/* ===== LMS Quiz Pages – Unified Design System ===== */

/* ===== BASE & VARIABLES ===== */
:root {
    --primary: #ed1e28;
    --primary-dark: #c91a23;
    --primary-darker: #a8161e;
    --primary-light: #fff1f2;
    --primary-glow: rgba(237, 30, 40, 0.12);
    --surface: #ffffff;
    --bg: #f0f2f5;
    --bg-subtle: #f8f9fb;
    --text: #1a1a2e;
    --text-secondary: #555;
    --text-muted: #71717a;
    --border: rgba(61, 61, 61, 0.08);
    --border-solid: #e2e8f0;
    --green: #16a34a;
    --green-light: #dcfce7;
    --red: #dc2626;
    --red-light: #fee2e2;
    --orange: #f97316;
    --orange-light: #fff7ed;
    --radius: 20px;
    --radius-sm: 14px;
    --radius-xs: 10px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
    --transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== MATERI SECTION ===== */
.container-materi {
    max-width: 100%;
    margin: 0;
    padding: 2rem 2.5rem 1rem;
}

.container-materi-inner {
    background: var(--surface);
    border-radius: 0;
    padding: 2.5rem 2.5rem;
    box-shadow: none;
    border: none;
    border-top: 4px solid var(--primary);
    position: relative;
}

.section {
    margin-bottom: 2.25rem;
}

.section:last-child {
    margin-bottom: 0;
}

.badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.7rem;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.section p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 0.6rem;
    line-height: 1.75;
}

.section ul {
    padding-left: 1.3rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 0.6rem;
}

.section ul li {
    margin-bottom: 0.35rem;
}

.section ul li b {
    color: var(--text);
}

.garis {
    background: var(--bg);
    padding: 14px 18px;
    border-radius: var(--radius-xs);
    font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.88rem;
    text-align: center;
    margin: 0.85rem 0;
    color: var(--text);
    letter-spacing: 0.06em;
    border: 1px solid var(--border-solid);
}

.box-info {
    background: #f0f9ff;
    border-left: 4px solid #0284c7;
    padding: 16px 18px;
    border-radius: var(--radius-xs);
    margin: 0.85rem 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.box-info b {
    color: var(--text);
}

.box-warning {
    background: var(--orange-light);
    border-left: 4px solid var(--orange);
    padding: 16px 18px;
    border-radius: var(--radius-xs);
    margin: 0.85rem 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== QUIZ DIVIDER ===== */
.quiz-divider {
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    text-align: center;
}

.quiz-divider-inner {
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff5f5 100%);
    border: 1.5px solid rgba(237, 30, 40, 0.2);
    border-radius: var(--radius-sm);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 12px rgba(237, 30, 40, 0.04);
}

.quiz-divider h2 {
    margin: 0 0 0.3rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

.quiz-divider p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ===== QUIZ HEADER (sticky) ===== */
.quiz-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border-solid);
    box-shadow: var(--shadow-sm);
}

.quiz-header-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quiz-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.quiz-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.quiz-meta span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.score-display {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.score-display strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.progress-wrap {
    flex: 1 1 100%;
}

.progress-bar {
    height: 5px;
    background: var(--border-solid);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    border-radius: 999px;
    width: 0%;
    transition: width 0.4s ease;
}

/* ===== NAV DOTS ===== */
.nav-wrap {
    max-width: 100%;
    margin: 0 auto;
    padding: 12px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.nav-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
}

.nav-dot {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-xs);
    border: 1.5px solid var(--border-solid);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.nav-dot:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.nav-dot.answered {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.nav-dot.correct {
    background: var(--green-light);
    border-color: var(--green);
    color: var(--green);
}

.nav-dot.wrong {
    background: var(--red-light);
    border-color: var(--red);
    color: var(--red);
}

.nav-dot.skipped {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #b45309;
}

/* ===== SOAL CARD ===== */
.container-quiz {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 24px 48px;
}

.soal-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-solid);
    scroll-margin-top: 140px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.soal-card:hover {
    box-shadow: var(--shadow);
}

.soal-card.correct {
    background: var(--green-light);
    border-color: var(--green);
}

.soal-card.wrong {
    background: var(--red-light);
    border-color: var(--red);
}

.soal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-xs);
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: var(--surface);
    font-weight: 800;
    font-size: 0.82rem;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(237, 30, 40, 0.2);
}

.soal-card b {
    display: block;
    margin-bottom: 14px;
    font-size: 1rem;
    line-height: 1.55;
    font-weight: 600;
    color: var(--text);
}

.opts label {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin: 7px 0;
    cursor: pointer;
    font-size: 0.9rem;
    border: 1.5px solid transparent;
    transition: all var(--transition);
    color: var(--text-secondary);
    line-height: 1.45;
}

.opts label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--text);
}

.soal-card.submitted .opts label {
    cursor: default;
}

.soal-card.submitted .opts label:hover {
    background: var(--bg);
    border-color: transparent;
    color: var(--text-secondary);
}

.soal-card.wrong .opts label:hover {
    background: var(--red-light);
}

input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.feedback {
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: var(--radius-xs);
    line-height: 1.55;
}

.feedback.benar {
    color: #166534;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.18);
}

.feedback.salah {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.12);
}

.penjelasan {
    margin-top: 10px;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-xs);
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.7;
    border-left: 4px solid var(--primary);
}

.penjelasan::before {
    content: "Pembahasan: ";
    font-weight: 700;
    color: var(--primary-dark);
    display: block;
    margin-bottom: 4px;
}

.submit-area {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-solid);
    margin-top: 10px;
    text-align: center;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 26px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: var(--surface);
    box-shadow: 0 2px 10px rgba(237, 30, 40, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(145deg, var(--primary-dark), var(--primary-darker));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 30, 40, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: var(--surface);
    color: var(--primary-dark);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-ghost {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border-solid);
}

.btn-ghost:hover {
    background: var(--border-solid);
    color: var(--text);
}

.warn-unanswered {
    font-size: 0.85rem;
    color: #b45309;
    margin-top: 12px;
}

.warn-unanswered.hide {
    display: none;
}

/* ===== RESULT CARD ===== */
.result-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 36px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1.5px solid var(--border-solid);
}

.result-card.sempurna {
    background: linear-gradient(135deg, #dcfce7, #f0fdf4);
    border-color: var(--green);
}

.result-card.bagus {
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
    border-color: #0284c7;
}

.result-card.belajar {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border-color: var(--orange);
}

.result-score {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.result-card.sempurna .result-score {
    color: #166534;
}

.result-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.result-msg {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* ===== SUMMARY ===== */
.summary-section {
    margin-top: 28px;
}

.summary-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-solid);
    letter-spacing: -0.02em;
}

.summary-item {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--border-solid);
}

.summary-item.correct {
    border-left-color: var(--green);
}

.summary-item.wrong {
    border-left-color: var(--red);
}

.summary-row1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.summary-item .num {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--primary-dark);
    min-width: 26px;
}

.summary-item .q {
    flex: 1;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.summary-item .badge-mini {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    flex-shrink: 0;
}

.badge-mini.ok {
    background: var(--green-light);
    color: #166534;
}

.badge-mini.fail {
    background: var(--red-light);
    color: #b91c1c;
}

.summary-jawaban {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 26px;
}

.summary-jawaban strong {
    color: var(--text);
}

.summary-exp {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 10px;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-xs);
    border-left: 4px solid var(--primary);
}

.summary-exp-label {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(6px);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.modal p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 22px;
}

.modal-btns {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.btn-cancel {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border-solid);
}

.btn-cancel:hover {
    background: var(--border-solid);
    color: var(--text);
}

#hasilSection {
    display: none;
}

#hasilSection.show {
    display: block;
}

#soalSection.hide {
    display: none;
}

/* ===== BIODATA MODAL ===== */
.biodata-modal .modal {
    max-width: 400px;
}

.biodata-modal label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.biodata-modal input,
.biodata-modal select {
    width: 100%;
    padding: 11px 16px;
    margin-bottom: 18px;
    border: 1.5px solid var(--border-solid);
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.biodata-modal input:focus,
.biodata-modal select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(237, 30, 40, 0.1);
}

.biodata-modal .btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 6px;
}

.quiz-meta .ubah-biodata {
    font-size: 0.72rem;
    color: var(--primary-dark);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.quiz-meta .ubah-biodata:hover {
    text-decoration: underline;
}

/* ===== FOOTER ===== */
.page-footer {
    margin-top: auto;
    background: #18181b;
    color: #a1a1aa;
    font-size: 0.82rem;
}

.page-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-footer .footer-brand {
    font-weight: 800;
    font-size: 1rem;
    color: var(--primary);
}

.page-footer .footer-brand span {
    color: #fff;
}

.page-footer .footer-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.page-footer .footer-nav a {
    color: #a1a1aa;
    text-decoration: none;
    font-weight: 500;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    transition: all var(--transition);
}

.page-footer .footer-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.page-footer .footer-nav .sep {
    color: rgba(255, 255, 255, 0.12);
    padding: 0 0.12rem;
    user-select: none;
}

.page-footer .footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.75rem;
    color: #52525b;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container-materi {
        padding: 1.5rem 1.5rem 0.5rem;
    }

    .container-materi-inner {
        padding: 2rem 1.75rem;
    }

    .quiz-header-inner {
        padding: 12px 18px;
    }

    .nav-wrap {
        padding: 10px 18px;
    }

    .container-quiz {
        padding: 16px 18px 36px;
    }

    .soal-card {
        padding: 20px 22px;
    }
}

@media (max-width: 640px) {
    .container-materi {
        padding: 1rem 1rem 0.5rem;
    }

    .container-materi-inner {
        padding: 1.5rem 1.25rem;
    }

    .soal-card {
        padding: 18px 18px;
    }

    .result-card {
        padding: 28px 22px;
    }

    .result-score {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .quiz-header-inner {
        padding: 10px 14px;
    }

    .container-quiz {
        padding: 14px 14px 32px;
    }

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

    .page-footer .footer-nav {
        justify-content: center;
    }
}

/* ===== INDEX / CARD PAGES ===== */
.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.page-banner {
    background: linear-gradient(165deg, #fff 0%, var(--bg-subtle) 50%, #f2f4f7 100%);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    position: relative;
}

.page-banner::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #ff4f57, var(--primary));
}

.page-banner h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.5rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.page-banner h1::after {
    content: "";
    display: block;
    width: 44px;
    height: 3.5px;
    background: linear-gradient(90deg, var(--primary), #ff4f57);
    margin: 0.6rem auto 0;
    border-radius: 2px;
}

.page-banner p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 500;
}

.page-title {
    margin-bottom: 2rem;
}

.page-title h1 {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.page-title h1::after {
    content: "";
    display: block;
    width: 40px;
    height: 3.5px;
    background: linear-gradient(90deg, var(--primary), #ff4f57);
    margin-top: 0.5rem;
    border-radius: 2px;
}

.page-title p {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.content-wrap {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem 3rem;
    flex: 1;
}

/* Cards Grid */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
    align-items: stretch;
}

a.card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card {
    background: var(--surface);
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #ff4f57);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before,
.card.active::before {
    opacity: 1;
}

.card:hover,
.card.active:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(237, 30, 40, 0.08);
    border-color: rgba(237, 30, 40, 0.2);
}

.card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.card .num {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.9rem;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--surface);
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(237, 30, 40, 0.3);
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover .num {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 6px 20px rgba(237, 30, 40, 0.4);
}

.card-locked .num {
    background: linear-gradient(145deg, #8b8b8b 0%, #6b6b6b 100%);
    box-shadow: none;
}

.card-locked:hover .num {
    transform: none;
}

.card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.card p {
    margin: 0.4rem 0 0.9rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

.card-cta {
    margin-top: auto;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--surface);
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-xs);
    box-shadow: 0 2px 10px rgba(237, 30, 40, 0.25);
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.card:hover .card-cta {
    background: linear-gradient(145deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    box-shadow: 0 4px 16px rgba(237, 30, 40, 0.35);
}

.card-locked .card-cta {
    background: #8b8b8b;
    box-shadow: none;
    cursor: default;
}

.card-locked:hover .card-cta {
    background: #8b8b8b;
    transform: none;
}

.card-locked {
    pointer-events: auto;
    opacity: 0.88;
    cursor: not-allowed;
}

.card-locked:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: var(--border);
}

/* Simple footer for index pages */
footer:not(.page-footer) {
    margin-top: auto;
    background: #18181b;
    color: #a1a1aa;
    font-size: 0.82rem;
}

footer:not(.page-footer) .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

footer:not(.page-footer) .footer-brand {
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: -0.02em;
}

footer:not(.page-footer) .footer-brand span {
    color: var(--primary);
}

footer:not(.page-footer) .footer-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

footer:not(.page-footer) .footer-nav a {
    color: #a1a1aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

footer:not(.page-footer) .footer-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

footer:not(.page-footer) .footer-nav .sep {
    color: rgba(255, 255, 255, 0.15);
    padding: 0 0.15rem;
    user-select: none;
}

footer:not(.page-footer) .footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.78rem;
    color: #52525b;
    font-weight: 500;
}

@media (max-width: 640px) {
    .page-banner {
        padding: 2rem 1.5rem 1.75rem;
    }

    .content-wrap {
        padding: 2rem 1.25rem 2.5rem;
    }

    footer:not(.page-footer) .footer-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    footer:not(.page-footer) .footer-nav {
        justify-content: center;
    }
}