﻿/* --- 1. БАЗОВЫЕ НАСТРОЙКИ --- */
:root {
    --bg-dark: #0a192f;
    --bg-darker: #060f1d;
    --text-light: #e6f1ff;
    --accent-gold: #ffc107;
    --accent-orange: #fd7e14;
    --font-main: 'Montserrat', sans-serif;
    --sidebar-bg: rgba(10, 25, 47, 0.98); /* Сделали чуть темнее */
    --card-bg: rgba(255, 255, 255, 0.05);
    --sidebar-width: 320px;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 2. LAYOUT --- */
.main-content {
    margin-right: var(--sidebar-width);
    transition: margin-right 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- 3. HEADER & CONTROLS --- */
header {
    padding: 15px 0;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* Обертка для переключателя языка и кнопки меню */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-switcher select {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 10px;
    border-radius: 5px;
    font-family: var(--font-main);
    cursor: pointer;
    outline: none;
}

    .language-switcher select option {
        background: var(--bg-dark);
    }

/* Кнопка Меню (Гамбургер) - Скрыта на ПК */
.menu-btn {
    display: none; /* Скрываем по умолчанию */
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: space-between;
    width: 42px;
    height: 38px;
    z-index: 101;
}

    .menu-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--accent-gold);
        border-radius: 2px;
    }

/* --- 4. HERO & CONTENT --- */
.hero {
    text-align: center;
    padding: 40px 0;
    flex-grow: 1; /* Чтобы футер прибивался к низу */
}

.hero-banner {
    width: 100%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(to right, #ffffff, var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-orange));
    color: var(--bg-darker);
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.features {
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.02);
}

.feature-list {
    list-style: none;
    padding: 0;
    display: inline-block;
    text-align: left;
}

    .feature-list li {
        font-size: 1rem;
        margin-bottom: 10px;
    }

footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: auto;
}

.author-link {
    color: var(--accent-gold);
    text-decoration: none;
}

/* --- 5. SIDEBAR (NEWS) --- */
.news-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 900;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0,0,0,0.3);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
}

.close-sidebar-btn {
    display: none; /* Скрыт на ПК */
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1000;
}

.news-feed {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
}

.news-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.news-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
}

.news-title {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: var(--accent-gold);
}

.news-body {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.news-date {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 5px;
}

/* --- 6. MOBILE MENU (OVERLAY) --- */
.mobile-nav {
    display: none; /* ВАЖНО: Скрыто на ПК, чтобы не было "огрызков" */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #060f1d;
    z-index: 2000;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    /* Анимация */
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

    .mobile-nav.active {
        transform: translateX(0);
    }

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.mobile-nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.close-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

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

    .mobile-nav-list li {
        margin-bottom: 20px;
    }

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    display: block;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    transition: background 0.2s;
}

    .nav-link:active {
        background: rgba(255,255,255,0.1);
        color: var(--accent-gold);
    }


/* --- 7. АДАПТИВНОСТЬ (MEDIA QUERIES) --- */
@media (max-width: 992px) {
    /* 1. Включаем элементы мобильного интерфейса */
    .menu-btn {
        display: flex; /* Показываем гамбургер */
    }

    .mobile-nav {
        display: flex; /* Делаем меню видимым для скрипта (но оно скрыто за экраном через transform) */
    }

    .close-sidebar-btn {
        display: block; /* Крестик в новостях */
    }

    /* 2. Скрываем сайдбар новостей по умолчанию */
    .news-sidebar {
        display: none; /* Убираем с экрана */
        width: 100%; /* На всю ширину */
        z-index: 2500; /* Поверх всего */
        border-left: none;
    }

        /* Когда добавляем класс active через JS — показываем новости */
        .news-sidebar.active {
            display: flex;
        }

    /* 3. Убираем отступ контента */
    .main-content {
        margin-right: 0;
    }

    /* 4. Мелкие правки размеров */
    .hero-title {
        font-size: 1.8rem;
    }

    .header-logo {
        height: 35px;
    }

    .logo-text {
        display: none; /* Скрываем текст лого на узких экранах */
    }
}
