/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0078D4;
    --primary-dark: #005A9E;
    --primary-light: #50A0FF;
    --secondary-color: #6C757D;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --warning-color: #FFC107;
    --info-color: #2196F3;
    --dark-color: #212529;
    --light-color: #F8F9FA;
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --text-color: #212529;
    --text-secondary: #6C757D;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-padding-top: 112px;
}

::placeholder {
    color: #64748b;
    opacity: 1;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 16px;
    overflow-x: hidden;
    background: #f5f7fa;
}

/* ── Page-level background/typography standardisation ─────────────────────── */
/* Consistent hero strip used by inner pages (roadmaps, config, etc.)          */
.page-hero {
    background: linear-gradient(135deg, #0078D4 0%, #00BCF2 100%);
    color: #fff;
    padding: 48px 20px 36px;
}
.page-hero h1 { color: #fff; font-size: 2rem; margin-bottom: .5rem; }
.page-hero p  { color: rgba(255,255,255,.88); margin: 0; }

/* Light content section — replaces bare white panels */
.page-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    padding: 32px;
    margin-bottom: 24px;
}

/* Subtle alternating section on light-bg pages */
.page-section-alt {
    background: #f8faff;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

/* Consistent inner-page content wrapper */
.page-content {
    padding: 40px 0 60px;
}

/* Typography scale — explicit so inline styles can't drift */
.page-title  { font-size: 1.9rem; font-weight: 800; color: #1e293b; margin-bottom: .4rem; }
.page-subtitle { font-size: 1rem; color: #64748b; margin: 0 0 2rem; }
/* ──────────────────────────────────────────────────────────────────────────── */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

a.btn:hover {
    color: inherit;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: #4CAF50;
    color: var(--white);
    border-color: #4CAF50;
}

.btn-success:hover {
    background: #45a049;
    border-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 120, 212, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #5A6268;
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-info {
    background: var(--info-color);
    color: var(--white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    min-height: 64px;
}
body.dark-mode .navbar {
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

/* Pre-JS placeholder so the header is never blank while nav.js loads */
.nav-loading {
    display: flex;
    align-items: center;
    min-height: 32px;
}
.nav-loading .nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark-color);
    white-space: nowrap;
}

.navbar .container {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Logo: always on the far left, never shrinks */
.nav-brand {
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark-color);
    white-space: nowrap;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text strong {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    position: relative;
    transition: color 0.18s ease, background 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Pill hover for plain top-level links, matching the dropdown toggles */
.nav-link:not(.dropdown-toggle):hover {
    background: #f0f4ff;
}
body.dark-mode .nav-link:not(.dropdown-toggle):hover {
    background: #334155;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 0.85rem;
    right: 0.85rem;
    height: 2.5px;
    border-radius: 2px;
    background: var(--primary-color);
}
.nav-link.dropdown-toggle.active::after { display: none; }

/* Right-side nav actions: hug the far right (menu's auto margin pushes them) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================================================
   DROPDOWN MEGA-NAV
   ============================================================ */

.nav-menu {
    gap: 0.15rem;
    align-items: center;
    /* Keep Home aligned directly after the brand; actions stay far-right. */
    margin: 0 auto 0 0;
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.dropdown-toggle:hover,
.nav-dropdown:hover .dropdown-toggle {
    background: #f0f4ff;
    color: var(--primary-color) !important;
}

/* Hide the active underline on dropdown toggles */
.dropdown-toggle.active::after { display: none; }

/* Active dropdown section gets a pill highlight instead of an underline */
.dropdown-toggle.active {
    background: #eaf2fe;
    color: var(--primary-color) !important;
}
body.dark-mode .dropdown-toggle.active {
    background: #334155;
    color: #93c5fd !important;
}

.whatsapp-training-link {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 9px 14px 9px 10px;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    box-shadow: 0 8px 24px rgba(18, 140, 77, 0.32);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-training-link:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(18, 140, 77, 0.4);
}
.whatsapp-training-link svg {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
}

/* Quiz quick-start cards */
.preset-modes {
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fbff, #f3f7ff);
}
.preset-modes h3 {
    margin: 0 0 14px;
    color: #172033;
    font-size: 1rem;
}
.preset-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.preset-btn {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
    padding: 15px;
    border: 1.5px solid #d7e1ee;
    border-radius: 13px;
    background: #fff;
    color: #24324a;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(31, 55, 86, 0.05);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.preset-btn:hover {
    transform: translateY(-2px);
    border-color: #7eb8ec;
    box-shadow: 0 8px 18px rgba(0, 120, 212, .12);
}
.preset-btn.active-preset {
    border-color: #0078d4;
    background: #eef7ff;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, .12);
}
.pb-icon { font-size: 1.35rem; line-height: 1; }
.pb-name { font-size: .9rem; font-weight: 750; color: #16243a; }
.pb-desc { font-size: .73rem; line-height: 1.35; color: #637087; }
.q-slider-wrap { padding: 12px 4px 2px; }
.q-slider { width: 100%; accent-color: #0078d4; cursor: pointer; }
.q-slider-labels { display: flex; justify-content: space-between; color: #6b778c; font-size: .72rem; }
.q-time-badge { padding: 5px 9px; border-radius: 999px; background: #eaf4ff; color: #005ea8; font-size: .78rem; font-weight: 700; }

.btn-icon {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: -0.15em;
}

@media (max-width: 900px) {
    .preset-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .preset-row { grid-template-columns: 1fr; }
    .whatsapp-training-link {
        right: 12px;
        bottom: 12px;
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
    }
    .whatsapp-training-link span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }
}

.nav-chevron {
    font-size: 0.68rem;
    transition: transform 0.2s ease;
    display: inline-block;
    opacity: 0.55;
    margin-top: 1px;
}

.nav-dropdown:hover .nav-chevron,
.nav-dropdown.open .nav-chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    /* display:none prevents FOUC — menus are invisible before CSS loads */
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.07);
    padding: 8px;
    min-width: 230px;
    z-index: 2000;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #fff;
    border-left: 1px solid rgba(0,0,0,0.07);
    border-top: 1px solid rgba(0,0,0,0.07);
    border-radius: 2px 0 0 0;
    transform: translateX(-50%) rotate(45deg);
    z-index: 1;
}

/* Invisible bridge to prevent menu disappearing when cursor moves to it */
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

/* Shown only via JS .open class — no CSS :hover so the 12px gap doesn't close the menu */
.nav-dropdown.open .dropdown-menu {
    display: block;
    pointer-events: all;
    animation: dropdownReveal 0.18s ease forwards;
}

@keyframes dropdownReveal {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.dropdown-item:hover {
    background: #f0f4ff;
    text-decoration: none;
}

.dropdown-icon {
    font-size: 1.2rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4ff;
    border-radius: 8px;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.dropdown-item:hover .dropdown-icon {
    transform: scale(1.12);
}

.dropdown-item strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a2236;
    line-height: 1.2;
}

.dropdown-item small {
    display: block;
    font-size: 0.74rem;
    color: #6b7280;
    margin-top: 1px;
    font-weight: 400;
}

.dropdown-item:hover strong {
    color: var(--primary-color);
}

/* Nav CTA Button — ghost/outline so the hero button stays the primary action */
.nav-cta-btn {
    background: transparent;
    color: var(--primary-color) !important;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1.5px solid var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
    white-space: nowrap;
}

.nav-cta-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,120,212,0.28);
    color: #fff !important;
    text-decoration: none;
}

/* Dark mode dropdown */
body.dark-mode .dropdown-toggle:hover,
body.dark-mode .nav-dropdown:hover .dropdown-toggle {
    background: #334155;
}

body.dark-mode .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

body.dark-mode .dropdown-menu::before {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .dropdown-item {
    color: #cbd5e1;
}

body.dark-mode .dropdown-item:hover {
    background: #334155;
}

body.dark-mode .dropdown-item strong {
    color: #e2e8f0;
}

body.dark-mode .dropdown-item:hover strong {
    color: #93c5fd;
}

body.dark-mode .dropdown-icon {
    background: #334155;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 4rem 0 0 0;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding-bottom: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 3rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title .highlight {
    background: linear-gradient(to right, #f093fb 0%, #f5576c 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-eyebrow {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.trust-bar {
    padding: 0.9rem 0;
    border-top: 2px solid #0ea5e9;
    border-bottom: 1px solid #334155;
    background: #1e293b;
}

.trust-bar-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trust-bar-items > * {
    padding: 0.35rem 1rem;
    border-right: 1px solid #475569;
    color: #e2e8f0;
    font-size: 0.86rem;
    text-align: center;
}

.trust-bar-items > *:last-child {
    border-right: 0;
}

.trust-bar-items strong {
    color: #7dd3fc;
}

.trust-bar-items a:hover,
.trust-bar-items a:focus-visible {
    color: #fff;
}

.section-kicker {
    margin-bottom: 0.45rem;
    color: #005ea8;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.certification-header {
    margin-bottom: 2rem;
}

.certifications .section-subtitle,
.features .section-subtitle,
.about .about-text > p,
.about-mission li,
.cards-counter {
    color: #5b6470;
}

.feature-badge,
#totalCount {
    color: #005ea8;
}

.stat-item {
    text-align: center;
    padding: 0.5rem 1rem;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(3) { animation-delay: 0.2s; }
.stat-item:nth-child(5) { animation-delay: 0.3s; }

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-number {
    display: block;
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.95rem;
    opacity: 0.95;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        margin-top: 1.5rem;
        padding: 1rem 0.5rem;
    }
    
    .stat-divider {
        display: none;
    }
    
    .stat-number {
        font-size: 1.55rem;
    }
    
    .stat-label {
        font-size: 0.72rem;
        white-space: normal;
    }

    .stat-item {
        padding: 0.25rem 0.35rem;
    }

    .trust-bar-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trust-bar-items > * {
        border-bottom: 1px solid #475569;
    }

    .trust-bar-items > *:nth-child(2n) {
        border-right: 0;
    }
}

/* Sections */
section {
    padding: 80px 0;
    scroll-margin-top: 112px;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Certifications Section */
.certifications {
    background: #f8f9ff;
    padding-top: 4.25rem;
    padding-bottom: 2rem;
    scroll-margin-top: 112px;
}

/* Features section reduced top gap */
.features {
    padding-top: 3rem;
}

/* Search Box Container */
.search-box-container {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
}

/* Search and Filter Controls */
.search-box {
    position: relative;
    max-width: 700px;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 56px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(0, 120, 212, 0.15);
}

/* Role filter row — removed from UI */
#roleFilterRow { display: none !important; }

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.cert-card.hidden {
    display: none;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.cert-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    align-self: stretch;
}

.cert-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.cert-card.featured {
    grid-column: auto;
}

.cert-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1;
}

.cert-header {
    padding: 1.35rem 1.25rem;
    color: var(--white);
    text-align: center;
    flex-shrink: 0;
}

.cert-icon {
    margin-bottom: 0.6rem;
}

.cert-grid .cert-icon svg {
    width: 46px;
    height: 46px;
}

.cert-name {
    font-size: 1.2rem;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.cert-code {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.9;
}

.cert-body {
    padding: 1.25rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.cert-card .cert-actions {
    margin-top: auto !important;
    padding-top: 1rem;
}

.cert-description {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cert-stats {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.cert-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.cert-stat svg {
    color: var(--primary-color);
}

.cert-topics {
    margin-bottom: 1rem;
}

.cert-topics h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.cert-topics ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.cert-topics li {
    padding: 0.2rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.cert-topics li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
}

.cert-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
    margin-top: 0;
    padding-top: 0.35rem;
}

.feature-badge {
    background: #E3F2FD;
    color: var(--primary-color);
    padding: 0.35rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

.btn-block {
    margin-top: 0.5rem;
}

.coming-soon {
    opacity: 0.7;
}

.coming-soon-badge {
    text-align: center;
    padding: 2rem;
    background: var(--light-color);
    border-radius: 8px;
    margin-top: 1rem;
}

.coming-soon-badge span {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 20px;
    font-weight: 600;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem 0;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-load-more svg {
    transition: transform 0.3s ease;
}

.btn-load-more:hover svg {
    transform: translateY(3px);
}

.cards-counter {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.cards-counter span {
    font-weight: 600;
    color: var(--primary-color);
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* How It Works */
.how-it-works {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.how-it-works .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.step {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.step-description {
    opacity: 0.9;
}

.step-line {
    flex: 0.5;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 1rem;
}

.cta-banner {
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.cta-banner h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-banner p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-mission {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.about-mission h3 {
    margin-bottom: 1rem;
}

.about-mission ul {
    list-style: none;
}

.about-mission li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.stat-large {
    text-align: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-large:last-child {
    border-bottom: none;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

/* Ensure stats-card numbers stay white regardless of later .stat-value overrides */
.stats-card .stat-value {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Practice Tests Section */
.practice-tests {
    background: var(--white);
    padding: 5rem 0;
}

.practice-tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.practice-test-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.practice-test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.practice-test-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.test-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.practice-test-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.test-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.test-questions,
.test-time {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.test-questions::before {
    content: '📝';
}

.test-time::before {
    content: '⏱️';
}

.practice-test-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.custom-config-cta {
    text-align: center;
    padding: 2rem;
    background: var(--light-color);
    border-radius: 12px;
}

.custom-config-cta p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Testimonials Section */
.testimonials {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 5rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.testimonial-card.featured {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.05) 0%, rgba(0, 120, 212, 0.02) 100%);
}

.testimonial-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.testimonial-rating {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.author-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.author-meta {
    font-size: 0.85rem;
    color: var(--success-color);
    font-weight: 600;
}

.testimonial-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.testimonial-stat {
    text-align: center;
}

.testimonial-stat .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.testimonial-stat .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111111;
    -webkit-text-fill-color: #111111;
    background: none;
    background-clip: initial;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.testimonial-stat .stat-text {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Page Sections */
.page-section {
    padding: 5rem 0;
    min-height: 60vh;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Contact Page */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h2 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-form-wrapper {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

select.form-control {
    cursor: pointer;
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-report {
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-report:hover {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

/* About Page */
.about-content-page {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.about-text p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Legal Pages */
.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.5rem;
}

.legal-content p,
.legal-content ul {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-content ul {
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: var(--white);
    padding: 2rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column h4 {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.7;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .dropdown-menu {
        display: none;
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #f8f9ff;
        padding: 0;
        min-width: unset;
        transition: none;
    }

    .dropdown-menu::before { display: none; }

    .nav-dropdown.open .dropdown-menu {
        display: block;
        padding: 6px 12px;
        animation: none;
    }

    .dropdown-item {
        justify-content: center;
    }

    .nav-cta-btn { display: none; }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-image {
        display: none;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .cert-card.featured {
        grid-column: 1;
        grid-row: auto;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .step-line {
        display: none;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* Animations */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   QUIZ CONFIGURATION PAGE STYLES
   ========================================== */

.quiz-config {
    background: var(--light-color);
    min-height: 100vh;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.config-header {
    margin-bottom: 3rem;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary-color);
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.config-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.exam-info-card,
.config-form-card,
.tips-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.exam-info-card {
    grid-column: 1 / -1;
}

.exam-info-header {
    padding: 2rem;
    background: linear-gradient(135deg, #0078D4 0%, #00BCF2 100%);
    color: var(--white);
}

.exam-badge {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.badge-icon {
    font-size: 3rem;
}

.badge-text h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.exam-info-body {
    padding: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    font-size: 2rem;
}

.info-content {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.config-form-card {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.label-icon {
    font-size: 1.25rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.custom-count-wrapper {
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
}

.custom-count-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.custom-count-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.custom-count-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.custom-count-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.checkbox-label:hover {
    border-color: var(--primary-color);
    background: rgba(0, 120, 212, 0.05);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: var(--white);
    font-weight: 700;
}

.checkbox-text {
    display: flex;
    flex-direction: column;
}

.checkbox-text small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.form-summary {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.form-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.summary-label {
    color: var(--text-secondary);
}

.summary-value {
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.tips-card {
    padding: 2rem;
    height: fit-content;
}

.tips-card h3 {
    margin-bottom: 1.5rem;
}

.tips-list {
    list-style: none;
}

.tips-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.tips-list li::before {
    content: '💡';
    position: absolute;
    left: 0;
}

/* ==========================================
   QUIZ PAGE STYLES
   ========================================== */

.quiz-body {
    background: var(--light-color);
    min-height: 100vh;
}

.quiz-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.quiz-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-branding {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.quiz-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--dark-color);
}

.quiz-title-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.quiz-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--light-color);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: var(--white);
}

.quiz-progress-bar {
    height: 8px;
    background: #e2e8f0;
    position: relative;
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0078D4 0%, #00BCF2 100%);
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 99px;
    position: relative;
}

/* Shimmer sweep on the progress bar fill */
.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
    animation: progressShimmer 1.8s infinite;
}

@keyframes progressShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.quiz-container {
    padding: 2rem 0 4rem;
}

.quiz-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.question-panel,
.sidebar-panel .sidebar-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.question-number {
    font-size: 1.25rem;
    font-weight: 700;
}

.question-difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.difficulty-easy {
    background: #E8F5E9;
    color: #2E7D32;
}

.difficulty-moderate {
    background: #FFF3E0;
    color: #E65100;
}

.difficulty-hard {
    background: #FFEBEE;
    color: #C62828;
}

.completion-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.question-progress-dots {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    transition: var(--transition);
}

.progress-dot.current {
    background: var(--primary-color);
    width: 24px;
    border-radius: 4px;
}

.progress-dot.answered {
    background: var(--success-color);
}

.question-content {
    margin-bottom: 2rem;
}

.question-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #E3F2FD;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.question-text {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.case-study-context {
    background: #f6f9ff;
    border: 1px solid #d1dcf7;
    border-left: 4px solid #4a6cf7;
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    margin: 0 0 1.25rem 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #29335c;
}
.case-study-context > summary {
    cursor: pointer;
    font-weight: 600;
    color: #2b3d8a;
    padding: 0.15rem 0;
    outline: none;
    user-select: none;
}
.case-study-context > summary::-webkit-details-marker {
    color: #4a6cf7;
}
.case-study-body {
    margin-top: 0.7rem;
    white-space: pre-wrap;
    color: #384073;
}
.case-study-question {
    font-size: 1.2rem;
    line-height: 1.55;
    color: inherit;
    font-weight: 500;
}

.question-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #FFF3E0;
    color: #E65100;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.answer-option {
    position: relative;
}

.answer-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.answer-option label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.answer-option input:checked + label {
    border-color: var(--primary-color);
    background: rgba(0, 120, 212, 0.05);
}

.answer-option label:hover {
    border-color: var(--primary-light);
}

.answer-option.correct label {
    border-color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
}

.answer-option.incorrect label {
    border-color: var(--danger-color);
    background: rgba(244, 67, 54, 0.1);
}

.option-marker {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-secondary);
}

.answer-option input:checked + label .option-marker {
    background: var(--primary-color);
    color: var(--white);
}

.option-text {
    flex: 1;
    line-height: 1.6;
}

.answer-explanation {
    background: #E8F5E9;
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.answer-explanation.correct {
    background: #E8F5E9;
    border-left: 4px solid var(--success-color);
}

.answer-explanation.incorrect {
    background: #FFEBEE;
    border-left: 4px solid var(--danger-color);
}

.explanation-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--success-color);
}

.answer-explanation.incorrect .explanation-header {
    color: var(--danger-color);
}

.explanation-content {
    color: var(--text-color);
    line-height: 1.8;
}

.explanation-reference {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.question-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.action-buttons-group {
    display: flex;
    gap: 1rem;
}

.btn.flagged {
    background: var(--warning-color);
    color: var(--dark-color);
}

.sidebar-card {
    margin-bottom: 1.5rem;
}

.sidebar-card:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.test-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-box {
    text-align: center;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 8px;
}

.stat-box .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-box .stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.question-nav-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.question-nav-btn:hover {
    border-color: var(--primary-color);
}

.question-nav-btn.current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.question-nav-btn.answered {
    background: #dcfce7;
    border-color: #22c55e;
    color: #15803d;
    font-weight: 700;
}

/* Unanswered but visited — subtle warm tint */
.question-nav-btn.unanswered {
    background: #fff7ed;
    border-color: #fb923c;
    color: #c2410c;
}

.question-nav-btn.flagged {
    position: relative;
    background: #fef9c3;
    border-color: #eab308;
    color: #854d0e;
    font-weight: 700;
}

.question-nav-btn.flagged::after {
    content: '🚩';
    position: absolute;
    top: -7px;
    right: -7px;
    font-size: 0.7rem;
    line-height: 1;
}

.legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
}

.legend-dot.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.legend-dot.answered {
    background: #E8F5E9;
    border-color: var(--success-color);
}

.legend-dot.flagged {
    background: #fef9c3;
    border-color: #eab308;
}

.legend-dot.unanswered {
    background: #fff7ed;
    border-color: #fb923c;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--light-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.action-btn:hover {
    border-color: var(--primary-color);
    background: rgba(0, 120, 212, 0.05);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-large {
    max-width: 600px;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light-color);
    color: var(--dark-color);
}

.modal-header {
    padding: 2rem 2rem 1rem;
}

.modal-header h2 {
    font-size: 1.75rem;
}

.modal-body {
    padding: 0 2rem 2rem;
}

.modal-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ==========================================
   RESULTS PAGE STYLES
   ========================================== */

.results-section {
    background: var(--light-color);
    min-height: 100vh;
    padding: 2rem 0 4rem;
}

.results-header {
    margin-bottom: 3rem;
}

.score-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 3rem;
    margin-bottom: 3rem;
}

.score-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 2rem;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.score-circle svg {
    transform: rotate(-90deg);
}

.score-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-percentage {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.result-status {
    text-align: center;
    margin-bottom: 2rem;
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.status-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.status-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.score-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.score-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 12px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-icon.correct {
    background: #E8F5E9;
    color: var(--success-color);
}

.stat-icon.incorrect {
    background: #FFEBEE;
    color: var(--danger-color);
}

.stat-icon.time {
    background: #E3F2FD;
    color: var(--primary-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-info .stat-label {
    color: var(--text-secondary);
}

.passing-indicator {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.passing-bar {
    position: relative;
    height: 40px;
    background: linear-gradient(to right, #FFEBEE 0%, #FFEBEE 70%, #E8F5E9 70%, #E8F5E9 100%);
    border-radius: 20px;
}

.passing-line {
    position: absolute;
    top: -30px;
    height: 100px;
    width: 2px;
    background: var(--dark-color);
}

.passing-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 12px;
    height: 12px;
    background: var(--dark-color);
    border-radius: 50%;
}

.passing-label {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
}

.score-marker {
    position: absolute;
    bottom: -10px;
    transform: translateX(-50%);
    transition: left 0.5s ease;
}

.marker-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 15px solid var(--primary-color);
}

.performance-breakdown,
.question-review,
.study-recommendations {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.breakdown-card {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 12px;
}

.breakdown-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.breakdown-item {
    margin-bottom: 1rem;
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.breakdown-label {
    font-weight: 600;
}

.breakdown-score {
    color: var(--text-secondary);
}

.breakdown-bar {
    height: 8px;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.review-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.review-question {
    background: var(--light-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--border-color);
}

.review-question.correct {
    border-left-color: var(--success-color);
}

.review-question.incorrect {
    border-left-color: var(--danger-color);
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.review-number {
    font-weight: 700;
}

.review-type,
.review-difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--white);
}

.review-flag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    background: var(--warning-color);
}

.review-result {
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.review-result.correct {
    background: #E8F5E9;
    color: var(--success-color);
}

.review-result.incorrect {
    background: #FFEBEE;
    color: var(--danger-color);
}

.review-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1rem 0;
}

.review-answers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.review-answer {
    padding: 1rem;
    border-radius: 8px;
}

.review-answer.correct {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--success-color);
}

.review-answer.incorrect {
    background: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--danger-color);
}

/* Collapsible Explanation Styles */
.collapsible-explanation {
    margin-top: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
}

.explanation-toggle {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    user-select: none;
    transition: all 0.3s ease;
}

.explanation-toggle:hover {
    background: #e9ecef;
}

.explanation-toggle.active {
    background: #007bff;
    color: white;
}

.toggle-text {
    font-size: 1rem;
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.explanation-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease-out;
    padding: 0 1.5rem;
}

.review-explanation {
    background: var(--white);
    padding: 1.5rem 0;
    border-radius: 8px;
}

.review-reference {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommendation-item {
    padding: 1.25rem;
    background: var(--light-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .config-container {
        grid-template-columns: 1fr;
    }
    
    .quiz-layout {
        grid-template-columns: 1fr;
    }
    
    .score-main {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .action-buttons-group {
        width: 100%;
        flex-direction: column;
    }
    
    .score-stats {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        gap: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-stats {
        padding: 2rem 1.5rem;
    }
}

/* ============================================
   Progress Dashboard Styles
   ============================================ */

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 48px;
}

.dashboard-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 12px;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-section {
    background: var(--white);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 0;
}

.quiz-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    transition: background-color 0.2s ease;
}

.quiz-history-item:last-child {
    border-bottom: none;
}

.quiz-history-item:hover {
    background-color: var(--gray-50);
}

.quiz-info h4 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.quiz-meta {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.quiz-score {
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 16px;
}

.quiz-score.passed {
    color: #4CAF50;
}

.quiz-score.failed {
    color: #F44336;
}

.quiz-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--gray-100);
    border-color: var(--primary-color);
}

.cert-perf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.cert-perf-card {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.cert-perf-card h4 {
    margin: 0 0 16px 0;
    color: var(--text-color);
}

.perf-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.perf-stat span:first-child {
    color: var(--gray-600);
}

.perf-stat span:last-child {
    font-weight: 600;
    color: var(--text-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-600);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cert-perf-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Flagged Questions Styles
   ============================================ */

.flagged-question-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flagged-question-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.flagged-question-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.cert-badge-small {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.flagged-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.difficulty-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-badge.easy {
    background: #E8F5E9;
    color: #2E7D32;
}

.difficulty-badge.medium {
    background: #FFF3E0;
    color: #E65100;
}

.difficulty-badge.hard {
    background: #FFEBEE;
    color: #C62828;
}

.topic-tag {
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--gray-700);
}

.flagged-date {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.unflag-btn {
    padding: 6px;
    background: transparent;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.unflag-btn:hover {
    background: #FFEBEE;
    color: #C62828;
}

.flagged-question-body {
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.question-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.answer-options-review {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.answer-option-review {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
}

.answer-option-review.correct {
    background: #E8F5E9;
    border-color: #4CAF50;
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.answer-option-review.correct .option-letter {
    background: #4CAF50;
    color: white;
}

.option-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.correct-indicator {
    font-size: 1.2rem;
    color: #4CAF50;
    font-weight: bold;
}

.explanation-box {
    background: #F3F4F6;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.explanation-box strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

.explanation-box p {
    margin: 0;
    line-height: 1.6;
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .flagged-question-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .flagged-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .unflag-btn {
        position: absolute;
        top: 20px;
        right: 20px;
    }
}

/* ============================================
   Social Sharing Modal Styles
   ============================================ */

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-modal.show {
    opacity: 1;
}

.share-modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.share-modal.show .share-modal-content {
    transform: scale(1);
}

.share-modal-content h3 {
    font-size: 1.8rem;
    margin: 0 0 12px 0;
    color: var(--text-color);
}

.share-modal-content p {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 24px;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.share-btn.linkedin {
    background: #0077B5;
}

.share-btn.linkedin:hover {
    background: #006399;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 119, 181, 0.3);
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.twitter:hover {
    background: #1A91DA;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29, 161, 242, 0.3);
}

.share-btn.copy {
    background: var(--gray-700);
}

.share-btn.copy:hover {
    background: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.close-modal-btn {
    padding: 12px 32px;
    background: transparent;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

@media (max-width: 480px) {
    .share-modal-content {
        padding: 24px;
    }
    
    .share-buttons {
        gap: 10px;
    }
    
    .share-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* ============================================
   Study Mode Badge
   ============================================ */

.study-mode-badge {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(76, 175, 80, 0.5);
    }
}

/* ============================================
   Mobile Responsive Improvements
   ============================================ */

@media (max-width: 768px) {
    /* Quiz Interface - Larger Touch Targets */
    .answer-option label {
        padding: 1.5rem !important;
        min-height: 60px;
        font-size: 1rem;
    }
    
    .answer-option input:checked + label {
        border-width: 3px;
    }
    
    .btn, .btn-primary, .btn-secondary, .btn-outline {
        min-height: 48px;
        padding: 14px 24px;
        font-size: 1rem;
        touch-action: manipulation;
    }
    
    .btn-large {
        width: 100%;
        min-height: 56px;
        font-size: 1.1rem;
    }
    
    .filter-btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Search Bar - Better Mobile UX */
    .search-box-container {
        padding: 0 16px;
        margin-bottom: 24px;
    }
    
    .search-input {
        padding: 16px 20px 16px 52px !important;
        font-size: 16px !important; /* Prevents iOS zoom */
        min-height: 52px;
    }
    
    .search-icon {
        left: 18px;
        width: 20px;
        height: 20px;
    }
    
    /* Hero Section */
    .hero-cta {
        flex-direction: column;
        gap: 16px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Quiz Navigation */
    .question-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-buttons-group {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }
    
    .action-buttons-group .btn {
        width: 100%;
    }
    
    /* Quiz Question Display */
    .question-card {
        padding: 1.5rem;
    }
    
    .question-header h2 {
        font-size: 1.1rem;
    }
    
    .question-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Progress Dashboard */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .dashboard-section {
        padding: 24px 16px;
    }
    
    .quiz-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .cert-perf-grid {
        grid-template-columns: 1fr;
    }
    
    /* Score Display */
    .score-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        padding: 16px;
    }
    
    /* Navigation */
    .nav-menu {
        font-size: 0.95rem;
    }
    
    /* Certification Cards */
    .cert-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cert-card {
        max-width: 100%;
    }
    
    /* Testimonials */
    .testimonials-grid {
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    /* Quiz Timer */
    .timer-display {
        font-size: 1.1rem;
        padding: 10px 16px;
    }
    
    /* Question Navigator */
    .question-nav {
        gap: 8px;
    }
    
    .question-nav-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 0.95rem;
    }
    
    /* Flagged Questions */
    .flagged-question-card {
        padding: 20px 16px;
    }
    
    .flagged-question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .flagged-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .unflag-btn {
        position: relative;
        top: 0;
        right: 0;
        min-width: 44px;
        min-height: 44px;
        margin-top: 12px;
    }
    
    /* Social Share Modal */
    .share-modal-content {
        width: 95%;
        max-width: 95%;
        padding: 24px 16px;
        margin: 20px;
    }
    
    .share-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
        min-height: 48px;
    }
    
    /* Container Padding */
    .container {
        padding: 0 16px;
    }
    
    .dashboard {
        padding: 60px 16px;
    }
    
    /* Form Elements */
    .form-select, .form-input, select, input[type="number"] {
        font-size: 16px !important; /* Prevents iOS zoom */
        min-height: 48px;
        padding: 12px 16px;
    }
    
    /* Checkbox Labels */
    .checkbox-label {
        min-height: 44px;
        padding: 12px;
    }
}

/* Extra Small Devices (max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .dashboard-title {
        font-size: 1.75rem;
    }
    
    .question-text {
        font-size: 0.95rem;
    }
    
    .answer-option label {
        padding: 1.25rem !important;
        font-size: 0.95rem;
    }
    
    .share-modal-content {
        padding: 20px 12px;
    }
    
    .share-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 0 12px;
    }
}

/* ============================================
   Flashcards Mode Styles
   ============================================ */

.flashcard-section {
    min-height: 80vh;
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.flashcard-selection {
    text-align: center;
    padding: 40px 0;
}

.flashcard-selection .section-title {
    color: white;
    margin-bottom: 16px;
}

.flashcard-selection .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 48px;
}

.flashcard-cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.flashcard-cert-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.flashcard-cert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.flashcard-cert-card .cert-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.flashcard-cert-card h3 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 1.8rem;
}

.flashcard-cert-card p {
    color: #666;
    margin-bottom: 16px;
}

.card-count {
    display: inline-block;
    background: #f0f0f0;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.flashcard-cert-card .btn {
    width: 100%;
}

/* Flashcard Viewer */
.flashcard-viewer {
    max-width: 900px;
    margin: 0 auto;
}

.flashcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.flashcard-progress {
    background: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #4f46a5;
}

.flashcard-controls {
    display: flex;
    gap: 12px;
}

.flashcard-controls .btn {
    background: white;
    color: #4f46a5;
    border: 2px solid white;
    font-weight: 600;
}

.flashcard-controls .btn:hover {
    background: #764ba2;
    color: white;
    border-color: white;
}

.flashcard-header .btn-outline {
    background: white;
    color: #4f46a5;
    border: 2px solid white;
    font-weight: 600;
}

.flashcard-header .btn-outline:hover {
    background: #764ba2;
    color: white;
}

.flashcard-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.flashcard-cert-name {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.flashcard-category {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Flashcard Container with Flip Animation */
.flashcard-container {
    perspective: 1000px;
    position: relative;
    margin-bottom: 32px;
    min-height: 400px;
}

.flashcard {
    position: relative;
    width: 100%;
    height: 400px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.flashcard-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    align-items: flex-start;
    padding-bottom: 130px;
    overflow-y: auto;
}

.flashcard-content {
    width: 100%;
    text-align: center;
}

.flip-hint {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
}

.flashcard-front h2 {
    font-size: 1.8rem;
    color: #333;
    line-height: 1.4;
}

.flashcard-back h3 {
    color: #667eea;
    margin-bottom: 16px;
    font-size: 1.3rem;
}

.flashcard-back p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
}

.explanation-box {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: left;
}

.explanation-box strong {
    color: #667eea;
    font-size: 1rem;
}

.explanation-box p {
    font-size: 0.95rem;
    margin-top: 8px;
}

.srs-grade-row {
    display: flex;
    position: absolute;
    right: 24px;
    bottom: 20px;
    left: 24px;
    z-index: 5;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.srs-grade-row[hidden] {
    display: none;
}

.srs-grade-row span {
    width: 100%;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
}

.srs-grade-row button {
    padding: 7px 16px;
    border: 1.5px solid;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
}

.srs-grade-row .srs-again { border-color: #ef4444; background: #fef2f2; color: #b91c1c; }
.srs-grade-row .srs-hard { border-color: #f59e0b; background: #fffbeb; color: #92400e; }
.srs-grade-row .srs-good { border-color: #22c55e; background: #f0fdf4; color: #166534; }
.srs-grade-row .srs-easy { border-color: #0078d4; background: #eff6ff; color: #1d4ed8; }

/* Flashcard Actions */
.flashcard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.mastery-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mastery-actions .btn {
    background: white;
    color: #4f46a5;
    border: 2px solid white;
    font-weight: 600;
    transition: all 0.3s;
}

.mastery-actions .btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.flashcard-actions .btn {
    min-width: 140px;
}

/* Flashcard Stats */
.flashcard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: rgba(255, 255, 255, 0.15);
    padding: 24px;
    border-radius: 16px;
}

.flashcard-stats .stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 16px;
    border-radius: 12px;
}

.flashcard-stats .stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.flashcard-stats .stat-value {
    display: block;
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

/* Card State Indicators */
.known-card .flashcard-front {
    border: 3px solid #4CAF50;
}

.review-card .flashcard-front {
    border: 3px solid #FF9800;
}

/* Mobile Responsive for Flashcards */
@media (max-width: 768px) {
    .flashcard-section {
        padding: 60px 0;
    }
    
    .flashcard-cert-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .flashcard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .flashcard-controls {
        justify-content: center;
    }
    
    .flashcard-container {
        min-height: 350px;
    }
    
    .flashcard {
        height: 350px;
    }
    
    .flashcard-front,
    .flashcard-back {
        padding: 24px;
    }

    .flashcard-back {
        padding-bottom: 130px;
    }
    
    .flashcard-front h2 {
        font-size: 1.4rem;
    }
    
    .flashcard-back p {
        font-size: 1rem;
    }
    
    .flashcard-actions {
        flex-direction: column;
    }
    
    .mastery-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .flashcard-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .flashcard-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .flashcard-container {
        min-height: 320px;
    }
    
    .flashcard {
        height: 320px;
    }
    
    .flashcard-front h2 {
        font-size: 1.2rem;
    }
    
    .flashcard-back h3 {
        font-size: 1.1rem;
    }
    
    .flashcard-back p {
        font-size: 0.95rem;
    }
}
/* ============================================================
   UI IMPROVEMENTS — Premium SaaS Upgrade
   ============================================================ */

/* Hero text layout */
.hero-text {
    flex: 1;
    min-width: 0;
}

/* Hero Product Visual mockup */
.hero-visual {
    flex: 0 0 420px;
    max-width: 420px;
}

.hero-mockup {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.15);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
    transition: transform 0.4s ease;
}

.hero-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    background: #1e1e2e;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mockup-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.mockup-dot.red { background: #ff5f57; }
.mockup-dot.yellow { background: #febc2e; }
.mockup-dot.green { background: #28c840; }

.mockup-title {
    color: rgba(255,255,255,0.7);
    font-size: 0.78rem;
    margin-left: 8px;
    font-weight: 500;
}

.mockup-body {
    padding: 20px;
    background: #f8f9ff;
}

.mockup-progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.mockup-progress-bar {
    background: #e2e8f0;
    border-radius: 4px;
    height: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}

.mockup-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    animation: progressFill 1.5s ease-out 0.5s backwards;
}

@keyframes progressFill {
    from { width: 0 !important; }
}

.mockup-question {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.5;
    margin-bottom: 14px;
}

.mockup-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.mockup-option {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #374151;
    cursor: default;
    transition: border-color 0.2s;
}

.mockup-option.correct {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
    font-weight: 600;
}

.mockup-explanation {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    font-size: 0.78rem;
    color: #78350f;
    line-height: 1.5;
}

.mockup-footer {
    background: #fff;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
}

.mockup-stat-row {
    display: flex;
    gap: 12px;
    justify-content: space-around;
}

.mockup-mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.75rem;
}

.mockup-mini-stat strong {
    font-size: 1.1rem;
    color: #1a202c;
}

.mockup-mini-stat small {
    color: #5f6368;
}

/* Responsive: stack hero on smaller screens */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { display: none; }
}

/* Hero CTA Button Styles */
.btn-hero-primary {
    background: #ff9f0a !important;
    color: #1a1a2e !important;
    border: 2px solid #ff9f0a !important;
    font-weight: 800 !important;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 50px !important;
    box-shadow: 0 4px 24px rgba(255,159,10,0.5);
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.btn-hero-primary:hover {
    background: #f08800 !important;
    border-color: #f08800 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(255,159,10,0.6);
    color: #1a1a2e !important;
    text-decoration: none !important;
}

.btn-hero-outline {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
    border: 2px solid rgba(255,255,255,0.9) !important;
    font-weight: 700 !important;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 50px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
}

.btn-hero-outline:hover {
    background: rgba(255,255,255,0.28) !important;
    border-color: #fff !important;
    color: #fff !important;
    transform: translateY(-3px);
    text-decoration: none !important;
}

/* Cert card hover glow */
.cert-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 0 2px rgba(102, 126, 234, 0.3) !important;
}

/* Full-width cert card CTA */
.cert-actions {
    flex-direction: column-reverse !important;
    gap: 8px !important;
}

.cert-actions a {
    flex: unset !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box;
}

.cert-actions .btn-primary {
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Stat item hover animation */
.stat-item {
    cursor: default;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-4px) scale(1.04);
    filter: brightness(1.1);
}

.stat-icon {
    font-size: 2.4rem !important;
}

/* Udemy External Course badge */
.udemy-external-badge {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* ============================================================
   DARK MODE
   ============================================================ */

body.dark-mode {
    --dark-color: #e2e8f0;
    --text-color: #cbd5e1;
    --text-secondary: #94a3b8;
    --white: #1e293b;
    --border-color: #334155;
    background: #0f172a;
    color: #cbd5e1;
}

body.dark-mode .navbar {
    background: #1e293b;
    box-shadow: 0 1px 0 #334155;
}

body.dark-mode .nav-brand a,
body.dark-mode .nav-link {
    color: #e2e8f0;
}

body.dark-mode .certifications,
body.dark-mode .cert-card,
body.dark-mode .search-input,
body.dark-mode .filter-btn {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .certifications {
    background: #0f172a;
}

body.dark-mode .cert-card {
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    border: 1px solid #334155;
}

body.dark-mode .search-input {
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .search-input::placeholder {
    color: #64748b;
}

body.dark-mode .filter-btn {
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

body.dark-mode .cert-body,
body.dark-mode .cert-description,
body.dark-mode .cert-topics h4,
body.dark-mode .cert-topics li {
    color: #cbd5e1;
}

body.dark-mode .cert-body {
    background: #1e293b;
}

body.dark-mode .cert-features .feature-badge {
    background: #334155;
    color: #94a3b8;
}

body.dark-mode .cert-stat {
    color: #94a3b8;
}

body.dark-mode section:not(.hero) {
    background: #0f172a;
    color: #cbd5e1;
}

body.dark-mode .section-title {
    color: #e2e8f0;
}

body.dark-mode .section-subtitle {
    color: #94a3b8;
}

/* ── Udemy Section dark mode (overrides inline gradient style) ── */
body.dark-mode #udemy-courses {
    background: #1e293b !important;
    border-top-color: #334155 !important;
}
body.dark-mode #udemy-courses .section-title {
    color: #e2e8f0;
}
body.dark-mode #udemy-courses .section-subtitle {
    color: #94a3b8 !important;
}
body.dark-mode .udemy-card {
    background: #0f172a;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
body.dark-mode .udemy-card-body p,
body.dark-mode .udemy-card-body .udemy-rating {
    color: #94a3b8;
}
body.dark-mode .udemy-card-body strong {
    color: #e2e8f0;
}
body.dark-mode .udemy-tag {
    background: #334155;
    color: #94a3b8;
}

/* ── Footer dark mode ───────────────────────────────────────── */
body.dark-mode .footer {
    background: #0f172a;
    border-top: 1px solid #334155;
}
body.dark-mode .footer-content {
    border-bottom-color: #334155;
}
body.dark-mode .footer-column h4 {
    color: #e2e8f0;
}
body.dark-mode .footer-column a {
    color: #94a3b8;
}
body.dark-mode .footer-column a:hover {
    color: #38bdf8;
}
body.dark-mode .footer-social a {
    background: rgba(255,255,255,0.08);
    color: #94a3b8;
}
body.dark-mode .footer-social a:hover {
    background: var(--primary-color);
    color: #fff;
}
body.dark-mode .footer-bottom p {
    color: #64748b;
    opacity: 1;
}

/* ── Stats card (about section) keeps visible text in dark mode */
body.dark-mode .stats-card {
    color: #fff;
}
body.dark-mode .stats-card .stat-value {
    color: #38bdf8;
}
body.dark-mode .stats-card .stat-label {
    color: rgba(255,255,255,0.8);
}

/* ── Testimonial stats numbers coloring in light mode ────────── */
.testimonial-stat .stat-number {
    color: #111111;
    -webkit-text-fill-color: #111111;
    background: none;
    background-clip: initial;
}

/* ============================================================
   HEADER POLISH — icon button, scroll blur, logo, a11y
   ============================================================ */

/* Circular icon button (dark-mode toggle) */
.nav-icon-btn {
    background: none;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color, #1e293b);
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.nav-icon-btn:hover {
    transform: rotate(20deg) scale(1.1);
    border-color: var(--primary-color);
}
body.dark-mode .nav-icon-btn {
    border-color: #475569;
    color: #e2e8f0;
}

/* Brand logo SVG sizing */
.logo-icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}
.logo-icon svg {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0,120,212,0.25));
}

/* Frosted-glass header once the page is scrolled */
.navbar {
    transition: background 0.25s ease, box-shadow 0.25s ease;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
}
body.dark-mode .navbar.scrolled {
    background: rgba(30, 41, 59, 0.82);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

/* Avatar button hover affordance (rendered by firebase-auth.js) */
#ccm-avatar-btn {
    transition: box-shadow 0.2s, transform 0.2s;
}
#ccm-avatar-btn:hover {
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.22);
    transform: scale(1.05);
}

/* Keyboard focus visibility across all header controls */
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.dropdown-item:focus-visible,
.nav-cta-btn:focus-visible,
.nav-icon-btn:focus-visible,
#ccm-avatar-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 6px;
}

#darkModeToggle:hover {
    transform: rotate(20deg) scale(1.1);
}

/* Search bar enhancement */
.search-box {
    max-width: 800px !important;
}

/* ============================================================
   LAUNCH POLISH — global UX refinements & mobile responsiveness
   (kept at end of file so it intentionally refines earlier rules)
   ============================================================ */

/* ---- Global niceties ---------------------------------------------------- */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Remove the grey tap-flash on touch devices, keep accessible focus rings */
a, button, .btn, .nav-link, .dropdown-item, input, textarea, select, [role="button"] {
    -webkit-tap-highlight-color: transparent;
}
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* WCAG-friendly target sizing for the learning workflow. */
.question-nav-btn,
.filter-btn,
.preset-btn,
.action-btn,
.btn-icon,
.modal-close,
.modal-close-x,
.quiz-body button,
.results-section button {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
}

.answer-option label {
    min-height: 56px;
}

.modal-close-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
}
::selection {
    background: rgba(0, 120, 212, 0.18);
}

/* Media never overflows its container on small screens */
img, svg, video, canvas, iframe {
    max-width: 100%;
    height: auto;
}

/* Lock background scroll while the mobile drawer is open */
body.nav-open {
    overflow: hidden;
}
body.nav-open .whatsapp-training-link {
    display: none;
}

/* ---- Mobile nav backdrop (created by nav.js) ---------------------------- */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    z-index: 998;
}
.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile CTA inside the drawer — hidden on desktop */
.nav-drawer-header { display: none; }
.nav-drawer-footer { display: none; }
.nav-mobile-cta-item { display: none; }
.nav-mobile-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0.75rem auto 0;
    padding: 14px 26px;
    background: var(--primary-color);
    color: #fff !important;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 120, 212, 0.28);
}

/* ---- Larger, consistent header tap targets ------------------------------ */
.nav-icon-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hamburger {
    /* keep its base display (none on desktop, flex in the mobile media query);
       just enlarge the tap target without changing layout */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}
.hamburger span {
    transition: transform 0.3s ease, opacity 0.2s ease;
}

/* ---- Fluid headings so text never overflows tiny screens ---------------- */
.hero-title { font-size: clamp(2rem, 6vw, 3rem); }
.section-title, .page-title { font-size: clamp(1.6rem, 4.5vw, 2.5rem); }
.hero-subtitle, .section-subtitle { font-size: clamp(1rem, 2.6vw, 1.25rem); }

/* ============================================================
   TABLET & MOBILE  (≤768px)
   ============================================================ */
@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
        overflow-x: clip;
    }

    .quiz-layout > *,
    .question-panel,
    .sidebar-panel,
    .sidebar-card {
        min-width: 0;
        max-width: 100%;
    }

    .quiz-header-content,
    .quiz-branding,
    .quiz-controls {
        min-width: 0;
        gap: .5rem;
    }

    .quiz-title-badge {
        display: none;
    }

    .quiz-controls {
        margin-left: auto;
    }

    .timer-display {
        padding: .5rem .65rem;
    }

    .navbar {
        padding: 0.55rem 0;
        min-height: 58px;
    }
    .navbar .container {
        padding: 0 14px;
    }
    .nav-brand {
        margin-right: 0.75rem;
    }
    .nav-brand a {
        font-size: 1.15rem;
    }
    .logo-icon svg {
        width: 28px;
        height: 28px;
    }
    .nav-actions {
        gap: 6px;
        margin-left: auto;
    }
    .nav-icon-btn,
    .hamburger {
        min-width: 42px;
        min-height: 42px;
        border-radius: 14px;
    }

    /* Tighter, breathable vertical rhythm */
    section { padding: 48px 0; }
    .section-header { margin-bottom: 2.25rem; }
    .container { padding: 0 18px; }

    /* --- Polished full-width mobile drawer under the sticky header --- */
    .nav-menu {
        position: fixed;
        top: 58px;
        right: 0;
        left: 0;
        height: calc(100dvh - 58px);
        width: 100vw;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        background: linear-gradient(180deg, #f8fbff, #ffffff);
        box-shadow: 0 22px 50px rgba(15, 23, 42, 0.2);
        padding: 14px 18px 28px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.24s ease, opacity 0.2s ease, visibility 0.2s ease;
        z-index: 999;
        text-align: left;
    }
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-drawer-header {
        display: block;
        margin: 2px 0 10px;
        padding: 14px 16px;
        border: 1px solid rgba(59, 130, 246, 0.16);
        border-radius: 18px;
        background: linear-gradient(135deg, #eef6ff, #f7f2ff);
        box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
    }
    .nav-drawer-header .nav-drawer-kicker {
        display: block;
        margin-bottom: 3px;
        color: #2563eb;
        font-size: 0.75rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
    .nav-drawer-header strong {
        display: block;
        color: #0f172a;
        font-size: 1.05rem;
    }
    .nav-drawer-footer {
        display: grid;
        gap: 8px;
        margin-top: 12px;
        padding: 14px 16px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 18px;
        background: #ffffff;
        color: #475569;
        font-size: 0.82rem;
        font-weight: 700;
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
    }
    .nav-drawer-footer span::before {
        content: '✓';
        margin-right: 8px;
        color: #0f9f6e;
        font-weight: 900;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    }
    .nav-menu > li:last-child { border-bottom: none; }

    .nav-link {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 52px;
        padding: 14px 10px;
        font-size: 1.02rem;
        border-radius: 12px;
    }
    /* Kill the desktop active underline inside the drawer */
    .nav-link.active::after { display: none; }
    .nav-link.active {
        color: var(--primary-color);
        font-weight: 700;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: space-between !important;
        min-height: 52px;
        padding: 14px 10px !important;
        font-size: 1.02rem;
        border-radius: 12px;
    }

    .dropdown-menu {
        display: none;
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #f4f7ff;
        padding: 0;
        min-width: 0;
        width: 100%;
        transition: none;
    }
    .dropdown-menu::before,
    .dropdown-menu::after { display: none; }
    .nav-dropdown.open .dropdown-menu {
        display: block;
        padding: 4px 4px 10px;
        animation: none;
    }
    .dropdown-item {
        justify-content: flex-start;
        padding: 12px 10px;
        border-radius: 12px;
    }
    .dropdown-item small {
        display: block;
        margin-top: 2px;
        line-height: 1.3;
    }

    /* Show the in-drawer CTA, hide the desktop ghost CTA */
    .nav-mobile-cta-item { display: block; border-bottom: none; text-align: center; }
    .nav-mobile-cta {
        width: min(100%, 280px);
        margin: 14px auto 8px;
        border-radius: 14px;
        box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
    }
    .nav-cta-btn { display: none; }

    /* --- Animated hamburger → X --- */
    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* --- Touch-friendly primary actions --- */
    .btn { padding: 0.8rem 1.4rem; }
    .hero {
        padding: 2rem 0 0;
    }
    .hero-content {
        gap: 1.5rem;
    }
    .hero-eyebrow {
        margin-bottom: 1rem;
        font-size: 0.78rem;
    }
    .hero-title {
        font-size: clamp(2rem, 8vw, 2.55rem);
        line-height: 1.08;
    }
    .hero-subtitle {
        max-width: 32rem;
        margin: 1rem auto 0;
        font-size: 1rem;
        line-height: 1.55;
    }
    .hero-cta {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 1.35rem;
    }
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        min-height: 50px;
        border-radius: 14px;
    }
    .hero-stats {
        margin-top: 1.35rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.16);
        backdrop-filter: blur(8px);
    }

    /* Dark-mode drawer surfaces */
    body.dark-mode .nav-menu {
        background: linear-gradient(180deg, #0f172a, #1e293b);
    }
    body.dark-mode .nav-menu > li { border-color: rgba(255, 255, 255, 0.08); }
    body.dark-mode .nav-drawer-header {
        background: linear-gradient(135deg, rgba(30, 58, 138, 0.35), rgba(88, 28, 135, 0.25));
        border-color: rgba(147, 197, 253, 0.2);
    }
    body.dark-mode .nav-drawer-header strong { color: #e2e8f0; }
    body.dark-mode .nav-drawer-footer {
        background: #111827;
        border-color: rgba(255, 255, 255, 0.08);
        color: #cbd5e1;
    }
    body.dark-mode .dropdown-menu { background: #0f172a; }
}

@media (max-width: 520px) {
    .hero-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0.25rem 1rem;
        text-align: left;
    }
    .hero-stats .stat-item {
        display: grid;
        grid-template-columns: minmax(86px, auto) 1fr;
        align-items: center;
        gap: 12px;
        padding: 0.9rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    }
    .hero-stats .stat-item:last-child {
        border-bottom: 0;
    }
    .stat-number {
        font-size: 1.45rem;
        line-height: 1;
    }
    .stat-label {
        font-size: 0.78rem;
        line-height: 1.25;
        letter-spacing: 0.04em;
    }
    .whatsapp-training-link {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 400px) {
    .quiz-logo .logo-text { display: none; }
    .question-panel,
    .sidebar-panel .sidebar-card { padding: 1.25rem; }
    .question-header { align-items: flex-start; gap: .75rem; }
    .completion-status { font-size: .82rem; }
    .test-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
    .stat-box { min-width: 0; padding: .75rem .2rem; }
    .stat-box .stat-value { font-size: 1.5rem; }
    .stat-box .stat-label { font-size: .7rem; overflow-wrap: anywhere; }
}

/* ============================================================
   SMALL PHONES  (≤480px)
   ============================================================ */
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    section { padding: 40px 0; }
    .nav-brand a { font-size: 1.2rem; }
    .logo-icon svg { width: 26px; height: 26px; }

    /* Stack call-to-action buttons full width for easy thumb taps */
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
    .hero {
        padding-top: 2.5rem;
    }
    .hero-content {
        padding-bottom: 2.5rem;
    }
    .hero-title {
        margin-bottom: 1rem;
    }
    .hero-subtitle {
        margin-bottom: 1.5rem;
    }
    .hero-cta {
        gap: 0.75rem;
        margin-bottom: 0;
    }
    .trust-bar-items {
        grid-template-columns: 1fr;
    }
    .trust-bar-items > * {
        border-right: 0;
    }

    /* Prevent wide tables/cards from causing horizontal scroll */
    .cert-grid,
    .features-grid,
    .footer-content { grid-template-columns: 1fr; }

    /* Contact details and form must stack instead of sharing a narrow row. */
    .contact-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
    .contact-info,
    .contact-form-wrapper,
    .contact-form {
        width: 100%;
        min-width: 0;
    }
    .contact-form-wrapper { padding: 1.25rem; }
    .contact-faq { margin-top: 2rem; }

    /* Results cards and long Microsoft Learn links stay inside the viewport. */
    .performance-breakdown,
    .question-review,
    .study-recommendations { padding: 1rem; }
    .breakdown-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .breakdown-card { min-width: 0; padding: 1rem; }
    .review-reference a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 380px) {
    /* Keep the injected account control from crowding the brand and menu. */
    #ccm-auth-nav { margin-left: 0 !important; }
    .ccm-signin-btn {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        justify-content: center !important;
        overflow: hidden;
        font-size: 0 !important;
    }

    .ccm-signin-btn span { font-size: 1rem !important; }
}

/* Homepage catalog contrast overrides must follow legacy component rules. */
.certifications .cert-card .feature-badge,
.certifications .load-more-container .cards-counter span {
    color: #005ea8;
}

.certifications .load-more-container .cards-counter,
.about .about-mission li {
    color: #4b5563;
}
