/*
Theme Name: Голос Гор - Custom Heights Edition
Description: Хедер 220px, правая колонка 340px, единая сетка.
Version: 24.4
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Inter:wght@400;500;700&display=swap');

:root {
    --accent-gold: #e6b333;
    --deep-blue: #001a33;
    --text-dark: #1a1a1a;
    --glass: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.2);
}

body { font-family: 'Inter', sans-serif; background: #f4f7f9; margin: 0; color: var(--text-dark); }
.container { max-width: 1400px; margin: 0 auto; padding: 0 25px; box-sizing: border-box; }

/* --- ВЕРХНЯЯ ПАНЕЛЬ --- */
.site-header-modern {
    position: relative;
    height: 220px;
    background: #000;
    display: block;
    overflow: visible;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 1000;
}

.header-visual-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(to bottom, rgba(0,26,51,0.4) 0%, rgba(0,26,51,0.9) 100%),
        url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center 25%;
    z-index: 1;
}

.header-content-flex {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    padding-top: 15px;
}

/* ЛЕВАЯ ЧАСТЬ */
.branding-left { display: flex; align-items: center; padding-top: 35px; }
.logo-link { text-decoration: none; display: flex; align-items: center; gap: 20px; }
.site-logo-img { height: 100px; width: auto; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.logo-text-group { display: flex; flex-direction: column; }
.logo-row { display: flex; gap: 10px; line-height: 1; }
.word-main { font-family: 'Montserrat', sans-serif; font-size: 48px; color: #fff; font-weight: 900; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.word-accent { font-family: 'Montserrat', sans-serif; font-size: 48px; color: var(--accent-gold); font-weight: 900; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.branding-subtitle { color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 4px; font-size: 11px; margin-top: 10px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }

/* ПРАВАЯ ЧАСТЬ */
.header-controls-right { margin-top: 0; }
.top-utility-bar { display: flex; align-items: center; gap: 15px; background: rgba(0, 0, 0, 0.3); padding: 8px 15px; border-radius: 6px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.1); }
.utility-item { color: #fff; font-size: 12px; font-weight: 600; }
.search-item form { display: flex; background: rgba(255,255,255,0.15); border-radius: 4px; padding: 4px 8px; transition: 0.3s; }
.search-item form:hover { background: rgba(255,255,255,0.25); }
.search-item input { background: transparent; border: none; color: #fff; outline: none; width: 140px; font-size: 12px; }
.search-item button { background: transparent; border: none; cursor: pointer; color: #fff; }
.auth-item a { background: var(--accent-gold); color: #001a33; text-decoration: none; text-transform: uppercase; font-weight: 800; padding: 6px 14px; border-radius: 4px; font-size: 11px; transition: 0.3s; display: inline-block; }
.auth-item a:hover { background: #fff; }

/* МЕНЮ */
.integrated-menu-bar { position: absolute; bottom: 0; left: 0; width: 100%; z-index: 20; background: transparent; }
.menu-flex-container { display: flex; justify-content: flex-end; align-items: center; height: 60px; }
.nav-flex-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.nav-flex-list > li > a { display: block; padding: 0 15px; line-height: 60px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.8); text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: 13px; position: relative; transition: 0.3s; }
.nav-flex-list > li > a::after { content: ''; position: absolute; bottom: 10px; left: 0; width: 100%; height: 3px; background: var(--accent-gold); transform: scaleX(0); transition: transform 0.3s ease; transform-origin: right; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.nav-flex-list > li > a:hover { color: var(--accent-gold); }
.nav-flex-list > li > a:hover::after { transform: scaleX(1); transform-origin: left; }

/* --- ЕДИНАЯ СЕТКА (GRID) --- */

/* Верхняя часть (Слайдер + Лента) */
.hero-grid-modern { 
    display: grid; 
    grid-template-columns: 1fr 340px; /* Контент + Правая колонка 340px */
    gap: 20px; 
    margin: 30px 0; 
    height: 470px; 
}

/* Нижняя часть (Новости + Сайдбар) и Архивы */
.main-content-split {
    display: grid;
    grid-template-columns: 1fr 340px; /* Та же пропорция */
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 60px;
    align-items: start; /* ВЫРОВНЯТЬ ВЕРХ КОЛОНОК */
}

/* --- КОМПОНЕНТЫ ЛЕНТЫ (ВЕРХ) --- */
.timeline-column { 
    background: #fff; 
    border-radius: 8px; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
    overflow: hidden;
    border: none;
    border-top: 4px solid var(--accent-gold);
}
.timeline-scroll-area { overflow-y: hidden; flex-grow: 1; padding: 0; }
.timeline-card { 
    padding: 13px 25px; 
    border-bottom: 1px solid #f0f0f0; 
    cursor: pointer; 
    transition: all 0.2s ease;
    display: flex; align-items: flex-start; gap: 15px;
    background: #fff; min-height: auto; box-sizing: border-box;
}
.timeline-card:last-child { border-bottom: none; }
.timeline-card:hover, .active-card { background: #fdfdfd; }
.timeline-card:hover .card-title, .active-card .card-title { color: var(--deep-blue); }

.card-time { 
    font-size: 12px; font-weight: 800; color: var(--accent-gold); 
    min-width: 40px; padding-top: 3px; font-family: 'Montserrat', sans-serif;
}
.card-title { 
    margin: 0; font-size: 14px; line-height: 1.35; font-weight: 600; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title a { color: var(--text-dark); text-decoration: none; transition: 0.2s; }
.card-title a:hover { color: var(--deep-blue); text-decoration: none; }

/* --- КОМПОНЕНТЫ СЛАЙДЕРА (ОБНОВЛЕНО) --- */
.focus-column { 
    border-radius: 8px; 
    overflow: hidden; 
    background: #000; 
    position: relative; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.hero-img-link {
    display: block;
    width: 100%;
    height: 100%;
}

#main-hero-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease, opacity 0.3s ease; }
.focus-column:hover #main-hero-img { transform: scale(1.03); }

/* Стиль Рубрики на слайдере */
/* --- ИСПРАВЛЕНИЕ: БЕЙДЖ РУБРИКИ НА СЛАЙДЕРЕ --- */
.hero-cat-badge {
    position: absolute;
    bottom: 120px; /* Положение над заголовком */
    left: 40px;
    z-index: 10;
    pointer-events: none;
    
    /* Стили самой кнопки */
    background: var(--accent-gold);
    color: #001a33;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    font-family: 'Montserrat', sans-serif;
    
    /* ВАЖНО: Чтобы кнопка не растягивалась */
    display: inline-block; 
    width: auto;
    line-height: 1;
}

.hero-cat-badge a {
    background: var(--accent-gold);
    color: #001a33;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    pointer-events: auto;
    font-family: 'Montserrat', sans-serif;
}

.hero-caption { 
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px; 
    background: linear-gradient(to top, rgba(0,26,51, 1) 0%, rgba(0,26,51, 0.6) 50%, rgba(0,26,51,0) 100%); 
    color: #fff; pointer-events: none; 
}
.hero-title { 
    font-family: 'Montserrat', sans-serif; 
    font-size: 30px; font-weight: 800; line-height: 1.1; margin: 0; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); color: #fff; 
    pointer-events: auto;
}
.hero-title a { color: #fff; text-decoration: none; }

/* --- КАРТОЧКИ НОВОСТЕЙ (4 В РЯД + ФИКС РУБРИК) --- */
.section-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 26px; font-weight: 800; margin-bottom: 25px; 
    position: relative; padding-left: 15px; border-left: 5px solid var(--accent-gold); line-height: 1;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 КОЛОНКИ */
    gap: 20px;
}

.popular-card {
    background: #fff; 
    border-radius: 12px;
    overflow: hidden; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    display: flex;       
    flex-direction: column;
}

.popular-card:hover { 
    transform: translateY(-7px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 160px; 
    overflow: hidden;
}

.pop-img-link { 
    display: block; 
    width: 100%;
    height: 100%;
}

.pop-img-link img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.5s; 
}
.popular-card:hover img { transform: scale(1.1); }

/* Рубрика в карточке */
.pop-category {
    position: absolute; 
    top: 10px; 
    left: 10px;
    z-index: 5; 
    pointer-events: none; 
}

.pop-category a {
    display: inline-block;
    background: var(--accent-gold); 
    color: #001a33;
    font-size: 9px; 
    font-weight: 800; 
    padding: 4px 8px; 
    border-radius: 4px; 
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-decoration: none;
    pointer-events: auto; 
    margin-right: 5px;
    line-height: 1;
}
.pop-category a:hover { background: #fff; color: var(--accent-gold); }

/* Контент карточки */
.pop-content { padding: 18px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }

.pop-title { 
    font-size: 14px; 
    font-weight: 700; 
    margin: 0 0 12px 0; 
    line-height: 1.4; 
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pop-title a { color: var(--text-dark); text-decoration: none; transition: 0.2s; }
.pop-title a:hover { color: var(--accent-gold); }

.pop-meta { 
    font-size: 11px; color: #999; 
    display: flex; justify-content: space-between; 
    border-top: 1px solid #f5f5f5;
    padding-top: 10px;
    margin-top: auto; 
}

/* --- САЙДБАР --- */
.widget-box {
    background: #fff; padding: 25px; border-radius: 8px; margin-bottom: 30px;
    border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.05); position: relative; overflow: hidden;
    /* Убираем верхний отступ, чтобы выровнять с заголовком новостей */
    margin-top: 0; 
}
.widget-box::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent-gold);
}
.widget-title {
    font-family: 'Montserrat', sans-serif; font-size: 16px; font-weight: 800; text-transform: uppercase;
    margin-top: 0; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0;
    color: var(--deep-blue); letter-spacing: 0.5px;
}
.widget-box ul { list-style: none; padding: 0; margin: 0; }
.widget-box ul li { padding: 12px 0; border-bottom: 1px solid #f9f9f9; font-size: 14px; display: flex; align-items: center; }
.widget-box ul li:last-child { border-bottom: none; }
.widget-box ul li a { text-decoration: none; color: #444; font-weight: 600; transition: 0.2s; }
.widget-box ul li a:hover { color: var(--accent-gold); padding-left: 5px; }

.widget_calendar table { width: 100%; border-collapse: collapse; }
.widget_calendar td, .widget_calendar th { padding: 5px; text-align: center; }
.widget_search input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }

/* --- ПОДВАЛ --- */
.site-footer {
    background-color: #0b0c10; color: rgba(255, 255, 255, 0.7);
    padding: 70px 0 30px; border-top: 5px solid var(--accent-gold);
    font-size: 14px; line-height: 1.7; margin-top: 50px;
}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; margin-bottom: 50px; }
.footer-column h4 {
    font-family: 'Montserrat', sans-serif; color: #fff; font-size: 18px; font-weight: 800; text-transform: uppercase;
    margin-top: 0; margin-bottom: 25px; position: relative; padding-bottom: 15px; letter-spacing: 1px;
}
.footer-column h4::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--accent-gold); border-radius: 2px;
}
.footer-column p { margin-bottom: 15px; }
.footer-column a { color: #fff; text-decoration: none; transition: 0.3s; border-bottom: 1px solid rgba(255,255,255,0.2); }
.footer-column a:hover { color: var(--accent-gold); border-color: var(--accent-gold); }
.footer-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 30px; text-align: center;
    color: rgba(255, 255, 255, 0.4); font-size: 12px; display: flex; justify-content: space-between; align-items: center;
}
.age-limit { border: 1px solid rgba(255,255,255,0.3); padding: 2px 6px; border-radius: 4px; color: #fff; font-weight: 700; }

/* --- ИСПРАВЛЕНИЕ ВЫПАДАЮЩЕГО МЕНЮ --- */
.nav-flex-list li { position: relative; }
.nav-flex-list .sub-menu {
    background-color: #ffffff !important;
    position: absolute !important;
    top: 100%; left: 0; z-index: 99999 !important;
    min-width: 280px; padding: 10px 0 !important;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.15);
    border-radius: 4px;
    visibility: hidden; opacity: 0; transform: translateY(10px);
    transition: all 0.3s ease;
    border-top: 3px solid var(--accent-gold);
    display: block;
}
.nav-flex-list li:hover > .sub-menu { visibility: visible; opacity: 1; transform: translateY(0); }
.nav-flex-list .sub-menu li { display: block; width: 100%; margin: 0; }
.nav-flex-list .sub-menu li a {
    color: #333333 !important; font-size: 14px !important;
    line-height: 1.4 !important; text-transform: none !important;
    padding: 12px 20px !important; border-bottom: 1px solid #f0f0f0;
    text-shadow: none !important; display: block; white-space: normal;
}
.nav-flex-list .sub-menu li:last-child a { border-bottom: none; }
.nav-flex-list .sub-menu li a:hover {
    background-color: #f9f9f9 !important; color: var(--accent-gold) !important;
    padding-left: 25px !important;
}
.nav-flex-list .sub-menu li a::after { display: none; }