/*
Файл: static/css/pricing.css
Назначение: Стили для страницы тарифов
TASK-10-62: Приведение сайта в соответствие требованиям ЮKassa

Особенности:
- Карточки тарифных планов
- Таблица сравнения
- Визуальное выделение рекомендуемого тарифа
- Анимации при наведении
- Адаптивная вёрстка
*/

/* =============================================
   Основные стили страницы
   ============================================= */

.pricing-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* =============================================
   Заголовок
   ============================================= */

.pricing-header {
    text-align: center;
    margin-bottom: 60px;
}

.pricing-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-header p {
    font-size: 18px;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

/* =============================================
   Карточки тарифов
   ============================================= */

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Рекомендуемый тариф */
.pricing-card.featured {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(1.03);
}

.pricing-card.featured:hover {
    transform: scale(1.03) translateY(-8px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-card-header {
    text-align: center;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-card-header h3 {
    font-size: 24px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.pricing-card-header .price {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.pricing-card-header .price .currency {
    font-size: 24px;
    font-weight: 400;
    color: #94a3b8;
}

.pricing-card-header .price .period {
    font-size: 16px;
    font-weight: 400;
    color: #64748b;
}

.pricing-card-header .price-note {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

/* Список функций */
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 15px;
    color: #e2e8f0;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features .check {
    color: #22c55e;
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.3;
}

.pricing-features .cross {
    color: #64748b;
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.3;
}

.pricing-features .disabled {
    color: #64748b;
}

/* Кнопка выбора */
.pricing-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.pricing-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.pricing-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.pricing-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pricing-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* =============================================
   Таблица сравнения
   ============================================= */

.pricing-comparison {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 80px;
}

.pricing-comparison h2 {
    text-align: center;
    font-size: 28px;
    margin: 0 0 32px 0;
    font-weight: 600;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table th:first-child {
    text-align: left;
}

.comparison-table td:first-child {
    text-align: left;
    color: #e2e8f0;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table .feature-name {
    font-weight: 500;
}

.comparison-table .check-icon {
    color: #22c55e;
    font-size: 20px;
}

.comparison-table .cross-icon {
    color: #64748b;
    font-size: 20px;
}

.comparison-table .highlight-col {
    background: rgba(59, 130, 246, 0.1);
}

/* =============================================
   FAQ секция
   ============================================= */

.pricing-faq {
    max-width: 800px;
    margin: 0 auto;
}

.pricing-faq h2 {
    text-align: center;
    font-size: 28px;
    margin: 0 0 40px 0;
    font-weight: 600;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question .icon {
    font-size: 20px;
    color: #64748b;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px 20px;
    color: #94a3b8;
    font-size: 15px;
    line-height: 1.7;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   CTA секция
   ============================================= */

.pricing-cta {
    text-align: center;
    margin-top: 80px;
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-cta h2 {
    font-size: 32px;
    margin: 0 0 16px 0;
}

.pricing-cta p {
    color: #94a3b8;
    font-size: 18px;
    margin: 0 0 32px 0;
}

.pricing-cta .pricing-btn {
    display: inline-block;
    width: auto;
    min-width: 200px;
}

/* =============================================
   Адаптивная вёрстка
   ============================================= */

@media (max-width: 1024px) {
    .pricing-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .pricing-card.featured {
        transform: none;
    }

    .pricing-card.featured:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 768px) {
    .pricing-container {
        padding: 30px 16px 60px;
    }

    .pricing-header h1 {
        font-size: 32px;
    }

    .pricing-header p {
        font-size: 16px;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .pricing-comparison {
        padding: 24px 16px;
        overflow-x: auto;
    }

    .comparison-table {
        min-width: 500px;
    }

    .pricing-cta {
        padding: 40px 24px;
    }

    .pricing-cta h2 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .pricing-header h1 {
        font-size: 28px;
    }

    .pricing-card {
        padding: 24px;
    }

    .pricing-card-header .price {
        font-size: 40px;
    }

    .faq-question {
        padding: 16px 20px;
        font-size: 15px;
    }

    .faq-answer {
        padding: 0 20px 16px;
        font-size: 14px;
    }
}

/* =============================================
   Навигация на странице тарифов
   ============================================= */

.pricing-nav {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.pricing-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pricing-nav-logo {
    font-weight: 700;
    font-size: 20px;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-nav-logo:hover {
    color: #3b82f6;
}

.pricing-nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.pricing-nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.pricing-nav-links a:hover {
    color: #fff;
}

.pricing-nav-links .nav-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
}

.pricing-nav-links .nav-btn:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

@media (max-width: 640px) {
    .pricing-nav-inner {
        flex-direction: column;
        gap: 16px;
    }

    .pricing-nav-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* =============================================
   Print styles
   ============================================= */

@media print {
    .pricing-page {
        background: white;
        color: #000;
    }

    .pricing-nav {
        display: none;
    }

    .pricing-card {
        background: white;
        border: 1px solid #ccc;
        color: #000;
        page-break-inside: avoid;
    }

    .pricing-card-header h3,
    .pricing-card-header .price {
        color: #000;
    }

    .pricing-features li {
        color: #333;
    }

    .pricing-btn {
        display: none;
    }

    .site-footer {
        display: none;
    }
}
