/* ===== Courses Page — Custom Styles ===== */

:root {
  --green-dark:  #1a3a2a;
  --green-mid:   #2a5a3e;
  --green-light: #3d7a57;
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --gold-pale:   #f7f0dc;
  --cream:       #f8f4ed;
  --text-main:   #1a2e22;
  --text-muted:  #5a7262;
  --white:       #ffffff;
}

/* ── En-tête de page (Hero) ── */
.page-header {
    position: relative;
    background-image: url('../images/silhouette-dome-mosques-on-twilight-with-crescent-moon-colorful-night-sky-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 120px 20px;
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: transparent;
    background-image: linear-gradient(180deg, #0ba39e 0%, #aa8730 100%);
    opacity: 0.5;
    transition: background 0.3s, border-radius 0.3s, opacity 0.3s;
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header .breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #d7e2e8;
    font-size: 14px;
    margin-bottom: 12px;
}

.page-header .separator {
    color: var(--gold-light);
    font-size: 16px;
    margin-top: -2px;
}

.page-header h1 {
    color: #fff;
    font-size: 85px;
    font-weight: 700;
    margin: 0;
}

.courses-section {
  padding: 80px 40px 100px;
  max-width: 1400px;
  margin: 0 auto;
  font-family: 'Tajawal', sans-serif;
  background-color: rgb(249, 244, 237);
}

/* ── En-tête ── */
.section-eyebrow {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 14px;
}
.section-eyebrow span { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--gold); }
.section-eyebrow::before, .section-eyebrow::after {
  content: ''; width: 48px; height: 1px; background: var(--gold); opacity: 0.5;
}
.section-title {
  text-align: center; font-size: clamp(26px, 4vw, 47px);
  font-weight: 800; color: rgb(19, 121, 118); line-height: 1.3; margin-bottom: 10px;
}
.section-subtitle {
  text-align: center; color: var(--text-muted); font-size: 15px;
  margin-bottom: 64px; max-width: 520px; margin-inline: auto; line-height: 1.8;
}

/* ── Grille des cartes ── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: start;
}

/* ── Carte ── */
.course-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.18);
  box-shadow: 0 4px 28px rgba(26,58,42,0.09);
  display: flex;
  flex-direction: column;
}

/* Photo en haut, ratio fixe 16/9, toujours complète */
.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}
.course-card:hover .card-image img { transform: scale(1.04); }

/* Corps de la carte */
.card-body {
  padding: 36px 36px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.level-tag {
      display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--gold-pale);
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 40px;
    margin-bottom: -28px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    width: fit-content;
}
.level-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); display: inline-block;
}

.card-title {
      font-size: 37px;
    font-weight: 800;
    color: #000000;
    margin-bottom: 0px;
}
.card-desc {
  font-size: 14.5px; color: var(--text-muted);
  line-height: 1.8; margin-bottom: 22px;
}

/* Tableau */
.curriculum-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; margin-bottom: 24px;
}
.curriculum-table thead tr { background: var(--green-dark); }
.curriculum-table thead th {
  color: var(--gold-light); padding: 10px 14px;
  font-size: 11.5px; font-weight: 700; text-align: center;
}
.curriculum-table thead th:first-child {
  border-left: 1px solid rgba(255,255,255,0.15);
  width: 30%;
}
.curriculum-table tbody tr { border-bottom: 2px solid #ffffff; }
.curriculum-table tbody tr:last-child { border-bottom: none; }
.curriculum-table tbody tr:nth-child(even) { background: var(--cream); }
.curriculum-table tbody tr:hover { background: var(--gold-pale); }
.curriculum-table td { padding: 10px 14px; color: var(--text-muted); line-height: 1.5; text-align: center; }
.curriculum-table td:first-child {
  border-left: 2px solid #ffffff;
}
.curriculum-table td.book-cell { color: var(--green-dark); font-weight: 600; }

/* Pied de carte */
.card-footer {
  padding: 0 36px 36px;
  display: flex; flex-direction: column; gap: 10px;
  margin-top: auto;
}
.btn-register {
  width: 100%; background: var(--green-dark); color: var(--gold-light);
  border: none; border-radius: 40px; padding: 13px 22px;
  font-family: 'Tajawal', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.22s, color 0.22s, transform 0.18s;
}
.btn-register:hover { background: var(--gold); color: var(--green-dark); transform: translateY(-2px); }
.btn-register.closed {
  background: #d4d0c8; color: #7a7870; cursor: not-allowed; pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .courses-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}
