/* =========================================
   EduPack Landing Page — Custom Styles
   UP Diliman Color Palette
   ========================================= */

/* ── CSS Custom Properties ───────────────── */
:root {
    --primary: #8A1538;
    --primary-dark: #6B1029;
    --primary-light: #c47a93;
    --secondary: #00573F;
    --accent: #FFCC33;
    --success: #00573F;
    --bg-primary: #0d0005;
    --bg-secondary: #160009;
    --bg-card: rgba(255,255,255,0.04);
    --border-card: rgba(255,255,255,0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #c4a0ab;
    --text-muted: #7a5060;
    --glow-primary: rgba(138,21,56,0.4);
    --glow-secondary: rgba(0,87,63,0.35);
    --glow-accent: rgba(255,204,51,0.4);
    --transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    --radius: 1rem;
    --radius-lg: 1.5rem;
}

[data-theme="light"] {
    --bg-primary: #fdf5f7;
    --bg-secondary: #f5e6eb;
    --bg-card: rgba(255,255,255,0.85);
    --border-card: rgba(138,21,56,0.12);
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6b3a52;
    --glow-primary: rgba(138,21,56,0.15);
}

/* ── Light Mode Component Overrides ────────── */
[data-theme="light"] .brand-sub {
    color: rgba(255,255,255,0.72);
}
[data-theme="light"] .nav-logo {
    background: linear-gradient(135deg, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0.42) 100%);
    border-color: rgba(255,204,51,0.30);
}
[data-theme="light"] .nav-logo:hover {
    background: linear-gradient(135deg, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.50) 100%);
}

/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary, #f1f5f9);
    overflow-x: hidden;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

svg {
    max-width: 100%;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* ── Scroll Progress ──────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ── Loading Screen ───────────────────────── */
#loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

    #loading-screen.hidden {
        opacity: 0;
        visibility: hidden;
    }

.loader-logo {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(0,0,0,0.20) 100%);
    padding: 10px 24px 10px 10px;
    border-radius: 18px;
    border: 1px solid rgba(255,204,51,0.22);
    box-shadow: 0 2px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
    animation: pulse-logo 1.5s ease-in-out infinite;
    margin-bottom: 2rem;
}

.loader-logo-icon {
    width: 58px !important;
    height: 58px !important;
    border-radius: 14px !important;
}

.loader-brand-name {
    font-size: 1.75rem !important;
}

.loader-bar-wrap {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    animation: loading-bar 1.8s ease-in-out forwards;
}

@keyframes loading-bar {
    0% {
        width: 0%;
    }

    60% {
        width: 75%;
    }

    100% {
        width: 100%;
    }
}

@keyframes pulse-logo {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.97);
    }
}

/* ── Particles Canvas ─────────────────────── */
#particles-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* ── Glassmorphism Card ───────────────────── */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
}

/* ── Gradient Text ────────────────────────── */
.grad-text {
    background: linear-gradient(135deg, var(--primary-light), var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Section Base ─────────────────────────── */
section {
    position: relative;
    z-index: 1;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(138,21,56,0.12);
    border: 1px solid rgba(138,21,56,0.25);
    color: var(--primary-light);
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary, #f1f5f9);
}

.section-sub {
    font-size: 1.0625rem;
    color: var(--text-secondary, #c4a0ab);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ── Navigation ───────────────────────────── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

    #navbar.scrolled {
        background: rgba(60,3,20,0.9);
        backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--border-card);
        padding: 0.65rem 0;
    }

[data-theme="light"] #navbar.scrolled {
    background: rgba(253,245,247,0.9);
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(0,0,0,0.20) 100%);
    padding: 7px 18px 7px 7px;
    border-radius: 16px;
    border: 1px solid rgba(255,204,51,0.18);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.06);
    transition: background .3s, border-color .3s, box-shadow .3s, transform .3s;
}

    .nav-logo:hover {
        background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(0,0,0,0.28) 100%);
        border-color: rgba(255,204,51,0.55);
        box-shadow: 0 0 0 3px rgba(255,204,51,0.12), 0 4px 16px rgba(0,0,0,0.35);
        transform: translateX(2px);
    }

.sidebar-logo-box {
    position: relative;
    overflow: hidden;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, #ffe566 0%, #FFCC33 45%, #c98f00 100%);
    border-radius: 12px;
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.55),
        inset 0 -1px 2px rgba(0,0,0,0.15),
        0 4px 12px rgba(0,0,0,0.35);
    transition: transform .3s, box-shadow .3s;
}

.sidebar-logo-box::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -80%;
    width: 55%;
    height: 220%;
    background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
    transform: skewX(-15deg);
    transition: left .5s ease;
    pointer-events: none;
}

    .nav-logo:hover .sidebar-logo-box {
        transform: scale(1.07) rotate(-1deg);
        box-shadow: 0 0 0 3px rgba(255,204,51,0.3), 0 6px 18px rgba(0,0,0,0.4);
    }

    .nav-logo:hover .sidebar-logo-box::after {
        left: 130%;
    }

.sidebar-text {
    padding-left: 12px;
    line-height: 1;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.5px;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.brand-name span { color: #FFCC33 !important; }

.brand-sub {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255,255,255,0.42);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-top: 4px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding: 0.25rem 0;
}

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--primary);
        transition: width 0.3s ease;
        border-radius: 1px;
    }

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

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

.btn-nav-login {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    transition: var(--transition);
    border: 1px solid var(--border-card);
}

    .btn-nav-login:hover {
        color: var(--text-primary);
        border-color: rgba(255,255,255,0.2);
    }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.7rem 1.75rem;
    min-height: 44px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .btn-primary::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, var(--accent), var(--secondary));
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 35px var(--glow-primary);
    }

        .btn-primary:hover::before {
            opacity: 1;
        }

    .btn-primary span {
        position: relative;
        z-index: 1;
    }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.7rem 1.75rem;
    min-height: 44px;
    border-radius: 9999px;
    border: 1px solid var(--border-card);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

    .btn-outline:hover {
        background: var(--bg-card);
        border-color: rgba(255,255,255,0.2);
        transform: translateY(-2px);
    }

/* Mobile menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    outline: none;
}

    .hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 1px;
        transition: var(--transition);
    }

    .hamburger.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.open span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px; /* updated: navbar is ~80-92px tall; overridden by JS on open */
    left: 0;
    right: 0;
    background: rgba(60,3,20,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-card);
    padding: 1.5rem;
    z-index: 999;
    flex-direction: column;
    gap: 1.25rem;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

    .mobile-menu.open {
        display: flex;
    }

/* Scrolled navbar: menu follows the smaller navbar height */
#navbar.scrolled + .mobile-menu {
    top: 66px;
    max-height: calc(100vh - 66px);
}

[data-theme="light"] .mobile-menu {
    background: rgba(253,245,247,0.97);
}

/* ── Hero Section ─────────────────────────── */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 5rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: float-orb 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: 100px;
    right: -50px;
    animation-delay: 3s;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: 50px;
    left: 40%;
    animation-delay: 6s;
}

@keyframes float-orb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.hero-badge {
    animation: fadeInUp 0.6s ease both;
}

.hero-title {
    animation: fadeInUp 0.6s 0.1s ease both;
}

.hero-sub {
    animation: fadeInUp 0.6s 0.2s ease both;
}

.hero-ctas {
    animation: fadeInUp 0.6s 0.3s ease both;
}

.hero-trust {
    animation: fadeInUp 0.6s 0.4s ease both;
}

.hero-mockup {
    animation: fadeInRight 0.8s 0.2s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dashboard Mockup */
.mockup-wrapper {
    position: relative;
    perspective: 1000px;
}

.mockup-float {
    animation: mockup-float 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes mockup-float {
    0%, 100% {
        transform: translateY(0) rotateY(-8deg) rotateX(4deg);
    }

    50% {
        transform: translateY(-16px) rotateY(-5deg) rotateX(2deg);
    }
}

.browser-shell {
    background: rgba(25,2,10,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05), inset 0 1px 0 rgba(255,255,255,0.08);
    width: 100%;
    max-width: 560px;
}

[data-theme="light"] .browser-shell {
    background: rgba(255,255,255,0.95);
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 40px 120px rgba(138,21,56,0.15), 0 0 0 1px rgba(138,21,56,0.1);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.browser-dots {
    display: flex;
    gap: 5px;
}

    .browser-dots span {
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27c93f;
}

.browser-url {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
}

.dash-body {
    display: flex;
    height: 340px;
}

.dash-sidebar {
    width: 130px;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 1rem 0.75rem;
    flex-shrink: 0;
}

.dash-sidebar-logo {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    cursor: pointer;
    transition: var(--transition);
}

    .dash-nav-item.active {
        background: rgba(138,21,56,0.15);
        color: var(--primary-light);
    }

.dash-nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.dash-main {
    flex: 1;
    padding: 1rem;
    overflow: hidden;
}

.dash-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.dash-page-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-btn-small {
    font-size: 0.6rem;
    background: var(--primary);
    color: #fff;
    padding: 0.3rem 0.65rem;
    border-radius: 9999px;
    font-weight: 600;
}

.stat-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stat-chip {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.5rem;
}

.stat-chip-val {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-chip-lbl {
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.course-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.course-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.04);
}

.course-thumb {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
}

.course-info {
    flex: 1;
}

.course-name {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-primary);
}

.course-meta {
    font-size: 0.52rem;
    color: var(--text-muted);
}

.progress-bar-wrap {
    width: 60px;
}

.progress-bar-bg {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* Floating badge cards on mockup */
.mockup-badge {
    position: absolute;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    animation: badge-float 4s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.badge-courses {
    background: linear-gradient(135deg, rgba(138,21,56,0.9), rgba(107,16,41,0.9));
    color: #fff;
    top: 15%;
    left: -50px;
    animation-delay: 0s;
}

.badge-export {
    background: linear-gradient(135deg, rgba(0,87,63,0.9), rgba(138,21,56,0.9));
    color: #fff;
    bottom: 20%;
    right: -40px;
    animation-delay: 2s;
}

.badge-ai {
    background: linear-gradient(135deg, rgba(255,204,51,0.9), rgba(0,87,63,0.9));
    color: #1a1a1a;
    bottom: 45%;
    left: -45px;
    animation-delay: 1s;
}

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

    50% {
        transform: translateY(-8px);
    }
}

/* ── Features Section ─────────────────────── */
#features {
    padding: 6rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    backdrop-filter: blur(16px);
    transition: var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
}

    .feature-card::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, var(--glow-color, var(--glow-primary)), transparent);
        opacity: 0;
        transition: opacity 0.4s ease;
        border-radius: inherit;
    }

    .feature-card:hover {
        transform: translateY(-6px);
        border-color: rgba(255,255,255,0.15);
    }

        .feature-card:hover::before {
            opacity: 1;
        }

        .feature-card:hover .feature-icon-wrap {
            transform: scale(1.1) rotate(-5deg);
        }

.feature-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.feature-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #f1f5f9);
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--text-secondary, #c4a0ab);
    line-height: 1.7;
}

/* ── How It Works ─────────────────────────── */
#how-it-works {
    padding: 6rem 0;
}

.steps-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
    margin-top: 3rem;
}

.steps-connector {
    position: absolute;
    top: 40px;
    left: calc(12.5% + 28px);
    right: calc(12.5% + 28px);
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 0;
}

    .steps-connector::after {
        content: '';
        position: absolute;
        inset: 0;
        background: inherit;
        filter: blur(4px);
        opacity: 0.5;
    }

.step-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

.step-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    background: var(--bg-secondary);
    border: 2px solid rgba(138,21,56,0.3);
    box-shadow: 0 0 0 6px var(--bg-primary), 0 0 30px var(--glow-primary);
    transition: var(--transition);
}

.step-card:hover .step-circle {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 6px var(--bg-primary), 0 0 40px var(--glow-primary);
}

.step-num {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #f1f5f9);
}

.step-desc {
    font-size: 0.825rem;
    color: var(--text-secondary, #c4a0ab);
    line-height: 1.65;
}

/* ── Why EduPack ──────────────────────────── */
#why-edupack {
    padding: 6rem 0;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.why-visual {
    position: relative;
    height: 460px;
}

.why-main-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 300px;
    backdrop-filter: blur(16px);
}

.why-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
}

.why-card-body {
    padding: 1.25rem;
}

.why-progress-item {
    margin-bottom: 1rem;
}

.why-prog-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 0.35rem;
    color: var(--text-secondary, #c4a0ab);
}

.why-prog-track {
    height: 6px;
    background: rgba(255,255,255,0.07);
    border-radius: 3px;
    overflow: hidden;
}

.why-prog-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1.5s ease;
    width: 0;
}

    .why-prog-fill.animated {
        width: var(--target-width, 80%);
    }

.why-float-card {
    position: absolute;
    bottom: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    backdrop-filter: blur(16px);
    animation: badge-float 5s ease-in-out infinite;
}

.why-float-card-1 {
    left: 0;
    width: 180px;
    animation-delay: 0s;
}

.why-float-card-2 {
    right: 0;
    width: 200px;
    animation-delay: 2.5s;
    bottom: 20px;
}

.wfc-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
}

.wfc-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary, #f1f5f9);
}

.wfc-sub {
    font-size: 0.65rem;
    color: var(--success);
    margin-top: 0.2rem;
}

/* ── Why EduPack — Advantages (THE FIX) ───── */
.why-advantages {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.adv-item {
    display: flex;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    transition: var(--transition);
    /* Ensure text colour is always set at the container level */
    color: var(--text-primary, #f1f5f9);
}

    .adv-item:hover {
        transform: translateX(6px);
        border-color: rgba(138,21,56,0.3);
    }

/* Force explicit colour on light theme so white text never bleeds through */
[data-theme="light"] .adv-item {
    color: #1e293b;
}

.adv-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.adv-text {
    flex: 1;
    min-width: 0;
}

    .adv-text h4 {
        font-size: 0.9rem;
        font-weight: 700;
        /* Explicit fallback colours — never relies solely on the variable */
        color: var(--text-primary, #f1f5f9);
        margin-bottom: 0.2rem;
    }

[data-theme="light"] .adv-text h4 {
    color: #1e293b;
}

.adv-text p {
    font-size: 0.8rem;
    color: var(--text-secondary, #c4a0ab);
    line-height: 1.6;
}

[data-theme="light"] .adv-text p {
    color: #475569;
}

/* ── Showcase Section ─────────────────────── */
#showcase {
    padding: 6rem 0;
}

.showcase-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2.5rem 0;
    padding: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 9999px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(12px);
}

.tab-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    transition: var(--transition);
}

    .tab-btn.active {
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: #fff;
        box-shadow: 0 4px 15px var(--glow-primary);
    }

    .tab-btn:hover:not(.active) {
        color: var(--text-primary);
        background: rgba(255,255,255,0.05);
    }

.showcase-panel {
    display: none;
}

    .showcase-panel.active {
        display: block;
        animation: fadeInUp 0.4s ease;
    }

.showcase-frame {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(25,2,10,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

[data-theme="light"] .showcase-frame {
    background: rgba(255,255,255,0.95);
    border-color: rgba(0,0,0,0.1);
}

.showcase-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.showcase-content {
    padding: 1.5rem;
    min-height: 300px;
}

/* Analytics chart bars */
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 120px;
}

.chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.chart-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
    min-height: 4px;
}

.chart-bar-lbl {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* Quiz builder mockup */
.quiz-question {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.quiz-q-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.quiz-opt {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.65rem;
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

    .quiz-opt.correct {
        border-color: rgba(0,87,63,0.5);
        background: rgba(0,87,63,0.1);
        color: #00573F;
    }

    .quiz-opt.selected {
        border-color: rgba(138,21,56,0.5);
        background: rgba(138,21,56,0.1);
        color: var(--primary-light);
    }

/* ── Demo Video Section ───────────────────── */
#demo-video {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(22,0,9,0.98) 50%, var(--bg-primary) 100%);
}

.video-container {
    max-width: 800px;
    margin: 3rem auto 0;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2d0010 0%, #450018 50%, #1c0009 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(138,21,56,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(138,21,56,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.video-content-preview {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.video-mockup-title {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    position: relative;
    z-index: 2;
    transition: var(--transition);
    box-shadow: 0 0 0 0 var(--glow-primary);
    animation: pulse-play 2.5s ease-in-out infinite;
}

    .play-btn:hover {
        transform: scale(1.1);
    }

@keyframes pulse-play {
    0% {
        box-shadow: 0 0 0 0 rgba(138,21,56,0.5);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(138,21,56,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(138,21,56,0);
    }
}

.video-caption {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}

/* ── Statistics Section ───────────────────── */
#statistics {
    padding: 6rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.stat-card {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .stat-card::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--stat-color, linear-gradient(90deg, var(--primary), var(--accent)));
        transform: scaleX(0);
        transition: transform 0.4s ease;
        transform-origin: left;
    }

    .stat-card:hover {
        transform: translateY(-6px);
    }

        .stat-card:hover::after {
            transform: scaleX(1);
        }

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--text-primary, #f1f5f9);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary, #c4a0ab);
    font-weight: 500;
}

/* ── Testimonials ─────────────────────────── */
#testimonials {
    padding: 6rem 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.testimonial-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    transition: var(--transition);
    position: relative;
}

    .testimonial-card::before {
        content: '"';
        position: absolute;
        top: 1rem;
        right: 1.5rem;
        font-size: 5rem;
        line-height: 1;
        color: var(--primary);
        opacity: 0.12;
        font-family: Georgia, serif;
    }

    .testimonial-card:hover {
        transform: translateY(-6px);
        border-color: rgba(138,21,56,0.25);
        box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    }

.stars {
    color: #FFCC33;
    font-size: 0.875rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-size: 0.9rem;
    color: var(--text-secondary, #c4a0ab);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.author-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
}

.author-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── FAQ Section ──────────────────────────── */
#faq {
    padding: 6rem 0;
}

.faq-list {
    max-width: 700px;
    margin: 3rem auto 0;
}

.faq-item {
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: var(--transition);
}

    .faq-item:hover {
        border-color: rgba(138,21,56,0.25);
    }

    .faq-item.open {
        border-color: rgba(138,21,56,0.35);
    }

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary, #f1f5f9);
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: left;
    gap: 1rem;
}

.faq-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(138,21,56,0.1);
    border: 1px solid rgba(138,21,56,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 300;
    transition: var(--transition);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    background: var(--primary);
    color: #fff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), padding 0.3s ease;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary, #c4a0ab);
    line-height: 1.8;
}

.faq-item.open .faq-answer {
    max-height: 200px;
}

/* ── Contact / Newsletter ─────────────────── */
#contact {
    padding: 6rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-form-card, .newsletter-card {
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary, #f1f5f9);
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

    .form-input::placeholder, .form-textarea::placeholder {
        color: var(--text-muted);
    }

    .form-input:focus, .form-textarea:focus {
        border-color: rgba(138,21,56,0.5);
        box-shadow: 0 0 0 3px rgba(138,21,56,0.1);
        background: rgba(138,21,56,0.04);
    }

.form-textarea {
    resize: vertical;
    min-height: 110px;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

    .social-link:hover {
        color: var(--primary);
        border-color: rgba(138,21,56,0.4);
        transform: translateY(-3px);
    }

.newsletter-email-row {
    display: flex;
    gap: 0.75rem;
}

    .newsletter-email-row .form-input {
        flex: 1;
    }

    .newsletter-email-row .btn-primary {
        white-space: nowrap;
        border-radius: 10px;
    }

/* ── Footer ───────────────────────────────── */
#footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-card);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-grid > div:first-child {
    flex: 1;
    max-width: 380px;
}

.footer-grid > div:not(:first-child) {
    flex-shrink: 0;
    min-width: 150px;
}

.footer-col-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-link {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.6rem;
    transition: var(--transition);
}

    .footer-link:hover {
        color: var(--text-primary);
        transform: translateX(3px);
    }

.footer-desc {
    font-size: 0.875rem;
    color: var(--text-secondary, #c4a0ab);
    line-height: 1.75;
    margin: 0.75rem 0 1.25rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-card);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ── Floating Elements ────────────────────── */
#chatbot-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px var(--glow-primary);
    transition: var(--transition);
    animation: pulse-play 3s ease-in-out infinite;
}

    #chatbot-btn:hover {
        transform: scale(1.1) rotate(-5deg);
    }

.chatbot-tooltip {
    position: fixed;
    bottom: 2.35rem;
    right: 5.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
    z-index: 900;
}

#chatbot-btn:hover ~ .chatbot-tooltip {
    opacity: 1;
}

#back-to-top {
    position: fixed;
    bottom: 5.5rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(12px);
}

    #back-to-top.visible {
        opacity: 1;
        pointer-events: auto;
    }

    #back-to-top:hover {
        color: var(--primary);
        border-color: rgba(138,21,56,0.4);
        transform: translateY(-3px);
    }

/* ── Theme Toggle ─────────────────────────── */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    flex-shrink: 0;
}

    .theme-toggle:hover {
        border-color: rgba(255,255,255,0.2);
        transform: rotate(20deg);
    }

/* ── Scroll Reveal ────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* ── Gradient Divider ─────────────────────── */
.gradient-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    opacity: 0.3;
    margin: 0 auto;
    max-width: 80%;
}

/* ── Contact form name/email row (extracted from inline style) ── */
.form-name-email-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── Hero grid (extracted from inline style so media queries can override) ── */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 1024px) {
    .steps-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .steps-connector {
        display: none;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .why-visual {
        display: none;
    }

    /* footer-grid uses flexbox — wrap items into two rows */
    .footer-grid {
        flex-wrap: wrap;
    }

    .footer-grid > div:first-child {
        width: 100%;
        max-width: 100%;
    }
}

/* ── Tablet: 641px – 1024px ───────────────────────────────── */
@media (min-width: 641px) and (max-width: 1024px) {
    /* Tighten the hero two-column gap on tablets */
    .hero-grid {
        gap: 2rem;
    }

    /* Stats: 3 columns on tablet instead of jumping 4→2 */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Testimonials: 2 columns on tablet instead of jumping 3→1 */
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Compress showcase tab strip so it doesn't overflow */
    .showcase-tabs {
        gap: 0.3rem;
        padding: 0.25rem;
    }

    .tab-btn {
        padding: 0.45rem 1rem;
        font-size: 0.75rem;
    }

    /* Contact grid: 2 cols at tablet is fine, keep it */
    /* Footer: allow column wrap at tablet edges */
    .footer-grid > div:not(:first-child) {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    /* Hero: single column, centred */
    #hero {
        padding: 7rem 0 3.5rem;
        text-align: center;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-mockup {
        display: none;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-trust {
        justify-content: center;
    }

    /* Reduce tall section padding so content isn't dwarfed on phones */
    #features,
    #how-it-works,
    #why-edupack,
    #showcase,
    #demo-video,
    #statistics,
    #testimonials,
    #faq,
    #contact {
        padding: 3.5rem 0;
    }

    /* Sub-page hero */
    .page-hero {
        padding: 6rem 0 2.5rem !important;
    }

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

    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Fix: footer-grid is flex, not grid */
    .footer-grid {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-grid > div:first-child {
        max-width: 100%;
    }

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

    .nav-links, .nav-actions {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }

    /* Ensure mobile-menu links are 44px tap targets */
    .mobile-menu .nav-link {
        min-height: 44px;
        padding: 0.55rem 0;
        display: flex;
        align-items: center;
    }

    /* Hide inline separators inside hero-trust that break on wrap */
    .hero-trust [style*="width:1px"] {
        display: none;
    }

    .badge-courses, .badge-export, .badge-ai {
        display: none;
    }

    .newsletter-email-row {
        flex-direction: column;
    }

    /* Give cards breathing room on small screens */
    .contact-form-card, .newsletter-card {
        padding: 1.5rem;
    }

    /* FAQ answers can be longer than 200px on mobile */
    .faq-item.open .faq-answer {
        max-height: 600px;
    }

    .faq-question {
        font-size: 0.875rem;
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 640px) {
    /* Tighten container side padding on small phones */
    .container {
        padding: 0 1rem;
    }

    #hero {
        padding: 6rem 0 3rem;
    }

    /* Sub-page hero */
    .page-hero {
        padding: 5rem 0 2rem !important;
    }

    #features,
    #how-it-works,
    #why-edupack,
    #showcase,
    #demo-video,
    #statistics,
    #testimonials,
    #faq,
    #contact {
        padding: 2.5rem 0;
    }

    .steps-wrapper {
        grid-template-columns: 1fr;
    }

    .form-name-email-row {
        grid-template-columns: 1fr;
    }

    .showcase-tabs {
        flex-wrap: wrap;
        border-radius: var(--radius);
    }

    /* showcase frame: horizontal scroll on small screens */
    .showcase-frame {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

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

    /* Shrink navbar logo on very small phones */
    .sidebar-logo-box {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .brand-sub {
        display: none;
    }

    /* Stack hero CTAs vertically on very small screens */
    .hero-ctas {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-ctas .btn-primary,
    .hero-ctas .btn-outline {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .section-sub {
        font-size: 0.9375rem;
    }

    /* Testimonial cards: less padding */
    .testimonial-card {
        padding: 1.5rem;
    }

    /* Stat cards: less padding */
    .stat-card {
        padding: 1.75rem 1rem;
    }
}

/* ── EduPack Authentic Brand Theme (for mockups) ── */
:root {
    --ep-maroon: #8A1538;
    --ep-maroon-dark: #6B1029;
    --ep-maroon-mid: #9B2040;
    --ep-gold: #FFCC33;
    --ep-gold-light: #FFE066;
    --ep-sidebar: #8A1538;
    --ep-sidebar-dark: #6B1029;
    --ep-content: #F8F9FA;
    --ep-white: #FFFFFF;
    --ep-border: #E5E7EB;
    --ep-text: #1F2937;
    --ep-text-muted: #6B7280;
    --ep-teal: #00573F;
    --ep-amber: #D97706;
}

/* Sidebar */
.ep-sidebar {
    background: linear-gradient(180deg, var(--ep-sidebar) 0%, var(--ep-sidebar-dark) 100%);
    color: rgba(255,255,255,0.7);
}

.ep-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--ep-gold);
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 0.5rem;
}

.ep-sidebar-logo-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--ep-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--ep-maroon-dark);
}

.ep-nav-section {
    font-size: 0.52rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0.75rem 0.25rem;
    margin-top: 0.25rem;
}

.ep-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    transition: var(--transition);
    margin: 0.1rem 0.25rem;
}

    .ep-nav-item:hover {
        background: rgba(255,255,255,0.07);
        color: #fff;
    }

    .ep-nav-item.active {
        background: rgba(255,204,51,0.18);
        color: var(--ep-gold);
        font-weight: 600;
        border-left: 2px solid var(--ep-gold);
        padding-left: calc(0.75rem - 2px);
    }

.ep-nav-icon {
    font-size: 0.75rem;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

/* Content area (white) */
.ep-content {
    background: var(--ep-content);
    color: var(--ep-text);
}

/* Header banner */
.ep-header-banner {
    background: linear-gradient(135deg, var(--ep-maroon-mid) 0%, var(--ep-maroon-dark) 100%);
    padding: 0.75rem 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ep-banner-greeting {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ep-banner-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
}

.ep-banner-tag {
    font-size: 0.52rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Stat card */
.ep-stat-card {
    background: #fff;
    border: 1px solid var(--ep-border);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
}

.ep-stat-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ep-text);
    line-height: 1;
}

.ep-stat-key {
    font-size: 0.52rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-text-muted);
    margin-top: 0.15rem;
}

.ep-stat-sub {
    font-size: 0.55rem;
    color: var(--ep-text-muted);
    margin-top: 0.15rem;
}

/* Status badges */
.ep-badge-pub {
    background: #00573F;
    color: #fff;
    padding: 0.18rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.58rem;
    font-weight: 700;
}

.ep-badge-draft {
    background: #D97706;
    color: #fff;
    padding: 0.18rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.58rem;
    font-weight: 700;
}

/* Course card (courses page) */
.ep-course-card {
    background: #fff;
    border: 1px solid var(--ep-border);
    border-radius: 8px;
    overflow: hidden;
}

.ep-course-thumb {
    height: 50px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-course-thumb-icon {
    font-size: 1rem;
    opacity: 0.5;
}

.ep-course-body {
    padding: 0.5rem 0.6rem;
}

.ep-course-name {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--ep-text);
}

.ep-course-desc {
    font-size: 0.55rem;
    color: var(--ep-text-muted);
    margin-top: 0.15rem;
}

/* Table rows */
.ep-table-header {
    display: grid;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #fff;
    background: #1F2937;
    padding: 0.5rem 0.75rem;
    border-radius: 6px 6px 0 0;
    gap: 0.5rem;
}

.ep-table-row {
    display: grid;
    font-size: 0.6rem;
    color: var(--ep-text);
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    background: #fff;
    border-bottom: 1px solid var(--ep-border);
    align-items: center;
}

    .ep-table-row:hover {
        background: #F9FAFB;
    }

/* Topbar */
.ep-topbar {
    background: #fff;
    border-bottom: 1px solid var(--ep-border);
    padding: 0.45rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ep-topbar-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ep-text);
}

.ep-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ep-maroon);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
}

/* Bottom copyright bar */
.ep-footer-bar {
    background: #fff;
    border-top: 1px solid var(--ep-border);
    padding: 0.35rem 0.75rem;
    font-size: 0.55rem;
    color: var(--ep-text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ep-footer-brand {
    color: var(--ep-maroon);
    font-weight: 700;
}

/* Login page mockup */
.ep-login-bg {
    background: radial-gradient(ellipse at 30% 30%, #9B2040 0%, #8A1538 40%, #4e0b1e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.ep-login-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    width: 260px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.ep-login-header {
    background: linear-gradient(135deg, var(--ep-maroon-mid), var(--ep-maroon-dark));
    padding: 1.25rem;
    text-align: center;
}

.ep-login-logo-box {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--ep-gold);
    color: var(--ep-maroon-dark);
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.ep-login-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--ep-gold);
}

.ep-login-subtitle {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.2rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ep-login-body {
    padding: 1rem;
}

.ep-field {
    margin-bottom: 0.6rem;
}

    .ep-field label {
        font-size: 0.58rem;
        color: #6B7280;
        display: block;
        margin-bottom: 0.25rem;
    }

    .ep-field input {
        width: 100%;
        border: 1px solid #D1D5DB;
        border-radius: 6px;
        padding: 0.4rem 0.6rem;
        font-size: 0.62rem;
        color: var(--ep-text);
        outline: none;
        font-family: inherit;
    }

.ep-sign-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--ep-maroon-mid), var(--ep-maroon-dark));
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.25rem;
}

.ep-sign-link {
    text-align: center;
    font-size: 0.58rem;
    color: #9CA3AF;
    margin-top: 0.6rem;
}

    .ep-sign-link a {
        color: var(--ep-maroon);
        font-weight: 600;
        text-decoration: none;
    }

/* ── Utility Classes ──────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}
