/* --- SHARED: SETTINGS & VARIABLES --- */
:root {
    --color-gold: #edd274;
    --color-gold-hover: #c0964b;
    --color-text-head: #000;
    --color-text-mute: #666;
    
    --font-main: 'PT-Root-UI', 'PT-Root-UI-Fallback', sans-serif;
    --font-head: 'Roboto Light', 'Roboto-Fallback', sans-serif;
    --font-cond: 'Roboto Condensed', 'Roboto-Condensed-Fallback', sans-serif;
    
    --container-width: 1360px;
    
    /* ГЕОМЕТРИЯ СТРАНИЦЫ */
    --menu-height: 44px; /* ИСПРАВЛЕНО: Уменьшена высота с 60px до 44px */
    --spacing-top: 40px; 
    --spacing-header-bottom: 60px; 
    
    /* ЕДИНЫЙ СТАНДАРТ ГРАНИЦ */
    --spacing-section-outer: 60px;
    --spacing-section-inner: 60px; 

    /* ОТСТУПЫ ВНУТРИ КАРТОЧЕК */
    --spacing-card: 15px;    
    --spacing-element: 15px; 
}

/* --- RESET & BASIC SETUP --- */
* { box-sizing: border-box; }
body { margin: 0; padding-top: var(--menu-height); background: #fff; font-family: var(--font-main); }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--color-gold-hover); }

/* RESET HEADINGS (SEO) */
h1, h2, h3, h4 { margin: 0; padding: 0; font-size: inherit; font-weight: inherit; font-family: var(--font-head); }

/* --- FONTS OPTIMIZATION (STRICT SWAP) --- */
@font-face {
  font-family: 'Roboto-Fallback';
  src: local('Arial');
  ascent-override: 92.8%;
  descent-override: 24.4%;
  line-gap-override: 0%;
  size-adjust: 100.6%;
}
@font-face {
  font-family: 'PT-Root-UI-Fallback';
  src: local('Arial');
  ascent-override: 96%;
  descent-override: 20%;
  size-adjust: 99.5%;
}
@font-face {
    font-family: 'Roboto';
    src: url('/css/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Roboto Condensed';
    src: url('/css/RobotoCondensed-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap; 
}
@font-face {
    font-family: 'Roboto Light';
    src: url('/css/Roboto-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap; 
}
@font-face {
    font-family: 'PT-Root-UI';
    src: url('/css/PT-Root-UI_Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap; 
}

/* COMMON TEXT STYLES - Глобальные настройки вне статьи */
p {
    font-size: clamp(16px, 1.1vw + 14px, 19px); 
    line-height: 1.6;
    color: #444444; /* Твой выбор цвета */
    font-weight: 400;
    max-width: 75ch;
    margin: 25px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* --- GLOBAL LAYOUT & UTILITIES --- */
.wrapper { width: 100%; overflow: hidden; } /* Prevent horizontal scroll */

.section { width: 100%; margin-bottom: var(--spacing-section-outer); clear: both; }
.section:last-of-type { margin-bottom: 0; }

.section-inner {
    max-width: var(--container-width); margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px;
}

.bg-cream { 
    background: #faf1d5; padding: var(--spacing-section-inner) 0; 
    margin-bottom: var(--spacing-section-outer); width: 100%; clear: both; 
}

.label-cat {
    font-family: var(--font-cond);
    display: inline-block; padding: 5px 10px; background: var(--color-gold); color: #fff !important;
    font-size: 14px; line-height: 1; align-self: flex-start; 
    margin-bottom: var(--spacing-element);
}
.label-cat:hover { background: #fff; color: var(--color-gold-hover) !important; outline: 1px solid var(--color-gold-hover); }

.preview-text {
    font-family: var(--font-head); font-size: 16px; line-height: 1.5; color: var(--color-text-mute);
    margin-top: var(--spacing-element); display: block;
}
.preview-text:hover { color: var(--color-text-head); }

/* --- HEADER MODULES --- */

/* 1. Navbar TG (Mobile Top Bar) */
.navbar-tg {
    font-family: var(--font-cond);
    position: fixed; top: 0; left: 0; width: 100%; height: 44px; z-index: 1001; /* ИСПРАВЛЕНО: Высота с 50px до 44px */
    transform: translateY(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform;
    background-color: #ffffff; border-bottom: 1px solid #f5f5f5; box-shadow: 0 0 30px rgba(0,0,0,0.15);
    display: flex; align-items: center; justify-content: space-between; /* ИСПРАВЛЕНО: space-between для размещения гамбургера слева */
    padding: 0 15px; /* ИСПРАВЛЕНО: Отступы с 20px до 15px */
    background-image: linear-gradient(135deg, rgba(173, 216, 230, 0.2), rgba(255, 182, 193, 0.2), rgba(221, 160, 221, 0.2), rgba(173, 216, 230, 0.2));
    background-size: 400% 400%; animation: gentle-background 10s ease-in-out infinite;
}
.navbar-tg.visible { transform: translateY(0); }
.navbar-tg-content { 
    display: flex; 
    align-items: center; 
    font-size: 14px; /* ИСПРАВЛЕНО: Уменьшен размер шрифта с 15px до 14px */
    color: #333; 
    line-height: 1; 
    flex: 1; /* ДОБАВЛЕНО: Занимает доступное пространство */
    justify-content: center; /* ДОБАВЛЕНО: Центрирование текста */
}
.navbar-tg-link { display: inline-flex; align-items: center; gap: 5px; color: #0088cc; font-weight: normal; } /* ИСПРАВЛЕНО: gap с 6px до 5px */
.navbar-tg-icon { width: 14px; height: 14px; fill: currentColor; display: block; } /* ИСПРАВЛЕНО: Размер с 16px до 14px */

/* ДОБАВЛЕНО: Стили для гамбургера в navbar-tg */
.navbar-tg .burger-btn {
    color: #333; /* Темнее для контраста с градиентным фоном */
}
.navbar-tg .burger-btn span {
    background-color: #333;
}

/* 2. Main Menu - БАЗОВЫЕ СТИЛИ (применяются ко всем) */
.menu-top {
    font-family: var(--font-cond);
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    z-index: 1000;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    transform: translateY(0); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    will-change: transform;
}
.menu-top.hidden { transform: translateY(-100%); }

/* ДЕСКТОПНЫЕ СТИЛИ МЕНЮ (только для экранов > 900px) */
@media (min-width: 901px) {
.menu-top {
    height: 60px;
    padding: 0 40px;
    
    /* Было: rgba(255,255,255, 0.85) — слишком глухо */
    background: rgba(255, 255, 255, 0.60);
    
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    
    /* Была граница 0.05 — почти невидима */
    border-bottom: 1px solid rgba(237, 210, 116, 0.25);
    
    /* Была тень 0.03 — почти невидима */
    box-shadow: 
        0 1px 0 rgba(255,255,255, 0.6) inset,  /* внутренний блик сверху */
        0 4px 30px rgba(0, 0, 0, 0.08);
}
    
    .menu-left { display: flex; align-items: center; gap: 25px; height: 100%; }
    .menu-link {
        font-size: 16px; color: #000; display: flex; align-items: center; height: 100%; position: relative; transition: color 0.2s;
    }
    .menu-link:hover { color: var(--color-gold-hover); }

    .menu-right { display: flex; align-items: center; }
    .search-form { display: flex; align-items: center; border: 1px solid #eee; padding: 4px 8px; border-radius: 4px; background: #fff; }
    .search-input { font-family: var(--font-cond); border: none; outline: none; font-size: 14px; width: 180px; color: #333; }
    .search-btn { background: none; border: none; cursor: pointer; color: #777; font-family: var(--font-cond); text-transform: uppercase; font-size: 13px; padding: 0 5px; }
    .search-btn:hover { color: var(--color-gold-hover); }
}

@keyframes gentle-background {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* 3. Header Wrapper (Logo & H1) */
.header-wrapper { width: 100%; margin-top: var(--spacing-top); margin-bottom: var(--spacing-header-bottom); }
.header-content { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; align-content: center; }
.logo-group { display: flex; flex-direction: column; justify-content: center; }
.logo { width: 232px; height: auto; display: block; }
.site-slogan-h1 {
    font-family: var(--font-cond); font-size: 13px; color: #888; margin-top: 6px; font-weight: 400; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.5px;
}

/* --- FOOTER MODULE --- */
.footer { width: 100%; background: #303030; color: #fff; padding: 40px 0; margin-top: 0; }
.footer-inner-fluid { width: 100%; padding: 0 40px; display: flex; justify-content: space-between; align-items: flex-start; }
.footer-left { width: 250px; display: flex; flex-direction: column; align-items: flex-start; }
.footer-logo {
    font-weight: 300; font-size: 20px; color: #fff; text-transform: uppercase; margin-bottom: 5px;
    display: inline-block; transform: scaleY(1.5); transform-origin: left bottom;
}
.footer-copy { font-size: 13px; color: #888; }
.footer-center { display: flex; gap: 60px; }
.footer-menu-col { display: flex; flex-direction: column; gap: 10px; }
.footer-menu-col a { font-family: var(--font-cond); font-size: 15px; color: #ccc; transition: color 0.2s; }
.footer-menu-col a:hover { color: var(--color-gold); }
.footer-title { font-family: var(--font-head); font-size: 16px; color: #fff; margin-bottom: 15px; opacity: 0.6; }
.footer-right { 
    width: 250px; 
    display: flex; 
    
    /* ТЕПЕРЬ: Колонка, чтобы текст был НАД иконками */
    flex-direction: column; 
    
    /* Выравнивание по правому краю (Desktop) */
    align-items: flex-start; 
    
    /* Отступ между заголовком и иконками */
    gap: 15px; 
}

/* Контейнер для иконок в ряд */
.social-row {
    display: flex;
    gap: 10px; /* Расстояние между кнопками */
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ (Внутри @media max-width: 900px) --- */
/* Убедись, что это правило находится ВНУТРИ media query для мобильных */

@media (max-width: 900px) {
    .footer-right {
        width: 100%;
        /* На мобильном центрируем всё */
        align-items: center; 
        justify-content: center;
        margin-bottom: 30px;
    }
}

/* --- СОЦСЕТИ В ФУТЕРЕ (Gold Glow / No Jump) --- */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    /* Фиксированная геометрия */
    width: 30px;
    height: 30px;
    
    /* БАЗА: Легкая стеклянная подложка (вместо рамки) */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px; /* Аккуратное скругление */
    
    /* Плавность для всего */
    transition: all 0.3s ease;
    
    /* Убираем любые границы и скачки */
    border: none;
    transform: translateZ(0); /* Аппаратное ускорение без сдвига */
}

/* Настройка SVG внутри */
.social-btn svg {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 8px; /* Чтобы картинка не вылезала за скругление */
    
    /* СТИЛЬ "MUTE": */
    /* В покое иконки черно-белые и слегка прозрачные.
       Это делает футер строгим и дорогим. */
    opacity: 0.6;
    filter: grayscale(100%);
    
    transition: all 0.3s ease;
}

/* HOVER ЭФФЕКТ (Свечение) */
.social-btn:hover {
    /* 1. Фон становится едва золотистым */
    background: rgba(237, 210, 116, 0.15); /* var(--color-gold) с прозрачностью */
    
    /* 2. Золотое свечение вокруг (вместо рамки) */
    box-shadow: 0 0 20px rgba(237, 210, 116, 0.25);
    
    /* 3. Никаких scale! */
    transform: none; 
}

.social-btn:hover svg {
    /* При наведении включаем "лампочку": 
       Убираем ч/б фильтр (возвращаем бренд-цвета) и делаем ярким */
    opacity: 1;
    filter: grayscale(0%);
}

/* --- COOKIE BAR --- */
.cookie-bar {
    position: relative; width: 100%; background: #252525; color: #ccc; 
    padding: 20px 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; 
    font-size: 13px; line-height: 1.5; font-family: var(--font-main); z-index: 10;
}
.cookie-text-block { flex-grow: 1; max-width: 1200px; }
.cookie-text-block a { color: var(--color-gold); text-decoration: underline; }
.cookie-close {
    background: none; border: 1px solid #666; color: #fff; font-size: 24px; line-height: 1; 
    width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: flex; 
    align-items: center; justify-content: center; flex-shrink: 0; padding-bottom: 2px; transition: all 0.2s;
}
.cookie-close:hover { border-color: var(--color-gold); color: var(--color-gold); }

/* --- SHARED MEDIA QUERIES (SCAFFOLDING) --- */

/* Desktop Logic - ДОПОЛНИТЕЛЬНЫЕ ПРАВИЛА */
@media (min-width: 901px) {
    .navbar-tg { display: none !important; }
    .menu-top { top: 0 !important; transform: translateY(0) !important; } /* Принудительно показываем меню */
    .menu-top.hidden { transform: translateY(0) !important; } /* На десктопе меню всегда видимо */
    .burger-btn { display: none; } /* Скрываем гамбургер на десктопе */
}

/* Mobile Logic */
@media (max-width: 900px) {
    :root { 
        --spacing-top: 20px; 
        --spacing-header-bottom: 30px; 
        --spacing-section-outer: 40px; 
        --spacing-section-inner: 40px; 
    }
    
    /* Menu Mobile */
    .menu-top { 
        padding: 0 15px; /* ИСПРАВЛЕНО: Уменьшены отступы с 20px до 15px */
        height: 44px; /* ИСПРАВЛЕНО: Уменьшена высота с 50px до 44px для компактности */
        background: rgba(255, 255, 255, 0.95); 
        position: fixed; /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Изменено с relative на fixed */
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        display: flex; 
        align-items: center; /* Вертикальное центрирование гамбургера */
    }
    
    .burger-btn {
        display: block; 
        background: none; 
        border: none; 
        width: 24px; /* ИСПРАВЛЕНО: Уменьшен размер с 30px до 24px */
        height: 24px; /* ИСПРАВЛЕНО: Уменьшен размер с 30px до 24px */
        position: relative; 
        cursor: pointer; 
        color: #000; 
        z-index: 1002; 
        padding: 0;
        flex-shrink: 0; /* Предотвращаем сжатие кнопки */
    }
    .burger-btn span { display: block; width: 100%; height: 2px; background-color: currentColor; margin-bottom: 5px; transition: 0.3s; } /* ИСПРАВЛЕНО: margin-bottom с 6px до 5px */
    .burger-btn span:last-child { margin-bottom: 0; }
    .burger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); } /* ИСПРАВЛЕНО: Адаптировано под новый размер */
    .burger-btn.active span:nth-child(2) { opacity: 0; }
    .burger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); } /* ИСПРАВЛЕНО: Адаптировано под новый размер */

    .menu-left {
        position: fixed; 
        top: 44px; /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Начинается под navbar (44px высота) */
        left: 0; 
        width: 100%; 
        height: calc(100vh - 44px); /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Высота минус navbar */
        background: rgba(255, 255, 255, 0.98); 
        backdrop-filter: blur(20px); 
        -webkit-backdrop-filter: blur(20px);
        display: flex; /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Добавлен display: flex */
        flex-direction: column; 
        align-items: flex-start; 
        padding: 20px; /* ИСПРАВЛЕНО: Убран избыточный верхний отступ, так как меню под navbar */
        transform: translateX(-100%); 
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto; 
        border-top: 1px solid rgba(0,0,0,0.05); /* ДОБАВЛЕНО: Граница для визуального разделения */
        box-sizing: border-box; /* ДОБАВЛЕНО: Для корректного расчета padding */
    }
    .menu-left.active { transform: translateX(0); }
    .menu-link { font-size: 20px; width: 100%; padding: 15px 0; border-bottom: 1px solid #f5f5f5; height: auto; }
    .menu-right { display: none; }
    .mobile-search-wrapper { display: block; width: 100%; margin-bottom: 20px; }

    /* Header Mobile */
    .header-content { flex-direction: column; align-items: center; }
    .logo { float: none; margin-bottom: 10px; margin: 0 auto; }
    .logo-group { align-items: center; text-align: center; } /* ИСПРАВЛЕНО: alignItems -> align-items */
    .site-slogan-h1 { font-size: 11px; margin-bottom: 5px; max-width: 280px; }
    
    /* Footer & Layout Mobile */
    .section-inner { flex-direction: column; }
    .footer-inner-fluid { flex-direction: column; align-items: center; text-align: center; padding: 0 20px; }
    
    /* ИСПРАВЛЕНИЕ: Центрирование логотипа и копирайта */
    .footer-left { 
        width: 100%; 
        justify-content: center; 
        align-items: center; /* Центрируем содержимое */
        margin-bottom: 30px; 
    }
    
    /* ИСПРАВЛЕНИЕ: Центрирование социальных сетей */
    .footer-right { 
        width: 100%; 
        justify-content: center; /* Центрируем иконки */
        margin-bottom: 30px; 
    }
    
    .footer-logo { transform-origin: center bottom; }
    
    /* ИСПРАВЛЕНИЕ: Центрирование меню */
    .footer-center { 
        width: 100%; 
        justify-content: center; /* Было space-between, стало center */
        flex-wrap: wrap; /* Разрешаем перенос на новую строку */
        margin-bottom: 30px; 
        order: -1; 
        gap: 20px; /* Увеличили gap для читаемости */
    }
    
    /* ИСПРАВЛЕНИЕ: Колонки меню центрируем */
    .footer-menu-col {
        align-items: center; /* Центрируем ссылки внутри колонки */
    }
    
    /* Cookie Mobile */
    .cookie-bar { flex-direction: column; text-align: center; padding: 20px; }
    .cookie-close { margin-top: 15px; }
}