/* Dar Al Quran Wal Hikmah — site styles
   Palette: https://coolors.co/283618-606c38-fefae0-dda15e-bc6c25 */

:root {
  --forest: #283618;
  --olive: #606c38;
  --cream: #fefae0;
  --cream-deep: #faedcd;
  --tan: #dda15e;
  --earth: #bc6c25;
  --ink: #24291c;
  --ink-soft: #55523f;
  --white: #fffef7;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(40, 54, 24, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
}

h1, h2, h3, h4 { font-family: "Amiri", Georgia, serif; color: var(--forest); line-height: 1.25; }

.arabic { font-family: "Amiri", "Traditional Arabic", serif; direction: rtl; }

a { color: var(--earth); }

img { max-width: 100%; display: block; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 1.25rem; }

/* Anchor sections need breathing room under the sticky header */
section[id] { scroll-margin-top: 5.5rem; }

/* Header / nav */
.site-header {
  background: var(--forest);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.brand { display: flex; flex-direction: column; text-decoration: none; }
.brand .brand-en { font-family: "Amiri", Georgia, serif; font-size: 1.25rem; font-weight: 700; color: var(--cream); letter-spacing: 0.02em; }
.brand .brand-ar { font-size: 1.05rem; color: var(--tan); }

.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.98rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--white); border-bottom-color: var(--tan); }

/* Services dropdown */
.site-nav .has-dropdown { position: relative; }
.nav-dropdown-toggle {
  font: inherit;
  font-size: 0.98rem;
  color: var(--cream);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.25rem 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-dropdown-toggle:hover { color: var(--white); border-bottom-color: var(--tan); }
.nav-dropdown-toggle .caret {
  border: 5px solid transparent;
  border-top-color: currentColor;
  margin-top: 4px;
  transition: transform 0.15s ease;
}
.has-dropdown.open .nav-dropdown-toggle .caret { transform: rotate(180deg); margin-top: -4px; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.7rem);
  left: -0.9rem;
  min-width: 15rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(40, 54, 24, 0.28);
  padding: 0.5rem 0;
  overflow: hidden;
}
.has-dropdown.open .dropdown-menu { display: block; }
.site-nav .dropdown-menu a {
  display: block;
  color: var(--ink);
  padding: 0.55rem 1.1rem;
  border-bottom: 0;
  font-size: 0.95rem;
}
.site-nav .dropdown-menu a:hover { background: var(--cream-deep); color: var(--forest); border-bottom: 0; }

/* Mobile nav: checkbox-driven hamburger */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: 0.4rem; }
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  display: block;
  width: 26px; height: 3px;
  background: var(--cream);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle-label span::before { position: absolute; top: -8px; }
.nav-toggle-label span::after { position: absolute; top: 8px; }

@media (max-width: 800px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 0.4rem 0 0.9rem;
  }
  .site-nav a { padding: 0.55rem 0.2rem; font-size: 1.05rem; border-bottom: 1px solid rgba(254, 250, 224, 0.15); }
  .site-nav a:last-child { border-bottom: none; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-toggle:checked ~ .nav-toggle-label span { transform: rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span::before { transform: rotate(-90deg); top: 0; }
  .nav-toggle:checked ~ .nav-toggle-label span::after { display: none; }

  /* Dropdown becomes an inline expanding list on small screens */
  .site-nav .has-dropdown { width: 100%; border-bottom: 1px solid rgba(254, 250, 224, 0.15); }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 0.55rem 0.2rem; font-size: 1.05rem; }
  .dropdown-menu {
    position: static;
    min-width: 0;
    box-shadow: none;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.16);
    padding: 0.2rem 0 0.5rem;
  }
  .site-nav .dropdown-menu a { color: var(--cream); padding: 0.5rem 0.2rem 0.5rem 1.1rem; border-bottom: 0; }
  .site-nav .dropdown-menu a:hover { background: none; color: var(--white); }
}

/* Hero */
.hero {
  background: linear-gradient(rgba(40, 54, 24, 0.8), rgba(40, 54, 24, 0.8)),
    url("../assets/hero-bg.avif") center 30% / cover no-repeat;
  color: var(--cream);
  text-align: center;
  padding: 5.5rem 1.25rem 5rem;
}
.hero h1 { color: var(--white); font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 0.4rem; }
.hero .hero-ar { font-size: clamp(1.4rem, 3.5vw, 2rem); color: var(--tan); margin-bottom: 1.1rem; }
.hero p.tagline { max-width: 42rem; margin: 0 auto 2rem; font-size: 1.12rem; }
.hero .hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--tan); color: var(--forest); }
.btn-outline { border: 2px solid var(--tan); color: var(--cream); }
.btn-dark { background: var(--forest); color: var(--cream); }
.btn-outline-dark { border: 2px solid var(--forest); color: var(--forest); background: none; }
button.btn { font: inherit; font-weight: 600; cursor: pointer; border: 0; }
button.btn-outline-dark { border: 2px solid var(--forest); }

/* Sections */
section { padding: 3.2rem 0; }
section.alt { background: var(--cream-deep); }
.section-title { text-align: center; font-size: 1.9rem; margin-bottom: 0.4rem; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 44rem; margin: 0 auto 2.2rem; }

/* Card grids — explicit columns so rows stay balanced */
.card-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .card-grid, .card-grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--tan);
}
.card h3 { margin-bottom: 0.5rem; font-size: 1.25rem; }
.card .card-ar { color: var(--olive); font-size: 1.1rem; margin-bottom: 0.6rem; }
.card p, .card li { color: var(--ink-soft); font-size: 0.98rem; }
.card .btn { margin-top: 1.1rem; font-size: 0.95rem; }

/* Program cards with image */
.program-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.program-card img { height: 210px; object-fit: cover; width: 100%; }
.program-card .program-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.program-card .program-body .btn { margin-top: auto; align-self: flex-start; }

/* Schedule table */
.table-wrap { overflow-x: auto; }
table.schedule { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.schedule th, table.schedule td { padding: 0.75rem 1rem; text-align: left; }
table.schedule th { background: var(--forest); color: var(--cream); font-weight: 600; }
table.schedule tr:nth-child(even) td { background: var(--cream); }
table.schedule td.time { white-space: nowrap; font-weight: 700; color: var(--forest); }

/* Facts strip — 3×2 grid keeps rows even */
.facts { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; }
@media (max-width: 720px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fact { background: var(--white); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; }
.fact .fact-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--earth); font-weight: 700; }
.fact .fact-value { font-family: "Amiri", Georgia, serif; font-size: 1.2rem; color: var(--forest); }

.callout {
  background: var(--white);
  border-left: 5px solid var(--tan);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}
.callout h3 { margin-bottom: 0.3rem; }

blockquote.hadith {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
  font-family: "Amiri", Georgia, serif;
  font-size: 1.35rem;
  color: var(--forest);
}
blockquote.hadith footer { font-family: "Source Sans 3", sans-serif; font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.7rem; }

/* Two-column split */
.split { display: grid; gap: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }

/* Lists */
ul.checks { list-style: none; }
ul.checks li { padding-left: 1.7rem; position: relative; margin-bottom: 0.55rem; }
ul.checks li::before { content: "\2713"; position: absolute; left: 0; color: var(--earth); font-weight: 700; }

/* Steps */
ol.steps { list-style: none; counter-reset: step; display: grid; gap: 1rem; }
ol.steps li { counter-increment: step; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.3rem 1.1rem 3.6rem; position: relative; }
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%);
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--tan); color: var(--forest); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 2rem; }

/* Compact page header for interior pages (no hero image) */
.page-hero {
  background: linear-gradient(160deg, var(--forest) 0%, #35471f 100%);
  color: var(--cream);
  text-align: center;
  padding: 3.2rem 1.25rem 2.8rem;
}
.page-hero h1 { color: var(--white); font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 0.35rem; }
.page-hero .page-hero-ar { font-family: "Amiri", Georgia, serif; font-size: clamp(1.25rem, 3vw, 1.8rem); color: var(--tan); margin-bottom: 0.9rem; }
.page-hero p { max-width: 44rem; margin: 0 auto; }
.page-hero .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; color: var(--tan); margin-bottom: 0.6rem; }

/* Embedded slide deck — 16:9 stage plus the deck's own control bar */
.deck-embed {
  position: relative;
  width: 100%;
  padding-bottom: calc(56.25% + 56px);
  background: var(--forest);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(40, 54, 24, 0.18);
}
.deck-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.deck-embed:fullscreen { padding-bottom: 0; height: 100%; border-radius: 0; }

.deck-note { text-align: center; color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.9rem; }
.deck-note kbd {
  font-family: inherit;
  background: var(--cream-deep);
  border: 1px solid rgba(40, 54, 24, 0.18);
  border-radius: 4px;
  padding: 0 0.32rem;
}

/* Status pill on program cards — "Now enrolling", "Registering interest", etc. */
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  margin-bottom: 0.7rem;
}
.pill-open { background: var(--olive); color: var(--cream); }
.pill-interest { background: var(--cream-deep); color: var(--earth); border: 1px solid var(--tan); }

/* Payment warning dialog */
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(40, 54, 24, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 5px solid var(--tan);
  box-shadow: 0 18px 44px rgba(40, 54, 24, 0.4);
  padding: 1.8rem;
  max-width: 32rem;
  width: 100%;
}
.modal h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.modal p { color: var(--ink-soft); margin-bottom: 0.8rem; }
.modal .modal-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.modal .modal-actions .btn { font-size: 0.95rem; }

/* Footer */
.site-footer { background: var(--forest); color: var(--cream); padding: 3.2rem 0 2rem; margin-top: 3rem; }
.site-footer .container { display: grid; gap: 2.2rem 3rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .site-footer .container { grid-template-columns: 1fr; gap: 1.8rem; } }
.site-footer h4 { color: var(--tan); margin-bottom: 0.7rem; font-size: 1.1rem; }
.site-footer p { line-height: 1.9; }
.site-footer a { color: var(--cream); }
.site-footer .fine { grid-column: 1 / -1; text-align: center; font-size: 0.85rem; color: #cdc9a5; border-top: 1px solid rgba(221, 161, 94, 0.3); padding-top: 1.4rem; margin-top: 1rem; line-height: 1.6; }

/* Registration form */
.registration-form {
  max-width: 52rem;
  margin: 1.5rem auto 0;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
.form-field { display: grid; gap: 0.38rem; }
.form-field-wide { grid-column: 1 / -1; }
.form-field label { color: var(--forest); font-weight: 700; }
.form-field label span, .form-required span { color: #a4362c; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #b9b9a6;
  border-radius: 0.35rem;
  background: #fffef8;
  color: var(--ink);
  font: inherit;
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 3px solid rgba(221, 161, 94, 0.4); border-color: var(--tan); }
.form-required { margin: 1.25rem 0 0.9rem; color: var(--ink-soft); font-size: 0.9rem; }
.website-field { position: absolute; left: -9999px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } .form-field-wide { grid-column: auto; } }

/* Pricing highlight cards */
.pricing-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 2rem;
}
@media (max-width: 720px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
.pricing-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 4px solid var(--tan);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(40, 54, 24, 0.22);
}
.pricing-card.featured {
  border-top-width: 5px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
}
.pricing-card .price {
  font-family: "Amiri", Georgia, serif;
  font-size: 2.4rem;
  color: var(--forest);
  font-weight: 700;
  line-height: 1.2;
}
.pricing-card .price-period {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.pricing-card .price-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 0.4rem;
}
.pricing-card .price-detail {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}
