/* صفحه جزئیات آزمون — site/tests/detail */

:root {
    --test-detail-primary:           #006B5A;
    --test-detail-primary-light:     #00A88E;
    --test-detail-primary-container: #E6F4F2;
    --test-detail-secondary:         #004D40;
    --test-detail-surface:           #F8FAFA;
    --test-detail-on-surface:        #191C1D;
    --test-detail-on-surface-var:    #3F4947;
    --test-detail-radius-card:       18px;
    --test-detail-radius-inner:      14px;
}

/* ──── General ──── */
.test-detail-page-bg      { background-color: var(--test-detail-surface); }
/* جلوگیری از اسکرول افقی موبایل (محتوای flex/دکمه nowrap) */
.test-detail-hero-wrap,
.test-detail-measure-wrap {
    max-width: 100%;
    overflow-x: clip;
}
.test-detail-hero-wrap .container,
.test-detail-measure-wrap .container {
    max-width: 100%;
}
.test-detail-hero-wrap .row > [class*="col"] {
    min-width: 0;
    max-width: 100%;
}
.test-detail-bg-white     { background-color: #fff; }
.test-detail-bg-surface   { background-color: var(--test-detail-surface); }
.test-detail-text-primary { color: var(--test-detail-primary) !important; }
.test-detail-text-var     { color: var(--test-detail-on-surface-var) !important; }

.test-detail-gradient {
    background: linear-gradient(135deg, #006B5A 0%, #00A88E 100%);
}
.test-detail-hero-pattern {
    background-image: radial-gradient(#00A88E 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.15;
}
.test-detail-divider {
    width: 64px; height: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #006B5A 0%, #00A88E 100%);
    margin: 20px auto 0;
}
.test-detail-divider--spaced { margin-top: 16px; }

/* ──── Hero Main Card ──── */
.test-detail-hero-card {
    background: #fff;
    border-radius: var(--test-detail-radius-card);
    padding: 56px 60px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    border: 1px solid rgba(0,168,142,.12);
    box-shadow: 0 2px 10px rgba(0,107,90,.05);
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}
.test-detail-hero-card .pattern-wrap {
    position: absolute;
    top: -96px; left: -96px;
    width: 320px; height: 320px;
    pointer-events: none;
}
.test-detail-hero-icon-box {
    width: 96px; height: 96px;
    flex-shrink: 0;
    background-color: var(--test-detail-primary-container);
    border-radius: var(--test-detail-radius-inner);
    border: 2px solid rgba(0,168,142,.18);
    display: flex;
    align-items: center;
    justify-content: center;
}
.test-detail-hero-icon-box svg { width: 52px; height: 52px; }
.test-detail-hero-icon-img { object-fit: contain; }
.test-detail-hero-title {
    font-family: var(--fanum-extrabold) !important;
    font-size: clamp(26px, 4vw, 44px) !important;
    color: var(--test-detail-primary) !important;
    line-height: 1.4;
    margin-bottom: 20px;
}
.test-detail-hero-desc {
    color: var(--test-detail-on-surface-var);
    font-size: 16px;
    line-height: 2;
    max-width: 620px;
    margin-bottom: 36px;
}
.test-detail-hero-card .test-detail-hero-text-block {
    width: 100%;
    min-width: 0;
    text-align: center;
}
.test-detail-hero-card .test-detail-hero-price-row .test-detail-hero-price-col {
    text-align: center;
}
.test-detail-hero-card .test-detail-hero-price-row {
    min-width: 0;
    width: 100%;
}
.test-detail-hero-card .test-detail-hero-price-col {
    min-width: 0;
    max-width: 100%;
}
@media (min-width: 576px) {
    .test-detail-hero-card .test-detail-hero-text-block,
    .test-detail-hero-card .test-detail-hero-text-block .test-detail-hero-title,
    .test-detail-hero-card .test-detail-hero-text-block .test-detail-hero-desc {
        text-align: right;
    }
    .test-detail-hero-card .test-detail-hero-price-row .test-detail-hero-price-col {
        text-align: right;
    }
}
.test-detail-price-label {
    font-size: 13px;
    color: rgba(63,73,71,.65);
    display: block;
    margin-bottom: 2px;
}
.test-detail-price-num {
    font-family: var(--fanum-extrabold);
    font-size: 28px;
    color: var(--test-detail-primary);
    line-height: 1;
}
.test-detail-price-num small { font-size: 13px; font-family: var(--fanum-regular); }
.test-detail-cta-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(135deg, #006B5A 0%, #00A88E 100%);
    color: #fff !important;
    font-family: var(--fanum-extrabold);
    font-size: 18px;
    border-radius: var(--test-detail-radius-inner);
    border: none;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(0,168,142,.25);
    transition: opacity .2s;
    white-space: normal;
    text-align: center;
    justify-content: center;
    max-width: 100%;
    box-sizing: border-box;
}
.test-detail-cta-btn:hover { opacity: .88; }
@media (min-width: 992px) {
    .test-detail-cta-btn {
        white-space: nowrap;
    }
}

/* ──── Stat Boxes ──── */
.test-detail-stat-box {
    background-color: rgba(230,244,242,.45);
    border: 1px solid rgba(0,168,142,.12);
    border-radius: var(--test-detail-radius-card);
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background-color .2s;
    height: 100%;
    min-height: 0;
}
.test-detail-hero-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-self: stretch;
    min-width: 0;
    max-width: 100%;
}
@media (min-width: 1200px) {
    .test-detail-hero-stats-grid {
        height: 100%;
        min-height: 0;
        flex: 1 1 auto;
        grid-template-rows: 1fr 1fr;
    }
    .test-detail-hero-stats-grid .test-detail-stat-box {
        min-height: 0;
    }
}
.test-detail-stat-box:hover { background-color: rgba(230,244,242,.7); }
.test-detail-stat-icon-wrap {
    width: 48px; height: 48px;
    background: #fff;
    border-radius: var(--test-detail-radius-inner);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
}
.test-detail-stat-icon-wrap svg { width: 26px; height: 26px; }
.test-detail-stat-label {
    font-size: 11px;
    color: rgba(0,107,90,.7);
    font-family: var(--fanum-bold);
    margin-bottom: 4px;
}
.test-detail-stat-value {
    font-family: var(--fanum-extrabold);
    font-size: 20px;
    color: var(--test-detail-primary);
    line-height: 1;
    overflow-wrap: anywhere;
}

/* ──── Section heading badge ──── */
.test-detail-badge {
    display: inline-block;
    padding: 6px 20px;
    background-color: var(--test-detail-primary-container);
    color: var(--test-detail-primary);
    font-family: var(--fanum-extrabold);
    font-size: 13px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.test-detail-section-title {
    font-family: var(--fanum-extrabold) !important;
    font-size: clamp(22px, 3vw, 34px) !important;
    color: var(--test-detail-on-surface) !important;
}
.test-detail-section-title.green { color: var(--test-detail-primary) !important; }

/* ──── Measurement Cards ──── */
.test-detail-measure-card {
    background: #fff;
    border-radius: var(--test-detail-radius-card);
    border: 1px solid #f3f4f6;
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: box-shadow .2s, transform .2s;
    height: 100%;
    max-width: 100%;
    min-width: 0;
}
.test-detail-measure-card:hover { box-shadow: 0 16px 40px rgba(0,0,0,.1); transform: translateY(-2px); }
.test-detail-measure-card .mc-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: transform .2s;
}
.test-detail-measure-card:hover .mc-icon { transform: scale(1.1); }
@media (max-width: 575.98px) {
    .test-detail-measure-card:hover .mc-icon { transform: none; }
}
.mc-icon--blue   { background-color: #eff6ff; border: 1px solid #bfdbfe; }
.mc-icon--teal   { background-color: #f0fdfa; border: 1px solid #99f6e4; }
.mc-icon--violet { background-color: #faf5ff; border: 1px solid #e9d5ff; }
.mc-icon--amber  { background-color: #fffbeb; border: 1px solid #fde68a; }
.test-detail-measure-card h3 {
    font-family: var(--fanum-extrabold) !important;
    font-size: 18px;
    color: var(--test-detail-primary);
    margin-bottom: 12px;
}
.test-detail-measure-card p {
    font-size: 13px;
    color: var(--test-detail-on-surface-var);
    line-height: 1.85;
    margin: 0;
    overflow-wrap: anywhere;
}
.test-detail-measure-wrap .test-detail-section-title {
    overflow-wrap: anywhere;
    padding-inline: 2px;
}
.test-detail-measure-wrap .row > [class*="col"] {
    min-width: 0;
    max-width: 100%;
}

/* ──── Deep Review ──── */
.test-detail-deep-card {
    background: #fff;
    border-radius: var(--test-detail-radius-card);
    padding: 56px 64px;
    border: 1px solid rgba(0,168,142,.08);
    box-shadow: 0 2px 10px rgba(0,107,90,.04);
}
.test-detail-deep-section { margin-bottom: 52px; }
.test-detail-deep-section:last-child { margin-bottom: 0; }
.test-detail-deep-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background-color: var(--test-detail-primary-container);
    color: var(--test-detail-primary);
    font-family: var(--fanum-bold);
    font-size: 14px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.test-detail-deep-label svg { width: 18px; height: 18px; flex-shrink: 0; }
.test-detail-deep-text {
    color: var(--test-detail-on-surface-var);
    font-size: 16px;
    line-height: 2;
    text-align: justify;
    font-family: var(--fanum-bold);
    margin: 0;
}
.test-detail-deep-inset {
    background-color: var(--test-detail-surface);
    border-radius: var(--test-detail-radius-inner);
    padding: 28px;
    border: 1px solid rgba(0,168,142,.06);
}

/* ──── Why Section ──── */
.test-detail-why-section {
    background-color: var(--test-detail-secondary);
    border-radius: var(--test-detail-radius-card);
    padding: 56px 48px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.test-detail-why-card {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--test-detail-radius-inner);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: background .2s;
    height: 100%;
}
.test-detail-why-card:hover { background: rgba(255,255,255,.18); }
.test-detail-why-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(0,168,142,.2);
    border: 1px solid rgba(0,168,142,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.test-detail-why-circle span {
    font-family: var(--fanum-extrabold);
    font-size: 24px;
    color: #00A88E;
}
.test-detail-why-card h4 {
    font-family: var(--fanum-bold);
    font-size: 17px;
    color: #fff;
    margin-bottom: 10px;
}
.test-detail-why-card p {
    font-size: 13px;
    color: rgba(255,255,255,.65);
    line-height: 1.8;
    margin: 0;
}
.test-detail-hero-pattern--muted {
    opacity: 0.04;
    pointer-events: none;
}
.test-detail-why-title {
    font-family: var(--fanum-extrabold) !important;
    font-size: clamp(22px, 3vw, 34px);
    color: #fff;
    margin-bottom: 0;
}
.test-detail-why-bar {
    width: 64px;
    height: 5px;
    border-radius: 999px;
    background: #00A88E;
    margin: 20px auto 0;
}

.test-detail-narrow-760 {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* ──── تست‌های مرتبط (Swiper) ──── */
.swiper-related-tests {
    overflow: hidden;
}
.swiper-related-tests .swiper-wrapper {
    align-items: stretch;
}
.swiper-related-tests .swiper-slide {
    height: auto;
    display: flex;
}
.swiper-related-tests .related-test-slide-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.related-test-cbox {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.related-test-price-row {
    min-height: 52px;
    align-items: center;
}
.swiper-related-nav .swiper-button-prev,
.swiper-related-nav .swiper-button-next {
    position: static;
    width: 38px;
    height: 38px;
    margin: 0;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(24, 162, 123, 0.12);
    color: #18a27b;
}
.swiper-related-nav .swiper-button-prev::after,
.swiper-related-nav .swiper-button-next::after {
    font-size: 15px;
    font-weight: 700;
}

/* ──── FAQ ──── */
.test-detail-faq-item {
    background: #fff;
    border-radius: var(--test-detail-radius-inner);
    border: 1px solid rgba(0,168,142,.1);
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    overflow: hidden;
}
.test-detail-faq-item summary {
    list-style: none;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: var(--fanum-bold);
    font-size: 16px;
    color: var(--test-detail-primary);
    user-select: none;
    transition: background .2s;
}
.test-detail-faq-item[open] summary { background: rgba(230,244,242,.25); }
.test-detail-faq-item summary::-webkit-details-marker { display: none; }
.test-detail-faq-toggle {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .25s;
}
.test-detail-faq-item[open] .test-detail-faq-toggle { transform: rotate(180deg); }
.test-detail-faq-body {
    padding: 0 28px 24px;
    color: var(--test-detail-on-surface-var);
    font-size: 15px;
    line-height: 1.95;
    font-family: var(--fanum-bold);
    border-top: 1px solid rgba(0,168,142,.07);
    padding-top: 20px;
}

/* ──── Responsive ──── */
@media (max-width: 991px) {
    .test-detail-hero-card { padding: 36px 28px; }
    .test-detail-deep-card { padding: 36px 28px; }
    .test-detail-why-section { padding: 40px 24px; }
}
@media (max-width: 767px) {
    .test-detail-hero-card { padding: 28px 20px; }
    .test-detail-hero-title { font-size: 22px !important; }
    .test-detail-cta-btn {
        font-size: 15px;
        padding: 14px 18px;
        width: 100%;
    }
    .test-detail-deep-card { padding: 28px 18px; }
    .test-detail-measure-card { padding: 28px 18px; }
}
