/* ============================================================================
   Prygga Skills Academy — "Scholar Green & Saffron" theme
   Academic green #15573C · warm saffron #E8A317 · warm ink #15201A
   on warm ivory #FBFAF6. Fraunces headings · Inter body · Hind Siliguri Bengali.
   Signature motif: the saffron "knowledge ribbon" underline (--lane).
   Vanilla, CSP-safe. Brand colors are also injected from SiteSettings as
   --primary / --accent / --dark by _Layout (these here are fallbacks).
   ========================================================================== */

:root {
    --primary: #15573C;
    --primary-dark: #0F4230;
    --primary-soft: #E7F1EB;
    --accent: #E8A317;
    --accent-dark: #C8870A;
    --accent-soft: #FBEFD2;
    --dark: #15201A;
    --dark-2: #1E2C24;
    --page: #FBFAF6;
    --card: #FFFFFF;
    --ink: #1B201C;
    --muted: #7C857D;
    --line: #E7E5DC;
    --danger: #C0392B;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 4px 18px rgba(21, 32, 26, .07);
    --shadow: 0 14px 40px rgba(21, 32, 26, .12);
    --shadow-lg: 0 22px 60px rgba(21, 32, 26, .18);

    --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', 'Hind Siliguri', system-ui, sans-serif;
    --lane: repeating-linear-gradient(90deg, var(--accent) 0 22px, transparent 22px 34px);
}

/* Bengali text gets the Hind Siliguri face for proper conjuncts */
:lang(bn), .bn-text { font-family: 'Hind Siliguri', 'Noto Sans Bengali', var(--font-body); }
h1:lang(bn), h2:lang(bn), h3:lang(bn), h4:lang(bn), .head:lang(bn) { font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif; font-weight: 700; }

/* ── Base ──────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--page);
    margin: 0;
    line-height: 1.6;
    overflow-x: clip; /* never hidden — keeps sticky header working (#31) */
}

h1, h2, h3, h4, h5, .head { font-family: var(--font-head); font-weight: 700; color: var(--dark); line-height: 1.18; }

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

.text-brand { color: var(--primary) !important; }
.bg-soft { background: var(--primary-soft); }
.bg-asphalt { background: var(--dark); color: #fff; }
.fw-head { font-family: var(--font-head); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn { font-weight: 600; border-radius: 999px; padding: .62rem 1.4rem; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-brand { background: var(--primary); color: #fff; border: none; }
.btn-brand:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 8px 20px rgba(21,87,60,.32); }
.btn-amber { background: var(--accent); color: var(--dark); border: none; }
.btn-amber:hover { background: var(--accent-dark); color: var(--dark); box-shadow: 0 8px 20px rgba(232,163,23,.34); }
.btn-outline-brand { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline-brand:hover { background: var(--primary); color: #fff; }
.btn-ghost-light { border: 2px solid rgba(255,255,255,.6); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--dark); }

/* ── Lane-dash divider (signature motif) ───────────────────────────────── */
.lane-dash { height: 6px; width: 64px; background: var(--lane); border-radius: 3px; }
.lane-dash.center { margin-inline: auto; }
.section-head { margin-bottom: 2.2rem; }
.section-head .eyebrow { color: var(--primary); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.section-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); margin: .35rem 0 .6rem; }
.section-head .lane-dash { margin-top: .2rem; }
.heading-underline { position: relative; display: inline-block; padding-bottom: .5rem; }
.heading-underline::after { content: ""; position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: var(--lane); border-radius: 3px; }

/* ── Layout sections ───────────────────────────────────────────────────── */
.section { padding: 84px 0; }
.section.tight { padding: 56px 0; }
.section.alt { background: #fff; }
.section.asphalt { background: var(--dark); color: #E6ECF1; }
.section.asphalt h2, .section.asphalt h3 { color: #fff; }

/* ── Header / nav ──────────────────────────────────────────────────────── */
.topbar { background: var(--dark); color: #C7D0D8; font-size: .85rem; }
.topbar a { color: #C7D0D8; }
.topbar a:hover { color: var(--accent); }

.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); transition: box-shadow .25s, padding .25s; }
.site-header.shrink { box-shadow: var(--shadow-sm); }
.navbar-brand { min-width: 0; display: flex; align-items: center; gap: .55rem; font-family: var(--font-head); font-weight: 800; color: var(--dark); }
.navbar-brand .brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.navbar-brand .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar .nav-link { color: var(--ink); font-weight: 600; padding: .5rem .85rem; border-radius: 8px; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--primary); background: var(--primary-soft); }

.lang-toggle, .theme-toggle { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 .6rem; }
.lang-toggle:hover, .theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* ── Cards (NEVER height:100% on base class — use .h-100 inside grids) ──── */
.ds-card { background: var(--card); border: 1px solid #EEF1ED; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .28s cubic-bezier(.22,.8,.3,1), box-shadow .28s, border-color .28s; }
.ds-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.ds-card-body { padding: 1.4rem; }
.course-card { border-left: 4px solid var(--accent); }
.course-card .thumb, .ds-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--primary-soft); }
.course-card .thumb img, .ds-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ds-card:hover .thumb img, .ds-card:hover .ds-thumb img { transform: scale(1.06); }

.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); }
.chip.amber { background: var(--accent-soft); color: #8a6500; }
.price-tag { font-family: var(--font-head); font-weight: 800; color: var(--primary); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .85rem; }

/* ── Pricing / package cards ───────────────────────────────────────────── */
.pkg-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.pkg-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.pkg-card.popular { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.pkg-card.popular .pkg-flag { background: var(--primary); color: #fff; }
.pkg-flag { display: inline-block; background: var(--accent-soft); color: #8a6500; font-weight: 700; font-size: .72rem; border-radius: 999px; padding: .2rem .7rem; }
.pkg-card ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.pkg-card ul li { padding: .35rem 0 .35rem 1.7rem; position: relative; }
.pkg-card ul li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: var(--primary); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { position: relative; background: var(--dark); color: #fff; overflow: hidden; min-height: 88vh; display: flex; align-items: center; }
.hero .hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero .hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(22,32,42,.92) 0%, rgba(22,32,42,.6) 55%, rgba(22,32,42,.35) 100%); z-index: 1; }
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.6rem); }
.hero .lead { color: #D7DEE4; font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 38rem; }
.signal-chip { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; }
.signal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* ── How-it-works steps (lane connector) ───────────────────────────────── */
.step-item { position: relative; text-align: center; }
.step-num { width: 62px; height: 62px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; margin: 0 auto .9rem; border: 2px dashed var(--accent); }

/* ── Speedometer stat ──────────────────────────────────────────────────── */
.stat-item { text-align: center; }
.stat-item .dial { position: relative; width: 120px; height: 64px; margin: 0 auto .5rem; }
.stat-item .num { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; color: var(--primary); line-height: 1; }
.stat-item .num .suffix { color: var(--accent); }
.stat-item .label { color: var(--muted); font-weight: 600; margin-top: .3rem; }
.section.asphalt .stat-item .num { color: var(--accent); }
.section.asphalt .stat-item .label { color: #AEB9C2; }

/* ── Instructor / vehicle cards ────────────────────────────────────────── */
.instructor-card .photo { aspect-ratio: 1/1; overflow: hidden; }
.instructor-card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.instructor-card:hover .photo img { transform: scale(1.05); }
.rating-star { color: var(--accent); }

/* ── Plain content-card polish (branch / quiz / testimonial) ───────────── */
.icon-badge, .branch-card .branch-pin { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); display: inline-grid; place-items: center; font-size: 1.25rem; flex: 0 0 auto; }
.branch-card { border-left: 4px solid transparent; }
.branch-card:hover { border-left-color: var(--accent); }

.quiz-teaser { background: linear-gradient(155deg, var(--primary-soft) 0%, var(--card) 65%); }
.quiz-feature { text-align: center; padding: .8rem .25rem; border-radius: 10px; background: rgba(255,255,255,.75); border: 1px solid #EAF1EC; height: 100%; }
.quiz-feature i { font-size: 1.45rem; color: var(--primary); }
.quiz-feature span { display: block; font-size: .78rem; font-weight: 600; color: var(--dark); margin-top: .3rem; }
.sign-shapes { font-size: 1.5rem; color: var(--accent); opacity: .5; letter-spacing: .5rem; }

.testi-card { position: relative; }
.testi-card .testi-quote { position: absolute; top: .6rem; right: 1.1rem; font-size: 2.6rem; color: var(--accent); opacity: .22; line-height: 1; }
.testi-card .rating-star { font-size: .92rem; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { background: var(--dark); color: #AEB9C2; }
.site-footer .foot-accent { height: 4px; background: var(--primary); position: relative; }
.site-footer .foot-accent::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 120px; background: var(--accent); }
.site-footer h5 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #AEB9C2; }
.site-footer a:hover { color: var(--accent); }
.site-footer .foot-bottom { border-top: 1px solid rgba(255,255,255,.08); color: #8995A0; }

/* ── Floating actions ──────────────────────────────────────────────────── */
.float-actions { position: fixed; right: 18px; bottom: 18px; z-index: 1040; display: flex; flex-direction: column; gap: 10px; }
.float-actions a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); font-size: 1.3rem; }
.fa-wa { background: #25D366; }
.fa-call { background: var(--primary); }
.fa-top { position: fixed; left: 18px; bottom: 18px; z-index: 1040; width: 46px; height: 46px; border-radius: 50%; background: var(--dark); color: #fff; border: none; display: none; place-items: center; }
.fa-top.show { display: grid; }

/* ── Notice bar ────────────────────────────────────────────────────────── */
.notice-bar { font-size: .9rem; font-weight: 600; padding: .5rem 0; }
.notice-bar a { color: inherit; text-decoration: underline; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(21,87,60,.18); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ── Page hero (interior pages) ────────────────────────────────────────── */
.page-hero { background: var(--dark); color: #fff; padding: 64px 0 56px; position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.6rem); }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: #8995A0; margin: 0; }
.page-hero .breadcrumb a { color: #C7D0D8; }
.page-hero .breadcrumb .active { color: var(--accent); }

/* ── Compare bar / favorites ───────────────────────────────────────────── */
.compare-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--dark); color: #fff; z-index: 1050; transform: translateY(110%); transition: transform .3s; }
.compare-bar.show { transform: translateY(0); }

/* =========================================================================
   §12.1 MANDATORY MOBILE SAFETY-NET (do not remove)
   ========================================================================= */
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
table { max-width: 100%; }
.container, .container-fluid { overflow-wrap: break-word; }
h1, h2, h3, h4, p, a, span, li { overflow-wrap: break-word; }
.min-w-0 { min-width: 0; }
/* Bootstrap g-5 (3rem gutter → −24px side margins) overflows a .container on tablet/mobile (gotcha #31/#66) */
@media (max-width: 1199.98px) { .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; } }

@media (max-width: 1199.98px) {
    .navbar .nav-link { padding: .5rem .65rem; }
}
@media (max-width: 991.98px) {
    .section { padding: 60px 0; }
    .hero { min-height: 78vh; }
}
@media (max-width: 767.98px) {
    .section, .page-hero { padding: 44px 0; }
    .hero { min-height: 72vh; text-align: left; }
    .stat-item .num { font-size: 2rem; }
    .float-actions a { width: 46px; height: 46px; font-size: 1.15rem; }
}
@media (max-width: 480px) {
    .section { padding: 36px 0; }
    .btn { padding: .56rem 1.1rem; }
}

@media print {
    .site-header, .topbar, .site-footer, .float-actions, .fa-top, .notice-bar { display: none !important; }
    body { background: #fff; }
}
