/* Импорт шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Montserrat:wght@300;400;500&display=swap');

/* Переменные */
:root {
    /* Основная палитра */
    --primary-color: #2C3E50;      /* Глубокий синий */
    --secondary-color: #3498DB;    /* Яркий синий */
    --accent-color: #E74C3C;       /* Красный акцент */
    --accent-light: #ECF0F1;       /* Светло-серый */
    
    /* Нейтральные цвета */
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --background-light: #F9FAFB;
    --background-dark: #2C3E50;
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #2C3E50, #3498DB);
    --gradient-dark: linear-gradient(135deg, #2C3E50, #34495E);
    --gradient-light: linear-gradient(135deg, #ECF0F1, #F9FAFB);
    --gradient-gold: linear-gradient(135deg, #D4AF37, #B87333);
    
    /* Эффекты */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
    --shadow-md: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    
    /* Скругления */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 30px;
    
    /* Анимации */
    --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--background-light);
}

/* Типография */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    line-height: 1.3;
    color: var(--primary-color);
}

h1 { 
    font-size: 3.5em; 
    margin-bottom: 30px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 { 
    font-size: 2.5em; 
    margin-bottom: 25px;
}

h3 { 
    font-size: 2em; 
    margin-bottom: 20px;
}

p {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.7;
}

/* Хедер */
header {
    background: var(--gradient-dark);
    padding: 12px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition-fast);
}

/* Скрываем хедер на главной странице */
body.home header {
    display: none;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--bg-light);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.licence-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9em;
    margin-right: 20px;
    transition: color 0.3s ease;
}

.licence-link:hover {
    color: var(--text-dark);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-wrapper {
    flex: 1;
    text-align: center;
}

/* Стили для логотипа на всех страницах */
.top-nav .logo-wrapper .logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.burger-menu {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.top-nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

.top-nav a {
    color: var(--background-light);
    text-decoration: none;
    font-size: 1.1em;
    transition: var(--transition-fast);
    position: relative;
    padding: 5px 0;
}

.top-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.top-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Основной контент */
.page-wrapper {
    position: relative;
    z-index: 1;
    margin-top: 100px; /* Только отступ под хедер */
    padding: 0 30px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Боковое меню */
.sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 100px);
    overflow: hidden;
    padding: 20px;
    background: white;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.section-nav {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    padding-right: 10px;
}

.section-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-nav li {
    margin-bottom: 10px;
}

.section-nav a {
    display: block;
    padding: 12px 15px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    white-space: normal;
    line-height: 1.4;
}

.section-nav a:hover {
    background: var(--gradient-light);
    color: var(--primary-color);
    transform: none;
}

.section-nav a.active {
    background: var(--gradient-primary);
    color: white;
}

/* Карточки контента */
.content-article {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-medium);
}

.content-article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Кнопки и интерактивные элементы */
.button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-gold);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Мобильное меню */
.menu-toggle {
    display: none; /* По умолчанию скрыта */
}

/* Медиа запросы */
@media (max-width: 1024px) {
    .page-wrapper {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 999;
        background: white;
        transition: var(--transition-fast);
    }

    .sidebar.active {
        left: 0;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.8em; }

    .content-article {
        padding: 20px;
    }

    .top-nav {
        padding: 10px 20px;
        display: flex;
        justify-content: center;
        position: relative;
    }

    .logo-wrapper {
        flex: 1;
        text-align: center;
    }

    .logo {
        font-size: 24px;
    }

    .burger-menu {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .sidebar {
        position: fixed;
        top: 90px;
        left: -100%;
        height: calc(100vh - 90px);
        width: 80%;
        max-width: 300px;
        padding: 20px;
        z-index: 9998;
        border-right: none;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .section-nav {
        max-height: none;
        height: auto;
        overflow: visible;
        padding-right: 0;
    }
    
    .section-nav ul li {
        margin-bottom: 15px;
    }
    
    .section-nav a {
        padding: 12px 15px;
        border-radius: var(--radius-md);
    }
    
    .top-nav ul {
        display: none;
    }

    .sections-grid {
        padding: 40px 0 30px;
    }

    .grid-container {
        margin-bottom: 30px;
    }

    .section-card {
        width: 100%;
    }

    .section-nav {
        padding: 20px 0;
    }

    .section-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .section-nav li {
        margin-bottom: 15px;
    }

    .section-nav a {
        color: var(--text-dark);
        text-decoration: none;
        font-size: 18px;
        display: block;
        padding: 10px 0;
    }

    .section-nav a.active {
        color: var(--primary-color);
        font-weight: 500;
    }

    .page-wrapper {
        grid-template-columns: 1fr;
        padding: 0 15px;
        margin-top: 100px;
        margin-bottom: 0;
    }

    header {
        padding: 15px 0;
    }

    .logo {
        margin: 0 auto;
        font-size: 1.5em;
    }

    .top-nav {
        justify-content: center;
    }

    /* Скрытие хедера при прокрутке вниз */
    header.hidden {
        transform: translateY(-100%);
    }

    /* Стили для мобильного хедера */
    .top-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    /* Кнопка выбора страницы */
    .page-select {
        background: none;
        border: none;
        color: white;
        font-size: 1.2em;
        padding: 8px 12px;
        border-radius: var(--radius-md);
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .page-select::after {
        content: '▼';
        font-size: 0.8em;
    }

    /* Остальные стили для мобильных устройств */
    .site-footer {
        padding: 0;
        margin-top: 30px;
    }

    .footer-bottom {
        padding: 15px 20px;
    }

    .footer-bottom p {
        font-size: 0.8em;
    }

    .main-content {
        margin-bottom: 0;
    }

    /* Принудительно обнуляем все нижние отступы */
    .main-content,
    .page-wrapper,
    body,
    .content-article,
    .sections-grid,
    section {
        padding-bottom: 0 !important;
    }

    /* Убираем фиксированную высоту у контейнеров */
    .sidebar,
    .section-nav {
        height: auto;
    }

    /* Бургер */
    .burger-menu {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 20px;
        cursor: pointer;
        z-index: 9999;
    }

    .burger-menu span {
        display: block;
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: white;
        transition: all 0.3s ease;
        left: 0;
    }

    .burger-menu span:nth-child(1) { top: 0; }
    .burger-menu span:nth-child(2) { top: 9px; }
    .burger-menu span:nth-child(3) { top: 18px; }

    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 9px;
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg);
        top: 9px;
    }

    /* Мобильное меню */
    .sidebar {
        display: block !important;
        position: fixed;
        top: 90px;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 90px);
        background: white;
        z-index: 9998;
        padding: 20px;
        transition: all 0.3s ease;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.active {
        left: 0;
    }

    /* Затемнение фона при открытом меню */
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 9997;
    }

    body.menu-open::after {
        opacity: 1;
        visibility: visible;
    }

    /* Скрываем десктопное меню */
    .top-nav ul {
        display: none;
    }

    /* Стили для страницы differences.html */
    .comparison-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .comparison-card {
        width: 100%;
        margin: 0;
    }

    .aspects-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .aspect-card {
        width: 100%;
        margin: 0;
    }

    .aspect-comparison {
        flex-direction: column;
        gap: 15px;
    }

    .immature-aspect,
    .mature-aspect {
        width: 100%;
        padding: 15px;
    }

    .development-timeline {
        flex-direction: column;
        padding: 20px 0;
    }

    .timeline-item {
        width: 100%;
        margin: 10px 0;
    }

    /* Общие стили для контента */
    .content-article {
        padding: 15px;
        overflow-x: hidden;
    }

    .article-content {
        width: 100%;
        overflow-x: hidden;
    }

    /* Исправление масштабирования изображений */
    .article-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        margin: 20px 0;
        display: block;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }

    /* Медиа-запрос для мобильных */
    .top-nav .logo-wrapper .logo {
        font-size: 24px;
    }

    .licence-link {
        margin-right: 15px;
        font-size: 0.8em;
    }

    /* Стили для скроллинга в мобильном меню */
    .sidebar .section-nav {
        max-height: none;
        height: auto;
        overflow: visible;
        padding-right: 0;
    }
}

/* Иконки меню */
.menu-icon {
    width: 24px;
    height: 2px;
    background: white;
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
    left: 0;
}

.menu-icon::before { top: -8px; }
.menu-icon::after { bottom: -8px; }

/* Улучшенные карточки */
.type-card, 
.feature-card, 
.aspect-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.type-card::before,
.feature-card::before,
.aspect-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.type-card:hover,
.feature-card:hover,
.aspect-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Сетки */
.type-grid,
.features-grid,
.aspects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* Таймлайн */
.development-timeline {
    position: relative;
    padding: 40px 0;
}

.timeline-item {
    position: relative;
    padding: 30px;
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    transform: translateY(-50%);
}

/* Улучшенные секции */
.intro-block {
    background: var(--gradient-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.intro-block::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 150px;
    height: 150px;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: 50%;
}

.lead-text {
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: 500;
    line-height: 1.6;
}

/* Навигация по статьям */
.navigation-links {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.prev-article,
.next-article {
    color: var(--primary-color);
    text-decoration: none;
    padding: 15px 25px;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    background: white;
    box-shadow: var(--shadow-sm);
}

.prev-article:hover,
.next-article:hover {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-gold);
}

/* Футер */
.site-footer {
    background: linear-gradient(to right, #1a2632, #2C3E50); /* Базовый градиент */
    padding: 20px 0;
    margin-top: 40px;
    position: relative;
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    margin: 0;
    line-height: 1.4;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: white;
}

.licence-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.licence-link:hover {
    color: white;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }
}

/* Медиа запросы для футера */
@media (max-width: 768px) {
    .site-footer {
        background: linear-gradient(to right, #243447, #34495E); /* Более яркий градиент для мобильных */
        padding: 0;
        margin-top: 30px;
    }

    .footer-bottom {
        padding: 25px 20px; /* Увеличиваем вертикальный паддинг */
    }

    .footer-bottom p {
        font-size: 0.8em;
    }
}

/* Убираем лишние стили футера */
.footer-content,
.footer-section {
    display: none;
}

/* Предупреждения и заметки */
.warning {
    border-left: 4px solid var(--accent-color);
    padding: 20px;
    background: rgba(128, 0, 32, 0.05);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 20px 0;
}

/* Улучшаем заголовки без изображений */
.article-header {
    padding: 40px;
    background: var(--gradient-light);
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.article-header::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 200px;
    height: 200px;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: 50%;
}

.article-header h1 {
    margin-bottom: 0;
}

/* Увеличиваем отступы для контента */
.article-content {
    padding: 0 40px;
}

/* Базовые анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для анимаций */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Задержки для разных элементов */
.hero-content h1 {
    animation-delay: 0.1s;
}

.hero-content .lead-text {
    animation-delay: 0.3s;
}

.hero-buttons .button:nth-child(1) {
    animation-delay: 0.5s;
}

.hero-buttons .button:nth-child(2) {
    animation-delay: 0.7s;
}

.section-card {
    animation-delay: 0.2s;
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .fade-in {
        animation-duration: 0.5s; /* Ускоряем анимации */
    }

    /* Уменьшаем задержки */
    .hero-content h1 {
        animation-delay: 0.1s;
    }

    .hero-content .lead-text {
        animation-delay: 0.2s;
    }

    .hero-buttons .button:nth-child(1) {
        animation-delay: 0.3s;
    }

    .hero-buttons .button:nth-child(2) {
        animation-delay: 0.4s;
    }

    .section-card {
        animation-delay: 0.1s;
    }
}

/* Добавляем стили для разделов на главной странице */
.sections-grid {
    padding: 80px 0;
    background: var(--background-light);
    text-align: center;
}

.section-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-subtitle {
    font-size: 1.2em;
    color: var(--text-light);
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 40px;
}

/* Карточки */
.section-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 360px;
    position: relative;
    padding-bottom: 100px;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.section-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.section-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Кнопка */
.card-button {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 40px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 160px;
}

.card-button:hover {
    transform: translateX(-50%) scale(1.05); /* Легкое увеличение на 5% */
    filter: brightness(1.1); /* Чуть ярче */
}

/* Мобильная версия */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px;
        margin: 40px auto;
    }

    .section-card {
        padding: 30px;
        padding-bottom: 90px;
        min-height: 320px;
    }
}

/* Кнопки категорий */
.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0;
}

.category-button {
    padding: 10px 20px;
    background: var(--accent-light);
    color: var(--text-dark);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-button:hover,
.category-button.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Стили для главной страницы */
.main-page {
    max-width: 1400px;
    margin: 100px auto 0;
    padding: 0 30px;
}

/* Главный заголовок */
.main-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 60px 20px;
    background: var(--gradient-light);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.main-header::after {
    content: '';
    position: absolute;
    right: -100px;
    bottom: -100px;
    width: 300px;
    height: 300px;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: 50%;
}

.main-header h1 {
    font-size: 4em;
    margin-bottom: 20px;
}

.main-header p {
    font-size: 1.4em;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* Секции на главной */
.main-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px 0;
}

.main-section-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-medium);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.main-section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.main-section-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.section-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.section-description {
    font-size: 1.1em;
    color: var(--text-light);
    margin-bottom: 25px;
    flex-grow: 1;
}

.section-link {
    display: inline-block;
    padding: 12px 25px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    text-align: center;
    font-weight: 500;
}

.section-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

/* Категории */
.categories {
    margin: 60px 0;
}

.categories-title {
    text-align: center;
    margin-bottom: 40px;
}

.category-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.category-button {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 500;
}

/* Медиа запросы для главной */
@media (max-width: 1200px) {
    .main-sections {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-sections {
        grid-template-columns: 1fr;
    }

    .main-header h1 {
        font-size: 3em;
    }

    .main-header p {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 40px 20px;
    }

    .main-section-card {
        padding: 30px;
    }

    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* Стили для главной страницы */
.hero-section {
    background: var(--gradient-primary);
    padding: 120px 0 80px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500); /* Золотой градиент */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.hero-content .lead-text {
    font-size: 1.4em;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.hero-buttons .button {
    min-width: 200px;
    text-align: center;
}

.button {
    padding: 15px 35px;
    border-radius: var(--radius-md);
    font-size: 1.1em;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

.button.primary {
    background: white;
    color: var(--primary-color);
}

.button.secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.sections-grid {
    padding: 80px 0;
    background: var(--background-light);
}

.grid-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    gap: 20px;
}

.section-card {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    min-width: 200px;
}

.section-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.card-icon {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.card-button {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 40px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 160px;
}

.card-button:hover {
    transform: translateX(-50%) scale(1.05); /* Легкое увеличение на 5% */
    filter: brightness(1.1); /* Чуть ярче */
}

@media (max-width: 768px) {
    /* Оптимизация главного экрана для мобильных */
    .hero-section {
        padding: 60px 0 80px;
        background: var(--gradient-primary);
    }

    .hero-content h1 {
        font-size: 2.8em;
        line-height: 1.2;
        margin-bottom: 25px;
        background: linear-gradient(135deg, #FFD700, #FFA500);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .hero-content .lead-text {
        font-size: 1.2em;
        line-height: 1.5;
        margin-bottom: 35px;
        padding: 0 15px;
    }

    .hero-buttons {
        display: flex;
        justify-content: center;
        margin-bottom: 40px;
        padding: 0 15px;
    }

    .hero-buttons .button {
        width: auto;
        min-width: 200px;
        text-align: center;
        padding: 12px 15px;
        font-size: 1em;
    }

    .grid-container {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }

    .section-card {
        width: 100%;
    }
}

.section-nav {
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

/* Стили для скроллбара в WebKit браузерах */
.section-nav::-webkit-scrollbar {
    width: 6px;
}

.section-nav::-webkit-scrollbar-track {
    background: transparent;
}

.section-nav::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Плавная прокрутка */
.section-nav {
    scroll-behavior: smooth;
}

/* Мобильная навигация */
.mobile-nav {
    display: none;
}

/* Медиа-запросы для мобильного меню */
@media screen and (max-width: 768px), (max-height: 600px) {
    .mobile-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .mobile-nav-container {
        display: flex;
        justify-content: space-around;
        padding: 10px;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-dark);
        font-size: 0.8em;
        padding: 5px;
    }

    .mobile-nav-icon {
        font-size: 1.5em;
        margin-bottom: 5px;
    }

    .mobile-nav-item.active {
        color: var(--primary-color);
    }

    /* Отступ для контента */
    body {
        padding-bottom: 80px;
    }

    /* Скрываем стандартное меню */
    .menu-toggle,
    .sidebar {
        display: none !important;
    }
}

/* Явно скрываем мобильное меню на больших экранах */
@media screen and (min-width: 769px) and (min-height: 601px) {
    .mobile-nav {
        display: none !important;
    }
}

/* Фикс для iOS */
@supports (-webkit-touch-callout: none) {
    .mobile-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Добавим общий стиль для мобильных устройств */
@media (max-width: 768px) {
    html, 
    body {
        height: auto;
        min-height: 100%;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Убираем все паддинги для главной страницы на мобильных */
    body.home {
        padding-bottom: 0 !important;
    }

    /* Оптимизация главного экрана для мобильных */
    .hero-section {
        padding: 60px 0 80px;
        background: var(--gradient-primary);
    }
}

/* Стили для кнопок на главной странице */
.hero-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

@media (max-width: 768px) {
    /* Адаптация только для вертикального режима на мобильных */
    @media (orientation: portrait) {
        .hero-buttons {
            display: flex;
            justify-content: center;
            margin-bottom: 40px;
            padding: 0 15px;
        }
    }

    .hero-buttons .button {
        width: auto;
        min-width: 200px;
        text-align: center;
        padding: 12px 15px;
        font-size: 1em;
    }

    /* Отступы для секций на главной */
    .sections-grid {
        padding: 40px 0 30px;
    }

    .grid-container {
        margin-bottom: 30px;
    }
}

/* Убираем кнопку закрытия меню */
.menu-close {
    display: none; /* Скрываем кнопку */
}

/* Или можно полностью удалить этот блок стилей, если он есть:
.menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    ...
}
*/

/* Мобильное меню */
@media (max-width: 768px) {
    .top-nav {
        position: relative;
        padding: 15px 20px;
    }

    .mobilem {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 40px;
        cursor: pointer;
        z-index: 1001;
    }

    .mobilem ._line {
        position: absolute;
        width: 100%;
        height: 2px;
        background: white;
        transition: .3s;
    }

    .mobilem ._line.__1 { top: 30%; }
    .mobilem ._line.__2 { top: 50%; }
    .mobilem ._line.__3 { top: 70%; }

    .mobilem.open ._line.__1 {
        top: 50%;
        transform: rotate(45deg);
    }

    .mobilem.open ._line.__2 {
        opacity: 0;
    }

    .mobilem.open ._line.__3 {
        top: 50%;
        transform: rotate(-45deg);
    }

    /* Мобильное меню */
    .sidebar {
        position: fixed;
        display: block !important;
        top: 90px;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 90px);
        background: white;
        z-index: 9998;
        padding: 20px;
        transition: all 0.3s ease;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* Адаптируем внутренние элементы */
    .sidebar .section-nav {
        max-height: none;
        height: auto;
        overflow: visible;
        padding-right: 0;
        padding: 0;
    }
    
    .sidebar .section-nav ul li {
        margin-bottom: 15px;
    }
    
    .sidebar .section-nav ul li a {
        padding: 12px 15px;
        display: block;
        font-size: 1.1em;
        border-radius: var(--radius-md);
    }
    
    .sidebar .section-nav a:hover {
        background: var(--gradient-light);
        color: var(--primary-color);
    }
    
    .sidebar .section-nav a.active {
        background: var(--gradient-primary);
        color: white;
    }
}

/* Добавим стили для карточек */
.type-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin: 0 0 15px 0;
    transition: all 0.3s ease;
}

.type-card h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.type-card .full-description {
    display: none;
    margin-top: 10px;
    line-height: 1.6;
}

.type-card.expanded {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.type-card.expanded img {
    height: 250px;
}

.type-card.expanded .full-description {
    display: block;
}

.type-card.expanded .short-description {
    display: none;
}

@media (max-width: 768px) {
    .type-card img {
        height: 180px;
    }
    
    .type-card.expanded img {
        height: 220px;
    }
}

/* Общие стили для остальных изображений в контенте */
.content-article img:not(.type-card img),
.article-content img:not(.type-card img),
.article-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    display: block;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Специальные стили для изображений в карточках */
.type-card img,
.feature-card img,
.aspect-card img {
    height: 150px;
    object-fit: cover;
    margin-bottom: 15px;
}

.type-card.expanded img {
    height: 187.5px;
}

@media (max-width: 768px) {
    .content-article img,
    .article-content img,
    .article-image,
    .type-card img,
    .feature-card img,
    .aspect-card img {
        margin: 15px 0;
    }

    .type-card img,
    .feature-card img,
    .aspect-card img {
        height: 135px;
    }
    
    .type-card.expanded img {
        height: 165px;
    }
} 