@charset "UTF-8";
/* ============================================================
   Masaqy Academy — Theme layer
   Modern, clean, professional. Loaded last; overrides base.*.css
   Direction-agnostic: uses CSS logical properties (RTL + LTR).
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
    /* Brand — derived from --primary_color (DB-driven, see brand.php) */
    --brand:        var(--primary_color, #6e319d);
    --brand-hover:  color-mix(in srgb, var(--brand) 86%, #000);
    --brand-active: color-mix(in srgb, var(--brand) 74%, #000);
    --brand-50:     color-mix(in srgb, var(--brand)  6%, #fff);
    --brand-100:    color-mix(in srgb, var(--brand) 12%, #fff);
    --brand-200:    color-mix(in srgb, var(--brand) 24%, #fff);
    --brand-300:    color-mix(in srgb, var(--brand) 40%, #fff);
    --brand-600:    color-mix(in srgb, var(--brand) 92%, #000);
    --brand-800:    color-mix(in srgb, var(--brand) 62%, #000);
    --brand-950:    color-mix(in srgb, var(--brand) 26%, #0b0716);

    /* Neutrals — cool gray ramp */
    --ink:      #0e1524;
    --ink-2:    #1e293b;
    --ink-3:    #475569;
    --muted:    #64748b;
    --muted-2:  #94a3b8;
    --line:     #e7eaf1;
    --line-2:   #eef1f6;
    --surface:  #ffffff;
    --surface-2:#f8f9fc;
    --surface-3:#f2f4f9;

    /* Status */
    --success:  #0f9d58;
    --success-bg: #e8f7ef;
    --warning:  #b7791f;
    --warning-bg: #fdf6e3;
    --danger:   #dc2626;
    --danger-bg: #fdecec;
    --info:     #2563eb;
    --info-bg:  #eaf1fe;
    --star:     #f59e0b;

    /* Radius */
    --r-xs: 6px;
    --r-sm: 8px;
    --r:    12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --r-full: 999px;

    /* Shadows — soft, layered, never heavy */
    --sh-xs: 0 1px 2px rgba(14,21,36,.05);
    --sh-sm: 0 1px 3px rgba(14,21,36,.06), 0 1px 2px rgba(14,21,36,.04);
    --sh:    0 4px 12px rgba(14,21,36,.07), 0 1px 3px rgba(14,21,36,.05);
    --sh-lg: 0 12px 28px rgba(14,21,36,.10), 0 4px 10px rgba(14,21,36,.05);
    --sh-brand: 0 8px 24px color-mix(in srgb, var(--brand) 24%, transparent);

    /* Type */
    --font: "Cairo", "Poppins", "Segoe UI", Tahoma, Arial, sans-serif;

    /* Layout */
    --shell: 1240px;
    --nav-h: 72px;

    --ease: cubic-bezier(.4, 0, .2, 1);
}

:root[dir="ltr"] { --font: "Poppins", "Cairo", "Segoe UI", Tahoma, Arial, sans-serif; }

/* ---------- 2. Base ---------- */
body {
    font-family: var(--font);
    background-color: var(--surface);
    color: var(--ink-3);
    font-size: 1rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body, input, textarea, select, button,
.form-control, .form-select, .btn, .badge,
.dropdown-item, .nav-link, .sidebar-link,
h1, h2, h3, h4, h5, h6 { font-family: var(--font); }

::selection { background: var(--brand-200); color: var(--ink); }

a { color: var(--brand); text-decoration: none; transition: color .18s var(--ease); }
a:hover, a:focus { color: var(--brand-hover); }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

img { max-width: 100%; }
hr { border-color: var(--line); opacity: 1; }

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    margin-block-end: .5em;
}
h1, .h1 { font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.5rem); line-height: 1.22; letter-spacing: -.022em; }
h2, .h2 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2rem);   line-height: 1.26; letter-spacing: -.018em; }
h3, .h3 { font-size: clamp(1.25rem, 1.05rem + .7vw, 1.5rem); line-height: 1.35; }
h4, .h4 { font-size: 1.175rem; }
h5, .h5 { font-size: 1.05rem; }
h6, .h6 { font-size: .95rem; }

p { margin-block-end: 1rem; }
small, .small { font-size: .8125rem; }

.text-muted, .text-gray-600 { color: var(--muted) !important; }
.lead { font-size: 1.125rem; line-height: 1.8; color: var(--ink-3); font-weight: 400; }

/* ---------- 4. Layout shell ---------- */
#main.layout-navbar { padding: 0; background: var(--surface); }
#main #main-content, #main-content { padding: 0 0 0 0; }

.container, .container-fluid {
    max-width: var(--shell);
    padding-inline: 24px;
    margin-inline: auto;
    width: 100%;
}
@media (max-width: 767.98px) {
    .container, .container-fluid { padding-inline: 18px; }
}

/* Full-bleed section bands (replaces the old negative-margin hack) */
.primary-section, .light-section {
    margin: 0;
    padding-block: clamp(3rem, 1.6rem + 4.4vw, 5.5rem);
    padding-inline: 0;
    background: var(--surface);
}
.primary-section { background: var(--surface-2); }
.light-section   { background: var(--surface); }
.primary-section + .primary-section { padding-block-start: 0; }

/* ---------- 5. Header / navbar ---------- */
header.mb-3 { margin-block-end: 0 !important; }

.navbar.navbar-expand {
    background: rgba(255,255,255,.88) !important;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line) !important;
    min-height: var(--nav-h);
    padding-block: 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow .2s var(--ease);
}
.navbar.navbar-expand.is-stuck { box-shadow: var(--sh-sm); }

.navbar .container { display: flex; align-items: center; gap: .25rem; min-height: var(--nav-h); }

.navbar-brand { margin: 0; padding: 0; display: flex; align-items: center; }
.navbar-brand img { height: 42px; width: auto; display: block; }

/* burger only on small screens — the public site is not an admin panel */
.burger-btn.d-block { display: none !important; }
@media (max-width: 991.98px) {
    .burger-btn.d-block {
        display: inline-flex !important;
        align-items: center; justify-content: center;
        width: 40px; height: 40px;
        border-radius: var(--r-sm);
        color: var(--ink-2);
        margin-inline-end: .35rem;
        transition: background .18s var(--ease);
    }
    .burger-btn.d-block:hover { background: var(--surface-3); }
    .burger-btn .fs-3 { font-size: 1.35rem !important; }
}

.navbar .main-menu .nav-link,
.navbar .navbar-nav .nav-link {
    color: var(--ink-2);
    font-weight: 500;
    font-size: .95rem;
    padding: .55rem .85rem;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus { background: var(--surface-3); color: var(--brand); }
.navbar .nav-link .bi { font-size: 1.1rem; line-height: 1; }
.navbar .dropdown-toggle::after { margin-inline-start: .3rem; border-top-color: currentColor; opacity: .55; }

/* search */
.navbar .form-group { max-width: 460px; margin-inline: 1.25rem !important; }
.navbar .form-control.rounded-pill {
    background: var(--surface-3);
    border: 1px solid transparent;
    border-radius: var(--r-full);
    height: 44px;
    padding-inline-start: 2.9rem !important;
    padding-block: 0 !important;
    font-size: .92rem;
    color: var(--ink-2);
    box-shadow: none;
    transition: background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.navbar .form-control.rounded-pill::placeholder { color: var(--muted-2); }
.navbar .form-control.rounded-pill:focus {
    background: var(--surface);
    border-color: var(--brand-300);
    box-shadow: 0 0 0 4px var(--brand-50);
}
.navbar .form-control-icon { inset-inline-start: .5rem; color: var(--muted); }
.navbar .form-control-icon .btn { color: var(--muted); padding: .25rem .4rem; }

/* nav buttons */
.navbar-btn, .navbar .btn.navbar-btn {
    background: transparent;
    color: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: .9rem;
    padding: .5rem 1rem;
    transition: all .18s var(--ease);
}
.navbar-btn:hover { border-color: var(--brand-300); color: var(--brand); background: var(--brand-50); }

.navbar .user-icon > a { display: inline-flex; align-items: center; }
.navbar .avatar img { border-radius: 50%; object-fit: cover; }
.navbar .user-icon .avatar-md { width: 40px; height: 40px; }
.navbar .user-icon .avatar img { border: 2px solid var(--line); transition: border-color .18s var(--ease); }
.navbar .user-icon:hover .avatar img { border-color: var(--brand-300); }

/* ---------- 6. Dropdowns ---------- */
.dropdown-menu {
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--sh-lg);
    padding: .4rem;
    font-size: .92rem;
    color: var(--ink-3);
    animation: dd-in .16s var(--ease);
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.dropdown-item {
    border-radius: var(--r-sm);
    padding: .55rem .7rem;
    color: var(--ink-2);
    font-weight: 500;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-3); color: var(--brand); }
.dropdown-header {
    color: var(--ink); font-weight: 700; font-size: .85rem;
    padding: .6rem .7rem; border-bottom: 1px solid var(--line-2); margin-block-end: .3rem;
}
.dropdown-divider { border-color: var(--line-2); }

.categories-menu .submenu, .categories-menu { min-width: 250px; }
.submenu-item > a { display: block; }

/* ---------- 7. Hero ---------- */
.masaqy-intro {
    margin: 0;
    min-height: 0;
    background: var(--brand-950);
    position: relative;
    overflow: hidden;
    text-align: start;
    isolation: isolate;
}
/* soft brand mesh instead of the stock-photo + wave stack */
.masaqy-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 80% at 78% 8%,  color-mix(in srgb, var(--brand) 62%, transparent) 0%, transparent 62%),
        radial-gradient(52% 70% at 12% 92%, color-mix(in srgb, #3b82f6 40%, transparent) 0%, transparent 60%),
        linear-gradient(160deg, var(--brand-950) 0%, color-mix(in srgb, var(--brand) 42%, #0b0716) 100%);
    z-index: -2;
}
/* fine grid texture — quiet, professional */
.masaqy-intro::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(80% 70% at 50% 0%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(80% 70% at 50% 0%, #000 0%, transparent 78%);
    z-index: -1;
}
.masaqy-intro .intro-bg {
    background: none;
    padding-block: clamp(3.5rem, 2rem + 6vw, 7rem);
    padding-inline: 0;
    min-height: 0;
    width: 100%;
    color: #fff;
    font-size: 1rem;
}
.masaqy-intro .intro-bg > .container { position: relative; z-index: 1; }
.masaqy-intro h3 {
    font-size: clamp(1.9rem, 1.15rem + 3vw, 3.35rem);
    font-family: var(--font);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -.025em;
    color: #fff;
    text-shadow: none;
    padding-bottom: 0;
    margin-block-end: 1.1rem;
    max-width: 20ch;
}
.masaqy-intro p {
    font-size: clamp(1rem, .95rem + .35vw, 1.175rem);
    line-height: 1.85;
    color: rgba(255,255,255,.78);
    max-width: 62ch;
    margin-block-end: 0;
}
.masaqy-intro .col-lg-8.mx-auto { margin-inline: 0 !important; max-width: 780px; }

/* hero CTA + stats (markup added in index.php) */
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: 2.25rem; }
.hero-actions .btn { padding: .8rem 1.6rem; font-size: 1rem; border-radius: var(--r); }
.btn.btn-hero {
    background: #fff; color: var(--brand-800); border: 0; font-weight: 700;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.btn.btn-hero:hover { background: #fff; color: var(--brand-800); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.24); }
.btn.btn-hero-ghost {
    background: rgba(255,255,255,.10); color: #fff; font-weight: 600;
    border: 1px solid rgba(255,255,255,.28);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.btn.btn-hero-ghost:hover { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.45); }

.hero-stats {
    display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.25rem);
    margin-block-start: 3rem; padding-block-start: 2rem;
    border-top: 1px solid rgba(255,255,255,.14);
}
.hero-stat .hero-stat-num {
    font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
    font-weight: 700; color: #fff; line-height: 1.15; letter-spacing: -.02em;
}
.hero-stat .hero-stat-label { font-size: .875rem; color: rgba(255,255,255,.66); margin-block-start: .15rem; }

/* kill the legacy decoration */
.masaqy-intro .layers .pattern, .intro-waves, .footer .waves, .wave { display: none !important; }
section.interactive .layers { overflow: visible; }

/* ---------- 8. Section headings ---------- */
.section-title {
    position: relative;
    text-align: start;
    margin: 0 0 2.25rem 0;
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-title h1 {
    position: static;
    font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.95rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink);
    min-width: 0; max-width: none;
    text-align: start;
    margin: 0;
    white-space: normal;
    border: 0;
    padding: 0;
    border-radius: 0;
    line-height: 1.28;
}
.section-title h1::before, .section-title h1::after { display: none; }
.section-title h3, .section-title h4 {
    font-family: var(--font);
    color: var(--ink);
    margin: 0;
}
.section-title h3 { font-size: 1.35rem; }
.section-title h4 { font-size: 1.15rem; }
.section-title .section-sub {
    color: var(--muted); font-size: .975rem; margin-block-start: .35rem; max-width: 70ch;
}
.section-title .section-link {
    font-weight: 600; font-size: .925rem; color: var(--brand);
    display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
}
.section-title .section-link:hover { gap: .55rem; }
.section-title .section-link .bi { transition: transform .18s var(--ease); }

/* ---------- 9. Buttons ---------- */
.btn {
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: .9375rem;
    padding: .625rem 1.15rem;
    line-height: 1.5;
    border: 1px solid transparent;
    transition: background .18s var(--ease), color .18s var(--ease),
                border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .8rem 1.6rem; font-size: 1rem; border-radius: var(--r); }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; border-radius: var(--r-xs); }

.btn-primary, .btn.btn-primary {
    background: var(--brand); border-color: var(--brand); color: #fff;
    box-shadow: var(--sh-xs);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--brand-hover); border-color: var(--brand-hover); color: #fff;
    box-shadow: var(--sh-brand);
}
.btn-primary:active { background: var(--brand-active); border-color: var(--brand-active); }

.btn-outline-primary {
    background: transparent; color: var(--brand); border-color: var(--brand-200);
}
.btn-outline-primary:hover { background: var(--brand-50); color: var(--brand-hover); border-color: var(--brand-300); }

.btn-secondary, .btn-light, .btn-outline-secondary {
    background: var(--surface); color: var(--ink-2); border-color: var(--line);
}
.btn-secondary:hover, .btn-light:hover, .btn-outline-secondary:hover {
    background: var(--surface-3); color: var(--ink); border-color: var(--line);
}
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  border-color: var(--danger);  color: #fff; }

.btn-outline-white, .btn.btn-outline-white {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff; font-weight: 600; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.btn-outline-white:hover { background: rgba(255,255,255,.22); color: #fff; border-color: rgba(255,255,255,.55); }

/* ---------- 10. Cards — shared ---------- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: none;
    background: var(--surface);
}
.card-header { background: transparent; border-bottom: 1px solid var(--line-2); font-weight: 700; color: var(--ink); }

/* ---------- 11. Course cards ---------- */
.courses-group .row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }.course-card-wrap,
.courses-group .course-card-wrap { padding: 0; margin-bottom: 0; height: 100%; }.course-card,
.courses-group .course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: none;
    overflow: hidden;
    transform: none;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
    user-select: auto;
}.course-card:hover,
.courses-group .course-card:hover,
.courses-group .course-card:focus {
    background: var(--surface);
    transform: translateY(-4px);
    box-shadow: var(--sh-lg);
    border-color: var(--brand-200);
}.course-card > a,
.courses-group .course-card > a { display: block; color: inherit; }.course-card .course-cover,
.courses-group .course-card .course-cover { position: relative; overflow: hidden; background: var(--surface-3); aspect-ratio: 16 / 10; }.course-card .course-cover img,
.courses-group .course-card .course-cover img {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 0;
    transition: transform .45s var(--ease);
    display: block;
}.course-card:hover .course-cover img,
.courses-group .course-card:hover .course-cover img { transform: scale(1.05); }.course-card .p-3,
.courses-group .course-card .p-3 { padding: 1.1rem 1.1rem .5rem !important; }.course-card .course-title,
.courses-group .course-card .course-title {
    margin: 0 0 .6rem 0;
    height: auto;
    min-height: 2.9em;
    font-size: 1.0125rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -.01em;
    color: var(--ink);
    text-align: start;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .18s var(--ease);
}.course-card:hover .course-title,
.courses-group .course-card:hover .course-title { color: var(--brand); line-height: 1.45; }.course-card .course-rating,
.courses-group .course-card .course-rating { display: flex; align-items: center; gap: .4rem; margin-top: 0; margin-bottom: .5rem; }.course-card .course-rating .rating-stars,
.courses-group .course-card .course-rating .rating-stars { margin: 0; display: inline-flex; gap: 1px; }.course-card .course-rating .bi-star-fill,
.courses-group .course-card .course-rating .bi-star-fill,
.rating-stars .bi { color: var(--star); font-size: .82rem; }.course-card .course-rating span,
.courses-group .course-card .course-rating span { color: var(--ink-2); font-size: .875rem; font-weight: 700; }.course-card .course-rating small,
.courses-group .course-card .course-rating small { font-size: .78rem; color: var(--muted); margin: 0; padding: 0; font-weight: 400; }.course-card .course-meta,
.courses-group .course-card .course-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; margin: 0 0 .35rem 0; }.course-card .course-meta .meta-item,
.courses-group .course-card .course-meta .meta-item {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .82rem; color: var(--muted); font-family: var(--font);
}.course-card .course-meta .bi,
.courses-group .course-card .course-meta .bi { margin: 0; font-size: .9rem; color: var(--muted-2); }.course-card .course-card-bottom,
.courses-group .course-card .course-card-bottom {
    margin-top: auto;
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    color: var(--muted); font-family: var(--font); font-size: .85rem;
    padding: .8rem 1.1rem; border-top: 1px solid var(--line-2);
    background: var(--surface);
}.course-card .course-card-bottom .course-price,
.courses-group .course-card .course-card-bottom .course-price {
    float: none; display: inline-flex; align-items: baseline; gap: .35rem;
    color: var(--ink); font-size: 1.0625rem; font-weight: 700; font-family: var(--font); padding: 0;
}.course-card .course-card-bottom .course-price s,
.courses-group .course-card .course-card-bottom .course-price s { color: var(--muted-2); font-size: .875rem; font-weight: 400; margin: 0; padding: 0; }.course-card .course-card-bottom .course-price.is-free,
.courses-group .course-card .course-card-bottom .course-price.is-free { color: var(--success); }.course-card .avatar-stack,
.courses-group .course-card .avatar-stack { display: inline-flex; align-items: center; gap: .45rem; }.course-card .avatar-stack .avatar img,
.courses-group .course-card .avatar-stack .avatar img,
.course-card .avatar img,
.courses-group .course-card .avatar img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* ---------- 12. Category cards ---------- */
.category-block {
    background: var(--surface);
    text-align: start;
    margin-bottom: 0;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    overflow: hidden;
    user-select: auto;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.category-block:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--brand-200); }
.category-block .category-cover {
    width: 100%; height: 168px; border-radius: 0;
    position: relative; overflow: hidden; background: var(--surface-3);
}
.category-block .category-cover img { width: 100%; height: 100%; object-fit: cover; }
.category-block:hover .category-cover { opacity: 1; }
.category-block .category-cover .category-overlay {
    background: linear-gradient(to top, rgba(9,12,22,.86) 0%, rgba(9,12,22,.34) 46%, rgba(9,12,22,.06) 100%);
    padding: 1.1rem;
    border-radius: 0;
    display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
    position: absolute; inset: 0;
    transition: background .25s var(--ease);
}
.category-block:hover .category-cover .category-overlay,
.category-block .category-cover .category-overlay:hover,
.category-block .category-cover .category-overlay:focus {
    background: linear-gradient(to top,
        color-mix(in srgb, var(--brand) 82%, transparent) 0%,
        rgba(9,12,22,.42) 55%, rgba(9,12,22,.10) 100%);
}
.category-block .category-content { width: 100%; text-align: start; }
.category-block .category-name {
    font-size: 1.05rem; color: #fff; line-height: 1.4;
    font-family: var(--font); font-weight: 700; letter-spacing: -.01em;
}
.category-block .category-name a { color: #fff; }
.category-block .courses-count,
.category-block .courses-count.btn.btn-outline-white {
    display: inline-flex; align-items: center;
    color: #fff; font-family: var(--font); font-size: .78rem; font-weight: 600;
    line-height: 1.5;
    margin-top: .6rem; padding: .18rem .7rem !important;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.24);
    border-radius: var(--r-full);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    box-shadow: none;
}
.category-block:hover .courses-count.btn.btn-outline-white {
    background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.4); transform: none;
}

/* ---------- 13. Forms ---------- */
.form-label, label { color: var(--ink-2); font-weight: 600; font-size: .9rem; margin-block-end: .4rem; }
.form-control, .form-select, .choices__inner {
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: .65rem .9rem;
    font-size: .9375rem;
    color: var(--ink-2);
    background-color: var(--surface);
    box-shadow: none;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.form-control::placeholder { color: var(--muted-2); }
.form-control:focus, .form-select:focus, .choices__inner:focus-within {
    border-color: var(--brand-300);
    box-shadow: 0 0 0 4px var(--brand-50);
    background-color: var(--surface);
    color: var(--ink);
}
.form-control-lg { padding: .85rem 1.1rem; font-size: 1rem; border-radius: var(--r); }
.form-check-input { border-color: var(--muted-2); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 4px var(--brand-50); border-color: var(--brand-300); }
.form-check-label { font-weight: 500; color: var(--ink-3); }
.input-group-text { background: var(--surface-3); border-color: var(--line); color: var(--muted); border-radius: var(--r-sm); }

/* ---------- 14. Badges & chips ---------- */
.badge {
    font-weight: 600; font-size: .75rem; letter-spacing: 0;
    padding: .34em .7em; border-radius: var(--r-full); font-family: var(--font);
}
.badge.bg-light-primary, .bg-light-primary { background: var(--brand-50) !important; color: var(--brand-800) !important; }
.badge.bg-light-success, .bg-light-success { background: var(--success-bg) !important; color: var(--success) !important; }
.badge.bg-light-warning, .bg-light-warning { background: var(--warning-bg) !important; color: var(--warning) !important; }
.badge.bg-light-danger,  .bg-light-danger  { background: var(--danger-bg)  !important; color: var(--danger)  !important; }
.badge.bg-light-info,    .bg-light-info    { background: var(--info-bg)    !important; color: var(--info)    !important; }
.badge.bg-primary { background: var(--brand) !important; }

/* ---------- 15. Alerts ---------- */
.alert {
    border: 1px solid transparent; border-radius: var(--r);
    padding: .9rem 1.1rem; font-size: .9375rem; font-weight: 500;
}
.alert-light-primary { background: var(--brand-50); color: var(--brand-800); border-color: var(--brand-100); }
.alert-light-success { background: var(--success-bg); color: var(--success); border-color: color-mix(in srgb, var(--success) 22%, #fff); }
.alert-light-warning { background: var(--warning-bg); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 22%, #fff); }
.alert-light-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 22%, #fff); }

/* ---------- 16. Tables ---------- */
.table { color: var(--ink-3); font-size: .9375rem; border-color: var(--line); }
.table > thead th {
    background: var(--surface-2); color: var(--muted);
    font-weight: 600; font-size: .8rem; letter-spacing: .02em;
    text-transform: none; border-bottom: 1px solid var(--line); padding: .85rem 1rem;
}
.table > tbody td { padding: .9rem 1rem; border-color: var(--line-2); vertical-align: middle; }
.table > tbody tr:hover { background: var(--surface-2); }

/* ---------- 17. Pagination ---------- */
.pagination { gap: .3rem; }
.pagination .page-link {
    border: 1px solid var(--line); border-radius: var(--r-sm) !important;
    color: var(--ink-2); font-weight: 600; font-size: .9rem;
    padding: .5rem .85rem; min-width: 40px; text-align: center;
    transition: all .18s var(--ease);
}
.pagination .page-link:hover { background: var(--surface-3); color: var(--brand); border-color: var(--line); }
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .page-item.disabled .page-link { color: var(--muted-2); background: var(--surface-2); }

/* ---------- 18. Tabs ---------- */
.nav-tabs { border-bottom: 1px solid var(--line); gap: .25rem; }
.nav-tabs .nav-link {
    border: 0; border-bottom: 2px solid transparent; border-radius: 0;
    color: var(--muted); font-weight: 600; font-size: .9375rem; padding: .75rem 1rem;
    transition: color .18s var(--ease), border-color .18s var(--ease);
}
.nav-tabs .nav-link:hover { color: var(--ink-2); border-bottom-color: var(--line); background: transparent; }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }

/* ---------- 19. Accordion (course curriculum) ---------- */
.accordion-item { border: 1px solid var(--line); border-radius: var(--r) !important; margin-block-end: .6rem; overflow: hidden; }
.accordion-button {
    background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: .975rem;
    padding: 1rem 1.1rem; box-shadow: none;
}
.accordion-button:not(.collapsed) { background: var(--brand-50); color: var(--brand-800); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 4px var(--brand-50); }
.accordion-body { padding: .5rem 1.1rem 1rem; }

/* ---------- 20. Progress ---------- */
.progress { background: var(--surface-3); border-radius: var(--r-full); height: 8px; }
.progress-bar { background: var(--brand); border-radius: var(--r-full); }

/* ---------- 21. Avatars ---------- */
.avatar img { object-fit: cover; border-radius: 50%; }
.avatar.avatar-xl img { width: 88px; height: 88px; }

/* ---------- 22. Sidebar (mobile drawer) ---------- */
#sidebar .sidebar-wrapper { border-inline-end: 1px solid var(--line); background: var(--surface); }
.sidebar-item .sidebar-link {
    border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; font-size: .9375rem;
    padding: .65rem .8rem; display: flex; align-items: center; gap: .6rem;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.sidebar-item .sidebar-link:hover { background: var(--surface-3); color: var(--brand); }
.sidebar-item.active .sidebar-link { background: var(--brand-50); color: var(--brand); }
.sidebar-item .sidebar-link .bi { font-size: 1.05rem; color: inherit; }

/* ---------- 23. Footer ---------- */
.footer {
    position: relative;
    text-align: start;
    margin: 0;
    padding: clamp(3rem, 2rem + 3vw, 4.5rem) 0 0 0;
    font-family: var(--font);
    background: var(--brand-950);
    color: rgba(255,255,255,.72);
    font-size: .9375rem;
    border-top: 0;
}
.footer a { color: rgba(255,255,255,.72); }
.footer a:hover, .footer a:focus { color: #fff; text-decoration: none; }
/* brand logo on a white plate so the purple/blue artwork reads on the dark footer */
.footer .footer-logo {
    display: inline-block; margin-bottom: 1.1rem; padding: .6rem .9rem;
    background: #fff; border-radius: var(--r-sm); line-height: 0;
    transition: box-shadow .18s var(--ease);
}
.footer .footer-logo:hover, .footer .footer-logo:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.22); }
.footer .footer-logo img { height: 40px; width: auto; display: block; }
.footer .footer-title {
    color: #fff; font-size: .95rem; font-weight: 700; letter-spacing: -.01em;
    margin-block-end: 1rem;
}
.footer .footer-about { max-width: 42ch; line-height: 1.85; color: rgba(255,255,255,.62); }
.footer .footer-links {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: .6rem;
}
.footer .footer-links li { display: block; margin: 0; font-size: .9375rem; }
.footer .footer-links li a { color: rgba(255,255,255,.72); }
.footer .footer-links a:hover, .footer .footer-links a:focus { color: #fff; text-decoration: none; }

.footer .social-media-icons { display: flex; gap: .5rem; margin-block-start: 1.5rem; }
.footer .social-media-icons a {
    background: rgba(255,255,255,.08) !important;
    width: 40px !important; height: 40px !important;
    color: rgba(255,255,255,.8); margin: 0; font-size: 1.05rem;
    border: 1px solid rgba(255,255,255,.12);
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-sm);
    transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.footer .social-media-icons a:hover, .footer .social-media-icons a:focus {
    background: rgba(255,255,255,.16) !important; color: #fff; transform: none;
    border-color: rgba(255,255,255,.28);
}
.footer .social-media-icons a:hover .bi { color: #fff; }
.footer .footer-bottom {
    margin-block-start: clamp(2.5rem, 2rem + 2vw, 3.5rem);
    border-top: 1px solid rgba(255,255,255,.10);
    padding-block: 1.5rem;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
}
.footer .copyright { font-size: .875rem; color: rgba(255,255,255,.55); margin: 0; }

/* ---------- 24. Empty states ---------- */
.empty-state {
    text-align: center; padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 1.5rem;
    border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--surface-2);
}
.empty-state .bi { font-size: 2.25rem; color: var(--muted-2); }
.empty-state h4 { margin-block: 1rem .35rem; font-size: 1.1rem; color: var(--ink); }
.empty-state p { color: var(--muted); margin: 0 auto; max-width: 46ch; }

/* ---------- 25. Verify section ---------- */
.verify-section { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.verify-section .form-control-lg {
    border-radius: var(--r); min-height: 54px; padding: .95rem 1.15rem;
    font-size: 1rem; background: var(--surface); border: 1px solid var(--line);
}
.verify-section h3 { font-family: var(--font); font-size: 1.6rem; margin-block-end: .75rem; letter-spacing: -.02em; }

/* ---------- 26. Utility ---------- */
.shadow-soft { box-shadow: var(--sh); }
.border-line { border-color: var(--line) !important; }
.bg-surface-2 { background: var(--surface-2) !important; }
.rounded-xl { border-radius: var(--r-lg) !important; }

@media (max-width: 991.98px) {
    .navbar .form-group { display: none !important; }
    .masaqy-intro h3 { max-width: none; }
    .verify-section { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }.course-card:hover,
.courses-group .course-card:hover,
.category-block:hover,
.btn.btn-hero:hover { transform: none; }
}

/* ============================================================
   PART 2 — page chrome, listings, profile, student area
   ============================================================ */

/* ---------- 27. Page heading band ---------- */
.page-heading {
    background: var(--surface);
    color: var(--ink);
    display: block;
    margin: 0;
    padding-block: clamp(2rem, 1.5rem + 2vw, 3rem);
    padding-inline: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--line);
}
.page-heading h1 {
    font-family: var(--font);
    font-weight: 700;
    font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem);
    letter-spacing: -.022em;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 0;
}
.page-heading .sub-title {
    font-family: var(--font);
    font-size: 1.0125rem;
    line-height: 1.8;
    color: var(--muted);
    margin-block: .6rem 0;
    max-width: 78ch;
}
.sub-title { font-family: var(--font); font-size: 1rem; color: var(--muted); margin-block: .6rem 0; }

/* breadcrumb */
.page-heading .breadcrumb { background: transparent; padding: 0; margin-block-end: .65rem; font-size: .875rem; }
.breadcrumb-item, .breadcrumb-item a { color: var(--muted); }
.breadcrumb-item.active { color: var(--ink-2); font-weight: 600; }

/* ---------- 28. Main container ---------- */
.masaqy-container {
    max-width: var(--shell);
    margin: 0 auto;
    padding-inline: 24px;
    padding-block: clamp(2rem, 1.5rem + 2vw, 3rem);
    min-height: auto;
    width: 100%;
}
@media (max-width: 767.98px) { .masaqy-container { padding-inline: 18px; } }

/* ---------- 29. Filter widgets ---------- */
.widget-group {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    position: sticky;
    top: calc(var(--nav-h) + 16px);
}
.widget { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line-2); }
.widget:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.widget .widget-heading, .widget-heading {
    font-family: var(--font);
    font-size: .9375rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin-bottom: .85rem;
    color: var(--ink);
}
.widget-menu { list-style: none; font-family: var(--font); padding: 0; margin: 0; }
.widget-menu li { padding-bottom: 0; margin-bottom: .15rem; }
.widget-menu li > a {
    display: flex; align-items: center; gap: .5rem;
    padding: .45rem .55rem;
    border-radius: var(--r-sm);
    color: var(--ink-3); font-size: .9rem; font-weight: 500;
    transition: background .16s var(--ease), color .16s var(--ease);
}
.widget-menu li > a:hover { background: var(--surface-3); color: var(--brand); }
.widget-menu li.active > a { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.widget-menu .badge, .widget-menu .bg-dark {
    background: var(--surface-3) !important;
    color: var(--muted) !important;
    font-weight: 600; font-size: .72rem;
    margin-inline-start: auto;
}
.widget-menu li > a:hover .badge, .widget-menu li.active > a .badge {
    background: var(--brand-100) !important; color: var(--brand-800) !important;
}
/* the +/- category expanders */
.widget-menu .arrow-dir, .widget-menu .bi-plus-square, .widget-menu .bi-dash-square {
    color: var(--muted-2); font-size: .85rem; order: -1;
}
.widget .form-check { padding-inline-start: 1.6rem; margin-bottom: .35rem; }
.widget .form-check-label { font-size: .9rem; color: var(--ink-3); cursor: pointer; }

/* ---------- 30. Listing toolbar ---------- */
.course-group-head {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: .75rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: none;
    border-radius: var(--r);
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    font-size: .9rem; color: var(--muted);
}
.course-group-head .dropdown-item { font-family: var(--font); }
.course-group-head .btn { font-size: .875rem; }

/* ---------- 31. Article cards ---------- */
.articles-group .row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }.article-card,
.articles-group .article-card {
    display: flex; flex-direction: column; height: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: none;
    overflow: hidden;
    transform: none;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}.article-card:hover,
.articles-group .article-card:hover,
.articles-group .article-card:focus {
    background: var(--surface);
    transform: translateY(-4px);
    box-shadow: var(--sh-lg);
    border-color: var(--brand-200);
}.article-card .article-cover,
.articles-group .article-card .article-cover { overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-3); }.article-card .article-cover img,
.articles-group .article-card .article-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .45s var(--ease); }.article-card:hover .article-cover img,
.articles-group .article-card:hover .article-cover img { transform: scale(1.05); }.article-card .article-title,
.articles-group .article-card .article-title,
.article-card .card-title,
.articles-group .article-card .card-title {
    font-size: 1.05rem; font-weight: 700; line-height: 1.45; color: var(--ink);
    letter-spacing: -.01em; margin-block: .5rem;
}.article-card:hover .article-title,
.articles-group .article-card:hover .article-title { color: var(--brand); }.article-card .article-text,
.articles-group .article-card .article-text,
.article-card p,
.articles-group .article-card p {
    color: var(--muted); font-size: .9rem; line-height: 1.75;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 32. Profile ---------- */
.profile-stats { margin-inline-end: 2.5rem; margin-inline-start: 0; min-width: 64px; }
.profile-stats .profile-stats-title { color: var(--muted); font-family: var(--font); font-size: .85rem; }
.profile-stats .profile-stats-number { color: var(--ink); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; }

/* ---------- 33. Generic page title / content ---------- */
.page-title {
    font-size: 1.35rem; font-family: var(--font); font-weight: 700;
    line-height: 1.35; letter-spacing: -.02em; color: var(--ink); margin-bottom: 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
}
.page-title .btn { font-family: var(--font); font-size: .875rem; }
.page-content { position: relative; font-family: var(--font); color: var(--ink-3); width: 100%; line-height: 1.9; }
.page-content p { font-family: var(--font); font-size: 1.0125rem; color: var(--ink-3); line-height: 1.9; }
.page-content h2, .page-content h3, .page-content h4 { margin-block: 1.75rem .75rem; }
.page-content img { border-radius: var(--r); }
.page-content blockquote {
    border-inline-start: 3px solid var(--brand-200);
    background: var(--surface-2);
    padding: 1rem 1.25rem; margin: 1.5rem 0;
    border-radius: 0 var(--r) var(--r) 0; color: var(--ink-2);
}

/* ---------- 34. Flex tables (transactions, my-courses) ---------- */
.flex-table {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); overflow: hidden;
}
.flex-table-row { border-bottom: 1px solid var(--line-2); transition: background .16s var(--ease); }
.flex-table-row:last-child { border-bottom: 0; }
.flex-table-row:hover { background: var(--surface-2); }
.flex-table-head, .flex-table-row.is-head {
    background: var(--surface-2); color: var(--muted);
    font-weight: 600; font-size: .8rem;
}
.flex-table-cell { flex: 1 1 0; display: flex; align-items: center; padding: .9rem 1rem; font-family: var(--font); font-size: .9rem; }
.flex-table-cell.is-grow { flex-grow: 2; }

/* ---------- 35. Auth pages ---------- */
.auth-card, .login-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-xl); padding: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
    box-shadow: var(--sh);
}
.list-group-item { border-color: var(--line); color: var(--ink-3); padding: .85rem 1rem; }
.list-group-item:hover { background: var(--surface-2); }

/* ---------- 36. Checkboxes used as filters ---------- */
.fake-checkbox + label, .checkbox label { cursor: pointer; }

/* ---------- 37. Tooltips & toasts ---------- */
.tooltip-inner {
    background: var(--ink); color: #fff; border-radius: var(--r-sm);
    font-size: .8rem; padding: .4rem .65rem; font-family: var(--font);
}
.toastify { border-radius: var(--r) !important; font-family: var(--font); box-shadow: var(--sh-lg) !important; }

/* ---------- 38. Course detail page ---------- */
.course-header, .course-intro {
    background: var(--brand-950); color: #fff;
    padding-block: clamp(2.5rem, 2rem + 2.5vw, 3.75rem);
}
.course-header h1, .course-intro h1 { color: #fff; letter-spacing: -.022em; }
.course-sidebar-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--sh);
    position: sticky; top: calc(var(--nav-h) + 16px);
}

/* content list rows inside curriculum */
.content-item, .section-content li {
    display: flex; align-items: center; gap: .6rem;
    padding: .65rem .25rem; border-bottom: 1px solid var(--line-2);
    font-size: .9rem; color: var(--ink-3);
}
.content-item:last-child { border-bottom: 0; }

/* ---------- 39. Student area ---------- */
.stat-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 1.25rem;
}
.stat-card .stat-num { font-size: 1.75rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
.stat-card .stat-label { color: var(--muted); font-size: .875rem; }

/* notifications list */
.notify { display: flex; flex-direction: column; gap: .15rem; }
.notify-text { color: var(--ink-2); font-size: .9rem; line-height: 1.65; }
.notify-time { color: var(--muted-2); font-size: .78rem; }
.notifications-menu { min-width: 340px; max-width: 380px; padding: 0; }
.notifications-menu .dropdown-item { border-radius: 0; padding: .75rem .85rem; border-bottom: 1px solid var(--line-2); white-space: normal; }
.notifications-menu .dropdown-item:last-child { border-bottom: 0; }
.notifications-menu .notify-avatar .avatar img { width: 38px; height: 38px; }
.notifications-dropdown { max-height: 380px; overflow-y: auto; }

/* settings nav */
.settings-nav .nav-link {
    color: var(--ink-3); border-radius: var(--r-sm); font-weight: 500;
    padding: .6rem .8rem; display: flex; align-items: center; gap: .55rem;
}
.settings-nav .nav-link:hover { background: var(--surface-3); color: var(--brand); }
.settings-nav .nav-link.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }

/* ---------- 40. Content player page ---------- */
.content-sidebar { background: var(--surface); border-inline-start: 1px solid var(--line); }
.plyr { border-radius: var(--r); overflow: hidden; }

/* ---------- 41. Responsive corrections ---------- */
@media (max-width: 1199.98px) {
    #main { margin-right: 0 !important; margin-left: 0 !important; }
}
@media (max-width: 991.98px) {
    .widget-group { position: static; }
    .course-sidebar-card { position: static; }
    .section-title { align-items: flex-start; flex-direction: column; gap: .5rem; }
}
@media (max-width: 575.98px) {
    .course-group-head { flex-direction: column; align-items: stretch; }
    .hero-stats { gap: 1.5rem 2rem; }
    .footer .footer-bottom { flex-direction: column; align-items: flex-start; }
}


/* ---------- 42. Neutralise fixed heights from base.*.css ---------- */
.courses-group .course-card-wrap,
.articles-group .article-card-wrap { height: auto; padding: 0; margin-bottom: 0; }
.courses-group .course-card,
.articles-group .article-card { height: 100%; }
.courses-group .course-card .course-title { height: auto; width: auto; }
.courses-group .course-card .course-rating { display: flex; text-align: start; }
.courses-group .course-card .course-rating .rating-stars { display: inline-flex; margin: 0; }
.courses-group .course-card .course-meta .meta-item { display: inline-flex; }
.courses-group .course-card .course-card-bottom .course-price { float: none; }
.courses-group .course-card .course-cover img { min-width: 0; max-width: 100%; min-height: 0; border-radius: 0; }

/* ---------- 43. Category tree filter ---------- */
.categories-tree {
    font-family: var(--font);
    color: var(--ink-3);
    list-style: none;
    padding: 0;
    margin: 0;
}
.categories-tree ul { list-style: none; padding-inline-start: 1.1rem; margin: .15rem 0; }
.categories-tree li { position: relative; padding-bottom: 0; margin-bottom: 1px; }
.categories-tree a {
    color: var(--ink-3);
    display: flex; align-items: center; gap: .5rem;
    padding: .42rem .55rem;
    border-radius: var(--r-sm);
    font-size: .9rem; font-weight: 500;
    transition: background .16s var(--ease), color .16s var(--ease);
}
.categories-tree a:hover { background: var(--surface-3); color: var(--brand); }
.categories-tree li.active > a { background: var(--brand-50); color: var(--brand); font-weight: 600; }

.categories-tree .badge,
.categories-tree .badge.bg-secondary {
    float: none !important;
    display: inline-flex !important;
    align-items: center; justify-content: center;
    margin-inline-start: auto;
    min-width: 22px;
    padding: .18em .5em !important;
    border-radius: var(--r-full);
    background: var(--surface-3) !important;
    color: var(--muted) !important;
    font-size: .72rem; font-weight: 600;
}
.categories-tree a:hover .badge, .categories-tree li.active > a .badge {
    background: var(--brand-100) !important; color: var(--brand-800) !important;
}

.categories-tree .indicator {
    color: var(--muted-2);
    font-size: .8rem;
    cursor: pointer;
    padding: .25rem;
    margin-inline-end: .1rem;
    border-radius: var(--r-xs);
    transition: color .16s var(--ease), background .16s var(--ease);
}
.categories-tree .indicator:hover { color: var(--brand); background: var(--surface-3); }
.categories-tree li.branch { display: flex; flex-wrap: wrap; align-items: center; }
.categories-tree li.branch > a { flex: 1 1 auto; min-width: 0; }
.categories-tree li.branch > ul { flex: 1 0 100%; }

/* ---------- 44. Course detail page ---------- */
.course-heading {
    background: var(--brand-950);
    color: #fff;
    display: block;
    margin: 0;
    padding-block: clamp(2.25rem, 1.75rem + 2vw, 3rem);
    padding-inline: 0;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.course-heading::before {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(58% 90% at 82% 4%, color-mix(in srgb, var(--brand) 55%, transparent) 0%, transparent 62%),
        linear-gradient(160deg, var(--brand-950) 0%, color-mix(in srgb, var(--brand) 34%, #0b0716) 100%);
}
/* the decorative code-symbol layers belong to the old look */
.course-heading .layers .pattern, section.interactive .layers .pattern { display: none !important; }

.course-heading h1 {
    font-family: var(--font); font-weight: 700;
    font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
    color: #fff; padding: 0; margin-block-end: .85rem;
    line-height: 1.28; letter-spacing: -.022em;
    max-width: 30ch;
}
.course-heading .sub-title {
    font-family: var(--font); font-size: 1.0125rem;
    color: rgba(255,255,255,.76);
    margin-block: 0 1rem; height: auto; overflow: visible; max-width: 68ch; line-height: 1.8;
}
.course-heading .breadcrumb { margin-block-end: 1rem; font-size: .85rem; }
.course-heading .breadcrumb a, .course-heading .breadcrumb-item { color: rgba(255,255,255,.6); }
.course-heading .breadcrumb-item.active { color: rgba(255,255,255,.85); }
.course-heading .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.35); }

.course-heading .course-rating { display: inline-flex; align-items: center; gap: .4rem; text-align: start; margin: 0 0 .5rem 0; }
.course-heading .course-rating .rating-stars { display: inline-flex; margin: 0; gap: 1px; }
.course-heading .course-rating span { color: #fbbf24; font-size: .9rem; font-weight: 700; }
.course-heading .course-rating small { font-size: .85rem; color: rgba(255,255,255,.6); margin: 0; padding: 0; }
.course-heading .users-enrolled {
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--font); margin-inline-start: 1.25rem; margin-inline-end: 0;
    font-size: .875rem; color: rgba(255,255,255,.75);
}
.course-heading .users-enrolled .bi { margin: 0; }
.course-heading .course-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.25rem; margin: .5rem 0 0 0; }
.course-heading .course-meta .bi { margin: 0; }
.course-heading .course-meta .meta-item {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .85rem; font-family: var(--font); color: rgba(255,255,255,.75);
}
.course-heading .course-meta .meta-item .badge { background: rgba(255,255,255,.16) !important; color: #fff !important; }

/* floating purchase card */
@media (min-width: 992px) {
    .course-heading { min-height: 390px; }
    .course-sidebar { margin-top: -318px; }
}
.course-sidebar {
    background-color: var(--surface);
    padding: 1rem;
    margin-bottom: 1.5rem;
    z-index: 1020;
    box-shadow: var(--sh-lg);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.course-sidebar .course-includes-head {
    font-family: var(--font); font-size: 1.0625rem; font-weight: 700;
    color: var(--ink); margin-top: 1rem;
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.course-sidebar .course-includes-head .course-price {
    display: inline-flex; float: none; color: var(--ink);
    font-size: 1.35rem; font-weight: 700; font-family: var(--font); padding: 0;
    letter-spacing: -.02em;
}
.course-sidebar ul.course-includes { list-style: none; padding: .85rem .25rem 0 .25rem; margin: 0; }
.course-sidebar ul.course-includes li {
    font-family: var(--font); margin-bottom: .55rem; color: var(--ink-3);
    font-size: .9rem; display: flex; align-items: center; gap: .6rem;
}
.course-sidebar ul.course-includes li .bi { color: var(--muted-2); font-size: 1rem; }
.course-sidebar .btn { font-family: var(--font); font-weight: 700; }
/* the enrol button is the page's primary action */
.course-sidebar .btn.btn-outline-primary {
    background: var(--brand); color: #fff; border-color: var(--brand);
    padding-block: .8rem; font-size: 1rem; border-radius: var(--r);
}
.course-sidebar .btn.btn-outline-primary:hover {
    background: var(--brand-hover); border-color: var(--brand-hover); color: #fff;
    box-shadow: var(--sh-brand);
}
.course-sidebar .plyr, .course-sidebar video, .course-sidebar img { border-radius: var(--r); overflow: hidden; }

/* sticky tab bar */
.course-navbar {
    height: auto; margin: 0; padding: 0;
    font-family: var(--font);
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    position: sticky; top: var(--nav-h); z-index: 1020;
}
.course-navbar .navbar-nav .nav-link {
    padding: 1rem .95rem; color: var(--muted);
    border-bottom: 2px solid transparent; font-weight: 600; font-size: .9375rem;
    border-radius: 0;
}
.course-navbar .navbar-nav .nav-link:hover { color: var(--ink-2); background: transparent; }
.course-navbar .navbar-nav .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }

/* body panels */
.course-details { margin: 0; }
.course-details .card { border: 1px solid var(--line); border-radius: var(--r-lg); }
.course-details .card-body { padding: 1.5rem; border-bottom: 1px solid var(--line-2); }
.course-details .card-body:last-child { border-bottom: 0; }
.course-details .card-body p { font-size: 1rem; line-height: 1.9; color: var(--ink-3); }
.course-details ul.course-outputs-list li { width: 48%; font-size: .95rem; color: var(--ink-3); padding-inline-start: 26px; }

.course-details .contents-accordions .accordion-item {
    margin-bottom: .6rem; border: 1px solid var(--line); border-radius: var(--r) !important; overflow: hidden;
}
.course-details .contents-accordions .accordion-button {
    background: var(--surface-2); font-family: var(--font); font-weight: 600;
    font-size: .975rem; line-height: 1.6; border-radius: 0; color: var(--ink); padding: 1rem 1.1rem;
}
.course-details .contents-accordions .accordion-button:not(.collapsed) { color: var(--brand-800); background-color: var(--brand-50); }
.course-details .contents-accordions .accordion-button:focus { border-color: var(--brand-300); box-shadow: 0 0 0 4px var(--brand-50); }
.course-details .contents-accordions ul.section-contents { list-style: none; padding-inline: 0; margin-bottom: 0; }
.course-details .contents-accordions ul.section-contents li {
    display: flex; align-items: center; gap: .6rem;
    padding: .7rem 1.1rem; border-top: 1px solid var(--line-2);
    font-size: .9rem; color: var(--ink-3);
}
.course-details section { scroll-margin: calc(var(--nav-h) + 60px) 0 0 0; }

/* ---------- 45. Course page stacking & sticky offsets ---------- */
/* the floating purchase card must sit above the sticky tab bar it overlaps */
.course-navbar { z-index: 1010; }
.course-sidebar { z-index: 1030; }

/* keep sticky elements clear of the fixed site header */
.sticky-top, .sticky-lg-top, .sticky-md-top { top: calc(var(--nav-h) + 16px); }
.course-navbar.sticky-top, .course-navbar.sticky-lg-top { top: var(--nav-h); }

/* ---------- 46. Settings side navigation ---------- */
.side-navigation {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: .5rem;
    position: sticky;
    top: calc(var(--nav-h) + 16px);
}
.side-navigation .nav-link {
    font-family: var(--font);
    display: flex; align-items: center; gap: .6rem;
    padding: .7rem .8rem;
    color: var(--ink-3);
    font-weight: 500; font-size: .9375rem;
    border-radius: var(--r-sm) !important;
    border: 0;
    transition: background .16s var(--ease), color .16s var(--ease);
}
.side-navigation .nav-link:hover, .side-navigation .nav-link:focus {
    color: var(--brand); background: var(--surface-3);
}
.side-navigation .nav-link .bi { margin: 0; font-size: 1.05rem; color: inherit; }
.side-navigation .nav-link.active,
.side-navigation .nav-link:first-child.active,
.side-navigation .nav-link:last-child.active {
    color: var(--brand);
    background-color: var(--brand-50);
    font-weight: 600;
    border-radius: var(--r-sm) !important;
}

/* the settings panel itself */
.settings .card, .settings > .card { border: 1px solid var(--line); border-radius: var(--r-lg); }
.settings hr { border-color: var(--line); margin-block: 1.75rem; }
.settings .form-text, .form-text { color: var(--muted); font-size: .8rem; }
.required-field { color: var(--danger); }

/* ---------- 47. Content player (content.php) ---------- */
/* base.*.css pulls this back by -2rem to cancel the old #main-content padding,
   which the theme now zeroes — so the offset has to go too. */
.content-container { margin: 0 !important; }

#content-sidebar .sidebar-heading {
    background-color: var(--brand-950) !important;
    padding: 1.15rem 1.2rem; height: 70px; color: #fff;
    font-weight: 700; font-size: .975rem;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
#content-sidebar { border-inline-start: 1px solid var(--line); background: var(--surface); }
#content-sidebar .contents-accordions .accordion-item { border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0 !important; margin: 0; }
#content-sidebar .contents-accordions .accordion-button { background: var(--surface); font-size: .925rem; padding: .9rem 1rem; }
#content-sidebar .contents-accordions .accordion-button:not(.collapsed) { background: var(--brand-50); }
#content-sidebar .section-contents li { padding: .65rem 1rem; font-size: .875rem; }
#content-sidebar .section-contents li:hover { background: var(--surface-2); }

.content-heading {
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem; font-weight: 700; color: var(--ink);
}
.content-nav { border-bottom: 1px solid var(--line); background: var(--surface); }
.content-nav .nav-link { color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; }
.content-nav .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }
.content-interactive-frame { border: 0; width: 100%; background: var(--surface-3); }
.course-content { background: var(--surface); }

/* on the player the site header should not float over the fixed layout */
body:has(.content-container) .navbar.navbar-expand { position: static; }

/* unify the player's top bar with the sidebar heading */
.navbar-content {
    padding: 0 1.25rem;
    min-height: 70px;
    background-color: var(--brand-950) !important;
    border-bottom: 1px solid rgba(255,255,255,.10);
    display: flex; align-items: center;
}
.navbar-content .navbar-brand, .navbar-content a, .navbar-content .nav-link { color: #fff; }
.navbar-content .btn, .navbar-content .sidebar-hide {
    background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
    color: #fff; border-radius: var(--r-sm);
}
.navbar-content .btn:hover, .navbar-content .sidebar-hide:hover { background: rgba(255,255,255,.18); color: #fff; }
.content-player-frame { background: var(--brand-950); opacity: 1; box-shadow: none; border-radius: 0; }

/* player top bar title: one line, ellipsis instead of a hard 52px crop */
.navbar-content .content-heading, .content-heading {
    max-width: 100%;
    height: auto;
    overflow: hidden;
    background: transparent;
    border: 0;
    padding: 0;
    display: flex; flex-direction: column; justify-content: center;
    min-width: 0;
}
.content-heading .course-title,
.navbar-content .content-heading .course-title {
    font-family: var(--font); color: rgba(255,255,255,.72); font-size: .8rem;
    font-weight: 500; margin: 0; height: auto; min-height: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.content-heading > *:not(.course-title) {
    color: #fff; font-weight: 700; font-size: .95rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 48. Off-canvas drawer must not extend the document ---------- */
/* base.*.css switches the drawer to position:absolute below 1200px; parked at
   right:-260px that widens the document, and in RTL the browser shifts the
   content origin instead of just clipping — content gets cut off at the start. */
@media screen and (max-width: 1199px) {
    .sidebar-wrapper { position: fixed; }
}

/* the parked drawer still grows the scrollable region; clip at the root so RTL
   does not shift the content origin */
html { overflow-x: hidden; max-width: 100%; }
/* base.css hides overflow-x on <body> too; with both set the body becomes a scroll
   container and position: sticky (why-section pin) stops working. `clip` still cuts
   horizontal overflow (iOS wiggle) without making the body a scroll container. */
body { overflow-x: clip; }

/* ---------- 49. Hero media ---------- */
.masaqy-intro .row.align-items-center { position: relative; z-index: 1; }

.hero-media {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 24px 60px rgba(0,0,0,.38), 0 6px 18px rgba(0,0,0,.22);
    background: color-mix(in srgb, var(--brand) 22%, #0b0716);
    isolation: isolate;
}
.hero-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
}
/* warm the photo into the brand instead of leaving it a grey rectangle */
.hero-media::after {
    content: "";
    position: absolute; inset: 0;
    background:
        linear-gradient(215deg, transparent 45%, color-mix(in srgb, var(--brand) 42%, transparent) 100%),
        linear-gradient(0deg, color-mix(in srgb, var(--brand-950) 34%, transparent) 0%, transparent 55%);
    mix-blend-mode: soft-light;
    pointer-events: none;
}
/* soft glow behind the frame */
.hero-media::before {
    content: "";
    position: absolute; inset: -14%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 55%, transparent), transparent 72%);
    filter: blur(28px);
    z-index: -1;
    pointer-events: none;
}

@media (max-width: 1199.98px) {
    .hero-media { aspect-ratio: 3 / 2; }
}

/* ============================================================
   PART 3 — refined header + full-screen overlay menu
   ============================================================ */

/* ---------- 50. Header refinement ---------- */
.navbar.navbar-expand { --nav-gap: .5rem; }
.navbar .container { gap: var(--nav-gap); }

/* burger is part of the identity block at every width now */
.burger-btn.d-block,
.navbar .burger-btn.d-block {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    width: 42px; height: 42px;
    flex: 0 0 auto;
    border-radius: var(--r-sm);
    color: var(--ink-2);
    margin-inline-end: .35rem;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.burger-btn:hover, .burger-btn:focus-visible { background: var(--surface-3); color: var(--brand); }

.burger-bars {
    display: block; position: relative;
    width: 20px; height: 14px;
}
.burger-bars > span {
    position: absolute;
    inset-inline: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .28s var(--ease), opacity .18s var(--ease), width .28s var(--ease);
}
.burger-bars > span:nth-child(1) { top: 0; }
.burger-bars > span:nth-child(2) { top: 6px; width: 70%; }
.burger-bars > span:nth-child(3) { top: 12px; }
.burger-btn:hover .burger-bars > span:nth-child(2) { width: 100%; }

/* morph to an X while the overlay is open */
body.menu-open .burger-bars > span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .burger-bars > span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
body.menu-open .burger-bars > span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
body.menu-open .burger-btn { color: var(--brand); }

/* identity block */
.navbar-brand { margin-inline-end: .75rem; }
.navbar .main-menu { margin-inline-start: 0 !important; }

/* search sits in the middle and never crowds the actions */
.navbar .form-group {
    max-width: 420px;
    margin-inline: auto !important;
    flex: 1 1 auto;
    min-width: 0;
}

/* action cluster */
.navbar .navbar-nav.ms-auto { margin-inline-start: auto !important; gap: .15rem; }
.navbar .user-navbar { display: flex; align-items: center; gap: .15rem; }

/* login = quiet, register = the primary action */
.navbar .btn.navbar-btn { white-space: nowrap; }
.navbar-nav .nav-item .btn[href$="/login"],
.navbar .btn.btn-light[href$="/login"] {
    background: transparent; border-color: transparent; color: var(--ink-2);
}
.navbar-nav .nav-item .btn[href$="/login"]:hover { background: var(--surface-3); color: var(--brand); }
.navbar-nav .nav-item .btn[href$="/register"] {
    background: var(--brand); border-color: var(--brand); color: #fff;
    box-shadow: var(--sh-xs);
}
.navbar-nav .nav-item .btn[href$="/register"]:hover {
    background: var(--brand-hover); border-color: var(--brand-hover); color: #fff;
    box-shadow: var(--sh-brand);
}

@media (max-width: 991.98px) {
    .navbar .form-group { display: none !important; }
    .navbar-brand img { height: 34px; }
}

/* ---------- 51. Full-screen overlay menu ---------- */
#sidebar {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 1rem + 2vw, 3rem);
    background: rgba(8, 6, 16, .74);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
#sidebar.active { opacity: 1; visibility: visible; }

/* the drawer becomes a centred panel — override the off-canvas geometry */
#sidebar .sidebar-wrapper,
#sidebar.active .sidebar-wrapper,
#sidebar:not(.active) .sidebar-wrapper {
    position: relative;
    inset: auto;
    right: auto; left: auto; top: auto; bottom: auto;
    width: min(620px, 100%);
    max-height: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity .3s var(--ease);
}
#sidebar.active .sidebar-wrapper { opacity: 1; }

#sidebar .sidebar-header,
#sidebar .sidebar-menu {
    transform: translateY(16px);
    transition: transform .38s var(--ease);
}
#sidebar.active .sidebar-header,
#sidebar.active .sidebar-menu { transform: none; }
#sidebar.active .sidebar-menu { transition-delay: .05s; }

/* header row: search + close */
#sidebar .sidebar-header {
    position: relative;
    display: flex; align-items: center; justify-content: center; gap: .75rem;
    padding: 3.5rem 0 1.5rem 0;
    font-size: 1rem; font-weight: 400; text-align: start;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 1.75rem;
}
#sidebar .sidebar-header .justify-content-between { flex: 1 1 auto; min-width: 0; }
#sidebar .sidebar-header form { width: 100%; }
#sidebar .sidebar-header .input-group-sm { width: 100%; }
#sidebar .sidebar-header input.form-control {
    max-width: 100%;
    width: 100%;
    height: 52px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: var(--r-full);
    color: #fff;
    padding-inline: 1.25rem;
    font-size: 1rem;
}
#sidebar .sidebar-header input.form-control::placeholder { color: rgba(255,255,255,.5); }
#sidebar .sidebar-header input.form-control:focus {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.32) !important;
    box-shadow: 0 0 0 4px rgba(255,255,255,.08);
    color: #fff;
}

#sidebar .toggler {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    z-index: 2;
}
#sidebar .sidebar-hide,
#sidebar a.sidebar-hide.d-xl-none {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    width: 46px; height: 46px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    font-size: 1.15rem;
    transition: background .18s var(--ease), transform .18s var(--ease), border-color .18s var(--ease);
}
#sidebar .sidebar-hide:hover {
    background: rgba(255,255,255,.18); color: #fff;
    border-color: rgba(255,255,255,.34);
    transform: rotate(90deg);
}

/* menu */
#sidebar .sidebar-menu { padding: 0; }
#sidebar .sidebar-wrapper .menu,
#sidebar .menu {
    min-height: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
#sidebar .sidebar-item { position: relative; }
#sidebar .sidebar-item .sidebar-link,
#sidebar .sidebar-link {
    display: flex; align-items: center; justify-content: center; gap: .75rem;
    text-align: center;
    padding: .8rem 1rem;
    border-radius: var(--r);
    color: rgba(255,255,255,.9);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -.01em;
    background: transparent;
    transition: background .2s var(--ease), color .2s var(--ease);
}
#sidebar .sidebar-item .sidebar-link:hover,
#sidebar .sidebar-item .sidebar-link:focus-visible {
    background: rgba(255,255,255,.10);
    color: #fff;
}
#sidebar .sidebar-item.active > .sidebar-link { background: rgba(255,255,255,.12); color: #fff; }
#sidebar .sidebar-link .bi {
    font-size: 1.15rem;
    color: rgba(255,255,255,.55);
    width: 1.4em; text-align: center; flex: 0 0 auto;
}
#sidebar .sidebar-item .sidebar-link:hover .bi { color: color-mix(in srgb, var(--brand) 45%, #fff); }

/* has-sub chevron */
#sidebar .sidebar-item.has-sub > .sidebar-link::after {
    content: "";
    margin-inline-start: .15rem;
    width: .5em; height: .5em;
    opacity: .6;
    border-inline-end: 2px solid rgba(255,255,255,.45);
    border-block-end: 2px solid rgba(255,255,255,.45);
    transform: rotate(45deg);
    transition: transform .25s var(--ease);
}
#sidebar .sidebar-item.has-sub > .sidebar-link[aria-expanded="true"]::after { transform: rotate(-135deg); }

/* submenu */
#sidebar .submenu {
    list-style: none;
    margin: .15rem 0 .5rem 0;
    padding-inline: 0;
    text-align: center;
    display: none;
    position: static;
    inset: auto;
}
#sidebar .submenu.active { display: block; }
#sidebar .submenu-item > a {
    display: block;
    padding: .5rem .75rem;
    border-radius: var(--r-sm);
    color: rgba(255,255,255,.62);
    font-size: .95rem;
    font-weight: 500;
    transition: background .18s var(--ease), color .18s var(--ease);
}
#sidebar .submenu-item > a:hover { background: rgba(255,255,255,.08); color: #fff; }

/* scrollbar inside the panel */
#sidebar .sidebar-wrapper::-webkit-scrollbar { width: 6px; }
#sidebar .sidebar-wrapper::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 99px; }
#sidebar .ps__rail-y { display: none !important; }

body.menu-open { overflow: hidden; }

@media (max-width: 575.98px) {
    #sidebar .sidebar-item .sidebar-link { font-size: 1.0625rem; padding: .7rem .85rem; }
    #sidebar .sidebar-header { padding-bottom: 1.1rem; margin-bottom: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
    #sidebar, #sidebar .sidebar-wrapper { transition: none; }
}

/* on narrow screens the panel fills the width, so drop it below the fixed close button */
@media (max-width: 767.98px) {
    #sidebar { align-items: flex-start; }
    #sidebar .sidebar-wrapper { max-height: 100%; }
}

/* ---------- 52. Input icon alignment ---------- */
/* base.*.css gives the glyph `vertical-align: sub`, which drops it below the
   field's centre line — centre the icon box instead of nudging the glyph */
.form-group[class*="has-icon-"] .form-control-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
}
.form-group[class*="has-icon-"] .form-control-icon i,
.navbar .form-control-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: auto;
}
.form-group[class*="has-icon-"] .form-control-icon i::before,
.navbar .form-control-icon i::before {
    vertical-align: middle;
    line-height: 1;
    display: block;
}
.navbar .form-control-icon {
    inset-inline-start: .35rem;
    padding: 0;
    color: var(--muted);
}
.navbar .form-control-icon .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    color: var(--muted);
    line-height: 1;
}
.navbar .form-control-icon .btn:hover { color: var(--brand); background: rgba(0,0,0,.04); }
.navbar .form-control-icon i { font-size: 1.05rem; }

/* ---------- 53. Mobile-only chrome ---------- */
/* the tab bar is switched on by mobile.css (media <=767.98px) */
.mobile-tabbar { display: none; }
.appbar-search { display: none; }

/* ---------- 54. Course promo fallback ---------- */
.promo-video .promo-cover {
    width: 100%; height: auto; display: block;
    border-radius: var(--r); object-fit: cover; aspect-ratio: 16 / 9;
}

/* ---------- 55. Saudi Riyal symbol ---------- */
.riyal {
    width: .84em;
    height: .84em;
    fill: currentColor;
    display: inline-block;
    vertical-align: -.06em;
    margin-inline-start: .22em;
    flex: 0 0 auto;
}
/* the price is a number + glyph pair — keep them on one line */
.course-price, .course-includes-head .course-price { white-space: nowrap; }
.course-price s .riyal { opacity: .75; }

/* ---------- 56. Header dropdowns must sit above page content ---------- */
/* the navbar's backdrop-filter creates a stacking context, so its menus are
   capped by the navbar's own z-index — raise it above the page layers
   (.course-sidebar 1030, .mobile-tabbar 1040, .course-navbar 1010) */
.navbar.navbar-expand { z-index: 1060; }
.navbar .dropdown-menu,
.navbar .categories-menu,
.navbar .notifications-menu,
.navbar .user-menu .dropdown-menu { z-index: 1065; }

/* the course tab strip also carries .navbar.navbar-expand, so it inherited the
   header's raised z-index and painted over the categories fly-out */
.navbar.navbar-expand.course-navbar { z-index: 1010; }

/* ---------- 52. Landing page: card grids, rating row, article text ---------- */
/* tablets: 4-up course/article cards are too narrow — go 2-up between 768 and 991px */
@media (min-width: 768px) and (max-width: 991.98px) {
    .courses-group > .row > [class*="col-md-3"],
    .articles-group > .row > [class*="col-md-3"] { flex: 0 0 50%; max-width: 50%; width: 50%; }
}
/* rating row: never break "(n reviews)" across lines */
.course-card .course-rating, .courses-group .course-card .course-rating { flex-wrap: wrap; row-gap: .1rem; }
.course-card .course-rating small, .courses-group .course-card .course-rating small { white-space: nowrap; }
/* card footer: instructor name truncates before the price wraps */
.course-card .course-card-bottom, .courses-group .course-card .course-card-bottom { gap: .6rem; }
.course-card .avatar-stack, .courses-group .course-card .avatar-stack { min-width: 0; flex: 1 1 auto; }
.course-card .course-card-bottom .course-price, .courses-group .course-card .course-card-bottom .course-price { flex: 0 0 auto; }
.course-card .avatar-stack .avatar a { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; max-width: 100%; }
.course-card .avatar-stack .avatar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* article excerpt: clamp to three full lines instead of clipping mid-line */
.article-card .article-description, .articles-group .article-card .article-description {
    height: auto !important; max-height: none !important;
    color: var(--muted); font-size: .9rem; line-height: 1.75; margin: 0 0 .9rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card .article-card-bottom, .articles-group .article-card .article-card-bottom { margin-top: auto; }


/* ============================================================
   PART 4 — Rich purple layer (v2)
   Same brand, more depth: aurora hero, glass chips, glowing CTAs,
   deeper cards, gradient bands, one authored motion (reveal on scroll).
   ============================================================ */

/* ---------- 57. Tokens for the rich layer ---------- */
:root {
    --brand-blue: color-mix(in srgb, var(--brand) 62%, #3b82f6);
    --grad-cta: linear-gradient(135deg, var(--brand) 0%, var(--brand-blue) 100%);
    --glow-brand: 0 10px 28px color-mix(in srgb, var(--brand) 32%, transparent);
    --glass: rgba(255,255,255,.08);
    --glass-line: rgba(255,255,255,.16);
}
html { scrollbar-color: var(--brand-200) transparent; }
::selection { background: var(--brand); color: #fff; }

/* ---------- 58. Hero: taller, aurora, entrance ---------- */
@media (min-width: 992px) {
    .masaqy-intro .intro-bg {
        min-height: min(720px, calc(100vh - var(--nav-h)));
        display: flex; align-items: center;
    }
}
.masaqy-intro { background: #0b0716; }
.masaqy-intro::before {
    background:
        radial-gradient(55% 70% at 82% 10%, color-mix(in srgb, var(--brand) 70%, transparent) 0%, transparent 60%),
        radial-gradient(45% 60% at 8% 90%, color-mix(in srgb, #3b82f6 46%, transparent) 0%, transparent 58%),
        linear-gradient(160deg, #0b0716 0%, color-mix(in srgb, var(--brand) 38%, #0b0716) 100%);
}
/* two slow aurora blobs on the (otherwise empty) intro-bg pseudo-elements */
.masaqy-intro .intro-bg { position: relative; }
.masaqy-intro .intro-bg::before,
.masaqy-intro .intro-bg::after {
    content: "";
    position: absolute;
    width: 46vw; height: 46vw; max-width: 640px; max-height: 640px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}
.masaqy-intro .intro-bg::before {
    inset-inline-end: -12%; top: -30%;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 85%, #fff) 0%, transparent 65%);
    animation: aurora-a 18s ease-in-out infinite alternate;
}
.masaqy-intro .intro-bg::after {
    inset-inline-start: -14%; bottom: -34%;
    background: radial-gradient(circle, color-mix(in srgb, #3b82f6 80%, #fff) 0%, transparent 65%);
    animation: aurora-b 22s ease-in-out infinite alternate;
}
@keyframes aurora-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(-8%, 12%) scale(1.15); } }
@keyframes aurora-b { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(10%, -10%) scale(.95); } }

.masaqy-intro h3 {
    font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.8rem);
    line-height: 1.16;
    letter-spacing: -.03em;
    text-wrap: balance;
}
.masaqy-intro p { color: rgba(255,255,255,.8); font-size: clamp(1.02rem, .95rem + .4vw, 1.2rem); }

/* CTA pair */
.hero-actions .btn { padding: .9rem 1.75rem; border-radius: var(--r); font-size: 1.02rem; }
.btn.btn-hero { box-shadow: 0 10px 30px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.35) inset; }
.btn.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.5) inset; }
.btn.btn-hero-ghost { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* stats become glass chips */
.hero-stats { border-top: 0; padding-block-start: 0; margin-block-start: 2.5rem; gap: .75rem; }
.hero-stat {
    min-width: 128px; padding: .8rem 1.15rem;
    background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(255,255,255,.08) inset;
}
.hero-stat .hero-stat-num { font-size: clamp(1.45rem, 1.2rem + .9vw, 1.9rem); }
.hero-stat .hero-stat-label { color: rgba(255,255,255,.72); }
@media (max-width: 575.98px) { .hero-stat { min-width: 0; padding: .7rem .4rem; } }

/* media: tilt on hover + floating glass badge */
.hero-media {
    border-radius: var(--r-xl);
    transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
    transition: transform .6s var(--ease), box-shadow .6s var(--ease);
    box-shadow: 0 30px 70px rgba(0,0,0,.42), 0 8px 20px rgba(0,0,0,.24);
    overflow: visible;
}
[dir="ltr"] .hero-media { transform: perspective(1200px) rotateY(6deg) rotateX(2deg); }
.hero-media:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.hero-media img, .hero-media::after { border-radius: var(--r-xl); }
.hero-media img { transform: none; }
.hero-float {
    position: absolute; inset-inline-start: -1.25rem; bottom: 1.5rem;
    display: inline-flex; align-items: center; gap: .75rem;
    padding: .8rem 1.05rem;
    background: rgba(255,255,255,.92); color: var(--ink);
    border-radius: var(--r); box-shadow: 0 16px 40px rgba(0,0,0,.35);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    animation: float-y 6s ease-in-out infinite;
    z-index: 2;
}
.hero-float .bi {
    width: 40px; height: 40px; border-radius: var(--r-sm);
    background: var(--grad-cta); color: #fff; font-size: 1.15rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.hero-float strong { display: block; font-size: 1.2rem; line-height: 1.1; letter-spacing: -.02em; }
.hero-float span { display: block; font-size: .78rem; color: var(--muted); }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* entrance */
.masaqy-intro h3, .masaqy-intro p, .hero-actions, .hero-stats, .hero-media {
    animation: hero-in .8s var(--ease) both;
}
.masaqy-intro p { animation-delay: .08s; }
.hero-actions { animation-delay: .16s; }
.hero-stats { animation-delay: .24s; }
.hero-media { animation: hero-in .9s var(--ease) .12s both; }
@keyframes hero-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-media { animation-name: hero-in-media; }
@keyframes hero-in-media {
    from { opacity: 0; transform: perspective(1200px) rotateY(-6deg) rotateX(2deg) translateY(24px); }
    to   { opacity: 1; transform: perspective(1200px) rotateY(-6deg) rotateX(2deg) translateY(0); }
}
[dir="ltr"] .hero-media { animation-name: hero-in-media-ltr; }
@keyframes hero-in-media-ltr {
    from { opacity: 0; transform: perspective(1200px) rotateY(6deg) rotateX(2deg) translateY(24px); }
    to   { opacity: 1; transform: perspective(1200px) rotateY(6deg) rotateX(2deg) translateY(0); }
}

/* ---------- 59. Section bands & headings ---------- */
.primary-section, .light-section { position: relative; isolation: isolate; }
.primary-section::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(48% 60% at 100% 0%, var(--brand-50) 0%, transparent 60%),
        radial-gradient(36% 50% at 0% 100%, #eef3ff 0%, transparent 60%);
}
.section-title h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
.section-title .section-link {
    padding: .5rem .95rem; border-radius: var(--r-full);
    background: var(--brand-50); border: 1px solid var(--brand-100);
    transition: background .18s var(--ease), border-color .18s var(--ease);
}
.section-title .section-link:hover { background: var(--brand-100); border-color: var(--brand-200); }

/* ---------- 60. CTAs ---------- */
.btn-primary, .btn.btn-primary {
    background: var(--grad-cta); border-color: transparent;
    box-shadow: var(--glow-brand);
}
.btn-primary:hover, .btn-primary:focus { background: var(--grad-cta); border-color: transparent; filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 14px 34px color-mix(in srgb, var(--brand) 40%, transparent); }
.btn-primary:active { transform: translateY(0); filter: brightness(.98); }
.navbar .guest-navbar .btn-outline-dark, .navbar .guest-navbar .btn.btn-outline-dark {
    background: var(--grad-cta); color: #fff; border-color: transparent; box-shadow: var(--glow-brand);
}
.navbar .guest-navbar .btn-outline-dark:hover { color: #fff; filter: brightness(1.07); }

/* ---------- 61. Cards: depth on hover ---------- */
.course-card, .courses-group .course-card, .article-card, .articles-group .article-card, .category-block {
    box-shadow: var(--sh-xs);
}
.course-card:hover, .courses-group .course-card:hover,
.article-card:hover, .articles-group .article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px color-mix(in srgb, var(--brand) 16%, transparent), var(--sh);
    border-color: var(--brand-200);
}
.course-card .course-cover::after, .courses-group .course-card .course-cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(11,7,22,.28) 100%);
    opacity: 0; transition: opacity .25s var(--ease); pointer-events: none;
}
.course-card:hover .course-cover::after { opacity: 1; }
.course-card .course-card-bottom .course-price, .courses-group .course-card .course-card-bottom .course-price {
    padding: .3rem .75rem; border-radius: var(--r-full);
    background: var(--brand-50); color: var(--brand-800); font-weight: 700;
}
.course-card .course-meta .badge.bg-light-warning, .courses-group .course-card .course-meta .badge.bg-light-warning {
    background: var(--warning-bg) !important; color: var(--warning) !important; border-radius: var(--r-full);
}
.article-card .article-card-bottom .btn, .articles-group .article-card .article-card-bottom .btn {
    border-radius: var(--r-full);
}

/* categories: taller, zoom, arrow on hover */
.category-block { box-shadow: var(--sh-xs); }
.category-block .category-cover { height: 196px; transition: transform .5s var(--ease); }
.category-block:hover .category-cover { transform: scale(1.035); }
.category-block:hover { transform: translateY(-6px); box-shadow: 0 22px 44px color-mix(in srgb, var(--brand) 22%, transparent); }
.category-block .category-name { font-size: 1.15rem; }
.category-block .category-content { display: flex; flex-direction: column; align-items: flex-start; }
@media (max-width: 767.98px) { .category-block .category-cover { height: 140px; } }

/* ---------- 62. Verify band ---------- */
.verify-section {
    position: relative; overflow: hidden; isolation: isolate;
    padding: clamp(1.75rem, 1.25rem + 2.2vw, 3.25rem);
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, var(--brand-950) 0%, color-mix(in srgb, var(--brand) 60%, #0b0716) 100%);
    color: #fff;
    box-shadow: 0 24px 60px color-mix(in srgb, var(--brand) 26%, transparent);
}
.verify-section::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(50% 70% at 85% 10%, color-mix(in srgb, var(--brand) 70%, transparent), transparent 62%),
        linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: auto, 56px 56px, 56px 56px;
}
.verify-section h3 { color: #fff; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); }
.verify-section small.text-muted, .verify-section .text-muted { color: rgba(255,255,255,.68) !important; }
.verify-section .form-control-lg {
    background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.24); color: #fff;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.verify-section .form-control-lg::placeholder { color: rgba(255,255,255,.5); }
.verify-section .form-control-lg:focus { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5); box-shadow: 0 0 0 4px rgba(255,255,255,.12); color: #fff; }
.verify-section .btn-primary { background: #fff; color: var(--brand-800); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.verify-section .btn-primary:hover { background: #fff; color: var(--brand-800); filter: none; box-shadow: 0 16px 36px rgba(0,0,0,.32); }
.verify-section > div:last-child { flex: 0 0 auto; }
.verify-section > div:last-child img {
    width: min(260px, 32vw); background: rgba(255,255,255,.94); border-radius: var(--r-lg); padding: 1.25rem;
    box-shadow: 0 16px 40px rgba(0,0,0,.3);
}
.verify-section .alert { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); }
@media (max-width: 767.98px) { .verify-section > div:last-child { display: none; } }

/* ---------- 63. Page bands, auth pages, footer ---------- */
.page-heading {
    background: linear-gradient(180deg, var(--brand-50) 0%, var(--surface) 100%);
    border-bottom-color: var(--brand-100);
    position: relative; isolation: isolate;
}
.page-heading::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(40% 90% at 100% 0%, var(--brand-100) 0%, transparent 60%);
}
#main-content:has(> .masaqy-container > .row > .col-lg-5.mx-auto > .card) {
    background:
        radial-gradient(55% 45% at 85% 0%, var(--brand-100) 0%, transparent 60%),
        radial-gradient(45% 40% at 10% 100%, #e3ecff 0%, transparent 60%),
        var(--surface-2);
}
.masaqy-container > .row > .col-lg-5.mx-auto > .card {
    border: 1px solid var(--brand-100); border-radius: var(--r-xl);
    box-shadow: 0 28px 70px color-mix(in srgb, var(--brand) 14%, transparent) !important;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.footer {
    background: linear-gradient(180deg, var(--brand-950) 0%, #0b0716 100%);
    position: relative; isolation: isolate;
}
.footer::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 60%, #fff), transparent);
}
.footer::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(50% 60% at 90% 0%, color-mix(in srgb, var(--brand) 40%, transparent) 0%, transparent 60%);
}
.footer .social-media-icons a:hover { background: var(--grad-cta) !important; border-color: transparent; }

/* ---------- 64. Reveal on scroll (progressive: only when JS opts in) ---------- */
html.js-reveal .reveal {
    opacity: 0; transform: translateY(18px);
    transition: opacity .65s var(--ease), transform .65s var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms);
}
html.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ---------- 65. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .masaqy-intro .intro-bg::before, .masaqy-intro .intro-bg::after, .hero-float,
    .masaqy-intro h3, .masaqy-intro p, .hero-actions, .hero-stats, .hero-media { animation: none !important; }
    html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
    .hero-media, [dir="ltr"] .hero-media { transform: none; }
    .course-card, .article-card, .category-block, .btn { transition-duration: .01ms !important; }
}


/* ---------- 67. Full-bleed photo hero ---------- */
.masaqy-intro.has-photo { min-height: min(760px, calc(100vh - var(--nav-h))); display: flex; flex-direction: column; }
.masaqy-intro.has-photo .intro-bg {
    flex: 1 1 auto; display: flex; align-items: center; min-height: 0;
    padding-block: clamp(4rem, 3rem + 5vw, 7rem);
}
.masaqy-intro .hero-photo { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
/* widen the photo layer past the end edge so the people sit beside the copy, not under it */
@media (min-width: 992px)  { .masaqy-intro .hero-photo { inset-inline-end: -18%; } }
@media (min-width: 1200px) { .masaqy-intro .hero-photo { inset-inline-end: -34%; } }
.masaqy-intro .hero-photo img {
    width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block;
    transform: scale(1.02);
    animation: hero-photo-in 1.6s var(--ease) both;
}
@keyframes hero-photo-in { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1.02); } }
.masaqy-intro.has-photo::before {
    background:
        linear-gradient(270deg, rgba(11,7,22,.94) 0%, rgba(11,7,22,.8) 36%, rgba(11,7,22,.42) 68%, rgba(11,7,22,.2) 100%),
        linear-gradient(0deg, #0b0716 0%, rgba(11,7,22,.6) 24%, transparent 58%);
}
[dir="ltr"] .masaqy-intro.has-photo::before {
    background:
        linear-gradient(90deg, rgba(11,7,22,.94) 0%, rgba(11,7,22,.8) 36%, rgba(11,7,22,.42) 68%, rgba(11,7,22,.2) 100%),
        linear-gradient(0deg, #0b0716 0%, rgba(11,7,22,.6) 24%, transparent 58%);
}
.masaqy-intro.has-photo::after { opacity: .55; }
.masaqy-intro.has-photo .intro-bg::before,
.masaqy-intro.has-photo .intro-bg::after { opacity: .32; }
.masaqy-intro .hero-content { max-width: 740px; }
.masaqy-intro.has-photo h3 {
    max-width: 17ch;
    font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4rem);
    text-shadow: 0 2px 24px rgba(0,0,0,.4);
}
.masaqy-intro.has-photo p { max-width: 56ch; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.masaqy-intro.has-photo .hero-stat { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
@media (max-width: 991.98px) {
    .masaqy-intro.has-photo { min-height: 0; }
    .masaqy-intro.has-photo .intro-bg { padding-block: 3rem 2.5rem; }
    .masaqy-intro .hero-photo img { object-position: 50% 26%; }
    .masaqy-intro.has-photo::before {
        background: linear-gradient(180deg, rgba(11,7,22,.7) 0%, rgba(11,7,22,.86) 55%, #0b0716 100%);
    }
}

/* ---------- 68. Why band ---------- */
.why-section {
    background: var(--surface);
    padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
    border-bottom: 1px solid var(--line-2);
}
.why-section .section-title { margin-bottom: 1.75rem; }
.why-list {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; background: var(--surface);
    box-shadow: var(--sh-xs);
}
.why-list > li { padding: 1.6rem 1.5rem; border-inline-start: 1px solid var(--line-2); }
.why-list > li:first-child { border-inline-start: 0; }
.why-icon {
    width: 48px; height: 48px; border-radius: var(--r);
    background: var(--brand-50); color: var(--brand);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem;
    margin-bottom: .95rem;
}
.why-list h3 { font-size: 1.05rem; margin: 0 0 .35rem; color: var(--ink); }
.why-list p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.7; }
@media (max-width: 991.98px) {
    .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .why-list > li:nth-child(odd) { border-inline-start: 0; }
    .why-list > li:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 575.98px) {
    .why-list { grid-template-columns: 1fr; }
    .why-list > li { border-inline-start: 0; border-top: 1px solid var(--line-2); padding: 1.25rem 1.2rem; }
    .why-list > li:first-child { border-top: 0; }
}

/* ---------- 69. Learner reviews band ---------- */
.reviews-section {
    position: relative; isolation: isolate; overflow: hidden;
    padding-block: clamp(3rem, 1.6rem + 4.4vw, 5.5rem);
    background: linear-gradient(160deg, var(--brand-950) 0%, color-mix(in srgb, var(--brand) 52%, #0b0716) 100%);
    color: #fff;
}
.reviews-section::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(50% 60% at 90% 0%, color-mix(in srgb, var(--brand) 65%, transparent), transparent 62%),
        radial-gradient(40% 50% at 5% 100%, color-mix(in srgb, #3b82f6 38%, transparent), transparent 60%);
}
.reviews-section .section-title h1 { color: #fff; }
.reviews-section .section-title .section-sub { color: rgba(255,255,255,.68); }
.reviews-row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
.review-card-wrap { height: 100%; }
.review-card {
    height: 100%; margin: 0; display: flex; flex-direction: column; gap: .9rem;
    padding: 1.5rem; border-radius: var(--r-lg);
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: background .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.review-card:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.28); transform: translateY(-4px); }
.review-card .review-stars { display: inline-flex; gap: 2px; font-size: .9rem; }
.review-card .review-stars .bi { color: #fbbf24; }
.review-card blockquote {
    margin: 0; flex: 1 1 auto; font-size: 1rem; line-height: 1.85; color: rgba(255,255,255,.92);
    display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.review-card figcaption {
    display: flex; align-items: center; gap: .75rem;
    padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12);
}
.review-card figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.28); flex: 0 0 auto; }
.review-card figcaption > div { min-width: 0; }
.review-card figcaption strong { display: block; font-size: .95rem; color: #fff; }
.review-card figcaption a { display: block; font-size: .8rem; color: rgba(255,255,255,.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-card figcaption a:hover { color: #fff; }

/* ---------- 70. Instructors ---------- */
.instructors-section {
    position: relative; isolation: isolate;
    padding-block: clamp(3rem, 1.6rem + 4.4vw, 5.5rem);
    background: var(--surface-2);
}
.instructors-section::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(48% 60% at 0% 0%, var(--brand-50), transparent 60%);
}
.instructors-row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
.instructor-card-wrap { height: 100%; }
.instructor-card {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem;
    height: 100%; padding: 1.75rem 1.25rem 1.5rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    color: var(--ink); box-shadow: var(--sh-xs);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.instructor-card:hover, .instructor-card:focus-visible {
    transform: translateY(-6px); border-color: var(--brand-200); color: var(--ink);
    box-shadow: 0 22px 44px color-mix(in srgb, var(--brand) 16%, transparent);
}
.instructor-avatar { width: 96px; height: 96px; border-radius: 50%; padding: 3px; background: var(--grad-cta); margin-bottom: .65rem; }
.instructor-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #fff; display: block; }
.instructor-card strong { font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.instructor-card .instructor-title { font-size: .85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.instructor-card .instructor-meta {
    margin-top: .55rem; font-size: .78rem; font-weight: 600; color: var(--brand);
    background: var(--brand-50); border-radius: var(--r-full); padding: .25rem .75rem;
    display: inline-flex; align-items: center; gap: .35rem;
}

/* phones: reviews and instructors become swipe rows, like the other card rows */
@media (max-width: 767.98px) {
    .reviews-row, .instructors-row {
        flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: .5rem;
    }
    .reviews-row::-webkit-scrollbar, .instructors-row::-webkit-scrollbar { display: none; }
    .reviews-row > [class*="col-"] { flex: 0 0 82%; max-width: 82%; scroll-snap-align: start; }
    .instructors-row > [class*="col-"] { flex: 0 0 60%; max-width: 60%; scroll-snap-align: start; }
}

/* ---------- 71. Solid white header with a real menu ---------- */
.navbar.navbar-expand {
    background: rgba(255,255,255,.96) !important;
    border-bottom: 1px solid var(--line) !important;
}
.navbar .main-menu { display: flex !important; align-items: center; gap: .1rem; flex: 0 0 auto; }
.navbar .main-menu .nav-item.dropdown { margin-inline-end: .35rem !important; }
.navbar .main-menu .main-link .nav-link {
    position: relative;
    padding: .55rem .8rem;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
}
.navbar .main-menu .main-link .nav-link::after {
    content: "";
    position: absolute;
    inset-inline: .8rem;
    bottom: .28rem;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-cta);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .22s var(--ease);
}
.navbar .main-menu .main-link .nav-link:hover,
.navbar .main-menu .main-link .nav-link:focus-visible { background: transparent; color: var(--brand); }
.navbar .main-menu .main-link .nav-link:hover::after,
.navbar .main-menu .main-link .nav-link.active::after { transform: scaleX(1); }
.navbar .main-menu .main-link .nav-link.active { color: var(--brand); }
/* the logo, menu and action cluster never shrink; the search field absorbs the slack */
.navbar-brand, .navbar .main-menu, .navbar .navbar-nav, .navbar .user-menu, .navbar .burger-btn { flex-shrink: 0; }
.navbar-brand img { flex-shrink: 0; }
.navbar .main-menu .main-link .nav-link { padding: .55rem .65rem; font-size: .92rem; }
@media (min-width: 1200px) {
    .navbar .form-group { flex: 1 1 200px; min-width: 140px; max-width: 300px; margin-inline: .75rem !important; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar .main-link.link-contact { display: none !important; }
    .navbar .form-group { max-width: 220px; }
}

/* ---------- 72. Overlay menu: logo, start-aligned rows ---------- */
#sidebar .sidebar-header { flex-wrap: wrap; justify-content: flex-start; padding-top: 1rem; }
#sidebar .overlay-logo { flex: 0 0 100%; display: block; margin-bottom: 1.5rem; padding-inline-end: 3.5rem; }
#sidebar .overlay-logo img { height: 40px; width: auto; display: block; filter: brightness(0) invert(1); }
#sidebar .toggler { top: 1rem; }
#sidebar .sidebar-item .sidebar-link,
#sidebar .sidebar-link {
    justify-content: flex-start;
    text-align: start;
    padding: .85rem 1.1rem;
    font-size: 1.05rem;
}
#sidebar .sidebar-link .bi { color: rgba(255,255,255,.7); }
#sidebar .sidebar-item.has-sub > .sidebar-link::after { margin-inline-start: auto; }
#sidebar .submenu-item a { text-align: start; }
@media (max-width: 767.98px) {
    #sidebar { padding: 1rem; align-items: flex-start; }
    #sidebar .sidebar-wrapper { padding-top: var(--safe-t, 0px); }
    #sidebar .sidebar-header { padding-top: .5rem; }
    #sidebar .toggler { top: .5rem; }
}

/* ---------- 73. Hero fills the viewport below the header ---------- */
@media (min-width: 992px) {
    .masaqy-intro.has-photo { min-height: calc(100vh - var(--nav-h)); }
    .masaqy-intro.has-photo .intro-bg { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
}
.hero-stat .hero-stat-num { font-variant-numeric: tabular-nums; }

/* ---------- 74. "Why" section: pinned checklist + scrolling cards ---------- */
.why-scroll { border-bottom: 0; padding-block: clamp(3rem, 1.6rem + 4.4vw, 5.5rem); }
.why-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 1rem + 3vw, 4rem); }
.why-pin { align-self: stretch; }
.why-pin-inner { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.why-pin h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); letter-spacing: -.025em; line-height: 1.2; margin: 0 0 .9rem; text-wrap: balance; }
.why-pin p { color: var(--muted); font-size: 1.02rem; line-height: 1.8; max-width: 42ch; margin: 0 0 1.75rem; }
.why-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.why-step {
    width: 100%; display: flex; align-items: center; gap: .75rem; text-align: start;
    padding: .7rem .85rem; border: 0; border-radius: var(--r); background: transparent;
    color: var(--muted-2); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
    transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.why-step:hover { background: var(--surface-2); color: var(--ink-3); }
.why-step.is-done { color: var(--muted); }
.why-step.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh); }
.why-check {
    width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%;
    border: 1.5px solid var(--line); color: transparent; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.35rem; line-height: 1; transition: background .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
.why-check svg { display: block; width: 14px; height: 14px; }
/* icon-font glyphs sit on a baseline offset; make the glyph box the whole em box so flex centring is exact */
.why-card-visual > .bi::before, .why-badge .bi::before, #sidebar .sidebar-link .bi::before { display: block; vertical-align: 0; line-height: 1; }
.why-step.is-done .why-check, .why-step.is-active .why-check {
    background: var(--grad-cta); border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 80%, transparent);
}
.why-progress { margin-top: 1.5rem; height: 4px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.why-progress > span {
    display: block; height: 100%; border-radius: var(--r-full); background: var(--grad-cta);
    transform: scaleX(var(--p, .25)); transform-origin: left center;
    transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}
[dir="rtl"] .why-progress > span { transform-origin: right center; }

.why-cards { display: flex; flex-direction: column; gap: 1.5rem; }
.why-card {
    position: relative; overflow: hidden; border-radius: var(--r-xl);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-xs);
    transition: box-shadow .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
}
.why-card.is-active { border-color: var(--brand-200); box-shadow: 0 24px 50px color-mix(in srgb, var(--brand) 16%, transparent), 0 0 0 3px var(--brand-50); }
.why-card-body { padding: clamp(1.4rem, 1rem + 1.2vw, 2.25rem); }
.why-num { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--brand); }
.why-card h3 { font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); margin: .35rem 0 .6rem; letter-spacing: -.015em; }
.why-card p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.8; max-width: 58ch; }
.why-card-visual {
    margin: 0 clamp(1.4rem, 1rem + 1.2vw, 2.25rem) clamp(1.4rem, 1rem + 1.2vw, 2.25rem);
    aspect-ratio: 16 / 7; border-radius: var(--r-lg);
    background:
        radial-gradient(60% 90% at 85% 15%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 60%),
        radial-gradient(50% 80% at 10% 100%, color-mix(in srgb, #3b82f6 45%, transparent), transparent 60%),
        linear-gradient(135deg, var(--brand-950), color-mix(in srgb, var(--brand) 45%, #0b0716));
    display: flex; align-items: center; justify-content: center;
    position: relative; isolation: isolate; overflow: hidden;
}
.why-card-visual::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 44px 44px;
}
.why-card-visual > .bi {
    width: 96px; height: 96px; border-radius: 28px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 2.6rem; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 24px 40px rgba(0,0,0,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: transform .7s var(--ease);
}
.why-card.is-active .why-card-visual > .bi { transform: scale(1.06); }
@media (max-width: 991.98px) {
    .why-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .why-pin-inner { position: static; }
    .why-steps { display: none; }
    .why-progress { display: none; }
    .why-cards { gap: 1rem; }
    .why-card-visual { aspect-ratio: 16 / 6; }
    .why-card-visual > .bi { width: 72px; height: 72px; font-size: 2rem; border-radius: 22px; }
}

/* ---------- 75. Category cards: sub-categories on hover ---------- */
.category-block { position: relative; }
.category-block .category-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.category-block .category-cover { height: 224px; }
.category-block .category-cover .category-overlay {
    background: linear-gradient(to top, rgba(9,12,22,.9) 0%, rgba(9,12,22,.5) 48%, rgba(9,12,22,.08) 100%);
}
.category-block .category-content { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.category-block .category-name { font-size: 1.2rem; }
.category-block .category-meta .courses-count {
    display: inline-flex; align-items: center; gap: .35rem;
    color: rgba(255,255,255,.88); font-size: .8rem; font-weight: 600; margin: 0; padding: .2rem .65rem;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-full);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.category-block .category-subs {
    position: relative; z-index: 3;
    display: flex; flex-wrap: wrap; gap: .35rem;
    max-height: 0; opacity: 0; overflow: hidden; transform: translateY(8px);
    transition: max-height .35s var(--ease), opacity .3s var(--ease), transform .35s var(--ease);
}
.category-block .category-subs a {
    display: inline-flex; align-items: center; padding: .22rem .6rem;
    font-size: .74rem; font-weight: 600; color: #fff; border-radius: var(--r-full);
    background: color-mix(in srgb, var(--brand) 55%, transparent); border: 1px solid rgba(255,255,255,.22);
    transition: background .18s var(--ease);
}
.category-block .category-subs a:hover { background: var(--brand); color: #fff; }
.category-block .category-cta {
    display: inline-flex; align-items: center; gap: .35rem;
    color: #fff; font-size: .85rem; font-weight: 700;
    opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.category-block .category-cta .bi { transition: transform .3s var(--ease); }
.category-block:hover .category-subs, .category-block:focus-within .category-subs { max-height: 120px; opacity: 1; transform: none; }
.category-block:hover .category-cta, .category-block:focus-within .category-cta { opacity: 1; transform: none; }
.category-block:hover .category-cta .bi { transform: translateX(-4px); }
[dir="ltr"] .category-block:hover .category-cta .bi { transform: translateX(4px); }
.category-block:hover .category-cover .category-overlay {
    background: linear-gradient(to top, color-mix(in srgb, var(--brand) 86%, #0b0716) 0%, color-mix(in srgb, var(--brand) 55%, transparent) 55%, rgba(9,12,22,.1) 100%);
}
@media (hover: none) {
    .category-block .category-subs, .category-block .category-cta { display: none; }
}
@media (max-width: 767.98px) {
    .category-block .category-cover { height: 150px; }
}

/* ---------- 76. Header: categories mega menu (Udemy-style flyouts) ---------- */
.navbar .main-menu .nav-item.dropdown { position: relative; }
.navbar .main-menu .nav-item.dropdown > .dropdown-menu.categories-menu {
    margin-top: .35rem; min-width: 280px; padding: .5rem; border-radius: var(--r-lg);
    box-shadow: 0 24px 60px rgba(14,21,36,.16), 0 4px 12px rgba(14,21,36,.06);
}
.navbar .main-menu .nav-item.dropdown.is-open > .dropdown-menu { display: block; }
.navbar .categories-menu > li { position: relative; }
.navbar .categories-menu .dropdown-item {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .6rem .8rem; font-size: .92rem; font-weight: 500; color: var(--ink-2); border-radius: var(--r-sm);
}
.navbar .categories-menu .dropdown-item .arrow-dir { float: none !important; font-size: .75rem; color: var(--muted-2); }
.navbar .categories-menu > li:hover > .dropdown-item,
.navbar .categories-menu > li:focus-within > .dropdown-item { background: var(--brand-50); color: var(--brand); }
.navbar .categories-menu > li:hover > .dropdown-item .arrow-dir { color: var(--brand); }
/* second level flies out beside the panel, away from the screen edge */
.navbar .categories-menu .submenu.categories-menu {
    display: none; position: absolute; top: -.5rem; inset-inline-end: calc(100% + .35rem); inset-inline-start: auto;
    min-width: 260px; padding: .5rem; margin: 0; border-radius: var(--r-lg);
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(14,21,36,.16), 0 4px 12px rgba(14,21,36,.06);
}
.navbar .categories-menu > li:hover > .submenu.categories-menu,
.navbar .categories-menu > li:focus-within > .submenu.categories-menu { display: block; animation: dd-in .16s var(--ease); }
.navbar .categories-menu .submenu .dropdown-item { font-weight: 500; }

/* ---------- 77. "Why" cards: photos when uploads/assets/why-N.jpg exists ---------- */
.why-card-visual.has-image { aspect-ratio: 16 / 8; }
.why-card-visual.has-image img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform .9s var(--ease);
}
.why-card.is-active .why-card-visual.has-image img { transform: scale(1.04); }
.why-card-visual.has-image::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, color-mix(in srgb, var(--brand-950) 62%, transparent), transparent 58%);
}
.why-card-visual .why-badge {
    position: absolute; inset-inline-start: 1.1rem; bottom: 1.1rem; z-index: 1;
    width: 54px; height: 54px; border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.45rem; color: #fff;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 14px 28px rgba(0,0,0,.32);
}
@media (max-width: 991.98px) {
    .why-card-visual.has-image { aspect-ratio: 16 / 9; }
    .why-card-visual .why-badge { width: 44px; height: 44px; border-radius: 13px; font-size: 1.2rem; inset-inline-start: .85rem; bottom: .85rem; }
}

/* ---------- 78. Categories: mosaic grid (one feature tile + compact tiles) ---------- */
.section-title .section-link.section-link-btn {
    background: var(--brand); border-color: var(--brand); color: #fff; padding: .6rem 1.15rem;
    box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--brand) 80%, transparent);
}
.section-title .section-link.section-link-btn:hover {
    background: color-mix(in srgb, var(--brand) 86%, #000); border-color: transparent; color: #fff;
}
.categories-mosaic {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 200px; grid-auto-flow: dense; gap: 1rem;
}
.categories-mosaic .category-block { height: 100%; margin: 0; }
.categories-mosaic .category-block .category-cover { height: 100%; }
.categories-mosaic .category-block.is-feature { grid-column: span 2; grid-row: span 2; }
.categories-mosaic .is-feature .category-cover .category-overlay { padding: clamp(1.25rem, 1rem + 1vw, 2rem); }
.categories-mosaic .is-feature .category-name { font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.1rem); line-height: 1.25; }
.categories-mosaic .is-feature .category-subs,
.categories-mosaic .is-feature .category-cta { max-height: none; opacity: 1; transform: none; }
.categories-mosaic .is-feature .category-subs a { font-size: .82rem; padding: .3rem .8rem; }
.categories-mosaic .category-block:not(.is-feature) .category-name { font-size: 1.05rem; }
.categories-mosaic .category-block:not(.is-feature) .category-cover .category-overlay { padding: .95rem; }
@media (hover: none) {
    .categories-mosaic .is-feature .category-subs { display: flex; }
    .categories-mosaic .is-feature .category-cta { display: inline-flex; }
}
@media (max-width: 991.98px) {
    .categories-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; gap: .85rem; }
    .categories-mosaic .category-block.is-feature { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 575.98px) {
    .categories-mosaic { grid-auto-rows: 150px; gap: .7rem; }
    .categories-mosaic .is-feature .category-name { font-size: 1.35rem; }
    .categories-mosaic .is-feature .category-subs { display: none; }
}

/* ---------- 79. Header: tablet range 768-1199px ---------- */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .navbar .container { gap: .25rem; }
    .navbar .form-group { flex: 1 1 120px; min-width: 110px; max-width: 240px; margin-inline: .5rem !important; }
    .navbar .form-group .form-control { font-size: .875rem; }
    .navbar .navbar-btn,
    .navbar .nav-item .btn[href$="/login"],
    .navbar .nav-item .btn[href$="/register"] { padding: .45rem .8rem; font-size: .875rem; white-space: nowrap; }
    .navbar .main-menu .nav-item.dropdown .nav-link { white-space: nowrap; }
    /* "become an instructor" moves to the overlay menu until xl */
    .navbar .navbar-btn { display: none !important; }
    .navbar .nav-item:has(> .navbar-btn) { display: none !important; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar .main-menu .nav-item.dropdown { margin-inline-end: 0 !important; }
    .navbar .main-menu .nav-item.dropdown .nav-link { padding-inline: .5rem; }
    /* the search field is hidden here, so keep the icon that opens the overlay search */
    .navbar .appbar-search {
        display: inline-flex !important; align-items: center; justify-content: center;
        width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); flex: 0 0 auto;
    }
    .navbar .appbar-search:hover { background: var(--surface-2); }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar .main-link.link-contact { display: none !important; }
    .navbar .main-menu .main-link .nav-link { padding: .55rem .5rem; font-size: .88rem; }
    .navbar .form-group { max-width: 190px; }
}

/* ---------- 80. Header: two-panel categories mega menu (list + sub-categories) ---------- */
@media (min-width: 992px) {
    .navbar .main-menu .nav-item.dropdown > .dropdown-menu.categories-menu {
        width: 640px; min-width: 0; padding: .6rem; background: var(--surface);
    }
    /* soft panel that the hovered category's sub-list covers */
    .navbar .main-menu .nav-item.dropdown > .dropdown-menu.categories-menu::before {
        content: ""; position: absolute; top: .6rem; bottom: .6rem; inset-inline-end: .6rem;
        width: calc(100% - 300px - 1.8rem); border-radius: var(--r);
        background: radial-gradient(90% 90% at 50% 50%, var(--brand-50), var(--surface-2));
    }
    .navbar .main-menu .nav-item.dropdown > .categories-menu > li { position: static; }
    .navbar .main-menu .nav-item.dropdown > .categories-menu > li > .dropdown-item { width: 300px; }
    .navbar .categories-menu .submenu.categories-menu {
        top: .6rem; bottom: .6rem; inset-inline-end: .6rem; inset-inline-start: auto;
        width: calc(100% - 300px - 1.8rem); min-width: 0; padding: .6rem;
        border: 0; box-shadow: none; background: var(--surface-2); border-radius: var(--r);
        overflow: auto; animation: none;
    }
    .navbar .categories-menu .submenu.categories-menu .dropdown-item { background: transparent; color: var(--ink-2); }
    .navbar .categories-menu .submenu.categories-menu .dropdown-item:hover {
        background: var(--surface); color: var(--brand); box-shadow: var(--sh-xs);
    }
}

/* ---------- 81. Burger menu: light side drawer (replaces the full-screen overlay) ---------- */
#sidebar {
    padding: 0; display: block;
    background: rgba(12, 8, 26, .48);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
#sidebar .sidebar-wrapper,
#sidebar.active .sidebar-wrapper,
#sidebar:not(.active) .sidebar-wrapper {
    position: absolute; top: 0; bottom: 0; inset-inline-start: 0; inset-inline-end: auto;
    left: auto; right: auto;
    width: min(380px, 88vw); height: 100%; max-height: none;
    display: flex; flex-direction: column;
    padding: 0; margin: 0; opacity: 1;
    background: var(--surface);
    border: 0; border-inline-end: 1px solid var(--line);
    box-shadow: 0 0 0 1px rgba(14,21,36,.04), 24px 0 64px rgba(14,21,36,.22);
    overflow: hidden;
    transition: transform .38s var(--ease);
}
#sidebar:not(.active) .sidebar-wrapper { transform: translateX(-104%); }
[dir="rtl"] #sidebar:not(.active) .sidebar-wrapper { transform: translateX(104%); }
#sidebar.active .sidebar-wrapper { transform: none; }
#sidebar .sidebar-header, #sidebar .sidebar-menu { transform: none; transition: none; }

/* header: logo + close, search on its own row */
#sidebar .sidebar-header {
    flex: 0 0 auto;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .8rem 1rem;
    padding: 1rem 1.1rem .95rem; margin: 0;
    border-bottom: 1px solid var(--line);
    text-align: start;
}
#sidebar .overlay-logo { flex: none; display: block; margin: 0; padding: 0; }
#sidebar .overlay-logo img { height: 36px; width: auto; filter: none; }
#sidebar .toggler { position: static; top: auto; }
#sidebar .sidebar-hide,
#sidebar a.sidebar-hide.d-xl-none {
    width: 40px; height: 40px;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
#sidebar .sidebar-hide:hover { background: var(--brand-50); color: var(--brand); border-color: var(--brand-200); transform: rotate(90deg); }
#sidebar .sidebar-header .justify-content-between { grid-column: 1 / -1; }
#sidebar .sidebar-header .input-group-sm { position: relative; }
#sidebar .sidebar-header .input-group-sm > .bi {
    position: absolute; inset-inline-start: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--muted-2); font-size: .95rem; pointer-events: none;
}
#sidebar .sidebar-header input.form-control {
    height: 46px; padding-inline: 2.6rem 1rem; font-size: .95rem;
    background: var(--surface-2); color: var(--ink);
    border: 1px solid var(--line) !important; border-radius: var(--r-full);
}
#sidebar .sidebar-header input.form-control::placeholder { color: var(--muted-2); }
#sidebar .sidebar-header input.form-control:focus {
    background: var(--surface); color: var(--ink);
    border-color: var(--brand-200) !important; box-shadow: 0 0 0 4px var(--brand-50);
}

/* scrolling body */
#sidebar .sidebar-menu {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: .8rem .75rem 1rem;
}
#sidebar .sidebar-menu::-webkit-scrollbar { width: 6px; }
#sidebar .sidebar-menu::-webkit-scrollbar-thumb { background: var(--brand-100); border-radius: 99px; }
#sidebar .drawer-account {
    display: flex; align-items: center; gap: .75rem;
    padding: .7rem .8rem; margin: 0 0 .6rem;
    border-radius: var(--r-lg); background: var(--brand-50); color: var(--ink);
}
#sidebar .drawer-account:hover { background: var(--brand-100); }
#sidebar .drawer-account img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
#sidebar .drawer-account span { min-width: 0; }
#sidebar .drawer-account strong { display: block; font-size: .95rem; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sidebar .drawer-account small { display: block; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#sidebar .menu { gap: .1rem; }
#sidebar .sidebar-item .sidebar-link,
#sidebar .sidebar-link {
    justify-content: flex-start; text-align: start; gap: .8rem;
    padding: .55rem .7rem; border-radius: var(--r);
    color: var(--ink-2); font-size: .98rem; font-weight: 600; letter-spacing: 0;
}
#sidebar .sidebar-link .bi {
    width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface-2); color: var(--brand); font-size: 1rem;
    transition: background .18s var(--ease), color .18s var(--ease);
}
#sidebar .sidebar-item .sidebar-link:hover,
#sidebar .sidebar-item .sidebar-link:focus-visible { background: var(--brand-50); color: var(--brand); }
#sidebar .sidebar-item .sidebar-link:hover .bi { background: var(--brand-100); color: var(--brand); }
#sidebar .sidebar-item.active > .sidebar-link { background: var(--brand-50); color: var(--brand); }
#sidebar .sidebar-item.active > .sidebar-link .bi { background: var(--brand); color: #fff; }
#sidebar .sidebar-item.has-sub > .sidebar-link::after {
    margin-inline-start: auto; opacity: 1;
    border-inline-end-color: var(--muted-2); border-block-end-color: var(--muted-2);
}
#sidebar .submenu { margin: .1rem 0 .4rem; padding-inline-start: 2.9rem; padding-inline-end: .4rem; text-align: start; }
#sidebar .submenu-item > a { padding: .45rem .7rem; color: var(--ink-3); font-size: .93rem; font-weight: 500; }
#sidebar .submenu-item > a:hover { background: var(--surface-2); color: var(--brand); }
#sidebar .submenu-item.submenu-all > a { color: var(--brand); font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; }
#sidebar .drawer-sep { height: 1px; margin: .55rem .4rem; background: var(--line); list-style: none; }

/* guest footer: login / register */
#sidebar .drawer-footer {
    flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
    padding: .85rem .9rem calc(.85rem + var(--safe-b, 0px));
    border-top: 1px solid var(--line); background: var(--surface);
}
#sidebar .drawer-footer .btn { border-radius: var(--r-full); font-weight: 700; padding: .65rem .75rem; font-size: .95rem; }
#sidebar .drawer-btn-primary { background: var(--grad-cta); color: #fff; border: 0; box-shadow: var(--sh-brand); }
#sidebar .drawer-btn-primary:hover { color: #fff; filter: brightness(1.06); }
#sidebar .drawer-btn-outline { border: 1.5px solid var(--brand-200); color: var(--brand); background: transparent; }
#sidebar .drawer-btn-outline:hover { background: var(--brand-50); color: var(--brand); }

#sidebar .sidebar-wrapper::-webkit-scrollbar { width: 0; }
@media (max-width: 767.98px) {
    #sidebar { padding: 0; align-items: stretch; }
    #sidebar .sidebar-wrapper { max-height: none; }
    #sidebar .sidebar-header { padding-top: calc(.9rem + var(--safe-t, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
    #sidebar .sidebar-wrapper { transition: none; }
}

/* ---------- 82. Course cards: one height per row ---------- */
/* an earlier reset left the wrapper at height:auto, so height:100% on the card had nothing to fill */
.courses-group .row > [class*="col-"] { display: flex; }
.courses-group .course-card-wrap { height: auto; width: 100%; display: flex; }
.courses-group .course-card { flex: 1 1 auto; width: 100%; height: auto; min-height: 100%; }
.courses-group .course-card > a { display: flex; flex-direction: column; flex: 1 1 auto; }
.courses-group .course-card > a > .p-3 { flex: 1 1 auto; }
.courses-group .course-card .course-title { min-height: 2.9em; }
.courses-group .course-card .course-meta { min-height: 1.9em; }
.courses-group .course-card .course-card-bottom { margin-top: auto; }

/* ---------- 83. Instructors: auto-scrolling slider ---------- */
.instructors-slider { position: relative; margin-inline: -.5rem; }
.instructors-track {
    display: flex; gap: 1.25rem; align-items: stretch;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    padding: .5rem .5rem 1.25rem;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.instructors-track::-webkit-scrollbar { display: none; }
.instructor-slide { flex: 0 0 clamp(210px, 22.5%, 262px); display: flex; }
.instructor-slide .instructor-card { width: 100%; }
.instructor-slide .instructor-title { min-height: 2.6em; }
.slider-nav {
    position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
    box-shadow: var(--sh); cursor: pointer; font-size: 1rem;
    transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.slider-nav:hover { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--sh-brand); }
.slider-nav:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 2px; }
.slider-prev { inset-inline-start: -.75rem; }
.slider-next { inset-inline-end: -.75rem; }
@media (hover: none) { .slider-nav { display: none; } }
@media (max-width: 767.98px) {
    .instructors-slider { margin-inline: -16px; }
    .instructors-track { padding-inline: 16px; gap: .85rem; mask-image: none; -webkit-mask-image: none; }
    .instructor-slide { flex-basis: 62%; }
}
@media (prefers-reduced-motion: reduce) {
    .instructors-track { scroll-snap-type: x mandatory; }
    .instructor-slide { scroll-snap-align: start; }
}

/* ---------- 84. Footer: social buttons + link rhythm ---------- */
.footer .social-media-icons { flex-wrap: wrap; gap: .6rem; margin-block-start: 1.6rem; }
.footer .social-media-icons .social-link {
    width: 42px !important; height: 42px !important; border-radius: 50%;
    background: rgba(255,255,255,.07) !important; border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.88);
    transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.footer .social-media-icons .social-link svg { width: 18px; height: 18px; display: block; }
.footer .social-media-icons .social-link .bi { font-size: 1.1rem; color: inherit; }
.footer .social-media-icons .social-link .bi::before { display: block; vertical-align: 0; line-height: 1; }
.footer .social-media-icons .social-link:hover,
.footer .social-media-icons .social-link:focus-visible {
    background: var(--grad-cta) !important; border-color: transparent; color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--brand) 85%, transparent);
}
.footer .social-media-icons .social-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.footer .footer-title { font-size: 1rem; }
.footer .footer-links li a { display: inline-block; transition: color .18s var(--ease), transform .18s var(--ease); }
.footer .footer-links li a:hover { transform: translateX(-3px); }
[dir="ltr"] .footer .footer-links li a:hover { transform: translateX(3px); }
.footer .footer-bottom .copyright a { color: rgba(255,255,255,.8); }

/* ---------- 85. Hero: header + hero = exactly one screen on desktop ---------- */
/* paddings and type scale with the viewport height, so 1280x720 and 1366x768 laptops fit too */
@media (min-width: 992px) {
    .masaqy-intro.has-photo { min-height: calc(100vh - var(--nav-h)); }
    .masaqy-intro.has-photo .intro-bg { padding-block: clamp(1.5rem, 4vh, 5rem); }
    .masaqy-intro.has-photo h3 {
        font-size: clamp(2rem, min(1.3rem + 3.6vw, 6.4vh), 4rem);
        margin-bottom: clamp(.75rem, 2vh, 1.5rem);
    }
    .masaqy-intro.has-photo p {
        font-size: clamp(1rem, min(.95rem + .4vw, 2.4vh), 1.2rem);
        margin-bottom: clamp(1rem, 2.6vh, 2rem);
    }
    .masaqy-intro.has-photo .hero-stats { margin-block-start: clamp(1.25rem, 3.2vh, 2.5rem); }
    .masaqy-intro.has-photo .hero-stat { padding: clamp(.55rem, 1.2vh, .8rem) 1.15rem; }
    .masaqy-intro.has-photo .hero-stat .hero-stat-num { font-size: clamp(1.3rem, min(1.2rem + .9vw, 2.6vh), 1.9rem); }
}

/* ---------- 86. Promo band: dark card, points, image mosaic ---------- */
.promo-section { padding-block: clamp(2.5rem, 1.5rem + 3vw, 5rem); background: var(--surface); }
.promo-band {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(1.75rem, 1rem + 2.5vw, 3.5rem); align-items: center;
    padding: clamp(1.75rem, 1.2rem + 2.4vw, 3.5rem);
    border-radius: 28px; background: #1c1b2b; color: #fff;
    box-shadow: 0 30px 80px -30px rgba(28,27,43,.6);
}
.promo-band::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(50% 70% at 100% 0%, color-mix(in srgb, var(--brand) 42%, transparent), transparent 60%),
        radial-gradient(40% 60% at 0% 100%, color-mix(in srgb, #3b82f6 26%, transparent), transparent 60%);
}
.promo-copy { text-align: start; }
.promo-eyebrow {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: color-mix(in srgb, var(--brand) 40%, #fff);
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-full);
    padding: .3rem .8rem; margin-bottom: 1rem;
}
.promo-copy h2 { color: #fff; font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.5rem); line-height: 1.25; letter-spacing: -.02em; margin: 0 0 .9rem; text-wrap: balance; }
.promo-copy > p { color: rgba(255,255,255,.72); font-size: 1.02rem; line-height: 1.8; margin: 0 0 1.5rem; max-width: 52ch; }
.promo-points { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.25rem; }
.promo-points li { display: flex; align-items: center; gap: .7rem; font-weight: 600; font-size: .95rem; color: rgba(255,255,255,.92); line-height: 1.45; }
.promo-icon {
    width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}
.promo-icon .bi::before { display: block; vertical-align: 0; line-height: 1; }
.promo-icon.is-violet { background: #e6dcff; color: #5b21b6; }
.promo-icon.is-mint   { background: #d5f5e3; color: #0f7a4b; }
.promo-icon.is-amber  { background: #ffe9c2; color: #9a5b00; }
.promo-icon.is-sky    { background: #d6ecff; color: #0b5bb5; }
.promo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.promo-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #fff; color: #1c1b2b; font-weight: 700; padding: .85rem 1.5rem; border-radius: 14px; border: 0;
    box-shadow: 0 12px 28px -12px rgba(0,0,0,.6);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.promo-btn:hover, .promo-btn:focus-visible { color: #1c1b2b; background: #fff; transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(0,0,0,.7); }
.promo-btn .bi { transition: transform .18s var(--ease); }
.promo-btn:hover .bi { transform: translateX(-3px); }
[dir="ltr"] .promo-btn:hover .bi { transform: translateX(3px); }
.promo-note { color: rgba(255,255,255,.58); font-size: .85rem; }

.promo-media { display: grid; grid-template-columns: 1fr 1.15fr .95fr; gap: clamp(.6rem, .4rem + .8vw, 1rem); height: clamp(320px, 22rem + 8vw, 470px); }
.promo-stack { display: grid; grid-template-rows: 1fr 1fr; gap: clamp(.6rem, .4rem + .8vw, 1rem); min-height: 0; }
.promo-tile { position: relative; overflow: hidden; border-radius: 22px; min-height: 0; display: flex; align-items: center; justify-content: center; }
.promo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-tile-shape { background: linear-gradient(160deg, #38bdf8 0%, #6d5bff 55%, #4c1d95 100%); }
.promo-tile-learner { background: #ecebf3; color: #b8b4c9; font-size: 3rem; }
.promo-tile-icon { background: #f1edff; color: var(--brand); font-size: 2.6rem; }
.promo-tile-object { background: #c9b4ff; color: #4c1d95; font-size: 2.6rem; }
.promo-tile:hover img { transform: scale(1.03); }
.promo-tile img { transition: transform .8s var(--ease); }
@media (max-width: 991.98px) {
    .promo-band { grid-template-columns: 1fr; border-radius: 22px; }
    .promo-media { height: clamp(220px, 44vw, 340px); }
}
@media (max-width: 575.98px) {
    .promo-points { grid-template-columns: 1fr; }
    .promo-media { grid-template-columns: 1fr 1.15fr; height: 220px; }
    .promo-stack { display: none; }
    .promo-tile { border-radius: 16px; }
}

/* ---------- 87. FAQ: intro column + accordion ---------- */
.faq-section { padding-block: clamp(3rem, 1.6rem + 4.4vw, 5.5rem); background: var(--surface-2); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
.faq-intro-inner { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.section-eyebrow {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand);
    background: var(--brand-50); border-radius: var(--r-full); padding: .3rem .75rem; margin-bottom: 1rem;
}
.faq-intro h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); letter-spacing: -.025em; line-height: 1.2; margin: 0 0 .75rem; }
.faq-intro p { color: var(--muted); font-size: 1.02rem; line-height: 1.8; max-width: 40ch; margin: 0 0 1.5rem; }
.faq-contact { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; color: var(--ink-2); font-weight: 600; }
.faq-contact-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    background: var(--surface); border: 1px solid var(--line); color: var(--brand); font-weight: 700;
    border-radius: var(--r-full); padding: .55rem 1.1rem; box-shadow: var(--sh-xs);
}
.faq-contact-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-xs); overflow: hidden;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.faq-item summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.05rem 1.25rem; font-weight: 700; font-size: 1.02rem; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 3px solid var(--brand-200); outline-offset: -3px; }
.faq-toggle {
    position: relative; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--line);
    transition: background .25s var(--ease), transform .3s var(--ease), border-color .25s var(--ease);
}
.faq-toggle::before, .faq-toggle::after {
    content: ""; position: absolute; top: 50%; left: 50%; background: var(--brand); border-radius: 2px;
    transform: translate(-50%, -50%);
}
.faq-toggle::before { width: 12px; height: 2px; }
.faq-toggle::after { width: 2px; height: 12px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.faq-item[open] { border-color: var(--brand-200); box-shadow: 0 16px 36px -18px color-mix(in srgb, var(--brand) 40%, transparent); }
.faq-item[open] summary { color: var(--brand); }
.faq-item[open] .faq-toggle { background: var(--brand); border-color: var(--brand); transform: rotate(180deg); }
.faq-item[open] .faq-toggle::before, .faq-item[open] .faq-toggle::after { background: #fff; }
.faq-item[open] .faq-toggle::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.faq-a { padding: 0 1.25rem 1.2rem; }
.faq-a p { margin: 0; color: var(--ink-3); line-height: 1.85; font-size: .98rem; max-width: 62ch; animation: dd-in .25s var(--ease); }
@media (max-width: 991.98px) {
    .faq-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .faq-intro-inner { position: static; }
}

/* ---------- 88. Final CTA band ---------- */
.cta-section { padding-block: clamp(2.5rem, 1.5rem + 3vw, 5rem) clamp(3rem, 2rem + 3vw, 5.5rem); background: var(--surface); }
.cta-band {
    position: relative; isolation: isolate; overflow: hidden; text-align: center;
    padding: clamp(2.25rem, 1.5rem + 3vw, 4.5rem) clamp(1.25rem, 1rem + 2vw, 3rem);
    border-radius: 28px; color: #fff;
    background: linear-gradient(135deg, var(--brand-950) 0%, color-mix(in srgb, var(--brand) 70%, #0b0716) 55%, color-mix(in srgb, var(--brand) 55%, #3b82f6) 100%);
    box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--brand) 70%, transparent);
}
.cta-band::before, .cta-band::after {
    content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .6; pointer-events: none;
}
.cta-band::before { width: 38vw; height: 38vw; max-width: 520px; max-height: 520px; inset-inline-end: -12%; top: -50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 60%, #fff), transparent 65%); }
.cta-band::after  { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; inset-inline-start: -10%; bottom: -55%; background: radial-gradient(circle, color-mix(in srgb, #3b82f6 70%, #fff), transparent 65%); }
.cta-eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: rgba(255,255,255,.75); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-full); padding: .3rem .85rem; margin-bottom: 1rem; }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.8rem); letter-spacing: -.025em; line-height: 1.2; margin: 0 auto .75rem; max-width: 22ch; text-wrap: balance; }
.cta-band p { color: rgba(255,255,255,.78); font-size: 1.05rem; line-height: 1.8; max-width: 52ch; margin: 0 auto 1.75rem; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.cta-btn-primary, .cta-btn-ghost {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .85rem 1.6rem; border-radius: 14px; font-weight: 700; font-size: 1rem;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.cta-btn-primary { background: #fff; color: var(--brand-950); border: 0; box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); }
.cta-btn-primary:hover, .cta-btn-primary:focus-visible { background: #fff; color: var(--brand); transform: translateY(-2px); }
.cta-btn-primary .bi { transition: transform .18s var(--ease); }
.cta-btn-primary:hover .bi { transform: translateX(-3px); }
[dir="ltr"] .cta-btn-primary:hover .bi { transform: translateX(3px); }
.cta-btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cta-btn-ghost:hover, .cta-btn-ghost:focus-visible { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.6); }
.cta-trust { list-style: none; margin: 1.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.75rem; color: rgba(255,255,255,.78); font-size: .9rem; font-weight: 600; }
.cta-trust li { display: inline-flex; align-items: center; gap: .45rem; }
.cta-trust .bi { color: color-mix(in srgb, var(--brand) 35%, #fff); }
@media (max-width: 575.98px) {
    .cta-band { border-radius: 20px; }
    .cta-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- 89. Reviews: rating summary + auto slider ---------- */
.reviews-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem); align-items: center; }
.reviews-summary { text-align: start; min-width: 0; }
.section-eyebrow.is-light { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.reviews-summary h2 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 .75rem; text-wrap: balance; }
.reviews-summary p { color: rgba(255,255,255,.7); font-size: 1.02rem; line-height: 1.8; margin: 0; max-width: 36ch; }
.rating-box {
    display: inline-flex; align-items: center; gap: 1rem; margin-top: 1.5rem;
    padding: .9rem 1.25rem; border-radius: var(--r-lg);
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.rating-avg { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.rating-meta .review-stars { display: inline-flex; gap: 2px; font-size: 1rem; }
.rating-meta .review-stars .bi { color: #fbbf24; }
.rating-meta small { display: block; margin-top: .3rem; font-size: .84rem; color: rgba(255,255,255,.66); }

.reviews-slider { position: relative; min-width: 0; margin-inline: -.25rem; }
.reviews-track {
    display: flex; gap: 1rem; align-items: stretch;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    padding: .75rem .25rem 1.1rem;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}
.reviews-track::-webkit-scrollbar { display: none; }
.review-slide { flex: 0 0 clamp(280px, 26vw, 350px); display: flex; }
.review-card { position: relative; width: 100%; gap: .8rem; padding: 1.4rem 1.4rem 1.25rem; }
.review-card::before {
    content: "\201D"; position: absolute; top: .1rem; inset-inline-end: 1rem;
    font-family: Georgia, "Times New Roman", serif; font-size: 5rem; line-height: 1; color: rgba(255,255,255,.12); pointer-events: none;
}
.review-card .review-head { display: flex; align-items: center; gap: .5rem; }
.review-card .review-num { font-size: .85rem; font-weight: 700; color: #fbbf24; }
.review-card blockquote { -webkit-line-clamp: 4; font-size: .98rem; }
.review-card figcaption strong .bi { font-size: .8rem; color: #7dd3fc; margin-inline-start: .15rem; vertical-align: middle; }
.review-card figcaption time { display: block; font-size: .74rem; color: rgba(255,255,255,.5); margin-top: .1rem; }
.reviews-slider .slider-nav { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.reviews-slider .slider-nav:hover { background: #fff; color: var(--brand); border-color: #fff; }
.reviews-slider .slider-prev { inset-inline-start: -.5rem; }
.reviews-slider .slider-next { inset-inline-end: -.5rem; }
@media (max-width: 991.98px) {
    .reviews-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .reviews-slider { margin-inline: -16px; }
    .reviews-track { padding-inline: 16px; mask-image: none; -webkit-mask-image: none; }
    .review-slide { flex-basis: min(78%, 340px); }
}
@media (prefers-reduced-motion: reduce) {
    .reviews-track { scroll-snap-type: x mandatory; }
    .review-slide { scroll-snap-align: start; }
}

/* ---------- 90. Become an instructor page ---------- */
.join-page { background: var(--surface); }
.join-hero {
    position: relative; isolation: isolate; overflow: hidden; color: #fff;
    padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
    background: linear-gradient(160deg, var(--brand-950) 0%, color-mix(in srgb, var(--brand) 55%, #0b0716) 100%);
}
.join-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(50% 60% at 90% 0%, color-mix(in srgb, var(--brand) 65%, transparent), transparent 62%),
        radial-gradient(40% 50% at 5% 100%, color-mix(in srgb, #3b82f6 38%, transparent), transparent 60%);
}
.join-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: center; }
.join-hero-copy { text-align: start; }
.join-hero h1 { color: #fff; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); line-height: 1.2; letter-spacing: -.025em; margin: .9rem 0 1rem; text-wrap: balance; }
.join-hero p { color: rgba(255,255,255,.76); font-size: 1.05rem; line-height: 1.8; max-width: 54ch; margin: 0; }
.join-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1.25rem; }
.join-hero .cta-trust { justify-content: flex-start; margin-top: .5rem; }
.join-hero-media { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 34px 70px rgba(0,0,0,.45); transform: rotate(-2deg); }
[dir="ltr"] .join-hero-media { transform: rotate(2deg); }
.join-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.join-benefits { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.join-benefits-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.join-benefit {
    padding: 1.5rem 1.35rem; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-xs);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.join-benefit:hover { transform: translateY(-4px); border-color: var(--brand-200); box-shadow: 0 20px 40px -20px color-mix(in srgb, var(--brand) 40%, transparent); }
.join-benefit-icon {
    width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-50); color: var(--brand); font-size: 1.25rem; margin-bottom: 1rem;
}
.join-benefit-icon .bi::before { display: block; vertical-align: 0; line-height: 1; }
.join-benefit h3 { font-size: 1.08rem; margin: 0 0 .4rem; }
.join-benefit p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.75; }

.join-steps { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); background: var(--surface-2); }
.join-steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; counter-reset: step; }
.join-step { position: relative; padding: 1.6rem 1.4rem 1.5rem; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.join-step-num {
    display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
    background: var(--grad-cta); color: #fff; font-weight: 800; font-size: .95rem; margin-bottom: 1rem; box-shadow: var(--sh-brand);
}
.join-step h3 { font-size: 1.1rem; margin: 0 0 .4rem; }
.join-step p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.75; }

.join-form-section { padding-block: clamp(2.5rem, 1.5rem + 3vw, 5rem); }
.join-form-card {
    max-width: 940px; margin: 0 auto; padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
    background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--sh-lg);
}
.join-form-head { text-align: start; margin-bottom: .5rem; }
.join-form-head h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin: 0 0 .4rem; letter-spacing: -.02em; }
.join-form-head p { color: var(--muted); margin: 0; line-height: 1.75; }
.join-form .form-section { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px dashed var(--line); }
.join-form .form-section-title { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-bottom: 1rem; }
.join-form .form-section-title .num {
    width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff; font-size: .85rem; font-weight: 800;
}
.join-form .form-group { margin-bottom: 1.1rem; }
.join-form label { font-weight: 600; color: var(--ink-2); margin-bottom: .35rem; }
.join-form .form-control, .join-form .form-select { border-radius: var(--r); min-height: 46px; }
.join-form textarea.form-control { min-height: 130px; }
.join-file {
    display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 46px; padding: .6rem .9rem; cursor: pointer;
    border: 1.5px dashed var(--brand-200); border-radius: var(--r); background: var(--brand-50); color: var(--brand); font-weight: 600; margin: 0;
    transition: background .18s var(--ease), border-color .18s var(--ease);
}
.join-file:hover { background: var(--brand-100); }
.join-file.has-file { border-style: solid; background: var(--surface); color: var(--ink); }
.join-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.join-file .bi { font-size: 1.2rem; }
.join-file-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.join-agree { display: flex; align-items: flex-start; gap: .6rem; font-weight: 500 !important; color: var(--ink-3) !important; line-height: 1.6; cursor: pointer; }
.join-agree input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--brand); flex: 0 0 auto; }
.join-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: .5rem; }
.join-form-actions .btn-lg { padding: .8rem 1.75rem; border-radius: var(--r); font-weight: 700; }
.join-form-note { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .85rem; }
.join-form-note .bi { color: var(--brand); }
.join-status { text-align: center; padding: clamp(1.5rem, 1rem + 2vw, 3rem) 1rem; }
.join-status > .bi { font-size: 3.2rem; color: var(--brand); display: block; margin-bottom: .75rem; }
.join-status h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin: 0 0 .5rem; }
.join-status p { color: var(--muted); max-width: 48ch; margin: 0 auto .5rem; line-height: 1.8; }
.join-status .btn { margin-top: .75rem; border-radius: var(--r-full); padding: .7rem 1.5rem; font-weight: 700; }
.join-status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.join-status-meta { font-size: .9rem; color: var(--muted-2) !important; }
.join-rejected { border-radius: var(--r-lg); margin-bottom: 1.25rem; }
@media (max-width: 991.98px) {
    .join-hero-grid { grid-template-columns: 1fr; }
    .join-hero-media { max-width: 520px; transform: none; }
    .join-benefits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .join-steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .join-benefits-grid { grid-template-columns: 1fr; }
    .join-form-card { border-radius: 20px; }
    .join-hero-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- 91. Register: account type switch + presenter fields ---------- */
.account-type { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.25rem; }
.account-type-option { position: relative; margin: 0; cursor: pointer; }
.account-type-option input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.account-type-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; height: 100%;
    padding: .9rem 1rem; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--surface-2);
    transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.account-type-card .bi { font-size: 1.35rem; color: var(--brand); margin-bottom: .2rem; }
.account-type-card strong { font-size: 1rem; color: var(--ink); }
.account-type-card small { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.account-type-option:hover .account-type-card { border-color: var(--brand-200); }
.account-type-option input:checked + .account-type-card { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-50); }
.account-type-option input:focus-visible + .account-type-card { outline: 3px solid var(--brand-200); outline-offset: 2px; }
.instructor-fields { margin-top: .25rem; }
.instructor-fields .form-section:first-child { border-top: 0; padding-top: .5rem; margin-top: 0; }
.instructor-fields .form-section-title { font-size: 1rem; }
.register-card-wrap .card { transition: max-width .3s var(--ease); }
@media (max-width: 575.98px) { .account-type { grid-template-columns: 1fr; } }


/* ---------- 92. Footer: commercial registration (CR) badge + QR ---------- */
.footer .cr-badge {
    display: inline-flex; align-items: center; gap: .9rem;
    margin-block-start: 1.5rem; padding: .55rem; padding-inline-end: 1rem;
    max-width: 100%;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--r-sm); color: rgba(255,255,255,.72); text-decoration: none;
    transition: background .18s var(--ease), border-color .18s var(--ease);
}
.footer .cr-badge img {
    width: 84px; height: 84px; flex: 0 0 auto; display: block;
    background: #fff; padding: 4px; border-radius: 8px;
}
.footer .cr-badge-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.footer .cr-badge-label { font-size: .75rem; color: rgba(255,255,255,.55); }
.footer .cr-badge-num {
    font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: .04em;
    font-variant-numeric: tabular-nums; unicode-bidi: isolate;
}
.footer .cr-badge:hover, .footer .cr-badge:focus {
    background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.28); color: #fff;
}
.footer .cr-badge:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- 91. Hero copy: multi-paragraph description + tagline ---------- */
/* the site description is one paragraph per line; a short last line is the tagline */
.masaqy-intro .hero-copy { max-width: 62ch; margin-block-end: 1.5rem; }
.masaqy-intro .hero-copy p { max-width: none; margin-block-end: .85rem; }
.masaqy-intro .hero-copy p:last-child { margin-block-end: 0; }
.masaqy-intro .hero-copy .hero-tagline {
    font-weight: 700; color: #fff; letter-spacing: -.01em; text-wrap: balance;
    padding-inline-start: .9rem; border-inline-start: 3px solid rgba(255,255,255,.72);
    margin-block-start: 1.15rem;
}
@media (min-width: 992px) {
    .masaqy-intro.has-photo .hero-copy { margin-block-end: clamp(1rem, 2.6vh, 2rem); }
    .masaqy-intro.has-photo .hero-copy p { margin-bottom: clamp(.5rem, 1.2vh, .85rem); }
    .masaqy-intro.has-photo .hero-copy p:last-child { margin-bottom: 0; }
}

/* ---------- 92. Static pages (page.php: about / privacy / terms): headings, lists, contact ---------- */
.card.page .page-content > :first-child { margin-block-start: 0; }
.card.page .page-content h2 { font-size: 1.3rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; margin-block: 2.1rem .7rem; }
.card.page .page-content h3 { font-size: 1.1rem; font-weight: 700; color: var(--ink-2); margin-block: 1.5rem .5rem; }
.card.page .page-content .page-lead { font-size: 1.12rem; font-weight: 600; color: var(--ink-2); }
.card.page .page-content ul, .card.page .page-content ol { margin-block: .25rem 1.25rem; padding-inline-start: 1.35rem; }
.card.page .page-content li { font-size: 1.0125rem; line-height: 1.9; color: var(--ink-3); margin-block: .3rem; padding-inline-start: .15rem; }
.card.page .page-content li::marker { color: var(--brand); }
.card.page .page-content li strong { color: var(--ink-2); }
.card.page .page-content .contact-list { list-style: none; padding: 0; margin-block: .5rem 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.card.page .page-content .contact-list a { font-weight: 700; color: var(--brand); }
.card.page .page-content .page-note { margin-block-start: 2rem; padding-block-start: 1rem; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .9rem; line-height: 1.8; }

/* ---------- 93. Footer: contact channels under the social icons ---------- */
.footer .footer-contact { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-direction: column; gap: .5rem; }
.footer .footer-contact li { margin: 0; font-size: .9375rem; }
.footer .footer-contact a { display: inline-flex; align-items: center; gap: .55rem; color: rgba(255,255,255,.78); }
.footer .footer-contact a:hover, .footer .footer-contact a:focus { color: #fff; }
.footer .footer-contact .bi { font-size: 1.05rem; color: rgba(255,255,255,.6); }

/* ---------- 94. Contact page: channels + message form ---------- */
.contact-page { padding-block: clamp(1.25rem, 1rem + 1.5vw, 2.5rem) clamp(1.5rem, 1rem + 2vw, 3rem); }
.contact-head { max-width: 62ch; margin-block-end: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.contact-head h1 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 0 0 .5rem; }
.contact-head .contact-lead { font-size: 1.05rem; line-height: 1.8; color: var(--ink-3); margin: 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.25rem, 1rem + 1.5vw, 2.5rem); align-items: start; }
.contact-side { display: flex; flex-direction: column; gap: 1rem; }
.contact-side-title { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 -.25rem; }
.contact-card {
    display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-xs);
    color: inherit; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
a.contact-card:hover, a.contact-card:focus-visible {
    transform: translateY(-3px); border-color: var(--brand-200); color: inherit; text-decoration: none;
    box-shadow: 0 16px 34px color-mix(in srgb, var(--brand) 14%, transparent);
}
.contact-icon {
    flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem;
    background: var(--brand-100); color: var(--brand);
}
.contact-card.is-whatsapp .contact-icon { background: #dcf8e8; color: #128c4a; }
.contact-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.contact-label { font-size: .85rem; color: var(--ink-3); }
.contact-value { font-weight: 700; color: var(--ink); font-size: 1.02rem; overflow-wrap: anywhere; }
.contact-card.contact-social { flex-direction: column; align-items: flex-start; gap: .75rem; }
.contact-social .social-media-icons { display: flex; flex-wrap: wrap; gap: .5rem; }
.contact-social .social-link {
    width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 1.05rem;
    transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.contact-social .social-link svg { width: 18px; height: 18px; }
.contact-social .social-link:hover, .contact-social .social-link:focus-visible { background: var(--brand); border-color: var(--brand); color: #fff; }
.contact-note { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--ink-3); padding-inline: .25rem; }
.contact-form-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-xs);
    padding: clamp(1.25rem, 1rem + 1.2vw, 2rem);
}
.contact-form-card h2 { font-size: 1.25rem; font-weight: 700; color: var(--ink); margin: 0 0 .35rem; }
.contact-form-card .contact-form-sub { color: var(--ink-3); font-size: .95rem; line-height: 1.7; margin: 0 0 1.25rem; }
.contact-form-card .form-group { margin-block-end: 1rem; }
.contact-form-card label { display: block; font-weight: 600; color: var(--ink-2); margin-block-end: .35rem; }
.contact-form-card .btn-primary { padding: .8rem 1.75rem; border-radius: var(--r); font-weight: 700; }
@media (max-width: 991.98px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-side { order: 2; }
}

/* ---------- 95. Cookie notice ---------- */
.cookie-consent {
    position: fixed; inset-inline-start: 1rem; bottom: 1rem; z-index: 1090;
    width: calc(100% - 2rem); max-width: 480px;
    display: flex; gap: .9rem; padding: 1.1rem 1.2rem;
    background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: 0 24px 60px -20px rgba(11,7,22,.45), var(--sh);
    opacity: 0; transform: translateY(12px);
    transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.cookie-consent.is-visible { opacity: 1; transform: none; }
.cookie-consent-icon {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-100); color: var(--brand); font-size: 1.3rem;
}
.cookie-consent-body { min-width: 0; }
.cookie-consent-title { font-weight: 700; color: var(--ink); margin-bottom: .25rem; }
.cookie-consent-body p { font-size: .9rem; line-height: 1.7; color: var(--ink-3); margin: 0 0 .85rem; }
.cookie-consent-body p a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cookie-consent-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cookie-consent .btn { border-radius: var(--r-sm); padding: .55rem 1.1rem; font-size: .9rem; }
.cookie-btn-primary { background: var(--brand); color: #fff; font-weight: 700; }
.cookie-btn-primary:hover, .cookie-btn-primary:focus-visible { background: var(--brand-hover); color: #fff; }
.cookie-btn-ghost { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); font-weight: 600; }
.cookie-btn-ghost:hover, .cookie-btn-ghost:focus-visible { background: var(--surface-3); color: var(--ink); }

/* ---------- 96. Course cards: "coming soon" badge (registration closed, no lessons yet) ---------- */
.course-card .course-cover .course-soon-badge {
    position: absolute; top: .75rem; inset-inline-start: .75rem; z-index: 2;
    background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1;
    padding: .4rem .7rem; border-radius: var(--r-full);
    box-shadow: 0 6px 16px rgba(11,7,22,.25);
}
