/* ============================================================
   BONJASKY ACADEMY — HEADER + MEGA MENU
   Premium design with featured visuals, USPs, split layout
   ============================================================ */

:root {
    --ba-black: #000000;
    --ba-white: #ffffff;
    --ba-gray-50: #fafafa;
    --ba-gray-100: #f4f4f5;
    --ba-gray-200: #e4e4e7;
    --ba-gray-400: #a1a1aa;
    --ba-gray-500: #71717a;
    --ba-gray-600: #52525b;
    --ba-gray-900: #18181b;
    --ba-accent: #FF0408;
    --ba-radius: 30px;
    --ba-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ba-font-heading: 'Montserrat', Arial, sans-serif;
    --ba-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

.ba-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ============================================================
   TOP BAR
============================================================ */
.ba-topbar {
    background: var(--ba-gray-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 101;
}

.ba-topbar .ba-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 38px;
}

.ba-topbar__items {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ba-topbar__item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-family: var(--ba-font-body);
    font-size: 12px;
    font-weight: 400;
    transition: color var(--ba-transition);
    white-space: nowrap;
}

.ba-topbar__item:hover { color: var(--ba-white); }

.ba-topbar__item svg { width: 12px; height: 12px; flex-shrink: 0; }

.ba-topbar__divider {
    width: 1px;
    height: 11px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.ba-topbar__socials {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ba-topbar__socials a {
    display: flex;
    color: rgba(255, 255, 255, 0.45);
    transition: color var(--ba-transition);
}

.ba-topbar__socials a:hover { color: var(--ba-white); }
.ba-topbar__socials svg { width: 13px; height: 13px; }

/* ============================================================
   HEADER
============================================================ */
.ba-header {
    background: var(--ba-white);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--ba-gray-200);
    transition: box-shadow var(--ba-transition);
}

.ba-header .ba-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 32px;
}

.ba-header--sticky {
    box-shadow: 0 1px 16px rgba(0, 0, 0, 0.06);
}

.ba-header__logo { display: flex; align-items: center; flex-shrink: 0; }
.ba-header__logo img { height: 44px; width: auto; display: block; }

/* ============================================================
   NAV
============================================================ */
.ba-header__nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: flex-end;
}

.ba-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    color: var(--ba-gray-600);
    text-decoration: none;
    font-family: var(--ba-font-body);
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--ba-transition);
    border: none;
    background: none;
    cursor: pointer;
    line-height: 1;
}

.ba-nav__link:hover,
.ba-nav__link[aria-expanded="true"] {
    color: var(--ba-black);
}

.ba-nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--ba-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--ba-transition);
    border-radius: 1px;
}

.ba-nav__link:hover::after,
.ba-nav__link[aria-expanded="true"]::after {
    transform: scaleX(1);
}

.ba-nav__chevron {
    width: 14px;
    height: 14px;
    transition: transform var(--ba-transition);
    opacity: 0.45;
}

.ba-nav__link[aria-expanded="true"] .ba-nav__chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.ba-nav__item { position: relative; display: inline-flex; }

/* CTA */
.ba-header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 26px;
    background: var(--ba-accent);
    color: var(--ba-white);
    text-decoration: none;
    font-family: var(--ba-font-body);
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--ba-radius);
    white-space: nowrap;
    transition: all var(--ba-transition);
    flex-shrink: 0;
}

.ba-header__cta:hover {
    background: var(--ba-black);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Toggle */
.ba-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
}

.ba-header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ba-black);
    border-radius: 2px;
    transition: all var(--ba-transition);
}

/* ============================================================
   MEGA PANELS
============================================================ */
.ba-mega {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 101;
    pointer-events: none;
}
.ba-mega.active { pointer-events: auto; }

.ba-mega__panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--ba-white);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(0,0,0,0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    padding: 0;
}

.ba-mega__panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.ba-mega__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: all var(--ba-transition);
    pointer-events: none;
}

.ba-mega__backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ── Split layout: featured left + links right ──── */
.ba-mega__split {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 380px;
}

/* ── Featured card (left side) ───────────────────── */
.ba-mega__featured {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ba-mega__featured-img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ba-mega__featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gradient overlay on image */
.ba-mega__featured-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.55) 50%,
        rgba(0, 0, 0, 0.15) 100%
    );
    z-index: 1;
}

/* If no image, fallback gradient */
.ba-mega__featured-img img[src=""],
.ba-mega__featured-img img:not([src]) {
    display: none;
}

.ba-mega__featured-img img[src=""] ~ ::after,
.ba-mega__featured:not(:has(img[src])) {
    background: linear-gradient(135deg, var(--ba-gray-900) 0%, #1a1a2e 50%, var(--ba-gray-900) 100%);
}

.ba-mega__featured-content {
    position: relative;
    z-index: 2;
    padding: 28px 24px;
}

.ba-mega__featured-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--ba-accent);
    color: var(--ba-white);
    font-family: var(--ba-font-body);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 20px;
    margin-bottom: 14px;
}

.ba-mega__featured-title {
    font-family: var(--ba-font-heading);
    font-style: italic;
    font-weight: 400;
    font-size: 22px;
    color: var(--ba-white);
    line-height: 1.2;
    margin: 0 0 8px 0;
}

.ba-mega__featured-desc {
    font-family: var(--ba-font-body);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

/* USP pills */
.ba-mega__usps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ba-mega__usp {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ba-font-body);
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.ba-mega__usp svg {
    width: 14px;
    height: 14px;
    stroke: var(--ba-accent);
    flex-shrink: 0;
}

/* CTA button inside featured */
.ba-mega__featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--ba-white);
    color: var(--ba-black);
    text-decoration: none;
    font-family: var(--ba-font-body);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--ba-radius);
    transition: all var(--ba-transition);
    margin-top: 4px;
}

.ba-mega__featured-btn svg {
    width: 16px;
    height: 16px;
    transition: transform var(--ba-transition);
}

.ba-mega__featured-btn:hover {
    background: var(--ba-accent);
    color: var(--ba-white);
}

.ba-mega__featured-btn:hover svg {
    transform: translateX(3px);
    stroke: var(--ba-white);
}

/* ── Links grid (right side) ─────────────────────── */
.ba-mega__links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 16px;
    align-content: start;
}

.ba-mega__links--compact {
    grid-template-columns: repeat(2, 1fr);
}

/* ── Card ─────────────────────────────────────────── */
.ba-mega__card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    transition: all var(--ba-transition);
}

.ba-mega__card:hover {
    background: var(--ba-gray-100);
}

.ba-mega__card:hover .ba-mega__label {
    color: var(--ba-accent);
}

.ba-mega__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--ba-gray-100);
    border-radius: 10px;
    flex-shrink: 0;
    transition: all var(--ba-transition);
}

.ba-mega__card:hover .ba-mega__icon {
    background: var(--ba-accent);
}

.ba-mega__icon svg {
    width: 17px;
    height: 17px;
    stroke: var(--ba-gray-500);
    transition: stroke var(--ba-transition);
}

.ba-mega__card:hover .ba-mega__icon svg {
    stroke: var(--ba-white);
}

.ba-mega__card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ba-mega__label {
    font-family: var(--ba-font-body);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ba-gray-900);
    line-height: 1.2;
    transition: color var(--ba-transition);
}

.ba-mega__desc {
    font-family: var(--ba-font-body);
    font-size: 11.5px;
    color: var(--ba-gray-400);
    line-height: 1.3;
}


/* ============================================================
   MOBILE MENU
============================================================ */
.ba-mobile {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--ba-white);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ba-mobile.active { transform: translateX(0); }

.ba-mobile__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--ba-gray-200);
    flex-shrink: 0;
}

.ba-mobile__logo img { height: 34px; width: auto; }

.ba-mobile__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--ba-gray-200);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all var(--ba-transition);
}

.ba-mobile__close svg { width: 18px; height: 18px; stroke: var(--ba-black); }
.ba-mobile__close:hover { background: var(--ba-gray-100); }

.ba-mobile__nav {
    flex: 1;
    padding: 8px 24px;
    display: flex;
    flex-direction: column;
}

.ba-mobile__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    color: var(--ba-gray-900);
    text-decoration: none;
    font-family: var(--ba-font-body);
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--ba-gray-100);
    transition: color var(--ba-transition);
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.ba-mobile__link:hover { color: var(--ba-accent); }

.ba-mobile__arrow {
    width: 20px;
    height: 20px;
    stroke: var(--ba-gray-400);
    transition: transform var(--ba-transition), stroke var(--ba-transition);
    flex-shrink: 0;
}

.ba-mobile__accordion.open .ba-mobile__arrow {
    transform: rotate(180deg);
    stroke: var(--ba-accent);
}

.ba-mobile__sub {
    display: none;
    flex-direction: column;
    padding: 2px 0 8px 0;
}

.ba-mobile__accordion.open .ba-mobile__sub { display: flex; }

.ba-mobile__sub a {
    display: block;
    padding: 10px 0 10px 16px;
    color: var(--ba-gray-500);
    text-decoration: none;
    font-family: var(--ba-font-body);
    font-size: 14.5px;
    font-weight: 400;
    border-bottom: 1px solid var(--ba-gray-100);
    transition: color var(--ba-transition), padding-left var(--ba-transition);
}

.ba-mobile__sub a:last-child { border-bottom: none; }
.ba-mobile__sub a:hover { color: var(--ba-accent); padding-left: 22px; }

.ba-mobile__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 24px 0;
    padding: 14px 32px;
    background: var(--ba-black);
    color: var(--ba-white);
    text-decoration: none;
    font-family: var(--ba-font-body);
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--ba-radius);
    transition: all var(--ba-transition);
    flex-shrink: 0;
}

.ba-mobile__cta:hover {
    background: var(--ba-accent);
}

.ba-mobile__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 24px 28px;
    flex-shrink: 0;
}

.ba-mobile__footer a {
    color: var(--ba-gray-400);
    text-decoration: none;
    font-family: var(--ba-font-body);
    font-size: 13px;
    transition: color var(--ba-transition);
}

.ba-mobile__footer a:hover { color: var(--ba-accent); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1280px) {
    .ba-nav__link { padding: 8px 10px; font-size: 13.5px; }
    .ba-header__cta { padding: 9px 20px; font-size: 13px; }

    .ba-mega__split {
        grid-template-columns: 280px 1fr;
        min-height: 340px;
    }

    .ba-mega__links { gap: 0; padding: 12px; }
    .ba-mega__card { padding: 10px 12px; }
}

@media (max-width: 1024px) {
    .ba-header__nav { display: none; }
    .ba-header__toggle { display: flex; }
    .ba-header__cta { display: none; }
    .ba-mega, .ba-mega__backdrop { display: none; }
}

@media (max-width: 600px) {
    .ba-topbar { display: none; }

    .ba-header .ba-container {
        height: 60px;
        padding: 0 16px;
    }

    .ba-header__logo img { height: 34px; }
}
