/* main.css — общие стили для всего сайта в стиле «Фиолетовая корова» */
:root {
    --purple-dark: #4c1d95;
    --purple: #6d28d9;
    --purple-light: #8b5cf6;
    --orange: #f97316;
    --orange-light: #fb923c;
    --yellow: #facc15;
    --dark: #1e1b2e;
    --light: #f5f3ff;
    --white: #ffffff;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 32px;
    --border-radius-sm: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(145deg, #f0e9ff 0%, #e0d7ff 100%);
    color: var(--dark);
    line-height: 1.5;
    min-height: 100vh;
    padding: 20px;
}

.site-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 2px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Шапка */
.main-header {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple));
    color: white;
    padding: 40px 40px 20px;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    display: grid;
    gap: 1rem;
    align-items: center;
}

.main-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><path d="M30 5 L55 30 L30 55 L5 30 Z" fill="%23ffffff" fill-opacity="0.05"/></svg>');
    opacity: 0.2;
    pointer-events: none;
}
@media (min-width: 769px) {
    .main-header {
        grid-template-columns: 1fr auto; /* текст занимает доступное место, логотип — по своей ширине */
        grid-template-areas: 
            "title logo"
            "subtitle logo"
            "nav nav";
    }
    .header-title {
        grid-area: title;
    }
    .header-subtitle {
        grid-area: subtitle;
    }
    .header-logo {
        grid-area: logo;
        justify-self: end; /* прижать логотип к правому краю своей ячейки */
    }
    .page-nav {
        grid-area: nav;
    }
}
@media (max-width: 768px) {
    .main-header {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "logo"
            "title"
            "subtitle"
            "nav";
        text-align: center; /* опционально — центрируем текст */
    }
    .header-logo {
        grid-area: logo;
        justify-self: center; /* центрируем логотип */
    }
    .header-title {
        grid-area: title;
    }
    .header-subtitle {
        grid-area: subtitle;
    }
    .page-nav {
        grid-area: nav;
    }
}


.header-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    max-width: 1000px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

.header-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 800px;
    margin-bottom: 30px;
    border-left: 5px solid var(--orange);
    padding-left: 20px;
}

/* Логотип */
.header-logo img {
    max-width: 150px;  /* Подберите нужный размер */
    height: auto;
    display: block;
}
/* Навигация */
.page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    padding: 15px 20px;
    border-radius: 60px;
    border: 1px solid rgba(255,255,255,0.2);
}

.page-nav-item {
    padding: 8px 18px;
    border-radius: 40px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.page-nav-item:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.page-nav-item.active {
    background: var(--orange);
    color: var(--dark);
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.4);
    border-color: var(--orange);
}

/* Основной контент */
.main-content {
    padding: 50px 50px 30px;
    flex: 1;
}

.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--purple-dark);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 6px;
    background: var(--orange);
    border-radius: 10px;
}

/* Карточки */
.card {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(106, 13, 173, 0.1);
    border: 1px solid #ede9fe;
    transition: all 0.3s;
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(106, 13, 173, 0.2);
    border-color: var(--purple-light);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--purple);
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: 15px;
}

/* Сетки */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* Статистика */
.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    border-top: 5px solid var(--purple);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--purple-dark);
    margin: 10px 0;
}

.stat-label {
    color: #4b5563;
    font-size: 1rem;
}

/* Таблицы */
.table-comparison {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.table-comparison th {
    background: var(--purple);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.table-comparison td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

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

.table-comparison tr:hover {
    background: #faf5ff;
}

.highlight {
    background: #fef3c7 !important;
    font-weight: 700;
    color: var(--purple-dark);
}

/* Блок выделения */
.purple-block {
    background: linear-gradient(145deg, var(--purple-light), var(--purple));
    color: white;
    border-radius: var(--border-radius-sm);
    padding: 40px;
    margin: 30px 0;
}

.orange-block {
    background: linear-gradient(145deg, var(--orange-light), var(--orange));
    color: var(--dark);
    border-radius: var(--border-radius-sm);
    padding: 40px;
    margin: 30px 0;
}

/* Нижняя навигация */
.bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    padding: 30px 50px;
    background: var(--light);
    border-top: 2px solid rgba(106, 13, 173, 0.1);
}

.nav-link {
    background: var(--purple);
    color: white;
    padding: 14px 30px;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 8px 20px rgba(106, 13, 173, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: var(--orange);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(249, 115, 22, 0.3);
}

.nav-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.to-top {
    background: var(--dark);
}

/* Футер */
.main-footer {
    background: var(--purple-dark);
    color: #cbd5e0;
    text-align: center;
    padding: 30px;
    font-size: 0.9rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-title { font-size: 2rem; }
    .main-content { padding: 30px 20px; }
    .page-nav { border-radius: 30px; }
    .bottom-nav { flex-direction: column; gap: 15px; }
}