/* ===== HERO — Centered Layout ===== */
.hero {
    padding: 5rem 0 5rem;
    background: linear-gradient(160deg, #EFF6FF 0%, #ffffff 55%);
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
}

.hero-center {
    max-width: 680px;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-weight: 400;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stat-inline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.hero-stat-inline strong {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.hero-stat-inline span {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* Hero image — full-width, flush bottom */
.hero-image-wrap {
    width: 100%;
    max-width: 1000px;
}

.hero-image-main {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
    box-shadow: var(--shadow-sm);
    display: block;
}

/* Hidden legacy elements */
.hero-visual {
    display: none;
}

.hero-decoration {
    display: none;
}

.hero-stat-card {
    display: none;
}

.hero-placeholder {
    display: none;
}

.hero-content {
    display: none;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    margin-bottom: 2.5rem;
}

.section-header .sh-label {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    background: var(--primary-light);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-header p {
    margin-top: 0.75rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.section-header-compact {
    margin-bottom: 1.5rem;
}

/* ===== FEATURED TESTS ===== */
.featured-tests-wrap {
    background-color: var(--bg-section);
    padding: 5rem 0;
}

.featured-tests {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.featured-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.featured-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.featured-card:hover .featured-card-img {
    transform: scale(1.04);
}

.featured-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--primary-light);
}

.featured-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.featured-card-body {
    min-width: 0;
    padding: 1.1rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.featured-card-body h3 {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.featured-card-footer {
    margin-top: auto;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    margin-bottom: -1rem;
}

.featured-card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fcs-pill {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.fcs-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

.fcs-val {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1;
}

/* ===== CATEGORIES GRID ===== */
.category-sections-intro {
    padding: 5rem 0 2rem;
    background: var(--bg-white);
}

.cat-section {
    padding: 5rem 0;
}

.cat-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.cat-section-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

/* Keep grid classes for pages that still use them (category.php etc) */
.test-cards-grid {
    display: grid;
    gap: 1.25rem;
}

.test-cards-grid.cols-1 {
    grid-template-columns: 1fr;
}

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

.test-cards-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.test-cards-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.test-card-img {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.test-card-img:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.tci-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.tci-thumb-placeholder {
    height: 140px;
    width: 100%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.tci-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tci-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.tci-body p {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    flex: 1;
}

.tci-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.tci-footer .num {
    color: var(--text-main);
    font-weight: 700;
}

/* ===== TEST CARDS (homepage category sections) ===== */
.tc {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.tc:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.tc:hover .tc-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

.tc:hover .tc-thumb {
    transform: scale(1.04);
}

.tc-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--primary-light);
    flex-shrink: 0;
}

.tc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}



.tc-body {
    flex: 1;
    min-width: 0;
    padding: 1.1rem 1.25rem 0.75rem;
}

.tc-body h3 {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.tc-body p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.5;
}

.tc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.tc-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.tc-arrow {
    color: var(--text-light);
    font-size: 1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* ===== PASS BANNER ===== */
.pass-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2.75rem;
    margin: 0;
    gap: 2rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.pass-banner-text {
    max-width: 600px;
}

.pass-banner-text strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.pass-banner-text p {
    font-size: 1rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.pass-banner .btn-yellow {
    background: white;
    color: var(--primary);
    border-color: rgba(255, 255, 255, 0.3);
    font-size: 1rem;
    padding: 0.85rem 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pass-banner .btn-yellow:hover {
    background: rgba(255, 255, 255, 0.92);
    transform: translateY(-1px);
}

/* ===== FLASHCARDS ===== */
.flashcards-wrap {
    padding: 5rem 0;
}

.flashcard-decks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.flashcard-deck {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.flashcard-deck:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.deck-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.deck-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.05rem;
    line-height: 1;
}

.deck-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== FEATURES STRIP ===== */
.features-strip {
    padding: 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature-item {
    padding: 1.25rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: left;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.feature-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.feature-icon-wrap {
    min-width: 44px;
    max-width: 100%;
    height: 44px;
    width: fit-content;
    padding: 0 0.65rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-md);
}

.feature-icon-wrap:has(.feature-free-text:empty) {
    display: none;
}

.feature-free-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
}

.feature-item h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.45rem;
}

.feature-item p {
    margin-bottom: 0;
    font-size: 0.88rem;
    line-height: 1.55;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 840px) {
    .pass-banner {
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        gap: 1.25rem;
    }

    .pass-banner-text strong {
        font-size: 1.4rem;
    }

    .pass-banner .btn-yellow {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 1024px) {
    .featured-tests {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .feature-item {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 3.5rem 0 3.5rem;
    }

    .test-cards-grid,
    .test-cards-grid.cols-2,
    .test-cards-grid.cols-3,
    .test-cards-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.25rem !important;
    }

    .hero-stat-inline {
        display: none;
    }

    .test-cards-grid,
    .test-cards-grid.cols-2,
    .test-cards-grid.cols-3,
    .test-cards-grid.cols-4 {
        grid-template-columns: 1fr;
    }

    .featured-tests {
        grid-template-columns: 1fr;
    }
}

/* ===== HOME ARTICLE SECTION ===== */
.home-article-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    align-items: center;
}

.home-article-content {
    min-width: 0;
}

.home-article-media img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: block;
}

@media (max-width: 991px) {
    .home-article-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .home-article-media {
        order: -1;
        /* Image first on mobile */
    }
}