/* ==========================================================================
   IDRISSI ACADEMY — إدريسي أكاديمي (التدريب والكورسات المساحية)
   Dedicated light-blue identity, distinct from Jobs (green) and Services.
   Survey-inspired motifs: coordinate grid + contour lines + crosshair.
   ========================================================================== */

:root {
    --ac-50: #f0f9ff;
    --ac-100: #e0f2fe;
    --ac-200: #bae6fd;
    --ac-300: #7dd3fc;
    --ac-400: #38bdf8;
    --ac-500: #0ea5e9;
    --ac-600: #0284c7;
    --ac-700: #0369a1;
    --ac-800: #075985;
    --ac-900: #0c4a6e;
    --ac-accent: #f59e0b;
    --ac-success: #059669;
    --ac-danger: #dc2626;
    --ac-ink: #0f2a3d;
    --ac-muted: #5b7083;
    --ac-surface: #ffffff;
    --ac-page: #f7fbfe;
    --ac-border: #dbeefb;
    --ac-shadow: 0 10px 30px -12px rgba(2, 132, 199, 0.28);
    --ac-radius: 18px;
}

[data-theme='dark'] {
    --ac-50: rgba(56, 189, 248, 0.08);
    --ac-100: rgba(56, 189, 248, 0.14);
    --ac-200: rgba(56, 189, 248, 0.24);
    --ac-600: #38bdf8;
    --ac-700: #7dd3fc;
    --ac-900: #e0f2fe;
    --ac-ink: #e6f1f8;
    --ac-muted: #9fb3c4;
    --ac-surface: #15202b;
    --ac-page: #0f1820;
    --ac-border: rgba(125, 211, 252, 0.16);
    --ac-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

.academy-page { background: var(--ac-page); color: var(--ac-ink); padding-bottom: 3rem; }
.academy-page a { color: var(--ac-600); }
.academy-page .text-muted { color: var(--ac-muted) !important; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn-ac {
    background: linear-gradient(135deg, var(--ac-500), var(--ac-600));
    color: #fff !important;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    padding: .6rem 1.25rem;
    box-shadow: 0 6px 16px -6px rgba(2, 132, 199, .6);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-ac:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 22px -8px rgba(2, 132, 199, .7); }
.btn-ac-outline {
    background: var(--ac-surface);
    color: var(--ac-600) !important;
    border: 1.5px solid var(--ac-200);
    border-radius: 12px;
    font-weight: 700;
    padding: .55rem 1.1rem;
}
.btn-ac-outline:hover { background: var(--ac-50); border-color: var(--ac-400); }
.btn-ac-soft { background: var(--ac-100); color: var(--ac-700) !important; border: none; border-radius: 10px; font-weight: 700; }
.btn-ac-soft:hover { background: var(--ac-200); }

/* ── Hero: light-blue with survey grid & contour lines ───────────────── */
.ac-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 400px at 100% 0%, rgba(56, 189, 248, .35), transparent 60%),
        linear-gradient(160deg, #f0f9ff 0%, #e0f2fe 45%, #bae6fd 100%);
    color: #0c4a6e;
    padding: 56px 0 72px;
    border-bottom: 1px solid #bae6fd;
}
[data-theme='dark'] .ac-hero {
    background:
        radial-gradient(1200px 400px at 100% 0%, rgba(56, 189, 248, .22), transparent 60%),
        linear-gradient(160deg, #0b1d2a 0%, #0c2a3d 60%, #0b3550 100%);
    color: #e0f2fe;
    border-bottom-color: rgba(125, 211, 252, .15);
}
.ac-hero::before { /* coordinate grid */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(2, 132, 199, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(2, 132, 199, .08) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, #000 40%, transparent);
    pointer-events: none;
}
.ac-hero::after { /* contour lines */
    content: '';
    position: absolute;
    inset-inline-start: -80px;
    bottom: -120px;
    width: 520px;
    height: 520px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%230284c7' stroke-opacity='.18'%3E%3Cpath d='M100 20c44 0 80 30 80 76s-38 84-82 84S20 150 20 104 56 20 100 20z'/%3E%3Cpath d='M100 40c33 0 60 22 60 56s-28 64-62 64-58-24-58-58 27-62 60-62z'/%3E%3Cpath d='M100 60c22 0 40 15 40 37s-19 43-41 43-39-16-39-38 18-42 40-42z'/%3E%3Cpath d='M100 80c11 0 20 7 20 18s-9 21-20 21-19-8-19-19 8-20 19-20z'/%3E%3C/svg%3E") no-repeat center / contain;
    pointer-events: none;
}
.ac-hero > .container { position: relative; z-index: 1; }
.ac-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, .75);
    border: 1px solid #bae6fd;
    color: #0369a1;
    border-radius: 999px;
    padding: .35rem .9rem;
    font-weight: 700;
    font-size: .85rem;
    backdrop-filter: blur(6px);
}
[data-theme='dark'] .ac-hero-badge { background: rgba(14, 165, 233, .12); border-color: rgba(125, 211, 252, .25); color: #7dd3fc; }
.ac-hero-title { font-weight: 900; font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 1rem 0 .5rem; line-height: 1.25; }
.ac-hero-title .ac-mark { color: var(--ac-600); position: relative; white-space: nowrap; }
.ac-hero-title .ac-mark::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: .05em;
    height: .28em;
    background: rgba(56, 189, 248, .35);
    border-radius: 4px;
    z-index: -1;
}
.ac-hero-sub { color: #075985; font-size: 1.05rem; max-width: 640px; opacity: .9; }
[data-theme='dark'] .ac-hero-sub { color: #bae6fd; }
.ac-flow {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
    font-weight: 700;
    font-size: .9rem;
}
.ac-flow span { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: 10px; padding: .3rem .7rem; color: var(--ac-700); }
.ac-flow i { color: var(--ac-400); }

.ac-search {
    display: flex;
    gap: .5rem;
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-radius: 16px;
    padding: .45rem;
    box-shadow: var(--ac-shadow);
    margin-top: 1.5rem;
    max-width: 640px;
}
.ac-search input { border: none; background: transparent; flex: 1; padding: .5rem .75rem; color: var(--ac-ink); outline: none; min-width: 0; }

.ac-hero-stats { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.ac-hero-stat {
    background: rgba(255, 255, 255, .7);
    border: 1px solid #bae6fd;
    border-radius: 14px;
    padding: .6rem 1rem;
    min-width: 120px;
}
[data-theme='dark'] .ac-hero-stat { background: rgba(14, 165, 233, .08); border-color: rgba(125, 211, 252, .2); }
.ac-hero-stat strong { display: block; font-size: 1.35rem; color: var(--ac-600); }
.ac-hero-stat small { color: var(--ac-muted); font-weight: 600; }

.ac-hero-panel {
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-radius: 22px;
    padding: 1.4rem;
    box-shadow: var(--ac-shadow);
}
.ac-hero-panel h6 { font-weight: 800; color: var(--ac-ink); }

/* ── Sub-navigation ─────────────────────────────────────────────────── */
.ac-subnav {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .25rem;
    margin-top: -28px;
    position: relative;
    z-index: 2;
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-radius: 16px;
    box-shadow: var(--ac-shadow);
    scrollbar-width: none;
}
.ac-subnav::-webkit-scrollbar { display: none; }
.ac-subnav a {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--ac-muted) !important;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.ac-subnav a:hover { background: var(--ac-50); color: var(--ac-700) !important; }
.ac-subnav a.active { background: var(--ac-100); color: var(--ac-700) !important; }

/* ── Section headings ───────────────────────────────────────────────── */
.ac-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 2.25rem 0 1rem; flex-wrap: wrap; }
.ac-section-head h2 { font-weight: 900; font-size: 1.4rem; margin: 0; color: var(--ac-ink); }
.ac-section-head p { margin: .2rem 0 0; color: var(--ac-muted); }
.ac-kicker { color: var(--ac-600); font-weight: 800; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }

/* ── Tabs (homepage: featured / newest / offers) ────────────────────── */
.ac-tabs { display: inline-flex; gap: .25rem; background: var(--ac-100); padding: .3rem; border-radius: 14px; }
.ac-tabs button, .ac-tabs a {
    border: none;
    background: transparent;
    color: var(--ac-700);
    font-weight: 700;
    border-radius: 10px;
    padding: .45rem 1rem;
    font-size: .9rem;
    text-decoration: none;
}
.ac-tabs .active { background: var(--ac-surface); color: var(--ac-600); box-shadow: 0 2px 8px -2px rgba(2, 132, 199, .35); }

/* ── Course card ────────────────────────────────────────────────────── */
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.ac-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius);
    overflow: hidden;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ac-card:hover { transform: translateY(-4px); box-shadow: var(--ac-shadow); border-color: var(--ac-300); }
.ac-card-media-wrap { position: relative; }
.ac-card-media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--ac-100), var(--ac-200)); overflow: hidden; }
.ac-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ac-card:hover .ac-card-media img { transform: scale(1.04); }
.ac-card-media .ac-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ac-600); font-size: 2.4rem; opacity: .6; }
.ac-type {
    position: absolute;
    top: .7rem;
    inset-inline-start: .7rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(255, 255, 255, .92);
    color: var(--ac-700);
    border-radius: 999px;
    padding: .25rem .65rem;
    font-size: .75rem;
    font-weight: 800;
    backdrop-filter: blur(4px);
}
.ac-type.practical { color: #b45309; }
.ac-discount {
    position: absolute;
    top: .7rem;
    inset-inline-end: .7rem;
    background: var(--ac-accent);
    color: #fff;
    border-radius: 10px;
    padding: .2rem .55rem;
    font-weight: 900;
    font-size: .78rem;
}
.ac-featured-ribbon {
    position: absolute;
    bottom: .7rem;
    inset-inline-start: .7rem;
    background: var(--ac-600);
    color: #fff;
    border-radius: 8px;
    padding: .15rem .55rem;
    font-size: .72rem;
    font-weight: 800;
}
.ac-save {
    position: absolute;
    bottom: .6rem;
    inset-inline-end: .6rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .92);
    color: var(--ac-600);
    display: grid;
    place-items: center;
}
.ac-save.saved { color: #e11d48; }
.ac-card-body { padding: 1rem 1.05rem .9rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.ac-card-cat { font-size: .75rem; font-weight: 800; color: var(--ac-600); }
.ac-card-title { font-weight: 800; font-size: 1.02rem; line-height: 1.45; margin: 0; color: var(--ac-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-card-title a { color: inherit !important; text-decoration: none; }
.ac-card-learn { list-style: none; padding: 0; margin: 0; font-size: .82rem; color: var(--ac-muted); }
.ac-card-learn li { display: flex; gap: .35rem; align-items: baseline; }
.ac-card-learn li::before { content: '✓'; color: var(--ac-500); font-weight: 900; }
.ac-card-snippets {
    display: flex;
    flex-direction: column;
    gap: .22rem;
    font-size: .74rem;
    color: var(--ac-muted);
    background: var(--ac-50);
    border-radius: 8px;
    padding: .35rem .55rem;
    border: 1px solid var(--ac-border);
}
.ac-card-snippet-item {
    display: flex;
    align-items: center;
    gap: .35rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ac-card-snippet-item i {
    color: var(--ac-500);
    font-size: .72rem;
    flex-shrink: 0;
}
.ac-card-snippet-item span {
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-instructor { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--ac-muted); font-weight: 600; }
.ac-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--ac-100); color: var(--ac-600); display: inline-grid; place-items: center; font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.ac-meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; font-size: .78rem; color: var(--ac-muted); font-weight: 600; }
.ac-meta i { color: var(--ac-400); }
.ac-stars { color: var(--ac-accent); font-size: .8rem; letter-spacing: 1px; }
.ac-rating { display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; font-size: .85rem; color: var(--ac-ink); }
.ac-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .8rem 1.05rem;
    border-top: 1px dashed var(--ac-border);
    background: var(--ac-50);
}
.ac-price { font-weight: 900; font-size: 1.15rem; color: var(--ac-ink); line-height: 1.1; }
.ac-price small { font-size: .7rem; color: var(--ac-muted); font-weight: 700; }
.ac-price-old { text-decoration: line-through; color: var(--ac-muted); font-size: .8rem; font-weight: 600; }
.ac-free { color: var(--ac-success); }
.ac-card-foot .btn-ac { padding: .4rem .85rem; font-size: .85rem; border-radius: 10px; }
.ac-chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--ac-100); color: var(--ac-700); border-radius: 999px; padding: .2rem .65rem; font-size: .75rem; font-weight: 800; }
.ac-chip.amber { background: #fef3c7; color: #b45309; }
.ac-chip.green { background: #d1fae5; color: #047857; }
.ac-chip.violet { background: #ede9fe; color: #6d28d9; }
[data-theme='dark'] .ac-chip.amber { background: rgba(245, 158, 11, .15); color: #fbbf24; }
[data-theme='dark'] .ac-chip.green { background: rgba(16, 185, 129, .15); color: #34d399; }
[data-theme='dark'] .ac-chip.violet { background: rgba(139, 92, 246, .15); color: #c4b5fd; }

/* ── Generic panels & forms ─────────────────────────────────────────── */
.ac-panel { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius); padding: 1.25rem; }
.ac-panel + .ac-panel { margin-top: 1rem; }
.ac-panel-title { font-weight: 800; font-size: 1.05rem; margin-bottom: .9rem; display: flex; align-items: center; gap: .5rem; color: var(--ac-ink); }
.ac-panel-title i { color: var(--ac-500); }
.ac-filters .form-select, .ac-filters .form-control,
.academy-page .form-control, .academy-page .form-select { border-radius: 10px; border-color: var(--ac-border); background-color: var(--ac-surface); color: var(--ac-ink); }
.academy-page .form-control:focus, .academy-page .form-select:focus { border-color: var(--ac-400); box-shadow: 0 0 0 .2rem rgba(56, 189, 248, .2); }
.academy-page .form-label { font-weight: 700; font-size: .88rem; }
.ac-empty { text-align: center; padding: 3rem 1rem; color: var(--ac-muted); }
.ac-empty i { font-size: 2.6rem; color: var(--ac-300); margin-bottom: .75rem; display: block; }

/* ── Course detail ──────────────────────────────────────────────────── */
.ac-detail-hero { background: linear-gradient(160deg, #0c4a6e, #075985 55%, #0284c7); color: #fff; padding: 40px 0 48px; position: relative; overflow: hidden; }
.ac-detail-hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 32px 32px; pointer-events: none; }
.ac-detail-hero > .container { position: relative; }
.ac-detail-hero a { color: #bae6fd; }
/* Title stays white on the blue hero in both themes — beats the global
   h1 / [data-theme="dark"] h1 colours from theme-text-colors.css. */
.ac-detail-hero h1,
[data-theme='dark'] .ac-detail-hero h1,
[data-bs-theme='dark'] .ac-detail-hero h1 { color: #ffffff; font-weight: 900; font-size: clamp(1.5rem, 3.2vw, 2.3rem); }
[data-theme='dark'] .ac-detail-hero,
[data-bs-theme='dark'] .ac-detail-hero {
    background:
        radial-gradient(900px 320px at 100% 0%, rgba(56, 189, 248, .18), transparent 60%),
        linear-gradient(160deg, #0b1d2a 0%, #0c2a3d 60%, #0b3550 100%);
    border-bottom: 1px solid rgba(125, 211, 252, .15);
}
[data-theme='dark'] .ac-detail-hero a { color: #7dd3fc; }
[data-theme='dark'] .ac-detail-hero .lead { color: #cfe8f7; }
.ac-detail-hero .lead { color: #e0f2fe; font-size: 1.05rem; }
.ac-detail-hero .ac-chip { background: rgba(255, 255, 255, .14); color: #fff; }
.ac-sticky { position: sticky; top: 90px; }
.ac-buy-card { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: 20px; overflow: hidden; box-shadow: var(--ac-shadow); margin-top: -140px; }
@media (max-width: 991.98px) { .ac-buy-card { margin-top: 0; } }
.ac-buy-card .ac-video { aspect-ratio: 16 / 9; background: #000; }
.ac-buy-card .ac-video iframe, .ac-buy-card .ac-video img { width: 100%; height: 100%; border: 0; object-fit: cover; }
.ac-buy-price { font-size: 1.8rem; font-weight: 900; }
.ac-includes { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .9rem; }
.ac-includes i { color: var(--ac-500); width: 20px; text-align: center; }
.ac-learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem 1rem; list-style: none; padding: 0; margin: 0; }
.ac-learn-grid li { display: flex; gap: .5rem; align-items: baseline; }
.ac-learn-grid li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free'; font-weight: 900; color: var(--ac-500); }
.ac-curriculum .accordion-item { border: 1px solid var(--ac-border); border-radius: 12px !important; overflow: hidden; margin-bottom: .5rem; background: var(--ac-surface); }
.ac-curriculum .accordion-button { font-weight: 800; background: var(--ac-50); color: var(--ac-ink); }
.ac-curriculum .accordion-button:not(.collapsed) { background: var(--ac-100); color: var(--ac-700); box-shadow: none; }
.ac-lesson-row { display: flex; align-items: center; gap: .6rem; padding: .55rem .25rem; border-bottom: 1px dashed var(--ac-border); font-size: .92rem; }
.ac-lesson-row:last-child { border-bottom: none; }
.ac-lesson-row i { color: var(--ac-500); width: 18px; text-align: center; }

.ac-group-card { border: 1px solid var(--ac-border); border-radius: 14px; padding: .9rem 1rem; background: var(--ac-surface); }
.ac-seatbar { height: 8px; background: var(--ac-100); border-radius: 99px; overflow: hidden; }
.ac-seatbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--ac-400), var(--ac-600)); border-radius: 99px; }
.ac-group-option { display: block; cursor: pointer; }
.ac-group-option input { display: none; }
.ac-group-option input:checked + .ac-group-card { border-color: var(--ac-500); box-shadow: 0 0 0 3px rgba(56, 189, 248, .25); background: var(--ac-50); }

/* ── Payment / booking ──────────────────────────────────────────────── */
.ac-steps { display: flex; gap: .5rem; flex-wrap: wrap; counter-reset: step; margin-bottom: 1rem; }
.ac-step { display: flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px; background: var(--ac-surface); border: 1px solid var(--ac-border); font-weight: 700; font-size: .82rem; color: var(--ac-muted); }
.ac-step::before { counter-increment: step; content: counter(step); width: 22px; height: 22px; border-radius: 50%; background: var(--ac-100); color: var(--ac-700); display: grid; place-items: center; font-size: .75rem; }
.ac-step.done { color: var(--ac-success); border-color: #a7f3d0; }
.ac-step.done::before { content: '✓'; background: #d1fae5; color: #047857; }
.ac-step.current { color: var(--ac-700); border-color: var(--ac-400); }
.ac-step.current::before { background: var(--ac-500); color: #fff; }
.ac-paybox { border: 2px dashed var(--ac-300); border-radius: 16px; padding: 1rem 1.1rem; background: var(--ac-50); }
.ac-paybox dt { font-size: .78rem; color: var(--ac-muted); font-weight: 700; }
.ac-paybox dd { font-weight: 800; margin-bottom: .55rem; word-break: break-all; }
.ac-summary-row { display: flex; justify-content: space-between; padding: .35rem 0; font-size: .95rem; }
.ac-summary-row.total { border-top: 1px dashed var(--ac-border); margin-top: .35rem; padding-top: .65rem; font-weight: 900; font-size: 1.1rem; }
.ac-lock-note { display: flex; gap: .6rem; align-items: start; background: var(--ac-50); border: 1px solid var(--ac-border); border-radius: 12px; padding: .75rem .9rem; font-size: .85rem; color: var(--ac-muted); }
.ac-lock-note i { color: var(--ac-500); margin-top: .2rem; }

/* ── Progress ───────────────────────────────────────────────────────── */
.ac-progress { height: 8px; background: var(--ac-100); border-radius: 99px; overflow: hidden; }
.ac-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ac-400), var(--ac-600)); border-radius: 99px; transition: width .4s ease; }

/* ── Learning player ────────────────────────────────────────────────── */
.ac-player { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; }
@media (max-width: 991.98px) { .ac-player { grid-template-columns: 1fr; } }
.ac-stage { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: 18px; overflow: hidden; }
.ac-stage .ac-video { aspect-ratio: 16 / 9; background: #000; }
.ac-stage .ac-video iframe, .ac-stage .ac-video video { width: 100%; height: 100%; border: 0; }
.ac-outline { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: 18px; max-height: calc(100vh - 140px); overflow-y: auto; position: sticky; top: 90px; }
.ac-outline-head { padding: 1rem; border-bottom: 1px solid var(--ac-border); position: sticky; top: 0; background: var(--ac-surface); z-index: 1; }
.ac-outline-section { padding: .6rem 1rem; font-weight: 800; font-size: .85rem; background: var(--ac-50); color: var(--ac-700); }
.ac-outline a { display: flex; gap: .6rem; align-items: center; padding: .6rem 1rem; color: var(--ac-ink) !important; text-decoration: none; font-size: .9rem; border-inline-start: 3px solid transparent; }
.ac-outline a:hover { background: var(--ac-50); }
.ac-outline a.current { background: var(--ac-100); border-inline-start-color: var(--ac-500); font-weight: 800; }
.ac-outline a .done { color: var(--ac-success); }
.ac-outline a .todo { color: var(--ac-300); }

/* ── Instructor profile ─────────────────────────────────────────────── */
.ac-profile-cover { height: 220px; background: linear-gradient(135deg, #7dd3fc, #0284c7); background-size: cover; background-position: center; border-radius: 0 0 28px 28px; position: relative; }
.ac-profile-cover::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 30px 30px; border-radius: inherit; }
.ac-profile-head { margin-top: -64px; position: relative; z-index: 1; }
.ac-profile-logo { width: 128px; height: 128px; border-radius: 28px; border: 5px solid var(--ac-surface); background: var(--ac-100); object-fit: cover; display: grid; place-items: center; font-size: 2.5rem; color: var(--ac-600); box-shadow: var(--ac-shadow); }
.ac-stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; }
.ac-stat-tile { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: 14px; padding: .8rem 1rem; }
.ac-stat-tile strong { display: block; font-size: 1.4rem; font-weight: 900; color: var(--ac-600); }
.ac-stat-tile span { font-size: .8rem; color: var(--ac-muted); font-weight: 700; }

/* ── Studio / dashboards ────────────────────────────────────────────── */
.ac-dash-head { background: linear-gradient(135deg, var(--ac-50), var(--ac-100)); border-bottom: 1px solid var(--ac-border); padding: 28px 0 24px; }
.ac-dash-tabs { display: flex; gap: .35rem; overflow-x: auto; border-bottom: 1px solid var(--ac-border); margin-bottom: 1.25rem; scrollbar-width: none; }
.ac-dash-tabs a { flex-shrink: 0; padding: .7rem 1rem; font-weight: 700; color: var(--ac-muted) !important; text-decoration: none; border-bottom: 3px solid transparent; font-size: .92rem; }
.ac-dash-tabs a.active { color: var(--ac-600) !important; border-bottom-color: var(--ac-500); }
.ac-dash-tabs .badge { background: var(--ac-accent); }
.ac-table { width: 100%; }
.ac-table th { font-size: .78rem; color: var(--ac-muted); font-weight: 800; background: var(--ac-50); white-space: nowrap; }
.ac-table td { vertical-align: middle; font-size: .9rem; }
.academy-page .table { --bs-table-bg: transparent; color: var(--ac-ink); }
.ac-builder-section { border: 1px solid var(--ac-border); border-radius: 14px; background: var(--ac-surface); margin-bottom: .9rem; }
.ac-builder-section > header { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; background: var(--ac-50); border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--ac-border); }
.ac-builder-lessons { list-style: none; margin: 0; padding: .4rem; min-height: 44px; }
.ac-builder-lesson { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 10px; background: var(--ac-surface); border: 1px solid transparent; }
.ac-builder-lesson:hover { border-color: var(--ac-border); background: var(--ac-50); }
.ac-handle { cursor: grab; color: var(--ac-300); padding: 0 .25rem; }
.ac-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: .45; background: var(--ac-100) !important; }
.ac-status { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .2rem .65rem; font-size: .75rem; font-weight: 800; }
.ac-status.draft { background: #e2e8f0; color: #475569; }
.ac-status.pending { background: #fef3c7; color: #b45309; }
.ac-status.published { background: #d1fae5; color: #047857; }
.ac-status.rejected, .ac-status.suspended { background: #fee2e2; color: #b91c1c; }
.ac-type-pick { display: block; border: 2px solid var(--ac-border); border-radius: 20px; padding: 1.5rem; background: var(--ac-surface); height: 100%; text-decoration: none; color: var(--ac-ink) !important; transition: all .2s ease; }
.ac-type-pick:hover { border-color: var(--ac-400); transform: translateY(-3px); box-shadow: var(--ac-shadow); }
.ac-type-pick .ac-type-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--ac-100); color: var(--ac-600); display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 1rem; }
.ac-check-list { list-style: none; padding: 0; margin: .5rem 0 0; font-size: .85rem; }
.ac-check-list li { display: flex; gap: .45rem; align-items: center; padding: .15rem 0; }
.ac-check-list li.ok i { color: var(--ac-success); }
.ac-check-list li.fail i { color: var(--ac-danger); }
.ac-check-list li.wait i { color: var(--ac-300); }

/* ── Course request cards ───────────────────────────────────────────── */
.ac-req-card { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: 18px; padding: 1.1rem 1.2rem; height: 100%; display: flex; flex-direction: column; gap: .6rem; position: relative; }
.ac-req-card.corporate { border-color: #c4b5fd; box-shadow: inset 4px 0 0 #8b5cf6; }
[dir='rtl'] .ac-req-card.corporate { box-shadow: inset -4px 0 0 #8b5cf6; }
.ac-req-card h3 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.ac-req-card h3 a { color: var(--ac-ink) !important; text-decoration: none; }
.ac-offer-card { border: 1px solid var(--ac-border); border-radius: 16px; padding: 1rem; background: var(--ac-surface); }
.ac-offer-card.best { border-color: var(--ac-400); box-shadow: 0 0 0 3px rgba(56, 189, 248, .18); }

/* ── Certificate verification ───────────────────────────────────────── */
.ac-verify-ok { border: 2px solid #34d399; background: #ecfdf5; border-radius: 20px; padding: 1.5rem; }
.ac-verify-bad { border: 2px solid #fca5a5; background: #fef2f2; border-radius: 20px; padding: 1.5rem; }
[data-theme='dark'] .ac-verify-ok { background: rgba(16, 185, 129, .08); }
[data-theme='dark'] .ac-verify-bad { background: rgba(239, 68, 68, .08); }

/* ── Homepage section (outside academy pages) ───────────────────────── */
.home-academy {
    background: linear-gradient(180deg, #f0f9ff 0%, rgba(224, 242, 254, 0.45) 60%, rgba(240, 249, 255, 0.15) 100%);
    border: 1px solid rgba(186, 230, 253, 0.75);
    border-radius: 24px;
    padding: 1.25rem 1.25rem 1rem;
    box-shadow: 0 8px 24px -8px rgba(14, 165, 233, 0.12);
    position: relative;
    transition: box-shadow 0.25s ease;
}
.home-academy:hover {
    box-shadow: 0 10px 28px -6px rgba(14, 165, 233, 0.18);
}
[data-theme='dark'] .home-academy,
[data-bs-theme='dark'] .home-academy {
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.08) 0%, rgba(15, 23, 42, 0.45) 100%);
    border-color: rgba(56, 189, 248, 0.22);
    box-shadow: 0 8px 24px -8px rgba(2, 132, 199, 0.2);
}
.home-academy .section-inline-icon {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(2, 132, 199, 0.12));
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.28);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}
[data-theme='dark'] .home-academy .section-inline-icon,
[data-bs-theme='dark'] .home-academy .section-inline-icon {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.12));
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
}
.home-academy .section-inline-title {
    color: #0c4a6e;
    font-weight: 800;
}
.home-academy .section-inline-subtitle {
    color: #0369a1;
    opacity: 0.9;
}
[data-theme='dark'] .home-academy .section-inline-title,
[data-bs-theme='dark'] .home-academy .section-inline-title {
    color: #f0f9ff;
}
[data-theme='dark'] .home-academy .section-inline-subtitle,
[data-bs-theme='dark'] .home-academy .section-inline-subtitle {
    color: #7dd3fc;
    opacity: 0.9;
}
.home-academy .ac-tabs {
    background: rgba(224, 242, 254, 0.65);
    border: 1px solid rgba(186, 230, 253, 0.75);
    padding: 3px;
    border-radius: 999px;
    display: inline-flex;
    gap: 3px;
    margin-top: 0;
}
.home-academy .ac-tabs button {
    border: none;
    background: transparent;
    padding: 5px 14px;
    border-radius: 999px;
    font-weight: 600;
    color: #0369a1;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.home-academy .ac-tabs button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.6);
    color: #0284c7;
}
.home-academy .ac-tabs button.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}
[data-theme='dark'] .home-academy .ac-tabs,
[data-bs-theme='dark'] .home-academy .ac-tabs {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(56, 189, 248, 0.25);
}
[data-theme='dark'] .home-academy .ac-tabs button,
[data-bs-theme='dark'] .home-academy .ac-tabs button {
    color: #94a3b8;
}
[data-theme='dark'] .home-academy .ac-tabs button:hover:not(.active),
[data-bs-theme='dark'] .home-academy .ac-tabs button:hover:not(.active) {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
}
[data-theme='dark'] .home-academy .ac-tabs button.active,
[data-bs-theme='dark'] .home-academy .ac-tabs button.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.5);
}
.home-academy .ac-card-learn { display: none; }

.ac-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 290px);
    gap: 1.1rem;
    overflow-x: auto;
    padding: 0.4rem 0.25rem 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(14, 165, 233, 0.35) transparent;
    -webkit-overflow-scrolling: touch;
}
.ac-scroll::-webkit-scrollbar {
    height: 6px;
}
.ac-scroll::-webkit-scrollbar-track {
    background: rgba(14, 165, 233, 0.05);
    border-radius: 999px;
}
.ac-scroll::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.3);
    border-radius: 999px;
}
.ac-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.5);
}
.ac-scroll > * {
    scroll-snap-align: start;
}

/* Scroll navigation buttons for desktop */
.ac-scroll-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #0284c7;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ac-scroll-nav-btn:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
    transform: translateY(-50%) scale(1.06);
}
.ac-scroll-prev-btn { right: -14px; }
.ac-scroll-next-btn { left: -14px; }
[dir='rtl'] .ac-scroll-prev-btn { right: -14px; left: auto; }
[dir='rtl'] .ac-scroll-next-btn { left: -14px; right: auto; }
[data-theme='dark'] .ac-scroll-nav-btn,
[data-bs-theme='dark'] .ac-scroll-nav-btn {
    background: #1e293b;
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
[data-theme='dark'] .ac-scroll-nav-btn:hover,
[data-bs-theme='dark'] .ac-scroll-nav-btn:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

.ac-empty-box {
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px dashed rgba(14, 165, 233, 0.35);
    border-radius: 18px;
}
[data-theme='dark'] .ac-empty-box,
[data-bs-theme='dark'] .ac-empty-box {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(56, 189, 248, 0.3);
}

@media (max-width: 575.98px) {
    .ac-hero { padding: 36px 0 56px; }
    .ac-grid { grid-template-columns: 1fr; }
    .ac-panel { padding: 1rem; }
    .ac-scroll { grid-auto-columns: minmax(230px, 260px); gap: 0.75rem; }
}
