/* ===== CSS-переменные для цветов, теней и отступов ===== */
:root {
    /* Цвета бренда */
    --gray-light: #aec0da;
    --bardo: #7C111B;
    --bardo-light: #CAB9AD;
    --beige: #CAB9AD;

    /* Цвета для тем */
    --orange: #FF8C00;
    --light-blue: #87CEEB;
    --red: #DC143C;
    --dark-yellow: #DAA520;

    /* Нейтральные цвета */
    --page-bg: #F8F9FA;
    --surface-bg: #FFFFFF;
    --border: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #111827;

    /* Семантические цвета */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Тени */
    --shadow-md: 0px 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0px 10px 24px rgba(0, 0, 0, 0.1);

    /* Отступы на основе 8-пиксельной сетки */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --spacing-xxl: 32px;
    --spacing-xxxl: 48px;
}

/* ===== Сброс стилей и базовые стили ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--gray);
}

/* ===== Типографика ===== */
h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 0.8;
}

h2 {
    font-size: 36px;
    font-weight: 700;
    line-height: 0.8;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 0.8;
}

h4 {
    font-size: 20px;
    font-weight: 600;
    line-height: 0.8;
}

/* ===== Контейнеры и секции ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
    color: #111827;
}

.commercial-main {
    background-color: var(--page-bg);
    min-height: 100vh;
    padding: var(--spacing-xl) 0;
}

.commercial-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* ===== Тарифы для организаторов ===== */
.tariffs-container {
    max-width: 1200px;
    margin: 0 auto;
}

.tariff-section-header {
    margin-bottom: var(--spacing-xxxl);
}

.tariff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Тарифные карточки ===== */
.tariff-card {
    background: var(--surface-bg);
    border-radius: 16px;
    padding: var(--spacing-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tariff-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Стили для кнопок в тарифных карточках */
.tariff-card .btn {
    margin-top: auto;
    display: block;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    align-self: flex-end;
}

.tariff-card {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.tariff-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.tariff-prices {
    margin-bottom: var(--spacing-lg);
}

.price-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border);
}

.price-option:last-child {
    border-bottom: none;
}

.price-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.price-value {
    font-size: 18px;
    font-weight: 600;
}

.tariff-features {
    margin-bottom: var(--spacing-xl);
}

.features-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
    line-height: 1.5;
}

.check-icon {
    color: var(--success);
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
    margin-top: 2px;
}

.tariff-custom {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.custom-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.custom-icon {
    color: var(--gray);
    margin-bottom: var(--spacing-lg);
}

/* ===== Персональные тарифы (баннеры) ===== */
.personal-tariff-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: var(--spacing-sm);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    border: 2px solid #667eea; /* Добавлена обводка */
}

.personal-tariff-banner:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(102, 126, 234, 0.4);
    z-index: 100;
}

.personal-tariff-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.personal-tariff-banner:hover::before {
    opacity: 1;
}

.personal-tariff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 2;
}

.personal-tariff-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.personal-tariff-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.personal-tariff-content {
    position: relative;
    z-index: 2;
}

.personal-tariff-description {
    font-size: 14px;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.personal-tariff-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
}

.feature-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.personal-tariff-footer {
    text-align: center;
    position: relative;
    z-index: 2;
}

.personal-tariff-price {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

/* ===== Кнопки ===== */
.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--bardo);
    color: white;
}

.btn-primary:hover {
    background: #6A0D15;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 17, 27, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--bardo);
    border: 2px solid var(--bardo);
}

.btn-secondary:hover {
    background: var(--bardo);
    color: white;
}

.btn-full {
    width: 100%;
}

/* ===== Модальные окна ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--surface-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-xl);
}

/* ===== Формы ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--surface-bg);
}

.form-input:focus {
    outline: none;
    border-color: var(--bardo);
    box-shadow: 0 0 0 3px rgba(124, 17, 27, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-container input {
    margin-right: var(--spacing-sm);
}

.forgot-password {
    color: var(--bardo);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #6A0D15;
    text-decoration: underline;
}

/* ===== Адаптивная верстка ===== */
@media (max-width: 768px) {
    .tariff-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .personal-tariff-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
}