
:root{
    --primary-color: #0a486ff7;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --header-bg: #ffffff;
    --hero-gradient-start: #0a486f;
    --hero-gradient-end: #021521;
    --hero-accent: rgba(255, 255, 255, 0.08);
    --signup-btn-color: #28a745;
    --create-course-btn-color: #ff6b35;
    --font-display: 'Plus Jakarta Sans', 'Roboto', sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Roboto', sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-tactile: cubic-bezier(0.34, 1.56, 0.64, 1);
    --bp-mobile: 576px;
    --bp-tablet: 768px;
    --bp-desktop: 992px;
    --touch-target-min: 44px;

    /* Every full-width band (hero, catalog, pricing) resolves to this same box,
       so their left and right edges line up down the page. */
    --page-max: 1240px;
    --page-gutter: clamp(1rem, 3vw, 2.5rem);
    --page-width: min(var(--page-max), 100% - var(--page-gutter) * 2);

    /* ── Refined neutral + surface scale ── */
    --ink-900: #0b1c2c;
    --ink-800: #16283a;
    --ink-700: #33475a;
    --ink-600: #52697d;
    --ink-500: #708499;
    --ink-400: #96a6b6;
    --ink-300: #c7d2db;
    --surface: #ffffff;
    --surface-soft: #f6f8fa;
    --surface-muted: #eef2f5;
    --border-soft: #e7ecf1;
    --accent-gold: #d4af37;

    /* ── Premium layered shadow scale ── */
    --shadow-xs: 0 1px 2px rgba(11, 28, 44, 0.05);
    --shadow-sm: 0 2px 8px rgba(11, 28, 44, 0.06), 0 1px 2px rgba(11, 28, 44, 0.05);
    --shadow-md: 0 8px 24px rgba(11, 28, 44, 0.08), 0 2px 6px rgba(11, 28, 44, 0.05);
    --shadow-lg: 0 20px 48px rgba(11, 28, 44, 0.12), 0 6px 16px rgba(11, 28, 44, 0.06);
    --shadow-xl: 0 32px 64px rgba(11, 28, 44, 0.16), 0 10px 24px rgba(11, 28, 44, 0.08);

    /* ── Radius scale ── */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide scrollbar for all browsers */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body{
    background-color: var(--header-bg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.mobile-menu-toggle,
.Action-class a,
.Options-Class .nav-link,
.user-profile-trigger {
    min-height: var(--touch-target-min);
}

/* ============================================================
   HEADER
   ============================================================ */
.header{
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 3rem;
    width: 100%;
    box-shadow: 0 1px 0 rgba(11, 28, 44, 0.06), 0 8px 24px rgba(11, 28, 44, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.logo-class{
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-class img{
    width: 120px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
    z-index: 160;
    order: 3;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s var(--ease-tactile);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Unified mobile nav wrapper: invisible pass-through on desktop so the
   flex layout of .header (logo / toggle / nav / actions) is untouched.
   Becomes the actual sliding drawer at <=991px (see media query below). */
.mobile-nav-panel {
    display: contents;
}

/* Dim backdrop shown behind the open mobile menu (mobile/tablet only) */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 28, 44, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out-quart), visibility 0.3s;
    z-index: 99;
}

.mobile-nav-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (min-width: 992px) {
    .mobile-nav-overlay {
        display: none;
    }
}

body.mobile-nav-locked {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .mobile-nav-panel,
    .mobile-nav-overlay,
    .hamburger-line {
        transition: none !important;
    }
}

.Options-Class{
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.Options-Class .nav-link {
    text-decoration: none;
    color: var(--ink-700);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.25s ease;
    position: relative;
    padding-bottom: 4px;
}

.Options-Class .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-color), #2ecc71);
    transition: width 0.3s var(--ease-out-quart);
}

.Options-Class .nav-link:hover {
    color: var(--primary-color);
}

.Options-Class .nav-link:hover::after {
    width: 100%;
}

.Options-Class .nav-link.active {
    color: var(--primary-color);
}

.Options-Class .nav-link.active::after {
    width: 100%;
}

.Action-class{
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sign-in-link {
    text-decoration: none;
    color: var(--ink-700);
    font-size: 0.92rem;
    font-weight: 700;
    transition: background-color 0.25s ease, color 0.25s ease;
    padding: 0.65rem 1.35rem;
    border-radius: 999px;
}

.sign-in-link:hover {
    background-color: var(--surface-soft);
    color: var(--primary-color);
    border-radius: 999px;
}

.sign-up-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #219a52 100%);
    color: white;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.28);
    transition: transform 0.25s var(--ease-out-quart), box-shadow 0.25s ease, background 0.25s ease;
    display: inline-block;
}

.sign-up-btn:hover {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(39, 174, 96, 0.38);
    color: white;
    text-decoration: none;
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.user-profile-trigger:hover {
    background-color: var(--surface-soft);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xs);
}

.user-profile-trigger.active {
    background-color: var(--surface-soft);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xs);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #083d5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.avatar-initials {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-trigger .bi-chevron-down {
    font-size: 0.75rem;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.user-profile-trigger.active .bi-chevron-down {
    transform: rotate(180deg);
}

.user-profile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
}

.profile-menu-item:last-child {
    border-bottom: none;
}

.profile-menu-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    text-decoration: none;
}

.profile-menu-item.logout-item {
    color: var(--danger-color);
    border-top: 1px solid #f1f3f5;
    margin-top: 0.25rem;
}

.profile-menu-item.logout-item:hover {
    background-color: #fff5f5;
    color: var(--danger-color);
}

.profile-menu-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.profile-menu-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .user-name {
        display: none;
    }

    .user-profile-trigger {
        padding: 0.5rem;
    }

    .user-profile-menu {
        right: 0;
        left: auto;
        min-width: 200px;
    }
}

/* ============================================================
   HERO — floating rounded card (page-width aligned), premium content
   ============================================================ */
.hero-section {
    position: relative;
    min-height: clamp(300px, 42vh, 420px);
    min-height: clamp(300px, 42dvh, 420px);
    width: var(--page-width);
    margin: clamp(0.75rem, 1.5vw, 1.25rem) auto;
    border-radius: clamp(18px, 2.2vw, 32px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    isolation: isolate;
}

.hero-section::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: no-repeat center center;
    background-image: url("/static/authentication/images/study_group.72c208c32fff.jpg");
    background-image: -webkit-image-set(
        url("/static/authentication/images/study_group.56148e6a78cd.webp") type('image/webp'),
        url("/static/authentication/images/study_group.72c208c32fff.jpg") type('image/jpeg')
    );
    background-image: image-set(
        url("/static/authentication/images/study_group.56148e6a78cd.webp") type('image/webp'),
        url("/static/authentication/images/study_group.72c208c32fff.jpg") type('image/jpeg')
    );
    background-size: cover;
    z-index: -2;
    will-change: transform;
    transform: translateZ(0);
    animation: hero-bg-zoom 20s ease-out forwards;
}
@keyframes hero-bg-zoom {
    0% { transform: translateZ(0) scale(1.05); }
    100% { transform: translateZ(0) scale(1); }
}

.hero-section::after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 900px 600px at 88% -8%, rgba(46, 157, 98, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 700px 500px at 8% 108%, rgba(37, 99, 235, 0.14) 0%, transparent 60%),
        linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 55%, #021521 100%);
    opacity: 0.94;
    z-index: -1;
}

/* Subtle grid overlay for depth */
.hero-section .hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: linear-gradient(var(--hero-accent) 1px, transparent 1px), linear-gradient(90deg, var(--hero-accent) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.35) 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.35) 70%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 4vw, 3rem);
    gap: clamp(1.75rem, 3vw, 2.5rem);
    min-height: 0;
}

.hero-text {
    flex: 2;
    color: white;
    text-align: left;
    max-width: 100%;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(16px);
    animation: hero-fade-up 0.6s var(--ease-out-expo) 0.05s forwards;
}
.hero-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3dbd7a;
    box-shadow: 0 0 10px rgba(61, 189, 122, 0.9);
    flex-shrink: 0;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.1vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 0.85rem;
    color: white;
    word-wrap: break-word;
    opacity: 0;
    transform: translateY(24px);
    animation: hero-fade-up 0.8s var(--ease-out-expo) 0.15s forwards;
}
.hero-title-line {
    display: block;
}
.title-line-2 {
    display: block;
    background: linear-gradient(100deg, #ffffff 20%, #8fe6b8 55%, #3dbd7a 85%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    max-width: 46rem;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 400;
    opacity: 0;
    transform: translateY(20px);
    animation: hero-fade-up 0.7s var(--ease-out-expo) 0.35s forwards;
}
.hero-description strong {
    font-weight: 600;
    color: white;
}

@keyframes hero-fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(16px);
    animation: hero-fade-up 0.6s var(--ease-out-expo) 0.5s forwards;
}

.btn-signup,
.btn-create-course {
    padding: 0.85rem 1.85rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    font-family: var(--font-body);
    transition: transform 0.3s var(--ease-tactile), box-shadow 0.35s ease, background 0.25s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.btn-signup::after,
.btn-create-course::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}
.btn-signup:hover::after,
.btn-create-course:hover::after {
    transform: translateX(100%);
}

.btn-signup {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.35);
}
.btn-signup:hover {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.45);
    color: white;
    text-decoration: none;
}
.btn-signup:active {
    transform: translateY(-1px);
}

.btn-create-course {
    background: linear-gradient(135deg, #ff7b54 0%, #f25c3d 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(242, 92, 61, 0.35);
}
.btn-create-course:hover {
    background: linear-gradient(135deg, #f25c3d 0%, #e04a2a 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(242, 92, 61, 0.45);
    color: white;
    text-decoration: none;
}
.btn-create-course:active {
    transform: translateY(-1px);
}

.btn-signup:focus-visible,
.btn-create-course:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
}
.hero-scroll-hint:focus-visible {
    outline: 2px solid rgba(255,255,255,0.8);
    outline-offset: 2px;
}

/* Scroll-to-courses hint - pill with glass effect */
.hero-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: color 0.25s ease, transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    opacity: 0;
    animation: hero-fade-up 0.6s var(--ease-out-expo) 0.65s forwards;
}
.hero-scroll-hint:hover {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(3px);
}
.hero-scroll-hint .bi-chevron-down {
    font-size: 1.1rem;
    transition: transform 0.3s var(--ease-out-quart);
}
.hero-scroll-hint:hover .bi-chevron-down {
    transform: translateY(3px);
}
@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}
.hero-scroll-hint .bi-chevron-down {
    animation: bounce-down 2.2s ease-in-out infinite;
}

/* Robot Section - with glow and entrance */
.hero-robot {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 170px;
    max-height: 34vh;
    opacity: 0;
    transform: translateX(24px);
    animation: hero-fade-up 0.9s var(--ease-out-expo) 0.25s forwards;
}
.hero-robot .robot-glow {
    position: absolute;
    width: 70%;
    height: 70%;
    max-width: 260px;
    max-height: 260px;
    background: radial-gradient(circle, rgba(10, 72, 111, 0.45) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(36px);
    pointer-events: none;
    animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.06); }
}

.robot-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
    animation: float 4s ease-in-out infinite;
    position: relative;
    z-index: 2;
    will-change: transform;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-section::before {
        animation: none;
    }
    .hero-eyebrow,
    .hero-title,
    .hero-description,
    .hero-buttons,
    .hero-scroll-hint,
    .hero-robot {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .robot-image {
        animation: none;
    }
    .hero-robot .robot-glow {
        animation: none;
    }
    .btn-signup::after,
    .btn-create-course::after {
        display: none;
    }
}

/* ============================================================
   COURSES SECTION — heading, continue-learning, filters, cards
   ============================================================ */
#courses-section {
    scroll-margin-top: 110px;
}
.externals-section {
    background-color: white;
    padding: clamp(0.75rem, 1.5vw, 1.25rem) 0 clamp(1.5rem, 3vw, 2.5rem);
    width: 100%;
    min-height: auto;
    height: auto;
}

.externals-section .container-fluid {
    padding-left: 0;
    padding-right: 0;
    width: var(--page-width);
    max-width: none;
    margin-inline: auto;
}

.externals-title {
    font-size: clamp(1.35rem, 3.5vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink-900);
    margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
}

/* Section title on the left, "View More" on the right, sharing a baseline. */
.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: clamp(0.85rem, 1.6vw, 1.15rem);
}

.section-heading .externals-title {
    margin-bottom: 0;
}

.section-heading__text {
    min-width: 0;
}

.section-heading__desc {
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ink-500);
}

.section-heading__more {
    flex-shrink: 0;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
}

.section-heading__more:hover {
    color: var(--ink-900);
    text-decoration: underline;
}

@media (max-width: 640px) {
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ===== Active catalog filters ===== */
.catalog-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.catalog-filters__label {
    font-size: 0.85rem;
    color: var(--ink-500);
}

.catalog-filters__chip {
    display: inline-flex;
    align-items: center;
    background: rgba(10, 72, 111, 0.08);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 0.25rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.catalog-filters__clear {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-500);
    text-decoration: underline;
}

.catalog-filters__clear:hover {
    color: var(--primary-color);
}

/* ===== Continue My Learning (signed-in visitors) ===== */
.continue-learning {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.continue-learning__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 1.6vw, 1.35rem);
}

.continue-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid rgba(16, 40, 62, 0.08);
    border-radius: 16px;
    box-shadow:
        0 1px 2px rgba(16, 40, 62, 0.04),
        0 6px 18px rgba(16, 40, 62, 0.04);
    text-decoration: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.continue-card:hover {
    transform: none;
    border-color: rgba(10, 72, 111, 0.18);
    box-shadow:
        0 1px 2px rgba(16, 40, 62, 0.04),
        0 10px 24px rgba(16, 40, 62, 0.07);
}

.continue-card__media {
    flex: 0 0 120px;
    align-self: stretch;
    min-height: 104px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

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

.continue-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

/* ===== Image fallback for courses with no artwork =====
   The photo sits on ::before so it can be blurred without smearing anything
   else, and ::after lays a brand-blue wash over it. */
.course-card-placeholder,
.continue-card__placeholder {
    position: relative;
    overflow: hidden;
    background-color: var(--primary-color);
}

.course-card-placeholder::before,
.continue-card__placeholder::before {
    content: "";
    position: absolute;
    inset: -16px;
    background-image: url("../authentication/images/course-placeholder-gray.0d5691bcd3d4.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(4px);
}

.course-card-placeholder::after,
.continue-card__placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 72, 111, 0.52) 0%, rgba(28, 109, 163, 0.38) 100%);
}

.continue-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.continue-card__code {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.continue-card__title {
    margin-top: 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink-900);
    text-decoration: none;
}

.continue-card__title:hover {
    color: var(--primary-color);
}

.continue-card__desc {
    margin: 0.45rem 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--ink-500);
}

/* Progress + Continue pinned to the bottom so cards of differing text length line up. */
.continue-card__footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.continue-card__progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.continue-card__bar {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: var(--surface-muted);
    overflow: hidden;
}

.continue-card__bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #2ecc71 100%);
}

.continue-card__progress-label {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-500);
}

.continue-card__cta {
    flex-shrink: 0;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-color), #063554);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s var(--ease-out-quart), box-shadow 0.25s ease;
    box-shadow: var(--shadow-xs);
}

.continue-card__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 72, 111, 0.3);
    color: white;
}

@media (max-width: 992px) {
    .continue-learning__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .continue-card {
        flex-direction: column;
    }

    .continue-card__media {
        flex: 0 0 auto;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .continue-card__footer {
        flex-wrap: wrap;
    }

    .continue-card__cta {
        width: 100%;
        text-align: center;
    }
}

/* ===== Skeletons shown while catalog_search.js swaps in new results =====
   These mirror .course-card-external so the swap doesn't resize the grid. */
.course-card-skeleton {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: #fff;
    overflow: hidden;
}

.course-card-skeleton__media {
    aspect-ratio: 16 / 9;
}

.course-card-skeleton__body {
    padding: 0.9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.course-card-skeleton__line {
    height: 12px;
    border-radius: 999px;
}

.course-card-skeleton__line--title {
    height: 17px;
    width: 75%;
}

.course-card-skeleton__line--short {
    width: 45%;
}

.course-card-skeleton__line--button {
    height: 32px;
    width: 104px;
    border-radius: var(--radius-sm);
    align-self: flex-end;
    margin-top: 0.4rem;
}

.course-card-skeleton__media,
.course-card-skeleton__line {
    background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-soft) 37%, var(--surface-muted) 63%);
    background-size: 400% 100%;
    animation: catalog-shimmer 1.4s ease-in-out infinite;
}

@keyframes catalog-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

[data-catalog-slot="results"].is-loading {
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .course-card-skeleton__media,
    .course-card-skeleton__line {
        animation: none;
    }
}

/* ===== Course cards grid — fixed four-up so every section ends on a full row ===== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 1.6vw, 1.35rem);
    padding-bottom: 1rem;
}

.courses-grid .no-courses {
    grid-column: 1 / -1;
}

@media (max-width: 1200px) {
    .courses-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .courses-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.15rem;
    }
}

@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== Per-course-group rows under the popular certificates ===== */
.catalog-group {
    margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.catalog-group .externals-title {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
}

.course-card-external {
    width: 100%;
    min-width: 0;
    max-width: 340px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(16, 40, 62, 0.08);
    box-shadow:
        0 1px 2px rgba(16, 40, 62, 0.04),
        0 6px 18px rgba(16, 40, 62, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
    will-change: auto;
}

.course-card-external::before {
    content: none;
}

.course-card-external:hover {
    transform: none;
    box-shadow:
        0 1px 2px rgba(16, 40, 62, 0.04),
        0 10px 24px rgba(16, 40, 62, 0.07);
    border-color: rgba(10, 72, 111, 0.18);
}

.course-card-external:hover::before {
    transform: none;
}

@media (hover: none) {
    .course-card-external:hover {
        transform: none;
        box-shadow:
            0 1px 2px rgba(16, 40, 62, 0.04),
            0 6px 18px rgba(16, 40, 62, 0.04);
    }
}

.course-card-image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    position: relative;
}

.course-card-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.45) 45%,
        rgba(255, 255, 255, 0) 90%
    );
    background-size: 200% 100%;
    animation: course-media-shimmer 1.4s ease-in-out infinite;
    opacity: 1;
    transition: opacity 0.35s ease;
}

.course-card-image-container:has(.course-card-img.is-loaded)::after,
.course-card-image-container:has(.course-card-placeholder)::after {
    opacity: 0;
    animation: none;
}

.course-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.45s ease, filter 0.45s ease;
    content-visibility: auto;
    opacity: 0;
    filter: blur(10px);
    transform: scale(1.03);
}

.course-card-img.is-loaded {
    opacity: 1;
    filter: none;
    transform: scale(1);
}

.course-card-external:hover .course-card-img.is-loaded {
    transform: none;
}

.course-card-external:hover .course-card-placeholder {
    transform: none;
}
.course-card-placeholder {
    transition: transform 0.3s ease;
}

@keyframes course-media-shimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -80% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .course-card-image-container::after {
        animation: none;
        opacity: 0;
    }
    .course-card-img {
        opacity: 1;
        filter: none;
        transform: none;
        transition: none;
    }
}

.course-card-content {
    padding: 1.35rem 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ink-900);
    margin-bottom: 0.85rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.course-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.course-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink-700);
    line-height: 1.2;
    background: var(--surface-muted);
    border: 1px solid transparent;
    border-radius: 8px;
}

.course-card-meta-item i {
    font-size: 0.78rem;
    color: var(--primary-color);
    opacity: 0.9;
    flex-shrink: 0;
}

.course-card-rating {
    background: rgba(212, 175, 55, 0.12);
    color: var(--ink-800);
    margin-left: auto;
}

.course-card-rating i {
    color: var(--accent-gold);
    opacity: 1;
}

.course-card-rating-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.course-card-rating-count {
    color: var(--ink-500);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.course-card-rating-count::before {
    content: "·";
    margin-right: 0.2rem;
    color: var(--ink-400);
}

.course-card-price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0.1rem 0 0.35rem;
}

.course-card-price--dual {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
}

.course-card-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.45rem;
}

.course-card-price-amount {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--primary-color);
}

.course-card-price-regular {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-400, #94a3b8);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

.course-card-price-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #0a486f;
    background: rgba(10, 72, 111, 0.1);
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    line-height: 1.2;
}

.course-card-price-teaser {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    color: #0a486f;
    font-variant-numeric: tabular-nums;
}

.course-card-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.course-card-provider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    margin-bottom: 1rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--border-soft);
}

.provider-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-xs);
}

.provider-logo img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    padding: 4px;
}

.provider-name {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.btn-get-started {
    background: linear-gradient(135deg, var(--primary-color), #063554);
    color: white;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    transition: transform 0.3s var(--ease-tactile), box-shadow 0.3s ease;
    align-self: flex-end;
    margin-top: 0;
    box-shadow: var(--shadow-xs);
    border: none;
}

.btn-get-started:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 72, 111, 0.3);
    color: white;
    text-decoration: none;
}

.no-courses {
    grid-column: 1 / -1;
    padding: 3rem;
    text-align: center;
    color: var(--ink-500);
    font-size: 1.05rem;
}

.no-courses i {
    display: block;
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: var(--ink-300);
}

/* ============================================================
   RESPONSIVE — header / hero / nav grouped by breakpoint
   ============================================================ */
@media (max-width: 1399px) {
    .header {
        padding: 1rem 2rem;
    }

    .hero-content {
        padding: 1.75rem 2.5rem;
    }
}

@media (max-width: 1199px) {
    .header {
        padding: 1rem 1.5rem;
    }

    .Options-Class {
        gap: 1.5rem;
    }

    .hero-content {
        gap: 1.25rem;
        padding: 1.5rem 1.75rem;
    }

    .hero-robot {
        min-height: 140px;
        max-height: 30vh;
    }

    .robot-image {
        max-width: 200px;
    }
}

/* Text and robot only stack once they can't sit side by side. */
@media (max-width: 700px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
    }

    .hero-description {
        margin-inline: auto;
    }

    .hero-buttons,
    .hero-scroll-hint {
        justify-content: center;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 0.75rem 1.5rem;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* ── Unified mobile navigation panel (course detail & simple headers) ──
       Nav links + sign in/up (or profile) live inside ONE cohesive floating
       card. Scoped under .mobile-nav-panel so the landing .site-header
       Action-class / category subnav layout is untouched. */
    .mobile-nav-panel {
        display: block;
        position: absolute;
        top: 100%;
        left: 0.75rem;
        right: 0.75rem;
        margin-top: 0.75rem;
        max-height: min(75vh, 32rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--surface);
        border: 1px solid var(--border-soft);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
        padding: 0.6rem;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px) scale(0.98);
        transform-origin: top center;
        transition: opacity 0.32s var(--ease-out-quart),
                    transform 0.32s var(--ease-tactile),
                    visibility 0.32s;
        z-index: 100;
    }

    .mobile-nav-panel.mobile-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .mobile-nav-panel .Options-Class {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.2rem;
        flex: none;
        justify-content: flex-start;
    }

    .mobile-nav-panel .Options-Class .nav-link {
        padding: 0.9rem 0.85rem;
        border-bottom: none;
        border-radius: var(--radius-md);
        width: 100%;
        color: var(--ink-700);
        transition: background-color 0.25s var(--ease-out-quart), color 0.25s ease;
    }

    .mobile-nav-panel .Options-Class .nav-link::after {
        display: none;
    }

    .mobile-nav-panel .Options-Class .nav-link:hover,
    .mobile-nav-panel .Options-Class .nav-link:focus-visible {
        background-color: var(--surface-soft);
        color: var(--primary-color);
    }

    .mobile-nav-panel .Options-Class .nav-link.active {
        background: linear-gradient(135deg, rgba(10, 72, 111, 0.08), rgba(46, 204, 113, 0.1));
        color: var(--primary-color);
        padding-left: 1.1rem;
        position: relative;
    }

    .mobile-nav-panel .Options-Class .nav-link.active::before {
        content: '';
        position: absolute;
        left: 0.35rem;
        top: 0.55rem;
        bottom: 0.55rem;
        width: 3px;
        border-radius: 2px;
        background: linear-gradient(180deg, var(--primary-color), #2ecc71);
    }

    .mobile-nav-panel .Action-class {
        display: flex;
        position: static;
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.5rem;
        padding: 0.85rem 0.1rem 0.1rem;
        box-shadow: none;
        border-top: 1px solid var(--border-soft);
    }

    .mobile-nav-panel .Action-class .sign-in-link,
    .mobile-nav-panel .Action-class .sign-up-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .mobile-nav-panel .Action-class .user-profile-dropdown {
        width: 100%;
    }

    .mobile-nav-panel .Action-class .user-profile-trigger {
        width: 100%;
        justify-content: space-between;
    }

    .mobile-nav-panel .Action-class .user-profile-menu {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        box-shadow: none;
        border: 1px solid var(--border-soft);
        transform: none;
    }

    .logo-class img {
        width: 100px;
    }

    .hero-robot {
        min-height: 130px;
        max-height: 26vh;
    }

    .robot-image {
        max-width: 190px;
    }

    .course-card-external {
        max-width: min(340px, 80vw);
    }
}

@media (max-width: 767px) {
    .header {
        padding: 0.75rem 1rem;
    }

    .logo-class img {
        width: 90px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .btn-signup,
    .btn-create-course {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1.5rem;
    }

    .hero-robot {
        min-height: 100px;
        max-height: 20vh;
    }

    .robot-image {
        max-width: 160px;
    }

    .course-card-external {
        max-width: min(300px, 85vw);
    }

    .course-card-content {
        padding: 1.25rem;
    }

    .course-card-title {
        font-size: 1.1rem;
    }

    .Action-class {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0.75rem;
    }

    .logo-class img {
        width: 80px;
    }

    .hamburger-line {
        width: 20px;
        height: 2px;
    }

    .hero-section {
        min-height: 280px;
    }

    .hero-content {
        padding: 1rem 0.75rem;
        gap: 1rem;
    }

    .hero-robot {
        display: none;
    }

    .btn-signup,
    .btn-create-course {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .course-card-external {
        max-width: min(280px, 90vw);
    }

    .course-card-content {
        padding: 1rem;
    }

    .course-card-title {
        font-size: 1rem;
    }

    .btn-get-started {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 360px) {
    .header {
        padding: 0.5rem;
    }

    .logo-class img {
        width: 70px;
    }

    .hero-content {
        padding: 0.75rem 0.5rem;
    }

    .course-card-external {
        max-width: min(260px, 95vw);
    }

    .course-card-content {
        padding: 0.875rem;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
    }

    .hero-content {
        flex-direction: row;
        min-height: auto;
        padding: 1rem 2rem;
    }

    .hero-text {
        text-align: left;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }

    .btn-signup,
    .btn-create-course {
        width: auto;
    }

    .hero-robot {
        min-height: 100px;
        max-height: 18vh;
    }

    .robot-image {
        max-width: 150px;
    }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: linear-gradient(160deg, var(--hero-gradient-start) 0%, #062c46 45%, var(--hero-gradient-end) 100%);
    color: white;
    width: 100%;
    padding: clamp(2.5rem, 4vw, 4.5rem) 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(61, 189, 122, 0.5), transparent);
}

.footer-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 5rem);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.55);
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #3dbd7a, transparent);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.25s ease, transform 0.25s ease, padding-left 0.25s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
    padding-left: 0.35rem;
}

.app-downloads {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #000;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: fit-content;
}

.app-btn:hover {
    background-color: #333;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.app-btn i {
    font-size: 1.25rem;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    margin: 2rem 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    letter-spacing: 0.01em;
}

.social-media {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

@media (max-width: 1199px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 767px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .app-downloads {
        width: 100%;
    }

    .app-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   LANDING PRICING (subscription tiers)
   Matches subscription plans / course detail polish:
   white canvas, quiet cards, flat price rows, slightly bolder type.
   ============================================================ */
.landing-pricing {
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    font-weight: 500;
}

.landing-pricing--below-courses {
    margin-top: clamp(2rem, 4vw, 3rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.landing-pricing__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
    max-width: none;
    margin-inline: 0;
}

.landing-pricing__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink-900);
    margin: 0 0 0.4rem;
}

.landing-pricing__subtitle {
    margin: 0;
    max-width: 42rem;
    color: var(--ink-600);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
}

.landing-pricing__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.landing-pricing__billing-toggle {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(16, 40, 62, 0.1);
    box-shadow: none;
}

.landing-pricing__toggle-btn {
    border: none;
    background: transparent;
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink-500);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.landing-pricing__toggle-btn.is-active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 1px 2px rgba(10, 72, 111, 0.18);
}

.landing-pricing__toggle-hint {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.9;
}

.landing-pricing__toggle-btn.is-active .landing-pricing__toggle-hint {
    opacity: 1;
}

.landing-pricing__link-all {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(10, 72, 111, 0.2);
    background: #fff;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.landing-pricing__link-all:hover {
    background: rgba(10, 72, 111, 0.05);
    border-color: var(--primary-color);
    color: #073454;
    text-decoration: none;
}

.landing-pricing__grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 300px), clamp(340px, 32vw, 420px))
    );
    gap: clamp(1rem, 2vw, 1.35rem);
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: none;
    margin-inline: 0;
}


.pricing-tier-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    padding: clamp(1.25rem, 2.2vw, 1.5rem) clamp(1.2rem, 2vw, 1.4rem) clamp(1.15rem, 1.8vw, 1.35rem);
    border: 1px solid rgba(16, 40, 62, 0.09);
    box-shadow:
        0 1px 2px rgba(16, 40, 62, 0.04),
        0 10px 24px rgba(16, 40, 62, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-height: 0;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.pricing-tier-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 10px 20px rgba(16, 40, 62, 0.06),
        0 24px 48px rgba(10, 72, 111, 0.12);
    border-color: rgba(10, 72, 111, 0.24);
}

@media (hover: none) {
    .pricing-tier-card:hover {
        transform: none;
    }
}

.pricing-tier-card--featured {
    border-color: rgba(10, 72, 111, 0.28);
    background:
        linear-gradient(180deg, rgba(10, 72, 111, 0.05) 0%, rgba(255, 255, 255, 0) 40%),
        #fff;
    box-shadow:
        0 1px 2px rgba(16, 40, 62, 0.04),
        0 16px 40px rgba(10, 72, 111, 0.13);
}

.pricing-tier-card--featured:hover {
    box-shadow:
        0 12px 24px rgba(16, 40, 62, 0.07),
        0 30px 56px rgba(10, 72, 111, 0.16);
}

@media (min-width: 769px) {
    .pricing-tier-card--featured {
        transform: none;
    }
    .pricing-tier-card--featured:hover {
        transform: translateY(-4px);
    }
}

.pricing-tier-card__popular-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #7a4a08;
    background: linear-gradient(135deg, #fff4cc 0%, #fde68a 100%);
    border: 1px solid rgba(180, 120, 20, 0.18);
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0;
    margin-right: 0.4rem;
    box-shadow: 0 1px 2px rgba(146, 64, 14, 0.08);
}

.pricing-tier-card__top {
    margin-bottom: 1.1rem;
    min-height: 0;
}

.pricing-tier-card__badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.pricing-tier-card__badge--full {
    background: rgba(10, 72, 111, 0.09);
    color: var(--primary-color);
    border: 1px solid rgba(10, 72, 111, 0.1);
}

.pricing-tier-card__badge--ppc {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.pricing-tier-card__name {
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--ink-900);
    margin: 0 0 0.4rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.pricing-tier-card__delivery {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink-500);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem 0.2rem 0.3rem;
    border-radius: 999px;
    background: rgba(16, 40, 62, 0.04);
    width: fit-content;
}

.pricing-tier-card__delivery i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: rgba(10, 72, 111, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
}

.pricing-tier-card__price-block {
    padding: 1.05rem 1rem;
    border-radius: 14px;
    background:
        linear-gradient(160deg, rgba(10, 72, 111, 0.055) 0%, rgba(248, 250, 252, 0.95) 55%, #fff 100%);
    border: 1px solid rgba(10, 72, 111, 0.08);
    margin-bottom: 1.15rem;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pricing-tier-card--featured .pricing-tier-card__price-block {
    border-color: rgba(10, 72, 111, 0.14);
    background:
        linear-gradient(160deg, rgba(10, 72, 111, 0.09) 0%, rgba(236, 244, 249, 0.95) 50%, #fff 100%);
}

.landing-pricing[data-active-cycle="monthly"] .pricing-tier-card__cycle-panel--yearly {
    display: none;
}

.landing-pricing[data-active-cycle="yearly"] .pricing-tier-card__cycle-panel--monthly {
    display: none;
}

.pricing-tier-card__cycle-panel--static {
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.45rem;
}

.pricing-tier-card__cycle-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.45rem;
    row-gap: 0.4rem;
}

.pricing-tier-card__price {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 2.6vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--primary-color);
    line-height: 1.1;
}

.pricing-tier-card__price--secondary {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink-700);
}

.pricing-tier-card__period {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-500);
}

.pricing-tier-card__save-pill {
    font-size: 0.7rem;
    font-weight: 700;
    color: #047857;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-left: 0.15rem;
}

.pricing-tier-card__muted-line {
    width: 100%;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-400);
    margin-bottom: 0.35rem;
}

.pricing-tier-card__fallback-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
}

.pricing-tier-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.15rem;
    min-height: 0;
}

.pricing-tier-card__desc {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-600);
    line-height: 1.55;
    margin: 0 0 0.95rem;
    min-height: 0;
}

.pricing-tier-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1 1 auto;
}

.pricing-tier-card__features li {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-700);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0;
    line-height: 1.45;
}

.pricing-tier-card__features li i {
    color: #059669;
    flex-shrink: 0;
    margin-top: 0.05rem;
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    font-size: 0.72rem;
}

.pricing-tier-card__cta {
    margin-top: auto;
    text-align: center;
    width: 100%;
    padding: 0.95rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    background: linear-gradient(180deg, #0c5a87 0%, var(--primary-color) 100%);
    border: 1px solid #073454;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 8px 18px rgba(10, 72, 111, 0.22);
}

.pricing-tier-card__cta:hover {
    background: linear-gradient(180deg, var(--primary-color) 0%, #073454 100%);
    border-color: #073454;
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 12px 24px rgba(10, 72, 111, 0.28);
}

.pricing-tier-card__cta:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.pricing-tier-card__pay-status {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-top: 0.75rem;
    padding: 0.7rem 0.8rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
}

.pricing-tier-card__pay-status[hidden] {
    display: none !important;
}

.pricing-tier-card__pay-spinner {
    width: 1rem;
    height: 1rem;
    margin-top: 0.15rem;
    border: 2px solid #a7f3d0;
    border-top-color: #059669;
    border-radius: 50%;
    animation: landingPaySpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes landingPaySpin {
    to { transform: rotate(360deg); }
}

.pricing-tier-card__pay-title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #065f46;
}

.pricing-tier-card__pay-text {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: #047857;
}

.pricing-tier-card__pay-error {
    margin: 0.55rem 0 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
}

.pricing-tier-card__pay-error[hidden] {
    display: none !important;
}

@media (max-width: 576px) {
    .landing-pricing__header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================================
   MARKETPLACE HEADER — Explore mega-menu + header search + category subnav
   ============================================================ */
/* display:contents lets these rows stick against the page scroll as
   independent siblings, rather than being trapped in a short wrapper. */
.site-header {
    display: contents;
}

.site-header .header {
    gap: 1.5rem;
    padding: 0.9rem 3rem;
}

.site-header .logo-class img {
    width: 92px;
}

.explore-menu {
    flex-shrink: 0;
}

.explore-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: none;
    border: none;
    padding: 0.5rem 0.25rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink-700);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.explore-trigger i {
    font-size: 1.15rem;
    color: var(--ink-500);
    transition: color 0.2s ease;
}

.explore-trigger:hover,
.explore-trigger[aria-expanded="true"] {
    color: var(--primary-color);
}

.explore-trigger:hover i,
.explore-trigger[aria-expanded="true"] i {
    color: var(--primary-color);
}

/* Full-screen mega menu opened from the Explore trigger */
.explore-panel {
    position: fixed;
    top: var(--floating-panel-top, 120px);
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    box-shadow: var(--shadow-xl);
    border-top: 1px solid var(--border-soft);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 149;
}

.explore-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.explore-panel__inner {
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 5rem);
}

.explore-panel__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-soft);
}

.explore-panel__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--ink-900);
}

.explore-panel__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    color: var(--ink-500);
}

.explore-panel__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1rem;
}

.explore-panel__item {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--ink-900);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.explore-panel__item:hover,
.explore-panel__item.is-active {
    background-color: rgba(10, 72, 111, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Both media variants keep the same band height so cards line up in the grid. */
.explore-panel__icon,
.explore-panel__thumb {
    width: 100%;
    height: clamp(120px, 11vw, 168px);
    flex-shrink: 0;
    overflow: hidden;
    background: var(--surface-muted);
}

.explore-panel__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 72, 111, 0.06);
    color: var(--primary-color);
    font-size: 1.75rem;
}

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

.explore-panel__thumb img.is-placeholder {
    filter: grayscale(100%);
}

.explore-panel__desc {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--ink-500);
}

.explore-panel__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
    padding: 1.15rem 1.25rem 1.25rem;
}

.explore-panel__name {
    font-weight: 700;
    font-size: 1.05rem;
}

.explore-panel__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.85rem;
}

.explore-panel__count {
    font-size: 0.85rem;
    color: var(--ink-500);
}

.explore-panel__arrow {
    color: var(--ink-500);
    flex-shrink: 0;
}

.explore-panel__item:hover .explore-panel__arrow {
    color: var(--primary-color);
}

.explore-panel__empty {
    grid-column: 1 / -1;
    color: var(--ink-500);
    font-size: 0.95rem;
}

.explore-panel__all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.explore-panel__all:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* Header search */
.header-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 620px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 0.25rem 0.3rem;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 72, 111, 0.1);
}

.header-search__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

.header-search__badge img {
    width: 22px;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.header-search__input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-color);
    padding: 0.5rem 0.25rem;
}

.header-search__input::placeholder {
    color: var(--ink-400);
}

.header-search__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), #063554);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.55rem 1.45rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.25s var(--ease-tactile), box-shadow 0.25s ease;
    box-shadow: var(--shadow-xs);
}

.header-search__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 72, 111, 0.3);
}

/* Category sub-nav row — right aligned under the account buttons on desktop;
   becomes the unified mobile drawer at <=991px (see media query below). */
.site-header .header-subnav {
    display: flex;
    flex: none;
    justify-content: flex-end;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    padding: 0.5rem 3rem 0.95rem;
    background-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    .site-header .header-subnav,
    .explore-panel {
        transition: none !important;
    }
}

@media (max-width: 1199px) {
    .site-header .header {
        padding: 0.9rem 1.5rem 0.5rem;
        gap: 1rem;
    }

    .site-header .header-subnav {
        padding: 0.35rem 1.5rem 0.9rem;
        gap: clamp(1rem, 3vw, 2rem);
    }

    .explore-trigger span {
        display: none;
    }
}

@media (max-width: 991px) {
    .site-header {
        display: block;
        position: relative;
        z-index: 100;
        background-color: transparent;
    }

    .site-header .header {
        flex-wrap: wrap;
        padding: 0.75rem 1.5rem;
    }

    .header-search {
        order: 4;
        flex: 1 1 100%;
        max-width: none;
        margin-top: 0.25rem;
    }

    .header-search__btn span {
        display: none;
    }

    .header-search__btn {
        padding: 0.6rem 0.9rem;
    }

    .site-header .logo-class img {
        width: 84px;
    }

    .explore-panel__inner {
        padding: 1.5rem 1.25rem 2.5rem;
    }

    .explore-panel__grid {
        grid-template-columns: 1fr;
    }

    /* ── Unified mobile drawer ──
       The category sub-nav becomes one cohesive floating card (positioned
       just under the sticky header via --floating-panel-top, computed in
       base_nav.js) instead of a separate edge-to-edge dropdown, so mobile
       navigation reads as a single deliberate panel rather than two
       disconnected pieces. */
    .site-header .header-subnav {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        position: fixed;
        top: var(--floating-panel-top, 64px);
        left: 0.75rem;
        right: 0.75rem;
        max-height: min(75vh, 32rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--surface);
        border: 1px solid var(--border-soft);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
        padding: 0.6rem;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px) scale(0.98);
        transform-origin: top center;
        transition: opacity 0.32s var(--ease-out-quart),
                    transform 0.32s var(--ease-tactile),
                    visibility 0.32s;
        z-index: 100;
    }

    .site-header .header-subnav.mobile-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .site-header .header-subnav .nav-link {
        padding: 0.9rem 0.85rem;
        border-radius: var(--radius-md);
        width: 100%;
        color: var(--ink-700);
        transition: background-color 0.25s var(--ease-out-quart), color 0.25s ease;
    }

    .site-header .header-subnav .nav-link::after {
        display: none;
    }

    .site-header .header-subnav .nav-link:hover,
    .site-header .header-subnav .nav-link:focus-visible {
        background-color: var(--surface-soft);
        color: var(--primary-color);
    }

    .site-header .header-subnav .nav-link.active {
        position: relative;
        background: linear-gradient(135deg, rgba(10, 72, 111, 0.08), rgba(46, 204, 113, 0.1));
        color: var(--primary-color);
        padding-left: 1.1rem;
    }

    .site-header .header-subnav .nav-link.active::before {
        content: '';
        position: absolute;
        left: 0.35rem;
        top: 0.55rem;
        bottom: 0.55rem;
        width: 3px;
        border-radius: 2px;
        background: linear-gradient(180deg, var(--primary-color), #2ecc71);
    }

    @media (prefers-reduced-motion: reduce) {
        .site-header .header-subnav {
            transition: none !important;
        }
    }
}

@media (max-width: 575px) {
    .site-header .header {
        padding: 0.65rem 1rem;
        gap: 0.65rem;
    }

    .site-header .logo-class img {
        width: 74px;
    }

    .site-header .Action-class .sign-in-link,
    .site-header .Action-class .sign-up-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.85rem;
    }
}

/* Print styles */
@media print {
    .header,
    .site-header,
    .footer,
    .mobile-menu-toggle,
    .mobile-nav-overlay,
    .hero-robot {
        display: none;
    }

    .hero-section {
        min-height: auto;
        background: none;
    }

    .hero-section::before,
    .hero-section::after {
        display: none;
    }

    .hero-text {
        color: black;
    }

    .hero-title,
    .hero-description {
        color: black;
    }
}
