/* ============================================================
   Тарифные планы — страница монетизации (Vera)
   Использует токены и базовые компоненты из index.css
   (:root переменные, nav, footer, .btn-primary, .modal-*).
   Здесь — только специфика страницы тарифов.
   ============================================================ */

.tarify-main {
    padding: 8rem 5% 5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* ---------- Шапка страницы ---------- */
.tarify-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3.5rem;
}

.tarify-head h1 {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    margin-bottom: 1rem;
    color: var(--deep-plum);
}

.tarify-head .tarify-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Строка "Оплата из любой страны" + бейджи платёжных систем */
.pay-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.pay-row-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pay-badges {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pay-badge {
    height: 34px;
    min-width: 54px;
    padding: 0 0.65rem;
    background: white;
    border: 1px solid var(--light-lavender);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(61, 46, 61, 0.06);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.pay-badge.pay-visa {
    color: #1A1F71;
    font-style: italic;
    font-family: Georgia, serif;
}

.pay-badge.pay-mir {
    color: #0F754E;
}

.pay-badge.pay-mc {
    gap: 0;
}

.pay-mc-dots {
    position: relative;
    width: 38px;
    height: 22px;
}

.pay-mc-dots span {
    position: absolute;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.pay-mc-dots span:nth-child(1) {
    left: 0;
    background: #EB001B;
}

.pay-mc-dots span:nth-child(2) {
    right: 0;
    background: #F79E1B;
    mix-blend-mode: multiply;
}

/* ---------- Объяснение монетизации ---------- */
.how-pay {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(61, 46, 61, 0.07);
    margin-bottom: 3.5rem;
}

.how-pay-lead {
    text-align: center;
    font-size: 1.2rem;
    color: var(--deep-plum);
    font-weight: 600;
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.5;
}

.how-pay-lead .accent {
    color: var(--accent-coral);
}

.how-pay-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 620px;
    margin: 0 auto;
}

.how-pay-item {
    text-align: center;
    padding: 1.75rem 1.25rem;
    background: var(--cream);
    border-radius: 18px;
    position: relative;
}

.how-pay-item .hp-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 16px;
    background: var(--light-lavender);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.how-pay-item .hp-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--deep-plum);
    margin-bottom: 0.4rem;
}

.how-pay-item .hp-value small {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.how-pay-item p {
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 0;
}

/* Полоса-сравнение «в 10 раз дешевле» */
.how-pay-compare {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.5;
}

.how-pay-compare strong {
    color: var(--accent-coral);
    font-weight: 700;
}

/* ---------- Блок баланса / пополнения ---------- */
.balance-block {
    background: linear-gradient(135deg, var(--deep-plum) 0%, #5d4a5d 100%);
    color: white;
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 3.5rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    align-items: center;
}

.balance-current .bc-label {
    font-size: 0.95rem;
    opacity: 0.75;
    margin-bottom: 0.4rem;
}

.balance-current .bc-amount {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1;
}

.balance-current .bc-hint {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.45;
    max-width: 320px;
}

.balance-topup h2 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.topup-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.topup-input-wrap {
    position: relative;
    flex: 1;
    min-width: 160px;
}

.topup-input-wrap input {
    width: 100%;
    height: 56px;
    padding: 0 3rem 0 1.1rem;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    background: white;
}

.topup-input-wrap input:focus {
    outline: 3px solid var(--dusty-lavender);
}

.topup-input-wrap .topup-cur {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-weight: 700;
    pointer-events: none;
}

.btn-topup {
    height: 56px;
    padding: 0 1.75rem;
    border: none;
    border-radius: 14px;
    background: var(--accent-coral);
    color: white;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-topup:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(201, 144, 122, 0.45);
}

.topup-feedback {
    margin-top: 0.9rem;
    font-size: 0.95rem;
    min-height: 1.2em;
    opacity: 0.9;
}

.topup-feedback.error {
    color: #ffd0c4;
    font-weight: 600;
    opacity: 1;
}

/* ---------- Пакеты ---------- */
.packages-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.packages-head h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    margin-bottom: 0.5rem;
}

.packages-head p {
    font-size: 1.1rem;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.package-card {
    background: white;
    border: 2px solid var(--light-lavender);
    border-radius: 24px;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.package-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 55px rgba(61, 46, 61, 0.14);
}

.package-card.featured {
    border-color: var(--dusty-lavender);
    box-shadow: 0 22px 55px rgba(61, 46, 61, 0.14);
}

.package-ribbon {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--dusty-lavender), var(--accent-coral));
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(61, 46, 61, 0.2);
}

.pkg-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-plum);
    margin-bottom: 0.4rem;
}

.pkg-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 1.25rem;
    min-height: 2.7em;
}

.pkg-price {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.pkg-price .pkg-new {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--deep-plum);
    line-height: 1;
}

.pkg-price .pkg-old {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    opacity: 0.7;
}

.pkg-discount {
    display: inline-block;
    background: var(--sage);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}

.pkg-sessions {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--deep-plum);
    margin: 0.6rem 0 1.5rem;
}

.btn-pay {
    width: 100%;
    padding: 0.95rem 1rem;
    border: none;
    border-radius: 50px;
    background: var(--deep-plum);
    color: white;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 1.5rem;
}

.btn-pay:hover {
    background: var(--warm-gray);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(61, 46, 61, 0.3);
}

.package-card.featured .btn-pay {
    background: linear-gradient(135deg, var(--dusty-lavender), var(--accent-coral));
}

.pkg-includes-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.85rem;
}

.pkg-includes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pkg-includes li {
    position: relative;
    padding-left: 1.85rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.pkg-includes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(123, 160, 91, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237BA05B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.tarify-foot-note {
    text-align: center;
    max-width: 640px;
    margin: 2.5rem auto 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ---------- Модалка оплаты ---------- */
.payment-modal {
    max-width: 460px !important;
    padding: 2.5rem !important;
}

.payment-modal h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pay-summary {
    background: var(--cream);
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.5rem;
}

.pay-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.45rem 0;
    font-size: 0.98rem;
}

.pay-summary-row span:first-child {
    color: var(--text-secondary);
}

.pay-summary-row span:last-child {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.pay-summary-row.total {
    border-top: 1px solid var(--light-lavender);
    margin-top: 0.4rem;
    padding-top: 0.85rem;
}

.pay-summary-row.total span:last-child {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--deep-plum);
    font-weight: 700;
}

.pay-summary-row .save {
    color: var(--sage);
    font-weight: 700;
}

/* Псевдо-форма карты (только визуализация) */
.pay-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.pay-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pay-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--deep-plum);
}

.pay-field input {
    height: 48px;
    padding: 0 1rem;
    border: 2px solid var(--light-lavender);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--cream);
    color: var(--text-primary);
}

.pay-field input:focus {
    outline: none;
    border-color: var(--dusty-lavender);
}

.pay-field-row {
    display: flex;
    gap: 0.85rem;
}

.pay-field-row .pay-field {
    flex: 1;
}

.btn-pay-confirm {
    width: 100%;
    padding: 1.05rem;
    border: none;
    border-radius: 50px;
    background: var(--deep-plum);
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-pay-confirm:hover {
    background: var(--warm-gray);
    transform: translateY(-2px);
}

.pay-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.pay-secure-note svg {
    width: 15px;
    height: 15px;
    stroke: var(--sage);
    flex-shrink: 0;
}

/* Экран демо-уведомления (оплата не подключена) */
.pay-demo-screen {
    display: none;
    text-align: center;
    padding: 1rem 0;
}

.pay-demo-screen.active {
    display: block;
}

.pay-demo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--light-lavender);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.pay-demo-screen h3 {
    margin-bottom: 0.75rem;
}

.pay-demo-screen p {
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.pay-demo-screen .btn-primary {
    cursor: pointer;
}

/* ---------- Адаптив ---------- */
@media (max-width: 980px) {
    .packages-grid {
        grid-template-columns: 1fr;
        max-width: 460px;
        margin: 0 auto;
    }
    .package-card.featured {
        order: -1; /* популярный пакет наверх на мобиле */
    }
    .pkg-desc {
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .tarify-main {
        padding: 7rem 5% 4rem;
    }
    .how-pay {
        padding: 1.75rem 1.25rem;
    }
    .how-pay-grid {
        grid-template-columns: 1fr;
    }
    .balance-block {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        padding: 1.75rem;
    }
    .balance-current {
        text-align: center;
    }
    .balance-current .bc-hint {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .topup-row {
        flex-direction: column;
    }
    .btn-topup {
        width: 100%;
    }
    .payment-modal {
        padding: 2rem 1.25rem !important;
    }
    .pkg-price .pkg-new {
        font-size: 2.2rem;
    }
}
