/* static/css/landing/tests-index.css */

:root {
    --main-color: #4653cf;
    --main-color-light: #7885e8;
    --main-color-bg: #f0f2ff;
    --callout-color: #525ebe;
    --text-secondary: #6b7280;
    --success-color: #10b981;
    --success-bg: #ecfdf5;
    --amber: #fbc933;
}

/* ========== Hero Section ========== */
.tests-hero {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #4653CF 0%, #6366f1 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tests-hero .container {
    position: relative;
    z-index: 10;
}

.tests-hero .hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.tests-hero h1 {
    font-family: 'Lexend', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.tests-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Hero Decorations */
.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Diamond shapes */
.diamond {
    position: absolute;
    transform: rotate(45deg);
    overflow: hidden;
    opacity: 0.8;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
}

.diamond img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotate(-45deg) scale(1.5);
    transform-origin: center;
}

.diamond::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

/* Left side diamonds */
.diamonds-left {
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.diamonds-left .diamond-1 {
    top: -180px;
    left: 0;
    width: 100px;
    height: 100px;
}

.diamonds-left .diamond-2 {
    top: -60px;
    left: 80px;
    width: 130px;
    height: 130px;
    opacity: 0.4;
}

.diamonds-left .diamond-3 {
    top: 80px;
    left: 0;
    width: 110px;
    height: 110px;
}

.diamonds-left .diamond-4 {
    top: 200px;
    left: 90px;
    width: 95px;
    height: 95px;
    opacity: 0.35;
}

/* Right side diamonds */
.diamonds-right {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.diamonds-right .diamond-5 {
    top: -180px;
    right: 80px;
    width: 105px;
    height: 105px;
}

.diamonds-right .diamond-6 {
    top: -50px;
    right: 0;
    width: 125px;
    height: 125px;
    opacity: 0.4;
}

.diamonds-right .diamond-7 {
    top: 90px;
    right: 90px;
    width: 115px;
    height: 115px;
}

.diamonds-right .diamond-8 {
    top: 210px;
    right: 0;
    width: 100px;
    height: 100px;
    opacity: 0.35;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .diamonds-left {
        left: -80px;
    }
    
    .diamonds-right {
        right: -80px;
    }
}

@media (max-width: 968px) {
    .hero-decorations {
        opacity: 0.3;
    }
    
    .tests-hero h1 {
        font-size: 2.25rem;
    }
    
    .tests-hero p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .tests-hero {
        padding: 60px 0 50px;
    }
}

/* ========== Section Styles ========== */
.featured-section {
    padding: 80px 0;
    background: #fff;
}

.featured-section h2,
.category-section h2 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    text-align: center;
}

.section-subtitle {
    font-size: 1rem;
    color: #595959;
    text-align: center;
    margin-bottom: 48px;
}

.category-section {
    padding: 80px 0;
    background: #fff;
}

.category-section.alt-bg {
    background: #FAFAFA;
}

/* ✅ Category header LEFT on desktop */
.category-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 40px;

    justify-content: flex-start;
    text-align: left;
}

.category-icon {
    width: 68px;
    height: 68px;
    background: var(--main-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 68px;
}

.category-icon img {
    filter: brightness(0) invert(1);
}

.category-header h2 {
    margin-bottom: 0;
    text-align: left;
}

.category-desc {
    color: #595959;
    font-size: 0.95rem;
    margin: 4px 0 0;
    text-align: left;
}

/* ========== Tests Grid (Flex) ========== */
.tests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;

    /* ✅ LEFT aligned everywhere (popular + categories) */
    justify-content: flex-start;
}

/* 3 columns on desktop */
.test-card {
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);

    background: #fff;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #EDEFFF;
    box-shadow: 0 5px 11px rgba(229, 229, 229, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.test-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(229, 229, 229, 0.6);
    border-color: var(--main-color);
    text-decoration: none;
}

.test-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.test-card-icon {
    width: 56px;
    height: 56px;
    background: rgba(188, 194, 251, 0.40);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.test-card:hover .test-card-icon {
    background: var(--main-color);
}

.test-card:hover .test-card-icon img {
    filter: brightness(0) invert(1);
}

.test-card-meta {
    flex: 1;
}

.test-card-category {
    font-size: 12px;
    color: var(--main-color);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.test-card-title {
    font-family: 'Lexend', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 4px 0 0;
    text-align: left;
}

.test-card-desc {
    color: #595959;
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 16px;
    text-wrap: pretty;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.test-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #EDEFFF;
}

.test-card-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #595959;
}

.test-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.test-card-stats i {
    color: var(--main-color);
    font-size: 12px;
}

.test-card-stats i.bi-star-fill {
    color: var(--amber);
}

.test-card-btn {
    color: var(--main-color);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.test-card:hover .test-card-btn {
    gap: 10px;
}

.test-card-btn i {
    font-size: 12px;
}

/* ========== CTA Section ========== */
.index-cta {
    padding: 80px 0;
    background: linear-gradient(180deg, #fff 0%, #E5E8FD 100%);
}

.index-cta .cta-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 50px 40px;
    border-radius: 20px;
    border: 1px solid #EDEFFF;
    box-shadow: 0 5px 11px rgba(229, 229, 229, 0.4);
}

.index-cta .cta-card h2 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

.index-cta .cta-card p {
    font-size: 1rem;
    color: #595959;
    margin-bottom: 24px;
}

.btn-primary{
    width: fit-content;
}

.index-cta .btn-primary {
    width: fit-content;
    margin: 0 auto;
}

footer {
    background: white;
}

.footer {
    color: var(--text-color) !important;
}

.footer-list a {
    color: var(--text-color) !important;
}

.footer-list a:hover {
    color: var(--main-color) !important;
    text-decoration: none;
}

/* ========== Responsive - Mobile ========== */
@media only screen and (max-width: 767px) {
    .tests-hero {
        padding: 60px 0 50px;
    }

    .tests-hero h1 {
        font-size: 2rem;
    }

    .tests-hero p {
        font-size: 1rem;
    }

    .featured-section,
    .category-section,
    .index-cta {
        padding: 40px 0;
    }

    .featured-section h2,
    .category-section h2 {
        font-size: 1.5rem;
    }

    .section-subtitle {
        margin-bottom: 30px;
    }

    .tests-grid {
        gap: 16px;
        justify-content: flex-start;
    }

    .test-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .constructs-section .btn-primary.mt-4{
        margin-top: 0 !important;
    }

    /* mobile: category header centered */
    .category-header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .category-header h2,
    .category-desc {
        text-align: center;
    }

    .index-cta .cta-card {
        padding: 30px 20px;
    }
}

/* ========== Responsive - Tablet ========== */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .featured-section,
    .category-section,
    .index-cta {
        padding: 60px 0;
    }

    .test-card {
        flex: 0 0 calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
    }
}
