/* 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: 8px;
    --border-radius-sm: 4px;
    --gradient-primary: linear-gradient(135deg, var(--purple-dark), var(--purple));
    --green: #10b981;
    --blue: #3b82f6;
}

* {
    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: visible; /* важно для sticky */
    display: flex;
    flex-direction: column;
}

/* Шапка */
.main-header {
    background: var(--gradient-primary);
    color: white;
    padding: 40px 40px 20px;
    position: relative;
    min-height: 320px;
    display: grid; /* только grid */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

    .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;
    }

/* Цитата миссии */
.mission-quote {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
}

/* Десктопная сетка шапки */
@media (min-width: 769px) {
    .main-header {
        grid-template-columns: 1fr auto;
        grid-template-areas: "title logo" "subtitle logo";
    }

    .header-title {
        grid-area: title;
    }

    .header-subtitle {
        grid-area: subtitle;
    }

    .header-logo {
        grid-area: logo;
        justify-self: end;
    }
}

/* Мобильная сетка шапки */
@media (max-width: 768px) {
    .main-header {
        grid-template-columns: 1fr;
        grid-template-areas: "logo" "title" "subtitle";
        text-align: center;
    }

    .header-logo {
        grid-area: logo;
        justify-self: center;
    }

    .header-title {
        grid-area: title;
    }

    .header-subtitle {
        grid-area: subtitle;
    }

    .mission-quote {
        font-size: 1.1rem;
    }
}

.header-title {
    font-size: 2.2rem;
    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.1rem;
    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 {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--gradient-primary);
    width: 100%;
    padding: 15px 40px;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.page-nav-item {
    padding: 8px 18px;
    border-radius: 30px;
    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: 1.8rem;
    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: 4px;
    }

/* Карточки */
.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.3rem;
    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: 1.8rem;
    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: 40px;
    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.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

/* Адаптивность для мобильных (меню и общие) */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.8rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 30px 20px;
    }

    .bottom-nav {
        flex-direction: column;
        gap: 15px;
    }
    /* Мобильное меню – вертикальное */
    .page-nav {
        padding: 12px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .page-nav-item {
        text-align: center;
        padding: 10px;
    }
}

.plain-link,
.plain-link:link,
.plain-link:visited,
.plain-link:hover,
.plain-link:active {
    color: inherit; /* наследует цвет родителя */
    text-decoration: none; /* убирает подчёркивание */
    cursor: pointer; /* оставляет курсор-указатель, чтобы пользователь понимал, что кликабельно */
}
/* Цвета для иконок в карточках "О группе" */
.card-icon-reliability {
    color: var(--purple); /* или другой оттенок, например #3b82f6 */
}

.card-icon-efficiency {
    color: #10b981; /* зелёный для энергоэффективности */
}

.card-icon-innovation {
    color: var(--orange); /* оранжевый для инноваций */
}
    .card-icon-reliability:hover,
    .card-icon-efficiency:hover,
    .card-icon-innovation:hover {
        filter: brightness(1.2);
        transform: scale(1.05);
        transition: all 0.2s;
    }

/* Карточки структуры группы */
.card-structure {
    transition: all 0.3s ease;
}

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

    .card-structure .card-icon {
        transition: all 0.2s ease;
    }

    .card-structure:hover .card-icon {
        transform: scale(1.1);
        filter: brightness(1.1);
    }

    /* Индивидуальные цвета для иконок при наведении */
    .card-structure:nth-child(1):hover .card-icon {
        color: #8b5cf6; /* фиолетовый */
    }

    .card-structure:nth-child(2):hover .card-icon {
        color: #f97316; /* оранжевый */
    }

/* Чтобы подсказка позиционировалась внутри карточки */
.card {
    position: relative;
}

.card-click-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.7rem;
    color: var(--orange);
    opacity: 0.6;
    font-weight: normal;
    transition: opacity 0.2s ease;
    pointer-events: none; /* чтобы текст не мешал клику по карточке */
}

.card:hover .card-click-hint {
    opacity: 1;
}

/* Мобильное меню (по умолчанию скрыто) */
@media (max-width: 768px) {
    .page-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--gradient-primary);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        margin: 0;
        border-radius: 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        z-index: 1000;
    }

        .page-nav.mobile-open {
            display: flex;
        }

    .page-nav-item {
        padding: 12px 20px;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        border-radius: 0;
    }

        .page-nav-item:last-child {
            border-bottom: none;
        }

    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: var(--gradient-primary);
        padding: 12px 20px;
        position: sticky;
        top: 0;
        z-index: 1001;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }

    .hamburger {
        background: none;
        border: none;
        font-size: 1.8rem;
        color: white;
        cursor: pointer;
        padding: 0;
        line-height: 1;
    }

    .current-page-title {
        font-weight: 600;
        font-size: 1rem;
        color: white;
        background: rgba(255,255,255,0.2);
        padding: 6px 12px;
        border-radius: 20px;
    }
}

@media (min-width: 769px) {
    .mobile-nav-header {
        display: none;
    }
}

/* Гамбургер-кнопка и мобильная шапка */
.mobile-header {
    display: none;
    background: var(--gradient-primary);
    color: white;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1001;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.hamburger {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

.current-page-title {
    font-size: 1rem;
    opacity: 0.9;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 999;
    display: none;
    backdrop-filter: blur(3px);
}


/* Мобильное меню (изначально скрыто) */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .page-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--gradient-primary);
        z-index: 1000;
        display: none;
        flex-direction: column;
        padding: 70px 20px 20px 20px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        border-radius: 0;
    }

        .page-nav.open {
            display: flex;
            transform: translateY(0);
        }

    .page-nav-item {
        text-align: center;
        padding: 12px 0;
        font-size: 1.2rem;
        border-radius: 0;
    }

    .overlay.active {
        display: block;
    }
}

/* Десктоп: меню остаётся липким как было */
@media (min-width: 769px) {
    .page-nav {
        position: sticky;
        top: 0;
        z-index: 1000;
        display: flex;
        flex-direction: row;
        background: var(--gradient-primary);
        padding: 15px 40px;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        margin-bottom: 0;
    }
}

/* Обёртка для меню, чтобы ограничить ширину и центрировать на десктопе */
@media (min-width: 769px) {
    .page-nav {
        max-width: 1400px; /* такая же, как у .site-container */
        margin: 0 auto; /* центрирование */
        left: 0;
        right: 0;
        width: auto;
    }
}