/* ─────────────────────────────────────────────────────
   Pricing page — стили для страницы тарифов.
   Использует CSS-переменные из globals.css (:root).
───────────────────────────────────────────────────── */

.pricing-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

/* ─── HERO ─────────────────────────────────────────── */
.pricing-hero {
    text-align: center;
    padding: 48px 24px 40px;
}

.pricing-hero h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.pricing-hero p {
    font-size: var(--text-sm);
    color: var(--muted);
    margin: 0 0 24px;
}

.trial-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-xs);
    color: var(--success-text);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 100px;
    padding: 6px 16px;
}

.trial-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success-text);
    flex-shrink: 0;
}

/* ─── BILLING TOGGLE ──────────────────────────────── */
.billing-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 0 20px;
}

.billing-label {
    font-size: var(--text-sm);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s ease;
    user-select: none;
}

.billing-label.is-active {
    color: var(--text);
    font-weight: 600;
}

.billing-toggle {
    width: 42px;
    height: 23px;
    background: var(--border);
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    outline: none;
    flex-shrink: 0;
    padding: 0;
}

.billing-toggle.is-on {
    background: var(--success-text);
}

.billing-toggle-knob {
    position: absolute;
    top: 2.5px;
    left: 2.5px;
    width: 18px;
    height: 18px;
    background: var(--surface);
    border-radius: 50%;
    transition: transform 0.2s ease;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.billing-toggle.is-on .billing-toggle-knob {
    transform: translateX(19px);
}

.discount-chip {
    font-size: var(--text-xs);
    font-weight: 600;
    background: var(--success-bg);
    color: var(--success-text);
    padding: 3px 10px;
    border-radius: 100px;
}

/* ─── SEGMENT TABS ────────────────────────────────── */
.seg-tabs {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 28px;
}

.seg-tab {
    font-family: inherit;
    font-size: var(--text-sm);
    padding: 8px 24px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.seg-tab:hover {
    border-color: var(--border-interactive);
    color: var(--text);
}

.seg-tab.is-active {
    background: var(--text);
    color: var(--surface);
    border-color: var(--text);
}

/* ─── PLAN CARDS ──────────────────────────────────── */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
    align-items: start;
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.plan-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-interactive);
}

.plan-card.is-featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}

.plan-card.is-featured:hover {
    box-shadow: 0 0 0 1px var(--primary), 0 8px 28px rgba(37, 99, 235, 0.12);
}

.plan-badge {
    font-size: var(--text-xs);
    font-weight: 600;
    background: var(--hover-active);
    color: var(--primary);
    padding: 3px 11px;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 12px;
    align-self: flex-start;
}

.plan-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}

.plan-price-area {
    margin-bottom: 18px;
}

.plan-price {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1;
}

.plan-price-orig {
    font-size: var(--text-sm);
    color: var(--muted);
    text-decoration: line-through;
    margin-left: 6px;
    vertical-align: middle;
    display: none;
}

.plan-period {
    font-size: var(--text-xs);
    color: var(--muted);
    margin-top: 4px;
    min-height: 18px;
}

.plan-cta {
    display: block;
    text-align: center;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 9px 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

.plan-cta:hover {
    background: var(--hover);
}

.plan-cta.is-primary {
    background: var(--primary);
    color: var(--surface);
    border-color: var(--primary);
}

.plan-cta.is-primary:hover {
    background: var(--primary-hover);
}

.plan-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 0 14px;
}

.plan-limit {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
}

.plan-limit-label {
    font-size: var(--text-xs);
    color: var(--muted);
}

.plan-limit-value {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text);
}

.plan-limit-value.is-unlimited {
    color: var(--success-text);
}

.plan-note {
    font-size: var(--text-xs);
    color: var(--muted);
    text-align: center;
    margin-top: auto;
    padding-top: 14px;
}

/* ─── MODULES SECTION ─────────────────────────────── */
.modules-section {
    background: var(--neutral-bg);
    border-radius: var(--radius);
    padding: 28px 24px 24px;
    margin-bottom: 36px;
}

.modules-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.modules-title {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.modules-sub {
    font-size: var(--text-xs);
    color: var(--muted);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.module-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    opacity: 0.4;
    transition: opacity 0.25s ease, border-color 0.25s ease;
}

.module-card.is-visible {
    opacity: 1;
}

.module-card.is-visible:hover,
.module-card.is-recommended:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-interactive);
}

.module-card.is-recommended {
    border-color: var(--success-text);
    border-width: 1.5px;
    opacity: 1;
}

.module-badge {
    font-size: var(--text-xs);
    padding: 2px 9px;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 10px;
}

.module-badge.is-rec {
    background: var(--success-bg);
    color: var(--success-text);
}

.module-badge.is-neutral {
    background: var(--neutral-bg);
    color: var(--muted);
}

.module-name {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}

.module-desc {
    font-size: var(--text-xs);
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.module-price {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text);
}

.module-price-orig {
    font-size: var(--text-xs);
    color: var(--muted);
    text-decoration: line-through;
    margin-left: 4px;
    display: none;
}

.seg-note {
    margin-top: 16px;
    background: var(--success-bg);
    border-left: 3px solid var(--success-text);
    border-radius: 0 8px 8px 0;
    padding: 11px 16px;
    font-size: var(--text-xs);
    color: var(--success-text);
    line-height: 1.65;
}

/* ─── YEAR BANNER ─────────────────────────────────── */
.year-banner {
    background: var(--text);
    border-radius: var(--radius);
    padding: 28px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 48px;
}

.year-banner-text strong {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--surface);
    display: block;
    margin-bottom: 5px;
}

.year-banner-text span {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.55);
}

.year-banner-btn {
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    background: var(--success-text);
    color: var(--surface);
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.year-banner-btn:hover {
    opacity: 0.9;
}

/* ─── FAQ ─────────────────────────────────────────── */
.faq-section {
    margin-bottom: 48px;
}

.faq-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.faq-sub {
    font-size: var(--text-sm);
    color: var(--muted);
    margin-bottom: 24px;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    padding: 18px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: color 0.15s ease;
}

.faq-q:hover {
    color: var(--primary);
}

.faq-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--text-base);
    color: var(--muted);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.faq-item.is-open .faq-icon {
    transform: rotate(45deg);
    background: var(--text);
    border-color: var(--text);
    color: var(--surface);
}

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

.faq-inner {
    padding: 0 0 18px;
    font-size: var(--text-sm);
    color: var(--muted);
    line-height: 1.75;
    max-width: 680px;
}

.faq-inner a {
    color: var(--primary);
}

/* ─── BOTTOM CTA ──────────────────────────────────── */
.bottom-cta {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.bottom-cta h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
}

.bottom-cta p {
    font-size: var(--text-sm);
    color: var(--muted);
    margin: 0 0 28px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    background: var(--primary);
    color: var(--surface);
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.btn-cta:hover {
    background: var(--primary-hover);
    color: var(--surface);
}

/* ─── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 980px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .year-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 580px) {
    .pricing-page {
        padding: 0 16px 32px;
    }

    .pricing-hero {
        padding: 32px 0 28px;
    }

    .pricing-hero h1 {
        font-size: var(--text-lg);
    }

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

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

    .seg-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .modules-header {
        flex-direction: column;
        gap: 4px;
    }

    .year-banner {
        padding: 24px 20px;
    }
}
