@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-soft: #eef2ff;
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --bg-light: #ffffff;
    --surface-light: #f8fafc;
    --border-light: #e2e8f0;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --nav-bg: rgba(255, 255, 255, 0.85);
}

body {
    font-family: 'Ubuntu', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients */
.bg-gradient-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-blob {
    position: absolute;
    width: 800px;
    height: 800px;
    filter: blur(100px);
    opacity: 0.15;
    border-radius: 50%;
}

.blob-1 {
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.blob-2 {
    bottom: -200px;
    left: -200px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

/* Navbar Overhaul */
.navbar {
    padding: 1rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    border-bottom: 1px solid var(--border-light);
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -1px;
    color: var(--text-dark) !important;
}

.navbar-brand span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    font-weight: 600;
    color: var(--text-muted) !important;
    font-size: 0.95rem;
    padding: 0.5rem 1.25rem !important;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

/* Nav CTA – Login / Signup button */
.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary) !important;
    text-decoration: none !important;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 50px;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-cta-btn:hover {
    color: #fff !important;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.nav-cta-btn:active {
    transform: scale(0.98);
}

/* Hero Section Refined */
.hero-section {
    position: relative;
    padding: 150px 0 60px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0px;
    line-height: 1.5;
    margin-bottom: 2rem;
    color: var(--text-dark);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(99, 102, 241, 0.1);
    z-index: -1;
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 580px;
    margin-bottom: 3rem;
    line-height: 1.7;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Attractive Image Styling */
.hero-image-wrapper {
    position: relative;
    animation: floating 6s ease-in-out infinite;
    animation-delay: 0.6s;
}

.hero-image-container {
    padding: 0;
    position: relative;
    z-index: 2;
}

.hero-image-container img {
    border-radius: 40px;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.15),
        0 30px 60px -30px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: all 0.5s ease;
    max-height: 350px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.hero-image-container:hover img {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-shape-decorator {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    filter: blur(40px);
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -50px;
    right: -50px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -30px;
    left: -30px;
    background: var(--accent);
}

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

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

@keyframes floating {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Hero Buttons – Refined & Attractive */
a.btn-primary-custom,
a.btn-secondary-custom {
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary-custom {
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: #fff !important;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4), 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.5), 0 6px 16px rgba(139, 92, 246, 0.3);
}

.btn-secondary-custom {
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
    border-radius: 50px;
    background: transparent;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
}

.btn-secondary-custom:hover {
    background: var(--primary-soft);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

/* What is QuizLoop – attractive card layout */
.what-is-section {
    background: linear-gradient(180deg, var(--surface-light) 0%, #fff 50%);
}

.what-is-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
}

.what-is-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.35s ease;
}

.what-is-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}

.what-is-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.25rem;
}

.what-is-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* How It Works step number circle */
.how-it-works-step {
    width: 48px;
    height: 48px;
    font-weight: 700;
}

/* How It Works – redesigned cards */
.how-it-works-section {
    background: linear-gradient(180deg, #fff 0%, var(--surface-light) 100%);
}

.how-it-works-heading {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-dark);
}

.how-it-works-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.35s ease;
    position: relative;
}

.how-it-works-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 20px 20px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.how-it-works-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.15);
}

.how-it-works-card:hover::before {
    opacity: 1;
}

.how-it-works-card-inner {
    text-align: center;
    position: relative;
}

.how-it-works-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.how-it-works-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: var(--primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
}

.how-it-works-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.how-it-works-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Core Features – image left, 4 points right with icon boxes */
.core-features-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-dark);
}

.core-features-image-wrap {
    position: relative;
}

.core-features-image-wrap img {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.core-feature-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2.25rem;
}

.core-feature-item:last-child {
    margin-bottom: 0;
}

.core-feature-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
}

.core-feature-content {
    flex: 1;
}

.core-feature-content h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
}

/* Contact / Support page */
.contact-support-section {
    background: linear-gradient(180deg, var(--surface-light) 0%, #fff 100%);
}

.contact-support-card {
    background: #fff;
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.contact-support-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    color: #fff;
}

.contact-support-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.contact-support-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.contact-support-email {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: var(--primary-soft);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.contact-support-email:hover {
    background: var(--primary);
    color: #fff;
}

/* Feature Cards */
.feature-card {
    background: white;
    border: 1px solid var(--border-light);
    padding: 2.5rem;
    border-radius: 24px;
    transition: all 0.4s ease;
    height: 100%;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-soft);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Practice Banner */
.practice-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 32px;
    padding: 4.5rem;
    text-align: center;
    color: white;
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.25);
}

/* Footer Improvements */
footer {
    padding: 80px 0 40px;
    background: var(--surface-light);
    border-top: 1px solid var(--border-light);
}

.hero-image-container img {
    border-radius: 32px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s ease;
}

.hero-image-container img:hover {
    transform: translateY(-10px);
}

/* Spacer for fixed navbar on inner pages */
.page-top-spacer {
    padding-top: 74px;
}

/* Practice section: breadcrumb, 80/20 layout, ads, cards */
.practice-page {
    padding-bottom: 2rem;
}

.practice-breadcrumb-wrap {
    width: 100%;
    background: var(--surface-light);
    margin-bottom: 0;
}

.practice-breadcrumb-wrap .container {
    padding-left: 1rem;
    padding-right: 1rem;
}

.practice-breadcrumb {
    padding: 0.75rem 0;
    margin-bottom: 0;
}

.practice-breadcrumb .breadcrumb {
    margin-bottom: 0;
    padding-left: 0;
}

.practice-breadcrumb .breadcrumb-item a {
    color: var(--text-muted);
}

.practice-breadcrumb .breadcrumb-item.active {
    color: var(--text-dark);
}

@media (min-width: 576px) {
    .practice-breadcrumb-wrap .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (min-width: 768px) {
    .practice-breadcrumb-wrap .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 991px) {
    .practice-breadcrumb-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .practice-breadcrumb-wrap .container {
        max-width: 100%;
        min-width: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .practice-breadcrumb {
        padding: 0.5rem 0;
    }
    .practice-breadcrumb .breadcrumb {
        flex-wrap: wrap;
        gap: 0.25rem 0;
    }
    .practice-breadcrumb .breadcrumb-item {
        font-size: 0.8125rem;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    .practice-breadcrumb .breadcrumb-item + .breadcrumb-item {
        padding-left: 0.5em;
    }
}

@media (max-width: 576px) {
    .practice-breadcrumb-wrap .container {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }
}

.practice-ad {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.practice-ad-placeholder {
    background: var(--surface-light);
    border: 1px dashed var(--border-light);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 1rem 1.5rem;
}

.practice-ad-sidebar {
    min-height: 250px;
    position: sticky;
    top: 120px;
}

.practice-main {
    display: flex;
    flex-wrap: wrap;
}

.practice-main .practice-left {
    flex: 0 0 80%;
    max-width: 80%;
}

.practice-main .practice-sidebar {
    flex: 0 0 20%;
    max-width: 20%;
}

/* Test page: 20% | 60% | 20% three-column layout */
.practice-main-three {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.practice-main-three .practice-sidebar-left {
    flex: 0 0 20%;
    max-width: 20%;
    order: 1;
}

.practice-main-three .practice-center {
    flex: 0 0 60%;
    max-width: 60%;
    order: 2;
    min-width: 0;
    padding: 0 0.5rem;
}

.practice-main-three .practice-sidebar-right {
    flex: 0 0 20%;
    max-width: 20%;
    order: 3;
}

@media (max-width: 991px) {
    .practice-main .practice-left,
    .practice-main .practice-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .practice-ad-sidebar {
        position: static;
        min-height: 90px;
    }

    .practice-main-three .practice-sidebar-left,
    .practice-main-three .practice-center,
    .practice-main-three .practice-sidebar-right {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .practice-main-three .practice-sidebar-left {
        order: 2;
        min-height: 90px;
    }

    .practice-main-three .practice-center {
        order: 1;
    }

    .practice-main-three .practice-sidebar-right {
        order: 3;
    }
}

.practice-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

.practice-card-grid {
    margin-bottom: 0;
}

.practice-card {
    display: block;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.practice-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.practice-card-inner {
    padding: 1.25rem;
}

.practice-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border-radius: 8px;
}

.practice-card-icon {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    background: var(--primary-soft);
    border-radius: 8px;
}

.practice-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--text-dark);
}

.practice-card-desc {
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.practice-card-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary) !important;
    text-decoration: none !important;
    background: var(--primary-soft);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.practice-card-btn:hover {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
}

.practice-card-with-btn .practice-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.practice-card-with-btn .practice-card-btn {
    margin-top: auto;
}

/* Practice test intro (details + Start Test button) */
.practice-test-intro-card {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    max-width: 560px;
    margin: 0 auto;
}

.practice-test-intro-img-wrap {
    width: 100%;
    max-width: 200px;
    height: 140px;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface-light);
}

.practice-test-intro-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.practice-test-intro-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
}

.practice-test-intro-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.practice-test-intro-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.practice-test-intro-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

.practice-test-intro-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.practice-test-intro-meta-item i {
    color: var(--primary);
}

.practice-test-start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.practice-test-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
    color: #fff !important;
}

/* Scholastic-style wrapper: light grey background */
.practice-scholastic-wrap {
    background: #e5e7eb;
    margin: 0 -0.5rem;
    padding: 1rem 0.5rem 2rem;
    border-radius: 12px;
}

/* Question palette (left sidebar) - white card */
.practice-test-palette-wrap {
    position: sticky;
    top: 100px;
}

.practice-palette-card {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.practice-palette-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.practice-palette-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.practice-palette-btn {
    width: 100%;
    aspect-ratio: 1;
    max-width: 40px;
    max-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.practice-palette-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.practice-palette-btn.practice-palette-current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.practice-palette-btn.practice-palette-answered {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.practice-palette-btn.practice-palette-marked {
    background: #ffedd5;
    border-color: #f97316;
    color: #c2410c;
}

.practice-palette-btn.practice-palette-not-visited {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #6b7280;
}

.practice-palette-legend {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.practice-palette-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.practice-palette-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.practice-palette-legend-swatch.practice-palette-answered { background: #dcfce7; border: 1px solid #22c55e; }
.practice-palette-legend-swatch.practice-palette-current { background: var(--primary); border: 1px solid var(--primary); }
.practice-palette-legend-swatch.practice-palette-marked { background: #ffedd5; border: 1px solid #f97316; }
.practice-palette-legend-swatch.practice-palette-not-visited { background: #f3f4f6; border: 1px solid #e5e7eb; }

.practice-palette-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.practice-palette-util-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: not-allowed;
    opacity: 0.8;
}

.practice-ad-160x600 {
    min-height: 250px;
}

.practice-ad-160x600 .practice-ad-placeholder {
    min-height: 250px;
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.4;
}

/* Scholastic top bar: title | timer | Finish */
.practice-scholastic-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.practice-scholastic-topbar-left {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.practice-scholastic-brand {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-dark);
}

.practice-scholastic-paper {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.practice-scholastic-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.practice-scholastic-timer {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.practice-scholastic-finish-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff !important;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.practice-scholastic-finish-btn:hover {
    background: var(--secondary);
    color: #fff !important;
}

/* Sub-header: Q n | Section | +marks */
.practice-question-subbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.practice-question-subbar-left {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.practice-question-marks-plus {
    font-size: 0.85rem;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

/* Diagram area (light blue placeholder style) */
.practice-question-diagram-wrap {
    margin: 1rem 0;
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    max-width: 100%;
}

.practice-question-diagram-wrap .practice-question-img {
    max-height: 260px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.practice-test-questions {
    margin-bottom: 2rem;
}

/* One question at a time */
.practice-test-one-by-one .practice-question-slide {
    display: none;
}

.practice-test-one-by-one .practice-question-slide.practice-question-current {
    display: block;
    animation: practiceQuestionFade 0.3s ease;
}

@keyframes practiceQuestionFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scholastic footer: Prev | Mark | Clear | Save & Next */
.practice-scholastic-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-top: 1px solid var(--border-light);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Prev button hidden on first question, shown when .visible is toggled by JS */
.practice-scholastic-prev {
    display: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark) !important;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.practice-scholastic-prev.visible {
    display: inline-flex !important;
}

.practice-scholastic-prev:hover {
    background: #e5e7eb;
    color: var(--text-dark) !important;
}

.practice-scholastic-mark {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #c2410c !important;
    background: #ffedd5;
    border: 1px solid #f97316;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.practice-scholastic-mark:hover {
    background: #fed7aa;
    color: #c2410c !important;
}

.practice-scholastic-clear {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #b91c1c !important;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: auto;
}

.practice-scholastic-clear:hover {
    color: #dc2626 !important;
    text-decoration: underline;
}

.practice-scholastic-next {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff !important;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.practice-scholastic-next:hover {
    background: var(--secondary);
    color: #fff !important;
}

.practice-scholastic-submit {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff !important;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.practice-scholastic-submit:hover {
    background: var(--secondary);
    color: #fff !important;
}

.practice-test-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.practice-test-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
    color: #fff !important;
}

.practice-test-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.practice-test-form-wrap .practice-test-questions {
    margin-top: 0;
    padding-top: 0;
}

.practice-test-form-wrap .practice-question-card {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0;
    padding: 1.5rem 1.75rem;
    margin-bottom: 0;
    box-shadow: none;
}

.practice-test-form-wrap .practice-question-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.practice-question-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.practice-question-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.practice-question-section {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.practice-question-marks-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    margin-left: auto;
}

.practice-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.practice-question-number {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.practice-question-marks {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-light);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

.practice-question-text {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.6;
}

.practice-question-img-wrap {
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-light);
    max-width: 100%;
}

.practice-question-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    display: block;
}

.practice-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.practice-option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 2px solid var(--border-light);
    background: var(--bg-light);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.practice-option-label:hover {
    background: var(--primary-soft);
    border-color: rgba(99, 102, 241, 0.25);
}

.practice-option-label:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.practice-option-label input:checked + .practice-option-letter {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.practice-option-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.practice-option-letter {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
    background: var(--primary-soft);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.practice-option-text {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-dark);
    overflow-wrap: break-word;
    word-break: break-all;
}

.practice-option-selected-tag {
    display: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.practice-option-label:has(input:checked) .practice-option-selected-tag {
    display: inline-block;
}

.practice-result-summary {
    background: var(--primary-soft);
    border: 1px solid var(--border-light);
}

.practice-result-correct {
    border-left: 4px solid #22c55e;
}

.practice-result-incorrect {
    border-left: 4px solid #ef4444;
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* Navbar & footer logo */
.navbar-logo-img {
    max-height: 24px;
}
.footer-logo-img {
    max-height: 24px;
}

/* Blog: post content */
.blog-content {
    line-height: 1.7;
}
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.blog-content table th,
.blog-content table td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    text-align: left;
}
.blog-content ul,
.blog-content ol {
    padding-left: 1.5rem;
}
.blog-content p {
    margin-bottom: 1rem;
}
.blog-post-featured-img {
    height: auto;
}

/* Blog index: card hover and image */
.blog-index-card {
    transition: box-shadow 0.2s ease;
}
a:hover .blog-index-card {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}
.blog-index-card-img {
    height: 200px;
    object-fit: cover;
}
.blog-index-card-placeholder {
    height: 200px;
}