/* assets/css/layout.css - Глобальные стили каркаса сайта */
@import url('colors.css');

/* Подключение кастомных шрифтов */
@font-face {
    font-family: 'Library3am';
    src: url('../fonts/Library3am-5V3Z.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Текст покажется системным шрифтом, пока кастомный грузится */
}

@font-face {
    font-family: 'PoiretOne';
    src: url('../fonts/PoiretOne-aD0x.ttf') format('truetype'); /* Формат для .ttf файлов */
    font-weight: normal; 
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ridge5Bold';
    src: url('../fonts/SuperTouchdownOutline-Jp11n.ttf') format('opentype'); /* Формат для otf файлов */
    font-weight: normal; 
    font-style: normal;
    font-display: swap;
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-main); 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    overflow-x: hidden;
}

body::before { content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent-red); z-index: 1000; }

/* Фоновая инженерная сетка */
.grid-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(var(--grid-line-color) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
    background-size: 50px 50px; z-index: -1;
}

/* --- ЕДИНАЯ ШАПКА --- */
header {
    padding: 1rem 8%; display: flex; justify-content: space-between; align-items: center;
    background: var(--header-bg-trans); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--header-border-red); position: sticky; top: 0; z-index: 1000;
}
.logo-block { display: flex; align-items: center; gap: 10px; }
/*.logo-vzex { font-weight: 900; font-size: 2.0rem; letter-spacing: 3px; color: var(--accent-red); text-transform: uppercase; text-decoration: none; transition: color 0.2s ease; line-height: 1.2; }
*/
.logo-vzex { 
    font-family: 'Library3am', sans-serif; /* Применяем наш новый шрифт */
    font-weight: 900; 
    font-size: 2.0rem; 
    letter-spacing: 3px; 
    color: var(--accent-red); 
    text-transform: uppercase; 
    text-decoration: none; 
    transition: color 0.2s ease; 
    line-height: 1.2; 
}
.logo-vzex:hover { color: var(--text-white); }
/*.logo-divider { color: var(--logo-divider-color); font-size: 2.0rem; font-weight: 300; user-select: none; line-height: 1.2; }
*/
.logo-divider { 
    font-family: 'PoiretOne', sans-serif; /* Подключаем третий шрифт */
    color: var(--logo-divider-color); 
    font-size: 2.0rem; 
    font-weight: 300; 
    user-select: none; 
    line-height: 1.2; 
}
/*.logo-module { font-weight: 700; font-size: 2.0rem; letter-spacing: 3px; color: var(--text-white); text-transform: uppercase; text-decoration: none; transition: color 0.2s ease; line-height: 1.2; }
*/
.logo-module { 
    font-family: 'PoiretOne', sans-serif; /* Подключаем второй шрифт */
    font-weight: 700; 
    font-size: 2.0rem; 
    letter-spacing: 3px; 
    color: var(--text-white); 
    text-transform: uppercase; 
    text-decoration: none; 
    transition: color 0.2s ease; 
    line-height: 1.2; 
}
.logo-module:hover { color: var(--accent-red); }

.nav-container { display: flex; align-items: center; }
.header-nav { display: flex; align-items: center; }
.nav-link { color: var(--text-nav-link); text-decoration: none; margin-left: 1.5rem; transition: 0.3s; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; }
.nav-link:hover { color: var(--accent-red); }

/* Глобальная кнопка действия (Войти в ЛК, Выход и т.д.) */
.btn-action { display: inline-flex; align-items: center; justify-content: center; height: 38px; box-sizing: border-box; color: var(--accent-red); background: transparent; text-decoration: none; text-transform: uppercase; font-weight: 700; font-size: 1.2rem; border: 2px solid var(--accent-red); padding: 0 20px; transition: all 0.2s; cursor: pointer; margin-left: 1.5rem; }
.btn-action:hover { background: var(--accent-red); color: var(--text-white); }

/* Мобильное меню */
.menu-toggle { display: none; flex-direction: column; justify-content: space-between; width: 24px; height: 18px; background: transparent; border: none; cursor: pointer; padding: 0; margin-right: 20px; z-index: 1100; }
.menu-toggle span { width: 100%; height: 2px; background-color: var(--text-white); transition: all 0.3s ease; }
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- ПОДВАЛ (FOOTER) --- */
footer { background: var(--footer-bg-heavy); border-top: 1px solid var(--footer-border-color); padding: 4rem 8% 2rem; backdrop-filter: blur(10px); margin-top: auto;}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; max-width: 1200px; margin: 0 auto 3rem; }
.footer-col h3 { color: var(--text-white); font-size: 1.2rem; text-transform: uppercase; font-weight: 900; margin: 0 0 1.5rem 0; letter-spacing: 1px; }
.footer-links { display: flex; flex-direction: column; gap: 1rem; }
.footer-links a { color: var(--text-movie-desc); text-decoration: none; font-size: 0.95rem; transition: 0.2s; font-weight: 600; }
.footer-links a:hover { color: var(--accent-red); }
.contact-info { color: var(--text-movie-desc); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.6; }
.disclaimer { border-top: 1px solid var(--footer-border-color); padding-top: 2rem; font-size: 0.85rem; color: var(--disclaimer-text-color); text-align: center; max-width: 800px; margin: 0 auto; line-height: 1.5; }
.disclaimer a { color: var(--accent-red); text-decoration: none; font-weight: bold; transition: color 0.2s ease; }
.disclaimer a:hover { color: var(--text-white); }

/* =========================================================
   АДАПТИВНОСТЬ КАРКАСА
========================================================= */

/* 1. ПЛАНШЕТЫ И ПОЛОВИНА ЭКРАНА (До 1100px)
   Скрываем только навигацию в шторку. Размеры шапки, логотипа и кнопок НЕ МЕНЯЕМ! */
@media (max-width: 1100px) {
    .menu-toggle { display: flex; }

    /* Навигация уходит в шторку (выпадает из потока, освобождая место) */
    .header-nav { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--mobile-nav-bg-heavy); 
        border-bottom: 1px solid var(--header-border-red); 
        flex-direction: column; 
        padding: 15px 0; 
        box-sizing: border-box; 
        z-index: 1050; 
    }
    .header-nav.open { display: flex; }
    .header-nav .nav-link { 
        margin-left: 0; 
        padding: 15px 20px; 
        width: 100%; 
        text-align: center; 
        border-bottom: 1px solid var(--mobile-nav-border); 
    }
    .header-nav .nav-link.logout-mobile { display: block; color: var(--accent-red); }
}

/* 2. МОБИЛЬНЫЕ ТЕЛЕФОНЫ (До 768px)
   Уменьшаем физические размеры элементов (шрифты, отступы, высоту) */
@media (max-width: 768px) {
    /* Уменьшаем шапку и логотип */
    header { padding: 12px 15px; position: relative; }
    .logo-block { gap: 6px; }
    .logo-vzex, .logo-module, .logo-divider { font-size: 1.2rem; letter-spacing: 1px; }

    /* Уменьшаем кнопку входа */
    .btn-action { margin-left: 0; font-size: 0.85rem; padding: 0 15px; height: 34px; }
    .btn-action:hover { background: transparent; color: var(--accent-red); }
    .btn-action:active { background: var(--accent-red); color: var(--text-white); transform: scale(0.95); transition: transform 0.1s; }

    /* Перестраиваем подвал */
    footer { padding: 3rem 15px 2rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* =========================================================
   УПРОЩЕННЫЙ ПОДВАЛ (MINI FOOTER) - КОМПАКТНЫЙ
========================================================= */
.footer-simple { 
    background: var(--footer-bg-heavy); 
    border-top: 1px solid var(--footer-border-color); 
    padding: 1.2rem 8%; /* Максимально сжимаем внутренние отступы */
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    margin-top: auto; 
}

.footer-simple-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem; /* Расстояние между ссылками */
    margin-bottom: 1rem; /* Небольшой отступ до разделительной линии */
}

.footer-simple-links a {
    color: var(--text-movie-desc);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-simple-links a:hover {
    color: var(--accent-red);
}

.footer-simple-links .divider {
    color: var(--footer-border-color);
    font-size: 0.8rem;
    user-select: none;
}

/* Нижний блок: линия + копирайт + дисклеймер */
.footer-simple-bottom {
    border-top: 1px solid var(--footer-border-color); /* Та самая линия-разделитель */
    padding-top: 1rem; /* Отступ текста от линии */
    display: flex;
    align-items: flex-start; /* Выравниваем по верхнему краю текста */
    gap: 2rem; /* Отступ между левым копирайтом и правым текстом */
}

/* Копирайт слева */
.footer-simple .copyright {
    flex-shrink: 0; /* Запрещаем сжиматься блоку копирайта */
    font-size: 0.85rem;
    color: var(--text-main); /* Сделали ярким (цвет основного текста) */
    font-weight: 700;
    white-space: nowrap; /* Не даем переноситься на вторую строку */
}

/* Дисклеймер справа */
.footer-simple .disclaimer {
    border-top: none; /* Убираем стандартную линию из оригинального класса */
    padding-top: 0;
    margin: 0;
    text-align: left; /* Текст читается слева направо */
    font-size: 0.8rem;
    color: var(--disclaimer-text-color);
    line-height: 1.4;
    max-width: none; /* Снимаем ограничение ширины из старого стиля */
}

/* Адаптивность для мобильных телефонов (До 768px) */
@media (max-width: 768px) {
    .footer-simple { 
        padding: 1rem 15px; 
    }
    
    .footer-simple-bottom {
        flex-direction: column; /* На маленьком экране ставим друг под друга */
        gap: 0.8rem; 
    }

    .footer-simple .copyright {
        white-space: normal; /* Разрешаем перенос на мобилках при необходимости */
    }
}