/* static/css/landing/test-landing.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;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-wrap: auto;
}

/* ========== Hero Section ========== */
.test-hero {
    padding: 80px 0 60px;
    background: #FFF;
}

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

.hero-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.badge-category {
    background: rgba(188, 194, 251, 0.40);
    color: var(--main-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.badge-rating i{
    color: var(--amber) !important;
    font-size: .875rem;
}

.hero-stats{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.test-title {
    font-family: 'Lexend', sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 130%;
    text-wrap: balance;
    margin-bottom: 16px;
}

.test-subtitle {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 0.5rem;
    text-wrap: pretty;
}

.trustpilot-review{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
}

.intro-benefits {
    list-style: none;
    padding: 0;
    margin-bottom: 0.5rem;
}

.intro-benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    color: var(--text-color);
    font-size: 1rem;
}

.benefit-icon {
    width: 24px;
    height: 24px;
    background: rgba(188, 194, 251, 0.40);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon i {
    color: var(--main-color);
    font-size: 20px;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-cta .btn-primary {
    width: fit-content;
    margin: 6px 0;
}

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

.hero-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-meta i{
    color: var(--main-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    max-width: 110%;
    height: auto;
    border-radius: 20px;
}

/* ========== Stats Bar ========== */
.stats-bar {
    background: #f5f5f5;
    padding: 24px 0;
}

.stats-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--main-color);
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #595959;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: #d9d9d9;
}

/* ========== Constructs Section ========== */
.constructs-section {
    padding: 100px 0;
    background: #fff;
}

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

/* ========== Constructs Section ========== */

.constructs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;

  /* This is what centers the last row when it has fewer items */
  justify-content: center;
}

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

/* Mobile (already your current behavior) */
@media only screen and (max-width: 767px) {
  .construct-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* iPad Portrait (2 columns) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
  .construct-card {
    flex: 0 0 calc((100% - 20px) / 2);
    max-width: calc((100% - 20px) / 2);
  }
}


.construct-card {
    background: #fff;
    border: 1px solid #EDEFFF;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 5px 11px rgba(229, 229, 229, 0.4);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}

.construct-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(229, 229, 229, 0.6);
    background: #fafbff;
}

.construct-icon {
    width: 64px;
    height: 64px;
    min-width: 64px;
    background: rgba(188, 194, 251, 0.40);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.construct-card:hover .construct-icon {
    background: rgba(188, 194, 251, 0.60);
}

.construct-icon img {
    width: 32px;
    height: 32px;
}

.construct-content h3 {
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
    text-transform: capitalize;
    text-align: left;
}

.construct-content p {
    font-size: 0.875rem;
    color: #595959;
    line-height: 1.5;
    margin: 0;
    text-wrap: pretty;
}

/* ========== How It Works ========== */
.how-it-works {
    padding: 100px 0;
    background: #FAFAFA;
}

.how-it-works .mt-10 {
    padding-top: 40px;
}

.steps-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.steps-list .step-item {
    padding: 20px;
    text-align: left;
}

.step-number {
    font-family: 'Lexend', sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--main-color);
    line-height: 1;
    display: block;
    margin-bottom: 12px;
}

.steps-list h3 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    text-align: left;
}

.steps-list p {
    color: #595959;
    line-height: 1.6;
    margin: 0;
    text-wrap: pretty;
}

.step-illustration {
    width: 200px;
    height: 200px;
    padding: 40px;
    background: rgba(188, 194, 251, 0.20);
    border-radius: 20px;
    object-fit: contain;
}

/* ========== What's Included ========== */
.whats-included {
    padding: 100px 0;
    background: var(--main-color);
}

.whats-included h2 {
    color: #fff;
    text-align: left;
    margin-bottom: 24px;
}

.included-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.included-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.included-list li:last-child {
    border-bottom: none;
}

.included-check {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.included-check i{
    color: #fff;
    font-size: 20px;
}

.results-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.preview-image {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

/* ========== Reviews Section ========== */
.test-landing .reviews-section {
    padding: 100px 0;
    background: #fff;
}

.review-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0px;
    text-wrap: auto;
}

.review-item p, .review-item span{
    line-height: normal;
}

/* ========== Explore More Tests ========== */
.explore-tests {
    padding: 100px 0;
    background: #FAFAFA;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.explore-card {
    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;
    justify-content: space-between;
}

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

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

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

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

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

.explore-card-content h3 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 6px 0 10px;
    text-align: left;
}

.explore-card-content p {
    font-size: 0.9rem;
    color: #595959;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    text-wrap: pretty;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.explore-card-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

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

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

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

.explore-card-arrow {
    width: 32px;
    height: 32px;
    background: rgba(188, 194, 251, 0.40);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.explore-card:hover .explore-card-arrow {
    background: var(--main-color);
}

.explore-card-arrow i {
    color: var(--main-color);
    font-size: 12px;
    transition: all 0.3s ease;
}

.explore-card:hover .explore-card-arrow i {
    color: #fff;
    transform: translateX(2px);
}

/* ========== CTA Middle Section ========== */
.cta-middle-section {
    display: flex;
    flex-wrap: wrap;
    min-height: 300px;
}

.cta-middle-section .cta-middle-img {
    height: 100%;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.cta-middle-section .cta-middle-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, transparent, var(--main-color));
    z-index: 1;
}

.cta-middle-section .cta-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    color: white;
    background: var(--main-color);
    padding: 60px 40px;
}

.cta-middle-section .cta-content h3 {
    color: white !important;
    text-align: left;
    margin-bottom: 12px;
}

.cta-middle-section .cta-content span {
    margin-bottom: 24px;
    opacity: 0.9;
}

/* ========== FAQ Section ========== */

/* FAQ */

.faq {
    position: relative;
    padding: 100px 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-color: #FAFAFA;
    min-height: 400px;
}

.faq-list {
    max-width: 800px;
    display: flex;
    margin-top: 40px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    background-color: white;
    padding: 20px;
    border-radius: 20px;
    outline: 1px solid #EDEFFF;
    box-shadow: 0 5px 11px rgba(229, 229, 229, 0.4);
}

.faq-item {
    position: relative;
    margin-bottom: 10px;
}

.faq-item h3 {
    font-size: 18px;
    font-weight: normal !important;
    text-transform: inherit;
    text-wrap: pretty;
    font-family: unset;
}

.faq-detail {
    position: relative;
    padding: 20px;
    text-wrap: pretty;
    border-radius: 8px;
    background-color: #f8f9ff;
}

.faq-detail ul{
    margin-top: 16px;
}

.faq .overlay-bg.flip {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: -1;
    transform: scaleX(-1);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer a, .faq-answer a:hover{
    color: var(--main-color);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #D9D9D9;
}

.faq-question .arrow{
    border-radius: 6px;
    background: #EDEFFF;
    transition: transform 0.3s ease;
}

.faq-question i{
    min-width: 30px !important;
    min-height: 30px !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.faq-question.active .arrow {
    position: relative;
    top: 0px;
    transform: rotate(-180deg);
}

.faq-question.active {
    color: var(--main-color);
}

.faq-question.active + .faq-answer {
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.5s ease-in;
}

/* ========== Fixed Mobile CTA ========== */
.test-landing .fixed-btn-container {
    display: none;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 10px calc(20px + env(safe-area-inset-bottom, 0));
    background: white;
    width: 100%;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.test-landing .fixed-btn {
    display: inline-block;
    position: relative;
    width: calc(100% - 20px);
    max-width: 400px;
    animation: pulse 4s infinite;
}

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) {

    h2 {
        font-size: 1.5rem;
    }

    .test-hero {
        padding: 40px 0 30px;
    }

    .test-title {
        font-size: 28px;
    }

    .test-subtitle {
        font-size: 0.95rem;
    }
    
    .steps-list .step-item{
        padding: 20px 0;
    }

    .hero-image-wrapper {
        margin-top: 30px;
    }

    .hero-image {
        max-width: 100%;
    }

    .stats-wrapper {
        gap: 20px;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 1 1 40%;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .constructs-section,
    .how-it-works,
    .whats-included,
    .test-landing .reviews-section,
    .explore-tests {
        padding: 40px 0;
    }

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

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

    .construct-icon {
        width: 56px;
        height: 56px;
        min-width: 56px;
        border-radius: 12px;
    }

    .faq{
        padding: 40px 0;
    }

    .faq-list .col-md-10{
        padding: 0;
    }

    .construct-icon img {
        width: 28px;
        height: 28px;
    }

    .how-it-works .row {
        flex-direction: column-reverse;
    }

    .how-it-works .mt-10 {
        padding-top: 20px;
        flex-direction: row-reverse !important;
    }

    .step-illustration {
        width: 120px;
        height: 120px;
        padding: 24px;
        margin-bottom: 20px;
    }

    .step-number {
        font-size: 1.75rem;
    }

    .whats-included .row {
        gap: 2.5rem;
    }

    .results-preview {
        margin-bottom: 30px;
    }

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

    .cta-middle-section .row {
        flex-direction: column-reverse;
        margin: 0;
    }

    .cta-middle-section .cta-middle-img {
        height: 200px;
        min-height: 200px;
    }

    .cta-middle-section .cta-middle-img::after {
        background: linear-gradient(to bottom, transparent 40%, var(--main-color) 90%);
    }

    .cta-middle-section .cta-content {
        padding: 30px 20px;
        align-items: center;
        text-align: center;
    }

    .cta-middle-section .cta-content h3 {
        text-align: center;
    }

    .test-landing .fixed-btn-container {
        display: flex;
    }
}

/* ========== Responsive - iPad Portrait ========== */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
    .test-hero {
        padding: 60px 0 40px;
    }

    .test-title {
        font-size: 32px;
    }

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

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

    .constructs-section,
    .how-it-works,
    .whats-included,
    .test-landing .reviews-section,
    .explore-tests {
        padding: 60px 0;
    }

    .hero-image-wrapper {
        margin-top: 30px;
    }

    .how-it-works .row .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .how-it-works .row {
        flex-direction: column-reverse;
    }

    .step-illustration {
        margin-bottom: 20px;
    }
}

/* ========== Responsive - iPad Landscape ========== */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
    .constructs-section,
    .how-it-works,
    .whats-included,
    .test-landing .reviews-section,
    .explore-tests{
        padding: 60px 0;
    }
}