/* ==========================================================================
   NZ Online Quran Academy — theme
   Calm, light palette: soft teal-green + warm sand gold on a cream base.
   ========================================================================== */
:root {
  --primary: #2e8b7a;
  --primary-600: #267767;
  --primary-700: #1f6155;
  --primary-50: #eef8f5;
  --primary-100: #d8efe8;
  --gold: #c99b3f;
  --gold-50: #fcf6e9;
  --gold-100: #f6e7c4;
  --sky-50: #eef5fb;
  --rose-50: #fbf0ef;
  --cream: #fbf9f4;
  --ink: #23343c;
  --muted: #5d6e76;
  --line: #e5ebe8;
  --white: #fff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(35, 52, 60, .06), 0 2px 8px rgba(35, 52, 60, .05);
  --shadow: 0 6px 24px rgba(35, 52, 60, .08);
  --shadow-lg: 0 18px 50px rgba(35, 52, 60, .12);
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-ar: "Amiri", "Scheherazade New", serif;

  --bs-primary: var(--primary);
  --bs-primary-rgb: 46, 139, 122;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--cream);
  --bs-link-color: var(--primary-600);
  --bs-link-color-rgb: 38, 119, 103;
  --bs-link-hover-color: var(--primary-700);
  --bs-border-color: var(--line);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--ink); background: var(--cream); font-size: 1rem; line-height: 1.65; }
h1, h2, h3, h4, h5, h6, .font-head { font-family: var(--font-head); font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
h1 { font-weight: 700; }
a { text-decoration: none; }
.text-muted, .muted { color: var(--muted) !important; }
.arabic { font-family: var(--font-ar); direction: rtl; line-height: 1.9; }
.text-primary { color: var(--primary) !important; }
.text-gold { color: var(--gold) !important; }
.bg-primary-soft { background: var(--primary-50) !important; }
.bg-gold-soft { background: var(--gold-50) !important; }
.bg-white { background: #fff !important; }
.fw-semi { font-weight: 600; }
.small-caps { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; }
::selection { background: var(--primary-100); }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; padding: .65rem 1.4rem; font-weight: 600; font-family: var(--font-head); font-size: .95rem; transition: all .2s ease; }
.btn-sm { padding: .4rem .95rem; font-size: .85rem; }
.btn-lg { padding: .85rem 1.8rem; font-size: 1.02rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-600); border-color: var(--primary-600); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(46, 139, 122, .25); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #b88a31; border-color: #b88a31; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(201, 155, 63, .28); }
.btn-outline-primary { color: var(--primary-600); border-color: var(--primary); background: transparent; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-soft { background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-100); }
.btn-soft:hover { background: var(--primary-100); color: var(--primary-700); }
.btn-white { background: #fff; color: var(--primary-700); border: 1px solid #fff; }
.btn-white:hover { background: var(--gold-50); color: var(--primary-700); }
.btn-whatsapp { background: #25d366; color: #fff; border-color: #25d366; }
.btn-whatsapp:hover { background: #1fb558; color: #fff; }

/* ---------- Top bar + Navbar ---------- */
.topbar { background: var(--primary-700); color: #e6f3ef; font-size: .84rem; }
.topbar a { color: #e6f3ef; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .35; margin: 0 .6rem; }
.site-nav { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.site-nav .navbar-brand img { height: 46px; }
.site-nav .nav-link { color: var(--ink); font-weight: 500; font-size: .93rem; padding: .5rem .7rem !important; border-radius: 999px; white-space: nowrap; }
.site-nav .nav-actions .btn { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1399px) { .site-nav .nav-link { padding: .5rem .55rem !important; font-size: .9rem; } }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--primary-600); background: var(--primary-50); }
.dropdown-menu { border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: .5rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .8rem; font-size: .92rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--primary-50); color: var(--primary-700); }
.dropdown-item.active, .dropdown-item:active { background: var(--primary); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-100); color: var(--primary-700); font-weight: 700; font-family: var(--font-head); font-size: .85rem; flex-shrink: 0; }
.avatar-lg { width: 84px; height: 84px; font-size: 1.6rem; }
.avatar-xl { width: 128px; height: 128px; font-size: 2.4rem; }
.avatar.female { background: var(--rose-50); color: #a35a55; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin-bottom: .75rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; color: var(--primary-600); background: var(--primary-50); border: 1px solid var(--primary-100); padding: .3rem .85rem; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 1rem; }
.eyebrow.gold { color: #9a742a; background: var(--gold-50); border-color: var(--gold-100); }
.pattern-bg { background-color: var(--primary-50); background-image: url("../img/pattern.svg"); background-size: 140px; }
.divider-orn { display: flex; align-items: center; justify-content: center; gap: .8rem; color: var(--gold); margin: .6rem 0 1.2rem; }
.divider-orn::before, .divider-orn::after { content: ""; height: 1px; width: 48px; background: var(--gold-100); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 76px 0 96px; background: radial-gradient(1200px 500px at 85% -10%, var(--gold-50), transparent 60%), radial-gradient(900px 500px at -10% 110%, var(--primary-100), transparent 60%), var(--cream); }
.hero::after { content: ""; position: absolute; inset: 0; background-image: url("../img/pattern.svg"); background-size: 160px; opacity: .35; pointer-events: none; mask-image: linear-gradient(90deg, transparent 40%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000); }
.hero > .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.15; margin-bottom: 1.2rem; }
.hero h1 .hl { color: var(--primary); position: relative; white-space: nowrap; }
.hero h1 .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .08em; height: .32em; background: var(--gold-100); z-index: -1; border-radius: 6px; }
.hero .lead { color: var(--muted); font-size: 1.12rem; max-width: 560px; }
.hero .bismillah { font-family: var(--font-ar); font-size: 1.7rem; color: var(--gold); margin-bottom: .5rem; }
.hero-checks { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.6rem; color: var(--muted); font-size: .93rem; }
.hero-checks i { color: var(--primary); }

/* Live class mock */
.live-mock { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
.live-mock .bar { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.live-mock .dot { width: 10px; height: 10px; border-radius: 50%; background: #e8e2d6; }
.live-badge { display: inline-flex; align-items: center; gap: .35rem; background: #fdecea; color: #c2473d; padding: .15rem .6rem; border-radius: 999px; font-weight: 600; font-size: .75rem; }
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #e0574b; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 87, 75, .5); } 70% { box-shadow: 0 0 0 8px rgba(224, 87, 75, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 87, 75, 0); } }
.live-mock .stage { display: grid; grid-template-columns: 1.5fr 1fr; gap: .8rem; padding: .9rem; }
.live-mock .board { background: linear-gradient(180deg, #fffdf7, var(--gold-50)); border: 1px solid var(--gold-100); border-radius: 14px; padding: 1.1rem; text-align: center; }
.live-mock .board .ayah { font-family: var(--font-ar); font-size: 1.65rem; color: var(--ink); line-height: 2; }
.live-mock .board .ayah span { background: var(--primary-100); border-radius: 6px; padding: 0 .25rem; }
.live-mock .vid { border-radius: 14px; aspect-ratio: 4/3; display: flex; align-items: flex-end; padding: .6rem; font-size: .78rem; font-weight: 600; color: var(--ink); position: relative; overflow: hidden; }
.live-mock .vid .avatar { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%); width: 54px; height: 54px; font-size: 1.1rem; background: #fff; }
.live-mock .vid.t { background: var(--primary-100); }
.live-mock .vid.s { background: var(--sky-50); }
.live-mock .vid .tag { background: rgba(255, 255, 255, .85); border-radius: 999px; padding: .1rem .55rem; }
.live-mock .tools { display: flex; justify-content: center; gap: .55rem; padding: .2rem 0 1rem; }
.live-mock .tools span { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-50); color: var(--primary-700); display: inline-flex; align-items: center; justify-content: center; }
.live-mock .tools span.end { background: #fdecea; color: #c2473d; }
.float-card { position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: .7rem .95rem; display: flex; align-items: center; gap: .65rem; font-size: .85rem; z-index: 2; }
.float-card .ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }

/* ---------- Trust strip ---------- */
.trust { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-item { display: flex; align-items: center; gap: .85rem; padding: 1.4rem 0; }
.trust-item .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.trust-item strong { display: block; font-family: var(--font-head); font-size: 1.02rem; }
.trust-item span { color: var(--muted); font-size: .86rem; }

/* ---------- Cards ---------- */
.card-soft { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.row > [class*="col"] > .card-soft:only-child { height: 100%; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-100); }
.icon-box { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; background: var(--primary-50); color: var(--primary); }
.icon-box.gold { background: var(--gold-50); color: var(--gold); }
.icon-box.sky { background: var(--sky-50); color: #4b7fae; }
.icon-box.rose { background: var(--rose-50); color: #b5635c; }
.course-card { padding: 1.7rem; display: flex; flex-direction: column; }
.course-card h3 { font-size: 1.15rem; margin: 1.1rem 0 .3rem; }
.course-card .ar { font-family: var(--font-ar); color: var(--gold); font-size: 1.15rem; }
.course-card p { color: var(--muted); font-size: .94rem; flex-grow: 1; }
.course-card .meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--cream); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: .2rem .65rem; font-size: .78rem; font-weight: 500; }
.chip.primary { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-700); }
.chip.gold { background: var(--gold-50); border-color: var(--gold-100); color: #8a6727; }
.link-arrow { font-weight: 600; font-family: var(--font-head); font-size: .92rem; color: var(--primary-600); display: inline-flex; align-items: center; gap: .35rem; }
.link-arrow i { transition: transform .2s; }
.link-arrow:hover i { transform: translateX(4px); }
.stretched-card { position: relative; }

.feature { padding: 1.6rem; }
.feature h4 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }

/* Steps */
.step { text-align: center; padding: 2rem 1.5rem; position: relative; }
.step .num { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1.1rem; background: #fff; border: 2px dashed var(--primary); color: var(--primary); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; }
.step h4 { font-size: 1.1rem; }
.step p { color: var(--muted); font-size: .94rem; }
@media (min-width: 992px) {
  .steps-row .col-lg-4:not(:last-child) .step::after { content: ""; position: absolute; top: 64px; right: -18%; width: 36%; border-top: 2px dashed var(--gold-100); }
}

/* Classroom feature block */
.classroom-panel { background: linear-gradient(135deg, var(--primary-50), #fff 60%); border: 1px solid var(--primary-100); border-radius: 28px; padding: 3rem; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem 0; }
.check-list li i { color: var(--primary); font-size: 1.1rem; margin-top: .1rem; }

/* Teachers */
.teacher-card { padding: 1.8rem 1.4rem; text-align: center; }
.teacher-card .avatar { margin: 0 auto 1rem; }
.teacher-card h5 { margin-bottom: .15rem; font-size: 1.05rem; }
.teacher-card .role { color: var(--primary-600); font-size: .86rem; font-weight: 500; }
.sample-badge { display: inline-block; background: #f1f3f4; color: #6b7780; font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: .12rem .5rem; }

/* Pricing */
.price-card { padding: 2.1rem 1.8rem; position: relative; display: flex; flex-direction: column; }
.price-card.popular { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.price-card .badge-pop { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #fff; padding: .25rem .9rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.price-card .price { font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; color: var(--ink); line-height: 1; }
.price-card .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card .cur { font-size: 1.2rem; vertical-align: top; position: relative; top: .35rem; margin-right: 2px; color: var(--muted); }
.price-card ul { flex-grow: 1; }

/* Testimonials */
.testi { padding: 1.8rem; }
.testi .stars { color: var(--gold); letter-spacing: 2px; }
.testi blockquote { color: var(--ink); font-size: .98rem; margin: .8rem 0 1.2rem; }
.testi .quote-ic { font-size: 2.2rem; color: var(--primary-100); line-height: 1; }

/* FAQ */
.accordion { --bs-accordion-border-color: var(--line); --bs-accordion-active-bg: var(--primary-50); --bs-accordion-active-color: var(--primary-700); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(46, 139, 122, .15); --bs-accordion-border-radius: 14px; --bs-accordion-inner-border-radius: 14px; }
.accordion-item { border-radius: 14px !important; margin-bottom: .75rem; border: 1px solid var(--line) !important; overflow: hidden; background: #fff; }
.accordion-button { font-family: var(--font-head); font-weight: 500; font-size: 1rem; padding: 1.1rem 1.3rem; }
.accordion-body { color: var(--muted); }

/* Blog */
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.post-thumb { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: var(--primary); background: var(--primary-50); background-image: url("../img/pattern.svg"); background-size: 110px; position: relative; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.post-thumb.cat-tajweed { background-color: var(--gold-50); color: var(--gold); }
.post-thumb.cat-parents { background-color: var(--sky-50); color: #4b7fae; }
.post-thumb.cat-islamic { background-color: var(--rose-50); color: #b5635c; }
.post-card .body { padding: 1.4rem; flex-grow: 1; display: flex; flex-direction: column; }
.post-card h3 { font-size: 1.08rem; line-height: 1.4; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--primary-600); }
.prose { font-size: 1.05rem; line-height: 1.85; }
.prose h2 { font-size: 1.5rem; margin: 2rem 0 .8rem; }
.prose h3 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; }
.prose blockquote { border-left: 4px solid var(--gold); background: var(--gold-50); padding: 1rem 1.3rem; border-radius: 0 12px 12px 0; margin: 1.5rem 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose .arabic { font-size: 1.6rem; text-align: center; color: var(--ink); }
.prose table { width: 100%; margin: 1rem 0 1.5rem; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6rem .8rem; }
.prose th { background: var(--primary-50); font-family: var(--font-head); font-weight: 600; font-size: .92rem; }

/* Alphabet grid (library) */
.alpha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .7rem; direction: rtl; margin: 1.5rem 0; }
.alpha-grid div { background: #fff; border: 1px solid var(--line); border-radius: 14px; text-align: center; padding: .7rem .3rem .5rem; }
.alpha-grid .l { font-family: var(--font-ar); font-size: 2.2rem; line-height: 1.4; color: var(--ink); }
.alpha-grid .n { direction: ltr; font-size: .78rem; color: var(--muted); font-weight: 500; }

/* Page header */
.page-hero { padding: 64px 0 56px; background: radial-gradient(800px 300px at 90% 0, var(--gold-50), transparent 70%), var(--primary-50); border-bottom: 1px solid var(--primary-100); position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; background-image: url("../img/pattern.svg"); background-size: 150px; opacity: .45; mask-image: linear-gradient(90deg, transparent 50%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 50%, #000); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: .6rem; }
.page-hero p { color: var(--muted); max-width: 640px; font-size: 1.06rem; margin: 0; }
.breadcrumb { font-size: .85rem; margin-bottom: .8rem; }
.breadcrumb a { color: var(--primary-600); }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--primary), #3a9f8c); color: #fff; border-radius: 28px; padding: 3.2rem; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; background-image: url("../img/pattern-light.svg"); background-size: 150px; opacity: .14; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e3f4ef; }

/* Forms */
.form-control, .form-select { border-radius: 12px; border-color: #dbe3df; padding: .7rem .95rem; background-color: #fff; font-size: .96rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .22rem rgba(46, 139, 122, .14); }
.form-label { font-weight: 500; font-size: .9rem; margin-bottom: .35rem; }
.form-text { font-size: .8rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.invalid-feedback { display: block; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 2.2rem; box-shadow: var(--shadow); }
.hp-field { position: absolute !important; left: -5000px !important; height: 0; overflow: hidden; }
.day-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.day-pills label { cursor: pointer; }
.day-pills input { display: none; }
.day-pills span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; font-size: .87rem; background: #fff; transition: .15s; }
.day-pills input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }
.multi-check > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem .8rem; }
.multi-check label { font-size: .92rem; display: flex; align-items: center; gap: .45rem; }
.multi-check input { accent-color: var(--primary); }

/* Alerts */
.alert { border-radius: 14px; border: 1px solid transparent; }
.alert-success { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-700); }
.alert-info { background: var(--sky-50); border-color: #d6e6f4; color: #3c6a93; }
.alert-warning { background: var(--gold-50); border-color: var(--gold-100); color: #85622a; }
.alert-danger, .alert-error { background: var(--rose-50); border-color: #f2d6d3; color: #9c4740; }

/* Footer */
.site-footer { background: #1f3a3f; color: #c3d3d1; padding-top: 72px; font-size: .93rem; }
.site-footer h6 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; }
.site-footer a { color: #c3d3d1; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .28rem 0; }
.site-footer .social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: inline-flex; align-items: center; justify-content: center; margin-right: .35rem; }
.site-footer .social a:hover { background: var(--primary); }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 48px; padding: 1.3rem 0; font-size: .85rem; }
.footer-brand { font-family: var(--font-head); font-weight: 600; color: #fff; font-size: 1.15rem; }

/* WhatsApp float */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 1030; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; box-shadow: 0 8px 24px rgba(37, 211, 102, .35); transition: transform .2s; }
.wa-float:hover { color: #fff; transform: scale(1.07); }

/* ---------- Dashboard / Portal ---------- */
.portal { background: #f6f8f7; min-height: calc(100vh - 80px); }
.portal-side { background: #fff; border-right: 1px solid var(--line); min-height: calc(100vh - 80px); padding: 1.5rem 1rem; }
.portal-side .nav-link { color: var(--ink); border-radius: 10px; padding: .6rem .9rem; display: flex; gap: .7rem; align-items: center; font-weight: 500; font-size: .94rem; }
.portal-side .nav-link i { color: var(--muted); font-size: 1.05rem; }
.portal-side .nav-link:hover { background: var(--primary-50); }
.portal-side .nav-link.active { background: var(--primary-50); color: var(--primary-700); }
.portal-side .nav-link.active i { color: var(--primary); }
.stat-card { padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: 1rem; }
.stat-card .val { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-card .lbl { color: var(--muted); font-size: .84rem; }
.next-class { background: linear-gradient(120deg, var(--primary), #3a9f8c); color: #fff; border-radius: 20px; padding: 1.8rem; position: relative; overflow: hidden; }
.next-class::after { content: ""; position: absolute; inset: 0; background-image: url("../img/pattern-light.svg"); background-size: 130px; opacity: .12; }
.next-class > * { position: relative; z-index: 1; }
.next-class h3 { color: #fff; }
.next-class .countdown { font-family: var(--font-head); font-size: 1.05rem; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: .3rem .9rem; display: inline-block; }
.session-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.session-row:last-child { border-bottom: 0; }
.date-box { width: 58px; text-align: center; border-radius: 12px; background: var(--primary-50); padding: .35rem 0; flex-shrink: 0; }
.date-box .d { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; line-height: 1.1; color: var(--primary-700); }
.date-box .m { font-size: .72rem; text-transform: uppercase; color: var(--muted); font-weight: 600; letter-spacing: .05em; }
.status-pill { font-size: .74rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; white-space: nowrap; }
.status-scheduled { background: var(--sky-50); color: #3c6a93; }
.status-live { background: #fdecea; color: #c2473d; }
.status-completed { background: var(--primary-50); color: var(--primary-700); }
.status-cancelled { background: #f1f3f4; color: #6b7780; }
.status-missed { background: var(--gold-50); color: #8a6727; }
.status-pending { background: var(--gold-50); color: #8a6727; }
.status-active { background: var(--primary-50); color: var(--primary-700); }
.status-paused { background: #f1f3f4; color: #6b7780; }
.empty-state { text-align: center; padding: 2.6rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.4rem; color: var(--primary-100); display: block; margin-bottom: .6rem; }

/* ---------- Live classroom ---------- */
.room-body { background: #eef3f1; height: 100vh; overflow: hidden; }
.room-top { height: 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 1rem; gap: 1rem; }
.room-top img { height: 36px; }
.room-wrap { display: flex; height: calc(100vh - 60px); }
.room-video { flex: 1; padding: .8rem; min-width: 0; }
#jitsi { width: 100%; height: 100%; border-radius: 16px; overflow: hidden; background: #dfe8e5; box-shadow: var(--shadow-sm); }
#jitsi iframe { border-radius: 16px; }
.room-side { width: 340px; background: #fff; border-left: 1px solid var(--line); overflow-y: auto; padding: 1.2rem; }
.room-side h6 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.2rem 0 .6rem; }
.room-side textarea { font-size: .9rem; }
.room-timer { font-family: var(--font-head); font-weight: 600; font-variant-numeric: tabular-nums; }
.room-loading { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; gap: .6rem; padding: 2rem; }
@media (max-width: 991px) {
  .room-body { height: auto; overflow: auto; }
  .room-wrap { flex-direction: column; height: auto; }
  .room-video { height: 72vh; }
  .room-side { width: 100%; border-left: 0; border-top: 1px solid var(--line); }
}

/* Device test */
.dt-video { width: 100%; aspect-ratio: 4/3; background: #dfe8e5; border-radius: 16px; object-fit: cover; transform: scaleX(-1); }
.meter { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--gold)); transition: width .08s; }

/* ==========================================================================
   Live whiteboard (embedded in the classroom + standalone page)
   ========================================================================== */
.wb-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #f4f7f6;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.wb-app:fullscreen { border-radius: 0; height: 100vh; background: #eef3f1; }

/* Header */
.wb-head {
  display: flex; align-items: center; gap: .75rem;
  padding: .45rem .7rem;
  background: #fff; border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.wb-head-title { display: flex; align-items: center; gap: .5rem; min-width: 0; font-weight: 600; font-family: var(--font-head); font-size: .92rem; }
.wb-head-title > i { color: var(--primary); font-size: 1.05rem; }
.wb-head-title > span.text-truncate { max-width: 34vw; }
.wb-head-actions { margin-left: auto; display: flex; align-items: center; gap: .45rem; }
.wb-page-indicator { font-size: .78rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wb-conn { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600; color: var(--muted); background: #f1f4f3; border-radius: 999px; padding: .12rem .55rem; }
.wb-conn .wb-dot { width: 7px; height: 7px; border-radius: 50%; background: #b9c4c1; }
.wb-conn[data-state="live"] { color: #1d7a53; background: #e6f6ee; }
.wb-conn[data-state="live"] .wb-dot { background: #2f9e44; box-shadow: 0 0 0 3px rgba(47, 158, 68, .16); }
.wb-conn[data-state="connecting"] .wb-dot { background: var(--gold); animation: wbPulse 1.2s infinite; }
.wb-conn[data-state="offline"] { color: #8a6727; background: var(--gold-50); }
.wb-conn[data-state="offline"] .wb-dot { background: var(--gold); }
.wb-conn[data-state="http"] { color: #3c6a93; background: var(--sky-50); }
.wb-conn[data-state="http"] .wb-dot { background: #4a86b8; }
@keyframes wbPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.wb-readonly { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; color: #8a6727; background: var(--gold-50); border: 1px solid var(--gold-100); border-radius: 999px; padding: .12rem .55rem; }

/* Toolbar */
.wb-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .55rem;
  padding: .45rem .6rem;
  background: #fff; border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.wb-group { display: inline-flex; align-items: center; gap: .25rem; padding-right: .55rem; margin-right: .05rem; border-right: 1px solid var(--line); }
.wb-group:last-child { border-right: 0; padding-right: 0; }
.wb-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin-right: .1rem; }
.wb-tool, .wb-icon-btn, .wb-pill-btn, .wb-toggle {
  border: 1px solid transparent; background: #f5f8f7; color: var(--ink);
  border-radius: 9px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.wb-tool { width: 34px; height: 32px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.wb-icon-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; }
.wb-pill-btn { height: 30px; padding: 0 .6rem; font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; }
.wb-toggle { height: 30px; padding: 0 .55rem; font-size: .74rem; font-weight: 700; letter-spacing: .03em; }
.wb-tool:hover, .wb-icon-btn:hover, .wb-pill-btn:hover, .wb-toggle:hover { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-100); }
.wb-tool.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(46, 139, 122, .28); }
.wb-toggle.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.wb-tool:disabled, .wb-icon-btn:disabled, .wb-pill-btn:disabled, .wb-toggle:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.wb-tool:disabled:hover, .wb-icon-btn:disabled:hover, .wb-pill-btn:disabled:hover { background: #f5f8f7; color: var(--ink); border-color: transparent; }
.wb-app.wb-no-draw .wb-toolbar { opacity: .82; }

.wb-colour-group { flex-wrap: wrap; }
#wbColor { width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 8px; padding: 1px; background: #fff; cursor: pointer; }
.wb-tajweed { display: inline-flex; gap: 3px; margin-left: .2rem; }
.wb-tajweed button { width: 16px; height: 22px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .12); cursor: pointer; padding: 0; transition: transform .1s; }
.wb-tajweed button:hover { transform: translateY(-2px); }
#wbSize { width: 92px; accent-color: var(--primary); }
.wb-sizeval { font-size: .76rem; font-weight: 600; color: var(--muted); min-width: 1.3rem; text-align: center; font-variant-numeric: tabular-nums; }
.wb-select { width: auto; min-width: 7.6rem; font-size: .78rem; padding-top: .2rem; padding-bottom: .2rem; border-radius: 8px; }

/* Canvas */
.wb-canvas-area {
  position: relative; flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background-color: #e6ecea;
  background-image: radial-gradient(rgba(46, 139, 122, .10) 1px, transparent 1px);
  background-size: 18px 18px;
  touch-action: none;
}
.wb-board {
  position: relative; flex: none;
  width: 960px; height: 600px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 10px 34px rgba(35, 52, 60, .18);
  overflow: hidden;
  transform-origin: center center;
  will-change: transform;
}
.wb-layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wb-layer-bg { z-index: 1; }
.wb-layer-draw { z-index: 2; }
.wb-layer-preview { z-index: 3; touch-action: none; }
.wb-pdf-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 0; pointer-events: none; background: #fff; }
.wb-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; gap: .4rem; pointer-events: none; }
.wb-empty i { font-size: 2.2rem; color: var(--primary-100); }
.wb-app.wb-panning .wb-layer-preview { cursor: grabbing !important; }

/* Inline text editor */
.wb-text-input {
  position: absolute; z-index: 8;
  min-width: 120px; width: 260px; max-width: 70%;
  padding: 2px 6px;
  border: 1px dashed var(--primary);
  border-radius: 4px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 14px rgba(35, 52, 60, .12);
  resize: none; overflow: hidden; line-height: 1.35;
  outline: none;
}

/* Footer */
.wb-foot {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .4rem .6rem;
  background: #fff; border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.wb-pages-wrap { display: flex; align-items: center; gap: .25rem; min-width: 0; overflow: auto; }
.wb-pages { display: flex; align-items: center; gap: .3rem; overflow-x: auto; padding: .1rem; scrollbar-width: thin; }
.wb-page-chip {
  position: relative; min-width: 30px; height: 28px; padding: 0 .5rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: .78rem; font-weight: 600; color: var(--muted); cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.wb-page-chip:hover { border-color: var(--primary-100); background: var(--primary-50); color: var(--primary-700); }
.wb-page-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.wb-page-dot { position: absolute; top: 4px; right: 4px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.wb-foot-right { margin-left: auto; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.wb-zoom { display: inline-flex; align-items: center; gap: 1px; background: #f5f8f7; border-radius: 9px; padding: 1px; }
.wb-zoom .wb-icon-btn { background: transparent; }
.wb-zoom-reset { width: 46px; font-size: .72rem; font-weight: 600; color: var(--muted); }
.wb-allow { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; color: var(--muted); font-weight: 500; background: var(--gold-50); border: 1px solid var(--gold-100); border-radius: 9px; padding: .25rem .55rem; cursor: pointer; white-space: nowrap; }
.wb-allow input { accent-color: var(--primary); }

/* Toast */
.wb-toast {
  position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%);
  z-index: 20; max-width: min(520px, 92%);
  background: #23343c; color: #fff; font-size: .82rem; line-height: 1.45;
  padding: .55rem .9rem; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
  text-align: center;
}
.wb-app { position: relative; }

/* Classroom drawer */
.wb-drawer {
  position: fixed; top: 60px; right: 0; bottom: 0;
  width: min(860px, 62vw);
  z-index: 1045;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 44px rgba(35, 52, 60, .16);
  transform: translateX(102%);
  transition: transform .28s ease;
  display: flex; flex-direction: column;
  padding: .45rem;
}
.wb-drawer.open { transform: none; }
.wb-drawer .wb-app { border-radius: 10px; }
body.wb-open .room-wrap { margin-right: min(860px, 62vw); }
.room-wrap { transition: margin-right .28s ease; }
@media (max-width: 1199px) {
  .wb-drawer { width: min(760px, 72vw); }
  body.wb-open .room-wrap { margin-right: min(760px, 72vw); }
}
@media (max-width: 991px) {
  .wb-drawer { width: 100vw; top: 60px; }
  body.wb-open .room-wrap { margin-right: 0; }
  .wb-head-title > span.text-truncate { max-width: 44vw; }
  .wb-toolbar { gap: .3rem .4rem; }
  .wb-group { padding-right: .4rem; border-right: 0; }
  .wb-label { display: none; }
  #wbSize { width: 68px; }
  .wb-pill-btn { padding: 0 .45rem; }
  .wb-foot { gap: .35rem; }
  .wb-foot-right { margin-left: 0; width: 100%; justify-content: flex-start; }
}

/* Standalone whiteboard page */
.wb-standalone { height: calc(100vh - 190px); min-height: 480px; }
.wb-standalone .wb-app { box-shadow: var(--shadow-sm); }
body.wb-page nav.site-nav { position: static; }
@media (max-width: 767px) { .wb-standalone { height: calc(100vh - 150px); } }

/* Payment / generic status pills that were missing */
.status-approved { background: #e6f6ee; color: #1d7a53; }
.status-rejected { background: #fdecea; color: #c2473d; }
.status-refunded { background: #f1f3f4; color: #6b7780; }
.status-paid { background: #e6f6ee; color: #1d7a53; }
.status-partial { background: var(--gold-50); color: #8a6727; }
.status-overdue { background: #fdecea; color: #c2473d; }
.status-issued { background: var(--sky-50); color: #3c6a93; }
.status-draft { background: #f1f3f4; color: #6b7780; }
.status-trial { background: var(--gold-50); color: #8a6727; }
.status-inactive { background: #f1f3f4; color: #6b7780; }
.status-archived { background: #f1f3f4; color: #6b7780; }

/* Utilities */
.rounded-xl { border-radius: 22px !important; }
.shadow-soft { box-shadow: var(--shadow) !important; }
.lift { transition: transform .2s; }
.lift:hover { transform: translateY(-3px); }
.nav-pills .nav-link { border-radius: 999px; color: var(--muted); font-weight: 500; padding: .45rem 1rem; }
.nav-pills .nav-link.active { background: var(--primary); }
.pagination { --bs-pagination-color: var(--primary-600); --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); --bs-pagination-border-radius: 10px; }
.table > :not(caption) > * > * { padding: .8rem 1rem; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
@media (max-width: 767px) {
  .g-5, .gx-5 { --bs-gutter-x: 1.5rem; }
  .section { padding: 64px 0; }
  .classroom-panel, .cta-band { padding: 2rem 1.4rem; border-radius: 20px; }
  .form-card { padding: 1.4rem; }
  .float-card { display: none; }
}

