/* ==================================================================
   Lebino Compare — Reimagined Comparison Surface
   Premium typography, refined hierarchy, motion-aware transitions
   ================================================================== */

/* ------------------- Section Foundation ------------------- */

.cmp-main {
    --landing-gutter: clamp(16px, 5vw, 48px);
    --landing-section-space: clamp(56px, 6vw, 84px);
    --landing-section-space-compact: clamp(40px, 4.5vw, 60px);
}

.cmp-main .cmp-container {
    width: min(calc(100% - (2 * var(--landing-gutter, clamp(16px, 5vw, 48px)))), 1200px);
    margin-inline: auto;
}

.cmp-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 40px 0;
    position: relative;
}

.cmp-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-top: 1px solid var(--primary-border);
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.02) 50%, transparent 100%);
    pointer-events: none;
}

.cmp-h2 {
    font-size: clamp(1.75rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary-dark-text);
    margin: 0;
    line-height: 1.25;
}

.cmp-section-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 72ch;
    margin: 0;
    position: relative;
    padding-right: 16px;
}

.cmp-section-note::before {
    content: 'ℹ';
    position: absolute;
    top: 2px;
    right: 0;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(10, 25, 47, 0.08);
    color: var(--primary-button-color);
    font-weight: 600;
}

/* ------------------- Podium Section ------------------- */

.cmp-podium-section {
    gap: 40px;
    padding-bottom: 64px;
}

.cmp-podium-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    position: relative;
}

.cmp-podium-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(255, 123, 38, 0.12), rgba(255, 123, 38, 0.05));
    border: 1px solid rgba(255, 123, 38, 0.25);
    border-radius: 999px;
    color: var(--cmp-orange);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cmp-podium-kicker-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.cmp-podium-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--primary-dark-text);
    margin: 0;
    line-height: 1.3;
}

.cmp-podium-desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 62ch;
    line-height: 1.7;
}

/* ------------------- Podium Stage ------------------- */

.cmp-podium-stage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: flex-end;
    position: relative;
    padding: 40px 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
    border-radius: 20px;
}

.cmp-podium-stage::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 123, 38, 0.1) 25%,
        rgba(255, 123, 38, 0.2) 50%,
        rgba(255, 123, 38, 0.1) 75%,
        transparent 100%
    );
    border-radius: 2px;
}

.cmp-podium-stage::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 123, 38, 0.15), transparent);
}

/* Podium placement */
.cmp-order-silver { order: 1; }
.cmp-order-gold { order: 2; }
.cmp-order-bronze { order: 3; }

.cmp-podium-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100%;
    position: relative;
}

/* ------------------- Podium Cards ------------------- */

.cmp-podium-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.12);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.cmp-podium-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(255,255,255,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cmp-podium-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 28px 56px -12px rgba(0, 0, 0, 0.15);
}

.cmp-podium-card:hover::before {
    opacity: 1;
}

.cmp-podium-card--gold {
    border: 2px solid rgba(255, 123, 38, 0.3);
    background: linear-gradient(180deg, #ffffff 0%, #fffbf8 100%);
    padding-top: 32px;
    padding-bottom: 28px;
}

.cmp-podium-card--gold:hover {
    box-shadow: 0 32px 64px -16px rgba(255, 123, 32, 0.2), 0 16px 32px -8px rgba(0, 0, 0, 0.1);
}

.cmp-podium-card--silver {
    border-color: rgba(148, 163, 184, 0.4);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.cmp-podium-card--bronze {
    border-color: rgba(217, 119, 6, 0.3);
    background: linear-gradient(180deg, #ffffff 0%, #fffdfa 100%);
}

/* Medal badge */
.cmp-podium-crown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.cmp-podium-medal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cmp-podium-medal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cmp-podium-col--gold .cmp-podium-medal-dot {
    box-shadow: 0 0 0 3px rgba(255, 123, 38, 0.2);
}

.cmp-podium-medal-text {
    text-transform: uppercase;
}

/* Lebino chip */
.cmp-podium-lebino-chip {
    background: var(--cmp-navy);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.05em;
}

/* Product identity */
.cmp-podium-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.cmp-podium-name {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: var(--primary-dark-text);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.cmp-podium-col--gold .cmp-podium-name {
    font-size: 1.375rem;
}

.cmp-podium-col--gold .cmp-podium-name::after {
    content: '';
    display: block;
    height: 32px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10,30 L40,20 L70,30 L100,15 L130,30 L160,20 L190,30 L190,5 L10,5 Z' fill='%23ff7b26' opacity='0.1'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
    opacity: 0.5;
}

.cmp-podium-sub {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Score ring */
.cmp-podium-score-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 12px 14px;
    position: relative;
    z-index: 1;
}

.cmp-podium-col--gold .cmp-podium-score-box {
    background: linear-gradient(180deg, rgba(255, 123, 38, 0.04), transparent);
    border-color: rgba(255, 123, 38, 0.15);
}

.cmp-ring {
    width: 56px;
    height: 56px;
    flex: none;
}

.cmp-ring svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: rotate(-90deg);
}

.cmp-ring-track,
.cmp-ring-fill {
    fill: none;
    stroke-width: 9;
}

.cmp-ring-track {
    stroke: rgba(48, 71, 94, 0.10);
}

.cmp-ring-fill {
    stroke: var(--cmp-orange);
    stroke-linecap: round;
    stroke-dasharray: var(--p, 0) 100;
    animation: cmpRingIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes cmpRingIn {
    from {
        stroke-dasharray: 0 100;
    }
}

.cmp-ring-value {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.cmp-ring-value strong {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--primary-dark-text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cmp-ring-value strong[data-score="10"] { color: var(--cmp-orange); }
.cmp-ring-value strong[data-score="9"] { color: #f97316; }
.cmp-ring-value strong[data-score="8"] { color: #fb923c; }
.cmp-ring-value strong[data-score="7"] { color: #fdba74; }
.cmp-ring-value small {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cmp-podium-score-labels {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cmp-podium-score-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-dark-text);
    letter-spacing: 0.02em;
}

.cmp-podium-market {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.cmp-podium-market strong {
    color: var(--primary-dark-text);
    font-weight: 700;
}

/* Features list */
.cmp-podium-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 48px;
    position: relative;
    z-index: 1;
}

.cmp-podium-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-main);
    line-height: 1.5;
}

.cmp-podium-check {
    font-weight: 800;
    color: #22c55e;
    flex-shrink: 0;
    line-height: 1.2;
}

/* Action buttons */
.cmp-podium-action {
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.cmp-podium-btn {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px;
}

.cmp-podium-btn--primary {
    background: var(--cmp-orange);
    color: #ffffff;
    border: 1px solid rgba(255, 123, 38, 0.6);
    box-shadow: 0 4px 16px -4px rgba(255, 123, 38, 0.4);
    position: relative;
    overflow: hidden;
}

.cmp-podium-btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cmp-podium-btn--primary:hover {
    background: #ff9552;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(255, 123, 38, 0.5);
}

.cmp-podium-btn--primary:hover::before {
    opacity: 1;
}

.cmp-podium-btn--primary .cmp-btn-arrow {
    transition: transform 0.2s ease;
}

.cmp-podium-btn--primary:hover .cmp-btn-arrow {
    transform: translateX(-4px);
}

.cmp-podium-btn--secondary {
    background: rgba(0, 71, 122, 0.05);
    color: var(--cmp-blue);
    border: 1px solid rgba(0, 71, 122, 0.15);
}

.cmp-podium-btn--secondary:hover {
    background: var(--cmp-blue);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -8px rgba(0, 71, 122, 0.25);
}

.cmp-btn-arrow {
    transition: transform 0.2s ease;
}

/* ------------------- Pedestal ------------------- */

.cmp-podium-pedestal {
    position: relative;
    border-radius: 0 0 12px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.cmp-pedestal-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.cmp-pedestal-rank {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-dark-text);
    line-height: 0.85;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 1;
}

.cmp-pedestal-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    top: -2px;
    position: relative;
    z-index: 1;
}

.cmp-podium-col--gold .cmp-pedestal-rank {
    font-size: 3rem;
    color: var(--cmp-orange);
    text-shadow: 0 4px 16px rgba(255, 123, 38, 0.3);
}

/* ------------------- Responsive ------------------- */

@media (max-width: 1024px) {
    .cmp-podium-stage {
        grid-template-columns: repeat(3, 1.1fr);
        gap: 32px;
        padding: 24px 12px;
    }

    .cmp-podium-card {
        padding: 24px 20px 20px;
    }

    .cmp-podium-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .cmp-section {
        gap: 20px;
        padding: 32px 0;
    }

    .cmp-podium-stage {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 380px;
        margin-inline: auto;
        padding: 20px 12px;
    }

    .cmp-order-gold { order: 1; }
    .cmp-order-silver { order: 2; }
    .cmp-order-bronze { order: 3; }

    .cmp-podium-col {
        min-height: auto;
    }

    .cmp-podium-card {
        padding: 20px 16px 18px;
    }

    .cmp-podium-title {
        font-size: 1.375rem;
    }

    .cmp-podium-sub {
        min-height: 32px;
    }

    .cmp-ring {
        width: 44px;
        height: 44px;
    }

    .cmp-podium-score-box {
        padding: 10px 10px;
    }

    .cmp-podium-score-title {
        font-size: 0.6875rem;
    }

    .cmp-podium-market {
        font-size: 0.625rem;
    }
}

@media (max-width: 480px) {
    .cmp-podium-stage {
        max-width: 320px;
        gap: 14px;
    }

    .cmp-podium-card {
        padding: 16px 14px 14px;
    }

    .cmp-podium-name {
        font-size: 1.125rem;
    }

    .cmp-podium-col--gold .cmp-podium-name {
        font-size: 1.25rem;
    }

    .cmp-pedestal-rank {
        font-size: 2rem;
    }

    .cmp-pedestal-label {
        font-size: 0.8125rem;
    }

    .cmp-podium-btn {
        font-size: 0.8125rem;
        height: 40px;
        padding: 0 14px;
    }
}

/* ------------------- Motion & Accessibilité ------------------- */

@media (prefers-reduced-motion: reduce) {
    .cmp-podium-card,
    .cmp-podium-btn,
    .cmp-podium-medal-dot {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Accessibility focus */
.cmp-podium-card:focus-visible,
.cmp-podium-btn:focus-visible,
.cmp-podium-link:focus-visible {
    outline: 3px solid var(--cmp-orange);
    outline-offset: 3px;
    border-radius: 8px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cmp-podium-card {
        border: 2px solid var(--primary-border);
    }

    .cmp-podium-medal-badge {
        border: 1px solid currentColor;
    }
}

/* ------------------- FAQ Section (Feature Page Pattern) ------------------- */

.cmp-main .faq-container {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.8fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 72px;
    align-items: start;
    margin-top: 16px;
}

.cmp-main .faq-container > .section-eyebrow {
    grid-column: 2;
    grid-row: 1;
    max-width: 42ch;
    margin: 0 0 12px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--primary-cta, #ff7b26);
    letter-spacing: 0;
}

.cmp-main .faq-container > .container-title {
    grid-column: 2;
    grid-row: 2;
    max-width: 17ch;
    margin: 0 0 16px;
    text-align: right;
    color: var(--primary-dark-text, #040d12);
    font-size: var(--type-heading, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    text-wrap: balance;
}

.cmp-main .faq-container > .section-subtitle {
    grid-column: 2;
    grid-row: 3;
    max-width: 42ch;
    margin: 0 !important;
    text-align: right;
    color: var(--primary-text-color, #30475e);
    font-size: 1rem;
    line-height: 1.8;
}

.cmp-main .faq-container > .faq-list {
    grid-column: 1;
    grid-row: 1 / span 3;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cmp-main .faq-container .faq-item {
    background: #ffffff;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid #dbe2f9;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.cmp-main .faq-container .faq-item.active {
    border-color: #c8d4e8;
    box-shadow: 0 12px 24px rgba(10, 25, 47, 0.06);
}

.cmp-main .faq-container .faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    cursor: pointer;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: right;
}

.cmp-main .faq-container .faq-question:focus-visible {
    outline: 3px solid rgba(255, 123, 38, 0.45);
    outline-offset: 4px;
    border-radius: 10px;
}

.cmp-main .faq-container .faq-question h3 {
    flex-grow: 1;
    text-align: right;
    margin: 0;
    font-size: var(--type-body, 1rem);
    font-weight: 700;
    line-height: 1.6;
    color: var(--primary-dark-text, #040d12);
}

.cmp-main .faq-container .faq-toggle-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--primary-button-color, #00477a);
    transition: transform 0.25s ease;
}

.cmp-main .faq-container .faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
}

.cmp-main .faq-container .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
}

.cmp-main .faq-container .faq-answer p {
    padding: 16px 0 4px;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.85;
    color: var(--primary-text-color, #30475e);
    max-width: 64ch;
    text-wrap: pretty;
}

@media (min-width: 901px) {
    .cmp-main .faq-container > .section-eyebrow,
    .cmp-main .faq-container > .container-title,
    .cmp-main .faq-container > .section-subtitle {
        text-align: left;
    }

    .cmp-main .faq-container > .section-eyebrow,
    .cmp-main .faq-container > .section-subtitle {
        justify-self: end;
    }
}

@media (max-width: 900px) {
    .cmp-main .faq-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        row-gap: 24px;
    }

    .cmp-main .faq-container > .section-eyebrow,
    .cmp-main .faq-container > .container-title,
    .cmp-main .faq-container > .section-subtitle,
    .cmp-main .faq-container > .faq-list {
        grid-column: 1;
        grid-row: auto;
        text-align: right;
    }

    .cmp-main .faq-container > .section-eyebrow {
        margin-bottom: 0;
    }

    .cmp-main .faq-container > .container-title {
        max-width: 24ch;
        margin-bottom: -8px;
        font-size: clamp(2rem, 8vw, 2.75rem);
    }
}

@media (max-width: 700px) {
    .cmp-main .faq-container .faq-item {
        padding: 16px;
    }
}

/* پنهان‌سازی کارت استیکی اقدام در صفحات مقایسه در حالت ریسپانسیو */
@media (max-width: 768px) {
    .cmp-sticky-cta,
    .mobile-sticky-cta,
    #mobileStickyCta {
        display: none !important;
    }
}

