:root,
[data-bs-theme="dark"] {
    color-scheme: dark;
    --bm-bg: #0a0b1e;
    --bm-text: #f7f4ff;
    --bm-muted: #b8b0cc;
    --bm-surface: #14152e;
    --bm-surface-strong: #1d1f3d;
    --bm-border: #2f315c;
    --bm-brand: #ffffff;
    --bm-accent: #c77ad0;
    --bm-accent-strong: #ff4d7d;
    --bm-cyan: #5ce1ff;
    --bm-purple: #8b5cf6;
    --bm-gradient: linear-gradient(135deg, #4c1d95 0%, #9b2d9e 48%, #e61e50 100%);
    --bm-gradient-neon: linear-gradient(90deg, #5ce1ff 0%, #9b2d9e 45%, #e61e50 100%);
    --bm-gradient-soft: linear-gradient(135deg, rgba(92, 225, 255, 0.1) 0%, rgba(155, 45, 158, 0.16) 48%, rgba(230, 30, 80, 0.12) 100%);
    --bm-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --bm-glow: 0 0 24px rgba(230, 30, 80, 0.35);
    --bm-radius: 16px;
    --bm-success: #66d39b;
}

[data-bs-theme="light"] {
    color-scheme: light;
    --bm-bg: #fffefe;
    --bm-text: #17142b;
    --bm-muted: #6d6780;
    --bm-surface: #f8f5fc;
    --bm-surface-strong: #efe8f8;
    --bm-border: #e4dcf0;
    --bm-brand: #1a1033;
    --bm-accent: #9b2d9e;
    --bm-accent-strong: #e61e50;
    --bm-cyan: #0891b2;
    --bm-purple: #5b2d8e;
    --bm-gradient: linear-gradient(135deg, #5b2d8e 0%, #9b2d9e 48%, #e61e50 100%);
    --bm-gradient-neon: linear-gradient(90deg, #0891b2 0%, #9b2d9e 45%, #e61e50 100%);
    --bm-gradient-soft: linear-gradient(135deg, rgba(91, 45, 142, 0.1) 0%, rgba(230, 30, 80, 0.08) 100%);
    --bm-shadow: 0 18px 50px rgba(91, 45, 142, 0.14);
    --bm-glow: 0 0 18px rgba(230, 30, 80, 0.2);
    --bm-success: #1f7a55;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bm-bg);
    color: var(--bm-text);
    font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.site-header {
    background: color-mix(in srgb, var(--bm-bg) 90%, transparent);
    border-bottom: 1px solid var(--bm-border);
    backdrop-filter: blur(18px);
}

.site-nav-link {
    color: var(--bm-muted);
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-nav-link:hover,
.site-nav-link:focus {
    color: var(--bm-accent-strong);
}

.site-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: var(--bm-glow);
}

.site-logo-title {
    font-size: 1.02rem;
    line-height: 1.2;
}

.site-logo-subtitle {
    color: var(--bm-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-logo-tagline {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--bm-accent-strong) 35%, var(--bm-border));
    color: var(--bm-muted);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.offcanvas {
    --bs-offcanvas-bg: var(--bm-bg);
    --bs-offcanvas-color: var(--bm-text);
    width: min(88vw, 360px) !important;
}

.offcanvas .btn-close {
    filter: none;
}

[data-bs-theme="dark"] .offcanvas .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.text-muted-soft {
    color: var(--bm-muted);
}

.text-accent {
    color: var(--bm-accent-strong);
}

.text-gradient {
    background: var(--bm-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-cinematic {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: max(78svh, 640px);
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.hero-cinematic__media,
.hero-cinematic__overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    transform: translateX(-50%);
}

.hero-cinematic__media {
    z-index: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-cinematic__overlay {
    z-index: 1;
    background:
        linear-gradient(270deg, rgba(10, 11, 30, 0.92) 0%, rgba(10, 11, 30, 0.68) 36%, rgba(10, 11, 30, 0.18) 68%, rgba(10, 11, 30, 0.35) 100%),
        linear-gradient(180deg, rgba(10, 11, 30, 0.35) 0%, transparent 42%, rgba(10, 11, 30, 0.82) 100%);
    pointer-events: none;
}

.hero-cinematic__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-block: clamp(4rem, 10vw, 7rem);
}

main > #top,
main > #top > .hero-cinematic {
    width: 100%;
    max-width: 100%;
}

.hero {
    position: relative;
    min-height: calc(100svh - 76px);
    padding-block: clamp(3rem, 8vw, 6.5rem);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(92, 225, 255, 0.12), transparent 34%),
        radial-gradient(circle at 88% 12%, rgba(230, 30, 80, 0.14), transparent 30%),
        var(--bm-gradient-soft);
    pointer-events: none;
}

.hero > .container,
.hero > .container-fluid,
.hero-cinematic__content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.35rem, 8vw, 4.5rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bm-accent) 12%, transparent);
    color: var(--bm-accent-strong);
    font-weight: 700;
}

.hero-portrait-wrap {
    position: relative;
    max-width: 420px;
    margin-inline: auto;
}

.hero-portrait-ring {
    position: absolute;
    inset: -14px;
    border-radius: 28px;
    background: var(--bm-gradient);
    opacity: 0.85;
    filter: blur(0);
}

.hero-portrait-frame {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 4px solid color-mix(in srgb, var(--bm-bg) 88%, transparent);
    box-shadow: var(--bm-shadow);
}

.hero-portrait-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
}

.hero-viewfinder {
    position: absolute;
    inset: 18px;
    pointer-events: none;
}

.hero-viewfinder span {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.85);
}

.hero-viewfinder span:nth-child(1) { top: 0; inset-inline-start: 0; border-inline-end: 0; border-bottom: 0; }
.hero-viewfinder span:nth-child(2) { top: 0; inset-inline-end: 0; border-inline-start: 0; border-bottom: 0; }
.hero-viewfinder span:nth-child(3) { bottom: 0; inset-inline-start: 0; border-inline-end: 0; border-top: 0; }
.hero-viewfinder span:nth-child(4) { bottom: 0; inset-inline-end: 0; border-inline-start: 0; border-top: 0; }

.hero-quote-card {
    position: absolute;
    inset-inline-start: -1rem;
    bottom: 1.5rem;
    max-width: 240px;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: color-mix(in srgb, var(--bm-bg) 92%, transparent);
    border: 1px solid var(--bm-border);
    box-shadow: var(--bm-shadow);
}

.stat-pill {
    padding: 1rem 1.1rem;
    border-radius: var(--bm-radius);
    background: color-mix(in srgb, var(--bm-bg) 90%, transparent);
    border: 1px solid var(--bm-border);
    box-shadow: 0 8px 24px rgba(91, 45, 142, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-pill:hover {
    transform: translateY(-3px);
    box-shadow: var(--bm-shadow);
}

.stat-pill strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1.1;
    background: var(--bm-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.surface-card {
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.surface-card:hover {
    border-color: color-mix(in srgb, var(--bm-accent) 28%, var(--bm-border));
}

.path-card:hover,
.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bm-shadow);
}

.btn-brand {
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-color: #ffffff;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: transparent;
    background-image: var(--bm-gradient);
    border: 0;
    box-shadow: 0 10px 28px rgba(230, 30, 80, 0.22);
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-brand:hover,
.btn-brand:focus {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(230, 30, 80, 0.28);
}

.btn-soft {
    --bs-btn-bg: var(--bm-surface);
    --bs-btn-border-color: var(--bm-border);
    --bs-btn-color: var(--bm-text);
    --bs-btn-hover-bg: var(--bm-surface-strong);
    --bs-btn-hover-border-color: var(--bm-border);
    --bs-btn-hover-color: var(--bm-text);
}

.section-block {
    padding-block: clamp(4rem, 9vw, 7rem);
    border-top: 1px solid var(--bm-border);
}

.badge-soft {
    color: var(--bm-accent-strong);
    background: color-mix(in srgb, var(--bm-accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--bm-accent) 22%, transparent);
}

.section-eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--bm-accent-strong);
}

.section-surface {
    background: var(--bm-gradient-soft);
}

.cta-band {
    border-radius: calc(var(--bm-radius) + 4px);
    background: var(--bm-gradient);
    color: #ffffff;
    box-shadow: var(--bm-shadow);
}

.cta-band .text-muted-soft {
    color: rgba(255, 255, 255, 0.82);
}

.cta-band .btn-light {
    font-weight: 700;
}

.trainer-spotlight {
    border-radius: calc(var(--bm-radius) + 6px);
    overflow: hidden;
    background: var(--bm-gradient-soft);
    border: 1px solid var(--bm-border);
}

.trainer-spotlight img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.community-chip {
    padding: 1rem 1.15rem;
    border-radius: var(--bm-radius);
    background: color-mix(in srgb, var(--bm-bg) 92%, transparent);
    border: 1px solid var(--bm-border);
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.community-chip:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--bm-accent-strong) 35%, var(--bm-border));
}

.site-footer {
    margin-top: auto;
    background: var(--bm-surface);
    border-top: 1px solid var(--bm-border);
}

.site-footer-heading {
    color: var(--bm-text);
    font-weight: 800;
    margin-bottom: 1rem;
}

.site-footer-links a {
    color: var(--bm-muted);
    transition: color 0.2s ease;
}

.site-footer-links a:hover {
    color: var(--bm-accent-strong);
}

.site-footer-bottom {
    border-top: 1px solid var(--bm-border);
    color: var(--bm-muted);
    font-size: 0.92rem;
}

.site-footer-lead {
    color: var(--bm-muted);
    max-width: 34rem;
}

.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: var(--bm-gradient);
}

.testimonial-stars {
    color: var(--bm-accent-strong);
    letter-spacing: 0.12em;
    font-size: 0.95rem;
}

.testimonial-quote {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--bm-text);
}

.testimonial-highlight {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bm-accent) 12%, transparent);
    color: var(--bm-accent-strong);
    font-size: 0.88rem;
    font-weight: 700;
}

.testimonial-avatar {
    display: inline-grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: var(--bm-gradient);
    color: #ffffff;
    font-weight: 800;
    flex-shrink: 0;
}

.heading-viewfinder {
    position: relative;
    display: inline-block;
    padding: 0.35rem 0.85rem;
}

.heading-viewfinder::before,
.heading-viewfinder::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--bm-accent-strong);
    border-style: solid;
}

.heading-viewfinder::before {
    top: 0;
    inset-inline-start: 0;
    border-width: 2px 0 0 2px;
}

.heading-viewfinder::after {
    bottom: 0;
    inset-inline-end: 0;
    border-width: 0 2px 2px 0;
}

.brand-motto {
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--bm-cyan);
}

.promo-panel {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    border-radius: calc(var(--bm-radius) + 4px);
    overflow: hidden;
    border: 1px solid var(--bm-border);
    background: var(--bm-surface);
    box-shadow: var(--bm-shadow);
}

@media (min-width: 992px) {
    .promo-panel {
        grid-template-columns: 1.05fr 0.95fr;
    }

    .promo-panel--reverse .promo-panel__media {
        order: 2;
    }
}

.promo-panel__media img {
    display: block;
    width: 100%;
    min-height: 280px;
    object-fit: cover;
}

.promo-panel__body {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.topic-card {
    position: relative;
    min-height: 220px;
    border-radius: var(--bm-radius);
    overflow: hidden;
    border: 1px solid var(--bm-border);
    box-shadow: var(--bm-shadow);
}

.topic-card img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.topic-card:hover img {
    transform: scale(1.04);
}

.topic-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.1rem;
    background: linear-gradient(180deg, transparent 25%, rgba(10, 11, 30, 0.92) 100%);
}

.topic-card__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.neon-divider {
    height: 2px;
    border: 0;
    background: var(--bm-gradient-neon);
    opacity: 0.75;
    margin-block: 0.5rem 1.5rem;
}

.path-card,
.plan-card {
    min-height: 100%;
}

.featured-plan {
    color: #ffffff;
    background: var(--bm-gradient);
    border-color: transparent;
    box-shadow: var(--bm-shadow);
}

.featured-plan .text-muted-soft,
.featured-plan .badge-soft {
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
}

.check-list li::before {
    content: "✓";
    color: var(--bm-success);
    font-weight: 700;
    margin-inline-end: 0.5rem;
}

.card-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.path-hero-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--bm-border);
}

.avatar-preview,
.avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
}

.avatar-preview {
    object-fit: cover;
    border: 2px solid var(--bm-border);
}

.avatar-placeholder {
    display: inline-grid;
    place-items: center;
    background: var(--bm-brand);
    color: var(--bm-bg);
    font-weight: 700;
    font-size: 1.5rem;
}

.media-preview {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--bm-border);
}

.media-preview-box {
    padding: 0.75rem;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: 8px;
}

.admin-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--bm-border);
    flex-shrink: 0;
}

.admin-thumb-wide {
    width: 120px;
    height: 72px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    padding: 0;
    border: 1px solid var(--bm-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bm-surface);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item-overlay {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 0.75rem;
    color: #ffffff;
    text-align: start;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.gallery-modal-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #0b0b0b;
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 1px solid var(--bm-border);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bm-bg) 90%, transparent);
    color: var(--bm-text);
    font-size: 1.5rem;
    line-height: 1;
}

.gallery-modal-prev {
    inset-inline-start: 0.75rem;
}

.gallery-modal-next {
    inset-inline-end: 0.75rem;
}

.community-carousel .carousel-indicators {
    margin-bottom: 0.5rem;
}

.community-carousel .carousel-control-prev,
.community-carousel .carousel-control-next {
    width: 12%;
}

.edit-image-card {
    display: block;
    padding: 0.75rem;
    border: 1px solid var(--bm-border);
    border-radius: 8px;
    background: var(--bm-surface);
    cursor: pointer;
}

.edit-image-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}

.comment-image {
    width: 100%;
    max-width: 320px;
    border-radius: 8px;
    border: 1px solid var(--bm-border);
}

.notification-badge {
    position: absolute;
    top: -6px;
    inset-inline-start: -6px;
    min-width: 18px;
    height: 18px;
    padding-inline: 4px;
    border-radius: 999px;
    background: var(--bm-accent-strong);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.notification-unread {
    border-color: color-mix(in srgb, var(--bm-accent) 35%, var(--bm-border));
}

.lesson-row {
    color: var(--bm-text);
    border-color: var(--bm-border);
}

.lesson-row:hover,
.lesson-row:focus {
    color: var(--bm-text);
    background: var(--bm-surface-strong) !important;
}

.lesson-status {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid var(--bm-border);
    border-radius: 50%;
    color: var(--bm-muted);
    background: var(--bm-bg);
    font-size: 0.8rem;
}

.lesson-status.completed {
    color: #ffffff;
    background: var(--bm-success);
    border-color: var(--bm-success);
}

.lesson-player {
    overflow: hidden;
}

.lesson-placeholder {
    min-height: 360px;
    place-items: center;
}

.lesson-lock {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bm-surface-strong);
    font-size: 1.6rem;
}

.progress {
    --bs-progress-bg: var(--bm-surface-strong);
    height: 10px;
}

.progress-bar {
    background: var(--bm-gradient);
}

.community-image {
    width: 100%;
    max-height: 680px;
    object-fit: contain;
    background: #0b0b0b;
}

.preserve-lines {
    white-space: pre-line;
}

.demo-mode-banner {
    background: #7a4f12;
    color: #fff8eb;
    font-size: 0.9rem;
}

@media (max-width: 991.98px) {
    .hero-quote-card {
        position: static;
        max-width: none;
        margin-top: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero {
        min-height: auto;
    }
}
