/* static/css/tests/test-thumbnail.css */

:root {
    --hexaco-light: #F9FF9F;
    --hexaco-dark: #CED561;
    --eq-light: #FFD5C4;
    --eq-dark: #f79080;
    --enneagram-light: #C2E5E5;
    --enneagram-dark: #64B5B5;
    --sq-light: #D1E6F9;
    --sq-dark: #A8CEF2;
    --aq-light: #FFCB9B;
    --aq-dark: #F3AC6A;
    --btn-color: #274285;
    /* Global fallback — overridden per slug below */
    --test-primary-color: #274285;
}

/* ── Per-test primary colours ─────────────────────────────────────────────── */
/* Used via --test-primary-color on any element carrying the slug class.       */
.adhd-test                { --test-primary-color: #b5a8f5; }
.archetype-test           { --test-primary-color: #C0622F; }
.attachment-style-test    { --test-primary-color: #d1baa3; }
.big-five-test            { --test-primary-color: #4184b4; }
.bpd-test                 { --test-primary-color: #7C3E8C; }
.burnout-test             { --test-primary-color: #D95A3B; }
.career-test              { --test-primary-color: #3a7bd5; }
.color-personality-test   { --test-primary-color: #c3a1b8; }
.dark-triad-test          { --test-primary-color: #77749b; }
.emotional-intelligence-test { --test-primary-color: #8cac94; }
.enneagram-test           { --test-primary-color: #64B5B5; }
.hexaco-personality-test  { --test-primary-color: #CED561; }
.imposter-syndrome-test   { --test-primary-color: #5B8DD9; }
.love-style-test          { --test-primary-color: #e9a0a0; }
.mental-age-test          { --test-primary-color: #9d9d71; }
.narcissism-test          { --test-primary-color: #B8860B; }
.ocd-test                 { --test-primary-color: #4A90A4; }
.ocean-test               { --test-primary-color: #6b9adb; }
.political-orientation-test { --test-primary-color: #6B4C9A; }
.procrastination-test     { --test-primary-color: #8da7b1; }
.self-esteem-test         { --test-primary-color: #E8845C; }
.social-quotient-test     { --test-primary-color: #A8CEF2; }
.strengths-finder-test    { --test-primary-color: #d29137; }

.featured-tests{
    background-color: #f7faff;
}

.test-list {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
    margin: 30px 0;
}

.test-thumbnail {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eaeffa;
    box-shadow: 0 2px 8px rgba(39,66,133,.07);
    transition: box-shadow .2s, transform .2s;
}

.test-thumbnail:hover {
    box-shadow: 0 6px 20px rgba(39,66,133,.13);
    transform: translateY(-2px);
}

/* ── Image area ── */
.test-thumbnail-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

.test-thumbnail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gradient fallback when no thumbnail exists */
.test-thumbnail-image.no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
}

.test-thumbnail.hexaco-personality-test    .test-thumbnail-image.no-thumb { background: linear-gradient(135deg, var(--hexaco-light), var(--hexaco-dark)); }
.test-thumbnail.emotional-intelligence-test .test-thumbnail-image.no-thumb { background: linear-gradient(135deg, var(--eq-light), var(--eq-dark)); }
.test-thumbnail.enneagram-test             .test-thumbnail-image.no-thumb { background: linear-gradient(135deg, var(--enneagram-light), var(--enneagram-dark)); }
.test-thumbnail.social-quotient-test       .test-thumbnail-image.no-thumb { background: linear-gradient(135deg, var(--sq-light), var(--sq-dark)); }
.test-thumbnail.adversity-quotient-test    .test-thumbnail-image.no-thumb { background: linear-gradient(135deg, var(--aq-light), var(--aq-dark)); }
.test-thumbnail-image.no-thumb             { background: linear-gradient(135deg, #eef3ff, #7e97d5); }

/* ── Content area ── */
.test-thumbnail .test-thumbnail-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 20px 20px;
    flex: 1;
}

.test-thumbnail h3 {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 0;
    color: #1a2340;
}

.test-thumbnail .btn-primary {
    display: block;
    width: 100%;
    padding: 11px;
    background-color: var(--btn-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-top: auto;
    font-weight: 600;
    text-align: center;
}

/* Specific Test Gradients */
.test-thumbnail.hexaco-personality-test { background: linear-gradient(135deg, var(--hexaco-light), var(--hexaco-dark)); }
.test-thumbnail.emotional-intelligence-test { background: linear-gradient(135deg, var(--eq-light), var(--eq-dark)); }
.test-thumbnail.enneagram-test { background: linear-gradient(135deg, var(--enneagram-light), var(--enneagram-dark)); }
.test-thumbnail.social-quotient-test { background: linear-gradient(135deg, var(--sq-light), var(--sq-dark)); }
.test-thumbnail.adversity-quotient-test { background: linear-gradient(135deg, var(--aq-light), var(--aq-dark)); }


/* Test Thumbnail small */

.tests-footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 40px 0 60px;
}

.tests-footer-container .arrow-icon {
    display: flex;
    width: 40px;
    height: 40px;
    justify-content: flex-end;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.tests-footer-container .arrow-icon:hover {
    transform: rotate(45deg); /* Rotate the icon */
}

.tests-footer h2{
    text-align: center;
}

.test-thumbnail-small {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    position: relative;
    padding: 14px 16px 14px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeffa;
    box-shadow: 0 2px 6px rgb(230 237 252 / 56%);
    color: #303030;
    overflow: hidden;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}

.test-thumbnail-small:hover {
    color: #274285;
    border-color: #274285;
    outline: 3px solid #bed2ff33;
    box-shadow: 0 4px 14px rgb(39 66 133 / 12%);
}

/* Left colour bar — driven by --test-primary-color */
.test-thumbnail-small .test-thumbnail-left {
    width: 5px;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--test-primary-color);
    border-radius: 8px 0 0 8px;
}

/* 1:1 thumbnail image */
.test-thumbnail-small-img {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: color-mix(in srgb, var(--test-primary-color) 15%, #f5f7ff);
}

.test-thumbnail-small-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.test-thumbnail-small-img.no-thumb {
    background: color-mix(in srgb, var(--test-primary-color) 20%, #eef3ff);
}

/* Info row */
.test-thumbnail-small .test-thumbnail-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.test-thumbnail-small .thumbnail-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-thumbnail-small h3 {
    font-size: 15px;
    margin-bottom: 0;
    font-weight: 600;
    line-height: 1.3;
}

.test-thumbnail-small .arrow-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    transition: transform 0.2s ease-in-out;
}

.test-thumbnail-small:hover .arrow-icon {
    transform: rotate(45deg);
}

/* Test Banner Header */

/* General Styles */
.banner-header {
    border-radius: 12px;
    padding: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.personality-test-banner {
    background: linear-gradient(90deg, #EEF3FF, #7E97D5); /* Soft blue gradient */
}

.banner-header .test-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    z-index: 1;
}

.banner-header-content {
    max-width: 50%;
    z-index: 10;
}

.banner-header-content h1 {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 0;
}

.banner-header-content p {
    font-size: 1em;
}

.badge {
    background: #274285;
    color: white;
    font-size: 0.9em;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: normal;
    width: fit-content;
}

/* Banner Illustration */
.banner-header-illustration {
    max-width: 80%;
    text-align: right;
    z-index: 10;
}

.banner-header-illustration img {
    width: 100%;
}

/* Specific Test Gradients */
.banner-header.hexaco-personality-test { background: linear-gradient(135deg, var(--hexaco-light), var(--hexaco-dark)); }
.banner-header.emotional-intelligence-test { background: linear-gradient(135deg, var(--eq-light), var(--eq-dark)); }
.banner-header.enneagram-test { background: linear-gradient(135deg, var(--enneagram-light), var(--enneagram-dark)); }
.banner-header.social-quotient-test { background: linear-gradient(135deg, var(--sq-light), var(--sq-dark)); }
.banner-header.adversity-quotient-test { background: linear-gradient(135deg, var(--aq-light), var(--aq-dark)); }

/* FAQs */

section.faq-container{
    padding: 0;
}

.faq-container {
    background-color: #f7faff;
}

.faq-container h3{
    font-family: inherit;
}

.faq-list{
    display: flex;
    padding: 40px 80px;
    flex-direction: column;
    justify-content: center;
}

.accordion-item{
    background-color: #fff;
    border: none;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #eaeffa;
    box-shadow: 0px 2px 6px #e6edfc8f;
}

.accordion-button {
    background: white;
    color: black;
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    color: #274285;
    background-color: aliceblue;
}

/* Responsive Design */
@media (max-width: 768px) {

    .banner-header{
        padding: 20px;
        flex-direction: column;
    }

    .banner-header-illustration.all-tests img {
        width: 80%;
        margin: auto;
        display: flex;
        justify-content: center;
    }

    .personality-test-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px;
        background: linear-gradient(180deg, #EEF3FF, #7E97D5);
    }

    .banner-header-content {
        max-width: 100%;
        width: 100%;
    }

    .banner-header-content h1 {
        margin-bottom: 10px;
    }

    .banner-header-illustration {
        max-width: 100%;
        width: 100%;
    }

    .banner-header-illustration img {
        width: 40%;
    }

    .tests-footer-container {
        grid-template-columns: 1fr !important;
        margin: auto;
    }

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

    .test-thumbnail-small h3{
        font-size: 20px;
    }

    .tests-footer-container .arrow-icon{
        margin-left: 10px;
    }

    .faq-list{
        padding: 40px 30px;
    }
}