/* =========================================================
   HOME PAGE — "Clean Indigo" redesign
   Loaded only by resources/views/home.blade.php.
   All classes are prefixed `hm-` so nothing collides with site.css.
   Desktop (>= 768px) = website, mobile (< 768px) = app-style screen.
   ========================================================= */
body.page-home {
    --hm-primary: #4F46E5;
    --hm-primary-dark: #4338CA;
    --hm-primary-soft: #EEF2FF;
    --hm-ink: #14132B;
    --hm-text: #46455E;
    --hm-muted: #5B5A73;
    --hm-bg: #F7F7FB;
    --hm-border: #ECECF3;
    --hm-chip: #EEEEF6;
    --hm-dark: #1E1B4B;
    --hm-gold-bg: #FEF3C7;
    --hm-gold-fg: #92400E;
    --hm-free-fg: #166534;
    --hm-radius-sm: 10px;
    --hm-radius: 16px;
    --hm-radius-lg: 20px;
    --hm-radius-xl: 28px;
    --hm-shadow: 0 8px 24px rgba(67, 56, 202, .08);
    --hm-shadow-lg: 0 24px 60px rgba(20, 19, 43, .10);
    --hm-font: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --hm-font-bn: 'Hind Siliguri', 'Plus Jakarta Sans', system-ui, sans-serif;

    font-family: var(--hm-font);
    background: var(--hm-bg);
    color: var(--hm-ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip; /* keeps sticky headers working (hidden would break them) */
}
html[lang="bn"] body.page-home { font-family: var(--hm-font-bn); }
html:has(body.page-home) { overflow-x: clip; }

.page-home a { text-decoration: none; }
.hm-bn { font-family: var(--hm-font-bn); }
.hm-muted { color: var(--hm-muted) !important; }
.fw-800 { font-weight: 800; }
.flex-none { flex: none; }
.hm-link { color: var(--hm-primary-dark); }
.hm-link:hover { color: #312E81; }

/* Same width as every other page (site.css .container: 1680px, 1.5rem gutters) */
.hm-container { width: 100%; max-width: 1680px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.hm-section { padding: 56px 0; }
.hm-section-title { font-size: 28px; font-weight: 800; margin: 0; color: var(--hm-ink); }

/* ---------- Buttons ---------- */
.hm-btn { background: var(--hm-primary); color: #fff; font-weight: 700; border-radius: 12px; padding: 12px 20px; border: 0; }
.hm-btn:hover, .hm-btn:focus, .hm-btn:active { background: var(--hm-primary-dark) !important; color: #fff !important; }
.hm-btn-outline { border: 1px solid #D9D8EA; color: var(--hm-ink); font-weight: 700; border-radius: 12px; padding: 12px 22px; background: #fff; }
.hm-btn-outline:hover, .hm-btn-outline:focus { border-color: var(--hm-primary); color: var(--hm-primary); background: #fff; }
.hm-btn-white { background: #fff; color: var(--hm-dark); font-weight: 800; border-radius: 12px; padding: 14px 22px; }
.hm-btn-white:hover, .hm-btn-white:focus { background: #E0E7FF; color: var(--hm-dark); }

/* ---------- Brand mark (mobile app header) ---------- */
.hm-brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--hm-primary); color: #fff !important; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--hm-font-bn); flex: none; }

/* ---------- Hero ---------- */
.hm-hero { padding: 64px 0 40px; }
.hm-hero-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #E4E3F1; border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 14px; color: #3B3A55; }
.hm-hero-pill .tag { background: var(--hm-gold-bg); color: var(--hm-gold-fg); font-weight: 700; font-size: 12px; border-radius: 999px; padding: 3px 10px; font-family: var(--hm-font); }
.hm-hero h1 { font-size: clamp(36px, 4.6vw, 56px); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--hm-ink); }
.hm-hero h1 .hl { color: var(--hm-primary); }
.hm-hero-lead { font-size: 19px; line-height: 1.6; color: var(--hm-text); max-width: 540px; }

.hm-search-box { position: relative; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #E4E3F1; border-radius: var(--hm-radius); padding: 8px 8px 8px 18px; box-shadow: var(--hm-shadow); max-width: 560px; }
.hm-search-box input { flex: 1; border: 0; outline: none; font-size: 16px; padding: 12px 4px; background: transparent; min-width: 0; color: var(--hm-ink); }
.hm-search-box > i { color: var(--hm-muted); font-size: 18px; }
.hm-search-box:focus-within { border-color: #C7C5F5; box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
.hm-search-box .bal-search-results { max-width: none; }

.hm-chip { display: inline-block; font-size: 13px; color: #3B3A55; background: var(--hm-chip); padding: 7px 12px; border-radius: 999px; }
.hm-chip:hover { background: #E3E2F2; color: var(--hm-ink); }
.hm-stat-num { font-size: 28px; font-weight: 800; line-height: 1.1; }
.hm-stat-label { font-size: 13px; color: var(--hm-muted); }

/* hero visual */
.hm-hero-visual { position: relative; height: 480px; max-width: 720px; margin-left: auto; }
.hm-hv-main { position: absolute; inset: 20px 30px 40px 40px; background: #fff; border-radius: var(--hm-radius-xl); border: 1px solid var(--hm-border); box-shadow: var(--hm-shadow-lg); padding: 20px; display: flex; flex-direction: column; gap: 16px; color: var(--hm-ink); }
.hm-hv-main:hover { color: var(--hm-ink); }
.hm-hv-cover { position: relative; flex: 1; min-height: 0; border-radius: 18px; background: #E9E7FF; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; overflow: hidden; }
.hm-hv-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-hv-cover > :not(img) { position: relative; }
.hm-hv-cover .title { font-family: var(--hm-font-bn); font-size: 30px; font-weight: 700; line-height: 1.2; color: #2E2A8C; }
.hm-mini-tag { font-size: 12px; background: #F1F1F6; color: #3B3A55; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.hm-float-card { position: absolute; background: #fff; border: 1px solid var(--hm-border); box-shadow: 0 16px 40px rgba(20, 19, 43, .12); color: var(--hm-ink); }
.hm-float-card:hover { color: var(--hm-ink); }
.hm-float-progress { left: 0; bottom: 0; width: 260px; border-radius: 18px; padding: 16px; }
.hm-float-cert { right: 0; top: 0; border-radius: var(--hm-radius); padding: 12px 14px; }
.hm-progress { height: 8px; background: var(--hm-chip); border-radius: 99px; }
.hm-progress .progress-bar { background: var(--hm-primary); border-radius: 99px; }
.hm-icon-tile { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.hm-play { border-radius: 999px; background: var(--hm-primary); color: #fff; }

/* badges */
.hm-badge-premium { background: var(--hm-ink); color: #FDE68A; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.hm-badge-free { background: #fff; color: var(--hm-free-fg); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }

/* ---------- Categories ---------- */
.hm-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hm-cat-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--hm-border); border-radius: var(--hm-radius); padding: 14px; color: var(--hm-ink); height: 100%; transition: border-color .15s, transform .15s; }
.hm-cat-card:hover { border-color: #C7C5F5; transform: translateY(-2px); color: var(--hm-ink); }
.hm-cat-ab { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; }
.hm-cat-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-cat-count { font-size: 12px; color: var(--hm-muted); }

/* ---------- Courses ---------- */
.hm-courses-wrap { background: #fff; border-top: 1px solid var(--hm-border); border-bottom: 1px solid var(--hm-border); }
.hm-seg { background: #F1F1F6; padding: 4px; border-radius: 14px; display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.hm-seg .nav-link { border: 0; border-radius: 10px; padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--hm-muted); background: transparent; }
.hm-seg .nav-link.active { background: #fff; color: var(--hm-ink); font-weight: 700; box-shadow: 0 1px 3px rgba(20, 19, 43, .1); }
.hm-course-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
/* One full row on wide screens (5 cards), two rows on narrower desktops */
.hm-course-grid > .hm-course-card:nth-child(n+6) { display: none; }
.hm-course-grid[hidden] { display: none !important; }
.hm-course-card { position: relative; background: #fff; border: 1px solid var(--hm-border); border-radius: var(--hm-radius-lg); overflow: hidden; display: flex; flex-direction: column; color: var(--hm-ink); transition: box-shadow .15s, transform .15s; }
.hm-course-card:hover { box-shadow: var(--hm-shadow-lg); transform: translateY(-3px); }
.hm-course-cover { position: relative; aspect-ratio: 16 / 9; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.hm-course-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-course-cover > :not(img) { position: relative; }
.hm-cover-title { font-family: var(--hm-font-bn); font-size: 22px; font-weight: 700; line-height: 1.2; }
.hm-save-form { position: relative; z-index: 2; margin: 0; }
.hm-btn-save { position: relative; z-index: 2; width: 36px; height: 36px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .92); display: inline-flex; align-items: center; justify-content: center; color: var(--hm-ink); box-shadow: 0 1px 3px rgba(20, 19, 43, .12); }
.hm-btn-save:hover { color: #E11D48; }
.hm-btn-save.saved { color: #E11D48; }
.hm-course-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hm-course-title { font-family: var(--hm-font-bn); font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0; }
.hm-course-title a { color: var(--hm-ink); }
.hm-course-meta { font-size: 13px; color: var(--hm-muted); }
.hm-course-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid #F1F1F6; }
.hm-price { font-weight: 800; font-size: 18px; }
.hm-price.free { color: var(--hm-free-fg); }
.hm-price-old { font-size: 13px; color: #6B6A82; text-decoration: line-through; margin-left: 6px; }
.hm-cert-tag { font-size: 12px; font-weight: 600; color: var(--hm-gold-fg); background: var(--hm-gold-bg); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.hm-enrolled-tag { font-size: 12px; font-weight: 600; color: var(--hm-free-fg); background: #DCFCE7; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }

/* ---------- AI World ---------- */
.hm-ai-world { background: var(--hm-dark); border-radius: var(--hm-radius-xl); padding: 48px; color: #fff; }
.hm-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #C7D2FE; background: rgba(255, 255, 255, .08); padding: 6px 12px; border-radius: 999px; display: inline-block; }
.hm-ai-world h2 { font-size: 40px; font-weight: 800; line-height: 1.1; color: #fff; }
.hm-ai-world p { font-size: 17px; line-height: 1.6; color: #DCDDF5; }
.hm-skill-chip { font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 12px; display: inline-block; }

/* ---------- Why / Steps ---------- */
.hm-feature-card { background: #fff; border: 1px solid var(--hm-border); border-radius: var(--hm-radius-lg); padding: 24px; height: 100%; }
.hm-feature-card h3 { font-size: 17px; font-weight: 700; margin: 12px 0 8px; }
.hm-feature-card p { font-family: var(--hm-font-bn); font-size: 15px; color: var(--hm-muted); line-height: 1.6; margin: 0; }
.hm-step-num { width: 32px; height: 32px; border-radius: 999px; background: var(--hm-primary); color: #fff; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ---------- Blog ---------- */
.hm-blog-card { background: #fff; border: 1px solid var(--hm-border); border-radius: var(--hm-radius-lg); padding: 22px; display: flex; flex-direction: column; gap: 10px; color: var(--hm-ink); height: 100%; transition: border-color .15s; }
.hm-blog-card:hover { border-color: #C7C5F5; color: var(--hm-ink); }
.hm-blog-card h3 { font-family: var(--hm-font-bn); font-size: 18px; line-height: 1.4; margin: 0; font-weight: 700; }
.hm-blog-card p { font-family: var(--hm-font-bn); font-size: 14px; color: var(--hm-muted); line-height: 1.6; margin: 0; }
.hm-pill-tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

/* ---------- FAQ ---------- */
.hm-faq-wrap { background: #fff; border-top: 1px solid var(--hm-border); }
.hm-accordion .accordion-item { border: 1px solid var(--hm-border); border-radius: var(--hm-radius) !important; overflow: hidden; margin-bottom: 10px; }
.hm-accordion .accordion-button { font-size: 15px; font-weight: 700; color: var(--hm-ink); padding: 18px 20px; background: #fff; box-shadow: none; border-radius: 0 !important; }
.hm-accordion .accordion-button:not(.collapsed) { background: #F7F7FF; color: var(--hm-ink); }
.hm-accordion .accordion-button:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, .2); }
.hm-accordion .accordion-body { padding: 0 20px 18px; background: #F7F7FF; color: var(--hm-text); font-size: 15px; line-height: 1.6; white-space: pre-line; }

/* =========================================================
   WIDE DESKTOP (>= 1400px): scale type & spacing up for the 1680px container
   ========================================================= */
@media (min-width: 1400px) {
    .hm-section { padding: 64px 0; }
    .hm-section-title { font-size: 32px; }
    .hm-hero { padding: 72px 0 48px; }
    .hm-hero h1 { font-size: clamp(48px, 3.9vw, 64px); }
    .hm-hero-lead { font-size: 20px; max-width: 620px; }
    .hm-search-box { max-width: 640px; }
    .hm-hero-visual { height: 540px; }
    .hm-hv-cover .title { font-size: 34px; }
    .hm-cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .hm-cat-card { padding: 16px; }
    .hm-cover-title { font-size: 22px; }
    .hm-course-title { font-size: 17px; }
    .hm-ai-world { padding: 56px 64px; }
    .hm-ai-world h2 { font-size: 46px; }
    .hm-ai-world p { font-size: 18px; max-width: 640px; }
    .hm-skill-chip { font-size: 15px; padding: 11px 16px; }
    .hm-feature-card { padding: 28px; }
    .hm-feature-card h3 { font-size: 18px; }
    .hm-blog-card { padding: 26px; }
    .hm-blog-card h3 { font-size: 19px; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .hm-course-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hm-course-grid > .hm-course-card:nth-child(n+5) { display: none; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .hm-course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hm-course-grid > .hm-course-card:nth-child(n+6) { display: flex; }
    .hm-course-grid > .hm-course-card:nth-child(n+7) { display: none; }
}

@media (max-width: 991.98px) {
    .hm-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =========================================================
   MOBILE APP MODE (< 768px)
   ========================================================= */
.hm-app-header, .hm-app-only { display: none; }

@media (max-width: 767.98px) {
    .hm-container { padding-left: 16px; padding-right: 16px; }
    body.page-home .nv { display: none; } /* the app header replaces the shared navbar on phones */
    .hm-app-only { display: block; }
    .hm-desktop-only { display: none !important; }

    /* App header */
    .hm-app-header { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 1030; background: var(--hm-bg); padding: 14px 16px 10px; padding-top: calc(14px + env(safe-area-inset-top)); }
    .hm-app-header .hm-brand-mark { width: 44px; height: 44px; border-radius: 14px; font-size: 16px; }
    /* Favicon from Settings: same 44x44 slot, image fills it */
    .hm-app-header .hm-brand-mark.has-icon { background: transparent; overflow: hidden; }
    .hm-app-header .hm-brand-mark.has-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
    .hm-app-hello { font-family: var(--hm-font-bn); font-size: 13px; color: var(--hm-muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hm-app-title { font-family: var(--hm-font-bn); font-size: 18px; font-weight: 700; line-height: 1.25; }
    .hm-app-icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--hm-border); background: #fff; display: inline-flex; align-items: center; justify-content: center; position: relative; color: var(--hm-ink); font-size: 19px; flex: none; }
    .hm-app-icon-btn:hover { color: var(--hm-primary); }
    .hm-app-icon-btn .dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 99px; background: #F97316; }
    .hm-app-lang { font-size: 13px; font-weight: 700; font-family: var(--hm-font-bn); }


    /* Hero becomes a compact app screen */
    .hm-hero { padding: 4px 0 8px; }
    .hm-hero .row { --bs-gutter-y: 1rem; }
    .hm-hero .col-lg-6.gap-4 { gap: 14px !important; }
    .hm-search-box { padding: 0 14px; height: 52px; box-shadow: none; border-color: var(--hm-border); border-radius: var(--hm-radius); }
    .hm-search-box .hm-btn { display: none; }
    .hm-search-box input { font-size: 15px; }
    .hm-continue-card { display: block; background: #fff; border: 1px solid var(--hm-border); border-radius: 20px; padding: 14px; color: var(--hm-ink); }
    .hm-continue-card:hover { color: var(--hm-ink); }
    .hm-stats-row { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 8px !important; background: #fff; border: 1px solid var(--hm-border); border-radius: var(--hm-radius); padding: 12px 8px !important; text-align: center; }
    .hm-stat-num { font-size: 18px; }
    .hm-stat-label { font-size: 11px; }

    .hm-section { padding: 22px 0; }
    .hm-section-title { font-size: 18px; }
    .hm-section-sub { display: none !important; }

    /* Horizontal app-style carousels */
    .hm-cat-grid, .hm-course-grid { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 8px; scroll-padding-left: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .hm-cat-grid::-webkit-scrollbar, .hm-course-grid::-webkit-scrollbar { display: none; }
    .hm-cat-grid > *, .hm-course-grid > * { scroll-snap-align: start; flex: none; }
    .hm-course-grid > .hm-course-card { width: 240px; }
    .hm-course-grid > .hm-course-card:nth-child(n) { display: flex; } /* swipe through all on phones */
    .hm-course-card:hover { transform: none; box-shadow: none; }
    .hm-cover-title { font-size: 18px; }
    .hm-cat-card { padding: 0 16px 0 6px; height: 48px; border-radius: 999px; gap: 8px; }
    .hm-cat-card:hover { transform: none; }
    .hm-cat-ab { width: 36px; height: 36px; border-radius: 999px; font-size: 15px; }
    .hm-cat-count { display: none; }
    .hm-courses-wrap { background: transparent; border: 0; }
    .hm-courses-head { flex-direction: column; align-items: stretch !important; margin-bottom: 14px !important; }
    .hm-seg { width: 100%; }
    .hm-seg .nav-item { flex: 1; }
    .hm-seg .nav-link { width: 100%; padding: 9px 8px; }
    .hm-view-all-wrap { display: none !important; }

    .hm-ai-world { padding: 22px; border-radius: 22px; }
    .hm-ai-world h2 { font-size: 24px; }
    .hm-ai-world p { font-size: 14px; }

    .hm-feature-card { padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
    .hm-feature-card h3 { margin: 0 0 4px; font-size: 15px; }
    .hm-feature-card p { font-size: 13px; }
    .hm-steps-card { display: none !important; }

    .hm-blog-card { padding: 18px; }
    .hm-blog-card h3 { font-size: 16px; }

    .hm-faq-wrap { background: transparent; border: 0; }
    .hm-accordion .accordion-button { font-size: 14px; padding: 16px; }
    .hm-accordion .accordion-body { padding: 0 16px 16px; font-size: 14px; }

}

@media (prefers-reduced-motion: reduce) {
    .hm-cat-card, .hm-course-card, .hm-blog-card { transition: none; }
}

/* =========================================================
   MOBILE FEATURED COURSE SLIDER (< 768px, replaces the AI World card)
   ========================================================= */
@media (max-width: 767.98px) {
    .bal-slider-wrap { --bal-primary: #4F46E5; --bal-ink: #14132B; font-family: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, sans-serif; margin: 6px 0 4px; }

    .bal-slider {
        display: flex; gap: 12px;
        overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
        padding: 4px 16px 14px;
        scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    }
    .bal-slider::-webkit-scrollbar { display: none; }

    .bal-slide {
        --c: var(--bal-primary);
        flex: none; width: calc(100% - 44px); max-width: 360px; height: 160px;
        scroll-snap-align: start; box-sizing: border-box;
        border-radius: 22px; padding: 14px 16px;
        display: flex; flex-direction: column; justify-content: space-between;
        position: relative; overflow: hidden;
        color: #fff; text-decoration: none;
        background: var(--c);
        box-shadow: 0 14px 30px -12px var(--c);
        transform: scale(.94); opacity: .75;
        transition: transform .35s ease, opacity .35s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .bal-slide.is-active { transform: scale(1); opacity: 1; }
    .bal-slide:hover, .bal-slide:focus { color: #fff; }
    .bal-slide:active { transform: scale(.97); }
    .bal-slide:focus-visible { outline: 3px solid #A5B4FC; outline-offset: 2px; }

    .bal-slide .ring-lg { position: absolute; right: -56px; top: -64px; width: 180px; height: 180px; border-radius: 999px; border: 22px solid rgba(255,255,255,.10); box-sizing: border-box; }
    .bal-slide .ring-sm { position: absolute; right: 30px; bottom: -66px; width: 120px; height: 120px; border-radius: 999px; border: 2px solid rgba(255,255,255,.18); box-sizing: border-box; }
    .bal-slide .dots-patch { position: absolute; right: 16px; bottom: 50px; width: 55px; height: 33px; background-image: radial-gradient(rgba(255,255,255,.35) 1.5px, transparent 1.5px); background-size: 11px 11px; }

    .bal-slide .s-row { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
    .bal-slide .s-stack { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }

    .bal-slide .badge { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; line-height: 1.2; }
    .bal-slide .badge.premium { background: #FDE68A; color: #78350F; }
    .bal-slide .badge.free { background: #fff; color: #166534; }
    .bal-slide .counter { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.18); color: #fff; padding: 4px 9px; border-radius: 999px; }

    .bal-slide .s-title { font-size: 18px; font-weight: 800; line-height: 1.15; max-width: 230px; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .bal-slide .s-meta { font-family: 'Hind Siliguri', 'Plus Jakarta Sans', sans-serif; font-size: 12px; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
    .bal-slide .s-price { font-weight: 800; font-size: 17px; color: #fff; }
    .bal-slide .s-old { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.75); text-decoration: line-through; margin-left: 4px; }
    .bal-slide .s-cta {
        display: inline-flex; align-items: center; gap: 6px;
        background: #fff; color: var(--bal-ink);
        font-family: 'Hind Siliguri', 'Plus Jakarta Sans', sans-serif; font-size: 12px; font-weight: 700;
        padding: 7px 12px; border-radius: 999px;
        box-shadow: 0 6px 14px rgba(0,0,0,.15);
    }

    .bal-dots { display: flex; justify-content: center; gap: 2px; margin-top: 2px; }
    .bal-dots button { border: 0; background: transparent; padding: 6px 2px; display: inline-flex; cursor: pointer; }
    .bal-dots span { display: block; width: 8px; height: 8px; border-radius: 99px; background: #CFCDE3; transition: width .2s, background .2s; }
    .bal-dots button.active span { width: 22px; background: var(--bal-primary); }
}
@media (prefers-reduced-motion: reduce) {
    .bal-slide, .bal-dots span { transition: none; }
}

/* =========================================================
   DESKTOP HERO CARD STACK (>= 992px) — courses chosen in
   Admin → Settings → Homepage Hero Slider
   ========================================================= */
.hero-stack { display: none; }
@media (min-width: 992px) {
    .hero-stack { display: block; position: relative; height: 560px; max-width: 720px; margin-left: auto; font-family: var(--hm-font, 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, sans-serif); color: #14132B; }
    .hs-blob { position: absolute; right: 0; top: 40px; width: 400px; height: 400px; border-radius: 999px; background: #E9E7FF; }

    .hs-card {
        position: absolute; left: 24px; top: 96px;
        width: min(470px, calc(100% - 150px)); box-sizing: border-box;
        background: #fff; border: 1px solid #ECECF3; border-radius: 26px; padding: 14px 14px 18px;
        color: #14132B; text-decoration: none; transform-origin: left bottom; cursor: pointer;
        transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .6s, box-shadow .6s;
    }
    .hs-card:hover { color: #14132B; }
    .hs-card:focus-visible { outline: 3px solid #A5B4FC; outline-offset: 3px; }
    .hs-card.pos-0 { transform: translate(0, 0) rotate(0deg) scale(1); z-index: 4; opacity: 1; box-shadow: 0 30px 60px rgba(20, 19, 43, .16); }
    .hs-card.pos-1 { transform: translate(70px, -34px) rotate(5deg) scale(.92); z-index: 3; opacity: .95; box-shadow: 0 16px 36px rgba(20, 19, 43, .10); }
    .hs-card.pos-2 { transform: translate(135px, -62px) rotate(10deg) scale(.84); z-index: 2; opacity: .85; box-shadow: 0 10px 24px rgba(20, 19, 43, .08); }
    .hs-card.pos-3 { transform: translate(160px, -76px) rotate(13deg) scale(.78); z-index: 1; opacity: 0; pointer-events: none; }
    .hs-card.pos-0:hover { transform: translate(0, -4px) rotate(0deg) scale(1); }

    .hs-cover { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 18px; background: var(--cover-bg, #E9E7FF); }
    .hs-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
    .hs-fallback { position: absolute; inset: 0; padding: 18px; display: flex; align-items: flex-end; font-family: 'Plus Jakarta Sans', 'Hind Siliguri', sans-serif; font-size: 30px; font-weight: 800; line-height: 1.12; color: var(--cover-fg, #2E2A8C); overflow: hidden; }
    .hs-fallback::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 999px; background: rgba(255, 255, 255, .4); }
    .hs-badge { position: absolute; left: 14px; top: 14px; z-index: 1; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; line-height: 1.2; }
    .hs-badge.premium { background: #14132B; color: #FDE68A; }
    .hs-badge.free { background: #fff; color: #166534; }
    .hs-badge.new-tag { left: auto; right: 14px; background: #fff; color: #4338CA; display: inline-flex; align-items: center; gap: 6px; }
    .hs-badge.new-tag::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: #4F46E5; }

    .hs-body { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 4px 0; }
    .hs-title { font-size: 18px; font-weight: 700; line-height: 1.3; margin: 0; color: #14132B; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .hs-meta { font-size: 13px; color: #5B5A73; margin-top: 4px; }
    .hs-price { text-align: right; flex: none; }
    .hs-price b { display: block; font-size: 20px; font-weight: 800; }
    .hs-price b.free { color: #166534; }
    .hs-price s { font-size: 13px; color: #6B6A82; }

    .hs-chip { position: absolute; right: 0; top: 18px; z-index: 10; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #ECECF3; border-radius: 16px; padding: 12px 14px; box-shadow: 0 16px 40px rgba(20, 19, 43, .12); }
    .hs-chip-ic { width: 36px; height: 36px; border-radius: 10px; background: #FEF3C7; color: #B45309; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; }
    .hs-chip b { display: block; font-size: 13px; }
    .hs-chip small { font-size: 12px; color: #5B5A73; }

    .hs-controls { position: absolute; left: 24px; bottom: 6px; z-index: 10; display: flex; align-items: center; gap: 14px; }
    .hs-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid #E4E3F1; background: #fff; color: #14132B; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
    .hs-btn:hover { border-color: #4F46E5; color: #4F46E5; }
    .hs-btn-primary { background: #4F46E5; border-color: #4F46E5; color: #fff; }
    .hs-btn-primary:hover { background: #4338CA; color: #fff; }
    .hs-btn:focus-visible { outline: 3px solid #A5B4FC; outline-offset: 2px; }
    .hs-dots { display: flex; gap: 2px; margin-left: 4px; }
    .hs-dots button { border: 0; background: transparent; padding: 8px 2px; cursor: pointer; display: inline-flex; }
    .hs-dots span { display: block; width: 8px; height: 8px; border-radius: 99px; background: #CFCDE3; transition: width .2s, background .2s; }
    .hs-dots button.active span { width: 22px; background: #4F46E5; }
    .hs-count { font-size: 13px; font-weight: 600; color: #5B5A73; }
}
@media (prefers-reduced-motion: reduce) {
    .hs-card, .hs-dots span { transition: none; }
}
