/* ── Стили для страницы тарифов ── */

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pricing-link {
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pricing-link:hover {
    border-color: var(--teal-mid);
    color: var(--teal-mid);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 191, 165, 0.2);
}

/* ── Заголовок страницы ── */
.pricing-header {
    text-align: center;
    margin-bottom: 50px;
}

.pricing-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--teal), var(--teal-mid));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

.pricing-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: 0.8;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* ── Секции ── */
.pricing-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.section-note {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

/* ── Сетка карточек ── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    max-width: 1000px;
    margin: 0 auto;
}

.family-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ── Карточки тарифов ── */
.pricing-card {
    position: relative;
    padding: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-height: 200px;
}

.pricing-card:hover {
    border-color: var(--teal-mid);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.pricing-card.featured {
    border-color: var(--teal-mid);
    box-shadow: 0 4px 20px rgba(0, 191, 165, 0.25);
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--teal), var(--teal-mid));
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.card-icon {
    font-size: 36px;
    margin-bottom: 4px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.card-data {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.card-price {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--teal), var(--teal-mid));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 4px 0;
}

.card-devices {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.card-note {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}

.family-card {
    padding: 28px;
}

/* ── Калькулятор ── */
.calculator-wrapper {
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 28px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.calculator-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.calc-label {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.calc-select {
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.calc-select:hover,
.calc-select:focus {
    border-color: var(--teal-mid);
    outline: none;
}

.calc-slider {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--teal), var(--teal-mid));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 128, 128, 0.4);
}

.calc-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--teal), var(--teal-mid));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 128, 128, 0.4);
}

.device-count {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--teal), var(--teal-mid));
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    min-width: 40px;
}

.calculator-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--bg-input);
    border: 1px solid var(--teal-mid);
    border-radius: 12px;
}

.result-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
}

.result-price {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--teal), var(--teal-mid));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Кнопка покупки ── */
.buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    margin-top: 16px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 60%, var(--teal-light) 100%);
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 128, 128, 0.3);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 165, 0.4);
}

.buy-btn:active {
    transform: scale(0.98);
}

.telegram-icon-btn {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ── Примечание о разработке ── */
.dev-note {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.8;
    line-height: 1.5;
}

/* ── Таблицы цен ── */
.price-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.price-table {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s ease;
}

.price-table:hover {
    border-color: var(--teal-mid);
    box-shadow: var(--shadow-hover);
}

.table-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    text-align: center;
    color: var(--text);
}

.table-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.table-row:hover {
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.1), rgba(0, 191, 165, 0.1));
}

.table-row span:first-child {
    color: var(--text-muted);
}

.table-row span:last-child {
    font-weight: 600;
    color: var(--text);
}

/* ── Адаптив ── */
@media (max-width: 768px) {
    .pricing-title {
        font-size: 32px;
    }

    .pricing-subtitle {
        font-size: 14px;
    }

    .pricing-hint {
        font-size: 12px;
    }

    .section-title {
        font-size: 22px;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .family-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card {
        padding: 16px;
        min-height: 180px;
    }

    .card-icon {
        font-size: 28px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-price {
        font-size: 22px;
    }

    .card-devices {
        font-size: 11px;
    }

    .card-note {
        font-size: 10px;
    }

    .calculator-wrapper {
        padding: 20px;
    }

    .result-price {
        font-size: 26px;
    }

    .price-tables {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 14px;
    }

    .logo {
        width: 44px;
        height: 44px;
    }

    .logo-name {
        font-size: 13px;
    }

    .online-indicator {
        font-size: 10px;
    }

    .pricing-link {
        padding: 6px 12px;
        font-size: 12px;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .main {
        padding: 20px 14px;
    }

    .pricing-title {
        font-size: 26px;
    }

    .pricing-subtitle {
        font-size: 13px;
    }

    .pricing-hint {
        font-size: 11px;
    }

    .section-title {
        font-size: 18px;
    }

    .section-note {
        font-size: 12px;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .pricing-card {
        padding: 14px;
        min-height: 160px;
    }

    .card-icon {
        font-size: 24px;
    }

    .card-title {
        font-size: 12px;
    }

    .card-price {
        font-size: 20px;
    }

    .card-data {
        font-size: 11px;
    }

    .card-devices {
        font-size: 10px;
    }

    .card-note {
        font-size: 9px;
    }

    .calculator-wrapper {
        padding: 16px;
    }

    .calculator-result {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .result-price {
        font-size: 24px;
    }

    .buy-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .dev-note {
        font-size: 11px;
    }

    .price-table {
        padding: 16px;
    }

    .table-title {
        font-size: 14px;
    }

    .table-row {
        padding: 8px 10px;
        font-size: 12px;
    }

    .footer {
        padding: 16px 14px;
    }

    .footer-link {
        font-size: 12px;
        padding: 9px 14px;
    }
}

/* ── Адаптив для очень маленьких экранов ── */
@media (max-width: 360px) {
    .header {
        padding: 8px 10px;
    }

    .logo {
        width: 40px;
        height: 40px;
    }

    .logo-name {
        font-size: 12px;
    }

    .pricing-link {
        padding: 5px 10px;
        font-size: 11px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .main {
        padding: 16px 10px;
    }

    .pricing-title {
        font-size: 22px;
    }

    .pricing-subtitle {
        font-size: 12px;
    }

    .pricing-hint {
        font-size: 10px;
    }

    .section-title {
        font-size: 16px;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .pricing-card {
        padding: 12px;
        min-height: 150px;
    }

    .card-icon {
        font-size: 22px;
    }

    .card-title {
        font-size: 11px;
    }

    .card-price {
        font-size: 18px;
    }

    .card-data {
        font-size: 10px;
    }

    .card-devices {
        font-size: 9px;
    }

    .card-note {
        font-size: 8px;
    }

    .calculator-wrapper {
        padding: 14px;
    }

    .calc-label {
        font-size: 13px;
    }

    .calc-select {
        font-size: 12px;
        padding: 10px 12px;
    }

    .buy-btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    .table-row {
        padding: 7px 8px;
        font-size: 11px;
    }
}

/* ── Адаптив для планшетов в альбомной ориентации ── */
@media (min-width: 769px) and (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .family-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .price-tables {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Адаптив для больших экранов ── */
@media (min-width: 1400px) {
    .main {
        max-width: 1200px;
    }

    .pricing-title {
        font-size: 48px;
    }

    .section-title {
        font-size: 30px;
    }
}
