/* Page-specific styles for public/courses.php */
.courses-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.course-card {
  display: flex;
  flex-direction: column;
  height: auto;
  background: #fff;
  border: 1px solid #e0e7e4;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: 0.25s box-shadow, 0.25s transform;
}

.course-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

.courses-grid .card-media { background: #f5f8f6; }
.course-card img { width: 100%; height: 100%; object-fit: cover; }

.course-card h3 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}

.course-card p {
  margin: 0.4rem 0 0.6rem;
}

.course-card .muted {
  color: #4a6359;
}

.course-meta > div {
  margin: 0.18rem 0;
  font-size: 0.8rem;
}

.course-price {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  font-weight: 500;
}

.course-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.5rem;
  padding-top: 0.6rem;
}

.course-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.course-actions .btn {
  background: #e8f1ed;
  color: #0b5132;
  border: 1px solid #b7c4bc;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
}

.course-actions .btn:hover {
  filter: brightness(0.97);
}

.course-added {
  font-size: 0.65rem;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.badge {
  letter-spacing: 0.5px;
}

@media (max-width: 640px) { .course-card { max-width: 100%; } }

/* Interest modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 9999;
}

.modal-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  max-width: 520px;
  width: 92%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  color: #0b5132;
}

.modal-card h3,
.modal-card p,
.modal-card label,
.modal-card .small,
.modal-card .muted {
  color: #0b5132;
}

.modal[hidden],
.modal-backdrop[hidden] {
  display: none;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 24px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #0b5132;
}

.modal-card .form-label {
  display: block;
  margin: 0.25rem 0;
}

.modal-card .form-control,
.modal-card textarea.form-control {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #b7c4bc;
  border-radius: 8px;
  color: #0b5132;
  background: #fff;
}

.modal-card .form-control::placeholder,
.modal-card textarea.form-control::placeholder {
  color: #7a9288;
}

.modal-card .btn {
  background: #e8f1ed;
  color: #0b5132;
  border: 1px solid #b7c4bc;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
}

.modal-card .btn:hover {
  filter: brightness(0.98);
}

.modal-card .btn.primary {
  background: #0b5132;
  color: #fff;
  border-color: #0b5132;
}

.modal-card .btn.primary:hover {
  filter: brightness(1.05);
}
