/* Multi-page additions: sub-page headers, home sections, timetable, registration form */
.main-nav a.current { color: var(--green); font-weight: 700; }
.main-nav a.current::after { transform: scaleX(1); }

/* home hero: Bismillah centred on its own line at the very top, on laptop and phone */
.hero-bismillah { position: relative; display: block; text-align: center; font-size: 2.1rem; line-height: 1.6; margin: 0 0 28px; }
@media (max-width: 640px) { .hero-bismillah { font-size: 1.7rem; margin-bottom: 18px; } }

/* home hero: logo arch on the left, text on the right (on phones the arch stays on top) */
@media (min-width: 981px) {
  .hero-inner { grid-template-columns: 1fr 1.25fr; }
  .hero-visual { order: -1; }
}

.page-hero { position: relative; overflow: hidden; padding: 64px 0 52px; background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); border-bottom: 1px solid var(--line); }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); max-width: 18em; }
.page-hero .sub { max-width: 40em; }
.page-hero .next-bar { margin-top: 28px; }
.section-tight { padding-top: 56px; }

.section-head.split { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.section-head.split > div { max-width: 640px; }
.section-head.split .sub { margin-bottom: 0; }
.more-link { color: var(--green); font-weight: 600; text-decoration: none; white-space: nowrap; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.more-link:hover { color: var(--green-800); }
.more-link.light { color: var(--gold); border-color: rgba(201, 162, 74, .5); }
.center-link { text-align: center; margin: 36px 0 0; position: relative; }

a.pillar { text-decoration: none; color: inherit; display: block; }

/* start-here paths */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.path { position: relative; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.path:hover { transform: translateY(-3px); border-color: var(--gold); }
.path h3 { margin: 10px 0 0; }
.path p { margin: 0; color: var(--muted); }
.path-num { font-family: var(--caps); font-size: 2.6rem; font-weight: 700; color: var(--gold); line-height: 1; }
.path-img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold); }

/* course art when there is no poster */
.course-art { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(150deg, var(--sc) 0%, var(--green-900) 100%); }
.course-art::before {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1' opacity='.45'%3E%3Cpath d='M40 4 L50 30 L76 40 L50 50 L40 76 L30 50 L4 40 L30 30 Z'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
}
.course-art span { position: relative; font-size: 2.6rem; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }

/* ---------- timetable ---------- */
.tt {
  display: grid; grid-template-columns: 150px repeat(7, minmax(0, 1fr)); grid-template-rows: auto repeat(var(--rows), minmax(150px, auto));
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.tt > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tt > div:nth-child(8n) { border-right: 0; }
.tt-corner { background: var(--green-900); }
.tt-day {
  background: var(--green-900); color: #fff; text-align: center; padding: 14px 6px;
  font-family: var(--caps); font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
}
.tt-day small, .ttm-name small { display: block; font-family: var(--sans); font-size: .66rem; letter-spacing: .1em; color: var(--gold); margin-top: 2px; }
.tt-day.today { background: var(--green); }
.tt-slot { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 14px 16px; background: var(--cream); font-weight: 600; color: var(--green-900); font-size: .95rem; }
.tt-slot svg { width: 20px; height: 20px; color: var(--gold-600); }
.tt-cell { padding: 8px; background: #fff; }
.tt-cell.today { background: #f4f8f1; }
.tt-cell.empty { background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(227, 218, 196, .35) 10px 11px); }
.tt-class {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--sc) 10%, #fff); border-left: 4px solid var(--sc); transition: transform .15s, box-shadow .15s;
}
.tt-class:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15, 45, 26, .12); }
.tt-subj { font: 700 .66rem var(--caps); letter-spacing: .12em; text-transform: uppercase; color: var(--sc); }
.tt-title { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.15; color: var(--green-900); }
.tt-venue { display: flex; gap: 4px; align-items: flex-start; font-size: .82rem; color: var(--muted); line-height: 1.3; }
.tt-venue svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; color: var(--sc); }
.tt-note { font-size: .74rem; color: var(--navy); font-style: italic; line-height: 1.3; }
.tt-next { margin-top: auto; font-size: .74rem; font-weight: 600; color: var(--gold-600); }
.tt-mobile { display: none; }
.tt-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: .88rem; color: var(--muted); }
.tt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tt-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- registration dialog ---------- */
.reg-dialog {
  width: min(620px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px;
  background: var(--cream); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.reg-dialog::backdrop { background: rgba(15, 45, 26, .55); backdrop-filter: blur(3px); }
.reg-form { padding: 28px 30px 30px; display: grid; gap: 14px; }
.reg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.reg-head h2 { font-size: 2rem; margin: 0; }
.reg-head .eyebrow { margin-bottom: .2em; }
.reg-close { background: #fff; border: 1px solid var(--line); width: 38px; height: 38px; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); flex-shrink: 0; }
.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 600; font-size: .92rem; color: var(--green-900); padding: 0; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .7em .9em; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47, 125, 58, .15); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills label { position: relative; }
.pills input { position: absolute; opacity: 0; }
.pills span { display: inline-block; padding: .5em 1.1em; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 500; }
.pills input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.pills input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 125, 58, .25); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); flex-shrink: 0; }
.form-error { margin: 0; padding: .7em 1em; border-radius: 10px; background: #fbe9e6; color: #8a2a1c; font-size: .93rem; }
.reg-submit { width: 100%; margin-top: 4px; }
.reg-submit:disabled { opacity: .7; cursor: wait; }
.reg-done { text-align: center; padding: 20px 6px; }
.reg-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; }
.reg-tick svg { width: 32px; height: 32px; }
.reg-tick.pending { background: var(--gold); color: var(--green-900); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.reg-tick.fail { background: #b3261e; font-size: 2.4rem; line-height: 1; font-weight: 700; }
.reg-form[hidden] { display: none; }
.reg-fail { padding: 30px 26px; }
.reg-fail h2 { color: #8a2a1c; }
.fail-tips { text-align: left; margin: 14px auto 0; max-width: 440px; padding-left: 20px; color: var(--muted); font-size: .93rem; }
.fail-tips li { margin-bottom: 6px; }

.status.free { background: var(--green); color: #fff; }

/* PayNow step */
.pay { background: #fff; border: 1.5px solid var(--gold); border-radius: 14px; padding: 16px 18px; display: grid; gap: 12px; }
.pay-title { margin: 0; font-family: var(--caps); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600); font-weight: 700; }
.pay-grid { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pay-qr { width: 170px; height: 170px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 4px; }
.pay-qr svg { width: 100%; height: 100%; display: block; }
.pay-qr-wrap { display: grid; gap: 6px; max-width: 220px; }
.pay-qr-wrap p { margin: 0; font-size: .78rem; line-height: 1.4; }
.pay-info { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .93rem; }
.pay-info dt { color: var(--muted); }
.pay-info dd { margin: 0; }
.pay-amount { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--green-900); line-height: 1; }
.pay-ref { font-family: ui-monospace, Consolas, monospace; background: var(--cream); padding: 2px 8px; border-radius: 6px; letter-spacing: .04em; }
.upload { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload-btn { display: inline-flex; align-items: center; gap: 8px; padding: .6em 1.1em; border-radius: 999px; border: 1.5px dashed var(--green); color: var(--green-800); font-weight: 600; cursor: pointer; }
.upload-btn svg { width: 16px; height: 16px; }
.upload input:focus-visible + .upload-btn { box-shadow: 0 0 0 3px rgba(47, 125, 58, .25); }
.upload-name { font-size: .88rem; color: var(--muted); word-break: break-all; }
.pay-note { margin: 0; }
#payBlock .pay-note { background: #fff; border: 1.5px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 10px 14px; font-size: .92rem; }
#payBlock .pay-note.free { border-left-color: var(--green); }
#payBlock .pay-note.wait { border-left-color: var(--navy); }
/* honeypot: hidden from people, visible to naive bots */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 65px; }
.status-card { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.pay-reminder { background: #fff4d6; border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 8px; text-align: left; }
.wa-join { margin: 18px auto 0; padding: 16px 18px; background: #e8f8ee; border: 1.5px solid #25d366; border-radius: 14px; max-width: 440px; }
.wa-join p { margin: 0 0 12px; color: var(--green-900); font-weight: 600; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb457; }
.btn-wa svg { width: 20px; height: 20px; }
.reg-done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.reg-done-actions svg { width: 18px; height: 18px; }

/* footer nav */
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { color: #dbe5de; text-decoration: none; font-size: .95rem; }
.footer-nav a:hover { color: var(--gold); }

@media (max-width: 980px) {
  .tt { display: none; }
  .tt-mobile { display: grid; gap: 14px; }
  .ttm-day { display: grid; grid-template-columns: 96px 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
  .ttm-name { margin: 0; background: var(--green-900); color: #fff; font-family: var(--caps); font-weight: 600; letter-spacing: .06em; font-size: .9rem; padding: 16px 12px; text-transform: uppercase; }
  .ttm-day.today .ttm-name { background: var(--green); }
  .ttm-list { display: grid; gap: 10px; padding: 12px; }
  .ttm-time { display: block; font-size: .8rem; font-weight: 600; color: var(--gold-600); margin-bottom: 4px; }
  .ttm-item .tt-class { height: auto; } /* cards stack under their time label instead of filling the slot */
  .ttm-item + .ttm-item { margin-top: 6px; }
  .paths { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-hero { padding: 40px 0 36px; }
  .field-row { grid-template-columns: 1fr; }
  .reg-form { padding: 22px 18px 24px; }
  .ttm-day { grid-template-columns: 1fr; }
  .ttm-name { padding: 10px 14px; }
}

/* ---------- more pages: nav, contact, fawaid, recordings, FAQ, privacy, gallery ---------- */
.main-nav { gap: 20px; }
@media (max-width: 1150px) and (min-width: 981px) {
  .main-nav {
    position: fixed; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px 24px 16px;
    transform: translateY(-120%); transition: transform .25s ease; z-index: -1;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .header-actions { margin-left: auto; }
  .menu-btn { display: block; }
}

.wa-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff; text-decoration: none; font-weight: 600; padding: 12px 18px 12px 14px;
  border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); transition: transform .15s;
}
.wa-fab:hover { transform: translateY(-2px); }
.wa-fab svg { width: 24px; height: 24px; }
@media (max-width: 640px) { .wa-fab span { display: none; } .wa-fab { padding: 14px; } }
.footer-contact { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; }
.footer-contact svg { width: 18px; height: 18px; color: #25d366; }

.pay-safety { margin: 0; font-size: .85rem; line-height: 1.45; background: #fff4d6; border-radius: 10px; padding: 10px 12px; color: #6b4e00; }
.consent a { color: var(--green); font-weight: 600; }

.wrap.narrow { max-width: 820px; }

.fawaid-list { display: grid; gap: 28px; }
.fawaid { display: grid; grid-template-columns: 340px 1fr; gap: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.fawaid-cover { position: relative; border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; aspect-ratio: 1; }
.fawaid-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.fawaid-cover:hover img { transform: scale(1.03); }
.fawaid-count { position: absolute; right: 10px; bottom: 10px; background: rgba(15, 45, 26, .85); color: #fff; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.fawaid-body h3 { margin: 4px 0 4px; }
.fawaid-src { color: var(--gold-600); font-size: .9rem; font-weight: 600; margin-bottom: .8em; }
.fawaid-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.fawaid-thumbs button { border: 1px solid var(--line); padding: 0; border-radius: 8px; overflow: hidden; width: 70px; height: 70px; cursor: zoom-in; background: #fff; }
.fawaid-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .fawaid { grid-template-columns: 1fr; } }

.rec-list { display: grid; gap: 16px; }
.rec { display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--sc); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.rec-icon { width: 56px; height: 56px; border-radius: 14px; background: color-mix(in srgb, var(--sc) 12%, #fff); color: var(--sc); display: grid; place-items: center; }
.rec-icon svg { width: 28px; height: 28px; }
.rec h3 { margin: 2px 0; }
.rec p { margin: 0; }
.rec .btn svg { width: 18px; height: 18px; }
#recChannel { margin: 18px 0 0; }
#recChannel .btn svg { width: 20px; height: 20px; }
@media (max-width: 640px) { .rec { grid-template-columns: 48px 1fr; } .rec .btn { grid-column: 1 / -1; } .rec-icon { width: 48px; height: 48px; } }

.faq-list { display: grid; gap: 12px; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; color: var(--green-900); position: relative; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--gold-600); font-weight: 400; }
.faq[open] summary::after { content: "–"; }
.faq-a { padding: 0 0 18px; color: #34413a; }
.faq-a p { margin: 0 0 8px; }

.prose h2 { font-size: 1.6rem; margin: 1.4em 0 .4em; }
.prose p { color: #34413a; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery-item { margin: 0; }
.gallery-item button { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; width: 100%; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.testi-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.testi { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; font-family: var(--serif); font-size: 1.2rem; font-style: italic; }
.testi cite { display: block; margin-top: 10px; font-family: var(--sans); font-style: normal; font-size: .9rem; color: var(--gold-600); font-weight: 600; }

.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 20, 14, .92); }
.lightbox::backdrop { background: rgba(10, 20, 14, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 94vw; max-height: 86dvh; object-fit: contain; border-radius: 8px; }
.lb-close { position: fixed; top: 14px; right: 18px; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .15); border: 0; color: #fff; font-size: 2.4rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-count { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; margin: 0; font-size: .9rem; }

.class-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.btn-ghost-link { background: #fff; border-color: var(--line); color: #b3261e; }
.btn-ghost-link:hover { border-color: #b3261e; }
.btn-ghost-link svg { width: 18px; height: 18px; }
@media (max-width: 980px) { .class-actions { flex-direction: row; flex-wrap: wrap; } }

/* WhatsApp contact: small round logo only (label kept for screen readers) */
.wa-fab { width: 56px; height: 56px; padding: 0; justify-content: center; gap: 0; }
.wa-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wa-fab svg { width: 30px; height: 30px; }
@media (max-width: 640px) { .wa-fab { width: 52px; height: 52px; padding: 0; } }
