/*
Theme Name: Loihakash Theme
Theme URI: https://loihakash.tj
Author: Foziljon Asoev
Description: Официальная тема для ГУП «Лоихакаш». Многоязычная и адаптивная.
Version: 1.0
Text Domain: loihakash
*/

:root {
  --color-primary: #7CB316;    /* Акцентный зеленый */
  --color-secondary: #5A5A5A;  /* Графитовый из логотипа */
  --color-text: #333333;       /* Основной текст */
  --color-bg-light: #F4F4F4;   /* Светло-серый фон */
  --color-white: #FFFFFF;      /* Белый */
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: 1rem;
}

a {
    text-decoration: none;
}

/* --- Плавная анимация появления страниц --- */
.site-main {
    animation: fadeUpIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeUpIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Сетка и Контейнер --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Шапка сайта (Header) --- */
.site-header {
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; /* Шапка будет "прилипать" при скролле */
    top: 0;
    z-index: 1000;
}

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

.site-logo a {
    display: flex;
    text-decoration: none;
    color: var(--color-secondary);
}

/* Меню навигации */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 15px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-menu li a:hover {
    color: var(--color-primary); /* Наш фирменный салатовый при наведении */
}

/* --- Языковой переключатель (Polylang) --- */
.lang-switcher {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.lang-switcher li {
    position: relative;
}

/* Разделитель между языками */
.lang-switcher li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -10px;
    color: var(--color-secondary);
    opacity: 0.5;
}

.lang-switcher li a {
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* Цвет активного языка и при наведении */
.lang-switcher li.current-lang a, 
.lang-switcher li a:hover {
    color: var(--color-primary);
}

/* --- Временные стили для контента --- */
.site-main {
    /* padding: 60px 0; */
    min-height: 60vh;
}
.site-footer {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 20px 0;
    text-align: center;
}

/* --- Кнопки (Базовые стили) --- */
.btn {
    display: inline-block;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px; /* Легкое скругление для современного вида */
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-secondary);
}

/* --- Первый экран (Hero Section) --- */
.hero-section {
    position: relative;
    height: 80vh; /* Занимает 80% высоты экрана */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Временный серый фон. Позже заменим на фото здания */
    background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    color: var(--color-white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(40, 40, 40, 0.7); /* Темная маска для читаемости текста */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Текст поверх маски */
    max-width: 900px;
}

.hero-title {
    font-size: 56px;
    color: var(--color-white);
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero-title .highlight {
    color: var(--color-primary); /* Выделяем вторую строчку салатовым */
}

.hero-subtitle {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 40px;
    color: #E0E0E0;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* --- Блок показателей (KPI Section) --- */
.kpi-section {
    background-color: var(--color-white);
    padding: 60px 0;
    margin-top: -60px; /* Приподнимаем блок над первым экраном */
    position: relative;
    z-index: 10;
}

.kpi-grid {
    display: flex;
    justify-content: space-between;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08); /* Красивая мягкая тень */
}

.kpi-item {
    text-align: center;
    flex: 1;
    border-right: 1px solid #EEEEEE;
}

.kpi-item:last-child {
    border-right: none;
}

.kpi-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 10px;
}

.kpi-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Адаптивность (Медиа-запросы) --- */
@media (max-width: 992px) {
    .hero-title { font-size: 42px; }
    .hero-subtitle { font-size: 18px; }
    .kpi-grid { padding: 30px 20px; }
    .kpi-number { font-size: 36px; }
}

@media (max-width: 768px) {
    .hero-section { height: auto; padding: 100px 0; }
    .hero-actions { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 300px; text-align: center; }
    
    .kpi-section { margin-top: 0; padding: 40px 0; }
    .kpi-grid { flex-direction: column; gap: 30px; box-shadow: none; padding: 0; }
    .kpi-item { border-right: none; border-bottom: 1px solid #EEEEEE; padding-bottom: 20px; }
    .kpi-item:last-child { border-bottom: none; padding-bottom: 0; }
}

/* --- Общие стили для секций --- */
.section-title {
    font-size: 32px;
    color: var(--color-secondary);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}
/* Зеленая подчеркивающая линия под заголовками */
.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 2px;
}
.text-center {
    text-align: center;
}
.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.btn-outline-dark {
    display: inline-block;
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
    margin-top: 20px;
}
.btn-outline-dark:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

/* --- О компании (About Section) --- */
.about-section {
    padding: 80px 0;
    background-color: var(--color-white);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Две равные колонки */
    gap: 60px;
    align-items: center;
}
.about-content p {
    margin-bottom: 15px;
    color: #555555;
    font-size: 16px;
}
.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Направления (Services Section) --- */
.services-section {
    padding: 80px 0;
    background-color: var(--color-bg-light); /* Светло-серый фон для разделения блоков */
}
.services-grid {
    display: grid;
    /* Умная адаптивная сетка без медиа-запросов */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.service-card {
    background-color: var(--color-white);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 3px solid transparent;
}
.service-card:hover {
    transform: translateY(-5px); /* Эффект "поднятия" карточки */
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-bottom-color: var(--color-primary); /* Появление зеленой полоски */
}
.service-icon {
    font-size: 45px;
    margin-bottom: 20px;
}
.service-card h3 {
    font-size: 18px;
    color: var(--color-secondary);
    margin-bottom: 15px;
}
.service-card p {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
}

/* --- Адаптивность для мобильных (Медиа-запросы) --- */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr; /* В одну колонку на телефонах */
        gap: 40px;
    }
    .about-image {
        order: -1; /* Картинка встанет над текстом */
    }
    .about-section, .services-section {
        padding: 50px 0;
    }
}

/* --- Актуальные новости (News Section) --- */
.news-section {
    padding: 80px 0;
    background-color: var(--color-white);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header .section-title {
    margin-bottom: 0; /* Убираем отступ, чтобы выровнять по центру с кнопкой */
}

.btn-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--color-secondary);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Карточка новости */
.news-card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #EAEAEA;
}

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

.news-thumbnail {
    height: 220px;
    background-color: var(--color-bg-light);
    overflow: hidden; /* Чтобы увеличенное фото не вылезало за края */
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-thumbnail img {
    transform: scale(1.05); /* Легкий зум картинки при наведении */
}

.news-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BBBBBB;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
}

.news-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: 13px;
    color: #888888;
    margin-bottom: 10px;
    display: block;
}

.news-title {
    font-size: 18px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-title a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--color-primary);
}

.news-excerpt {
    font-size: 14px;
    color: #666666;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1; /* Прижимает кнопку "Читать далее" к низу */
}

.news-excerpt p {
    margin-bottom: 0;
}

.news-read-more {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    align-self: flex-start;
    position: relative;
}

.news-read-more::after {
    content: '→';
    margin-left: 5px;
    transition: margin-left 0.3s ease;
}

.news-read-more:hover::after {
    margin-left: 10px; /* Стрелочка уезжает вправо при наведении */
}

/* --- Адаптивность для мобильных --- */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* --- Каталог проектов (Archive) --- */
.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 40px;
}

.page-title {
    font-size: 40px;
    color: var(--color-secondary);
    margin-bottom: 15px;
}

/* Кнопки фильтрации */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--color-bg-light);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Сетка проектов */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Карточка проекта */
.project-card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #EAEAEA;
}

.project-card:hover {
    transform: translateY(-5px) !important; /* Усиливаем ховер эффект */
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.project-thumbnail {
    height: 240px;
    overflow: hidden;
    background: var(--color-bg-light);
    position: relative;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.08);
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 20px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.project-title a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-title a:hover {
    color: var(--color-primary);
}

.project-meta {
    font-size: 14px;
    color: #777777;
    margin-bottom: 15px;
}
.project-meta a {
    color: inherit;
    text-decoration: none;
}
.project-meta a:hover {
    color: var(--color-primary);
}

/* Стили для постраничной навигации */
.pagination {
    margin-top: 50px;
    text-align: center;
}
.pagination .nav-links {
    display: inline-flex;
    gap: 10px;
}
.pagination a, .pagination span {
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
}
.pagination .current, .pagination a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* --- Индивидуальная страница проекта (Single Project) --- */

/* Заглавный блок с картинкой */
.project-hero {
    position: relative;
    height: 60vh; /* Занимает 60% высоты экрана */
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
}

.project-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.project-hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Градиент снизу вверх для читаемости текста */
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

.project-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.project-title-large {
    color: var(--color-white);
    font-size: 48px;
    margin: 0;
    max-width: 800px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Макет: Контент + Сайдбар */
.project-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Левая колонка шире правой */
    gap: 50px;
    margin-top: 60px;
    margin-bottom: 80px;
}

/* Содержимое (Текст проекта) */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}
.entry-content h2, .entry-content h3 {
    margin-top: 30px;
    color: var(--color-secondary);
}
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* Сайдбар с деталями */
.project-sidebar {
    position: relative;
}

.project-details-box {
    background: var(--color-bg-light);
    padding: 30px;
    border-radius: 8px;
    position: sticky; /* Блок будет "прилипать" при прокрутке текста */
    top: 120px;
    border-top: 4px solid var(--color-primary);
}

.project-details-box h3 {
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.project-meta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.project-meta-list li {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
    margin-bottom: 5px;
}

.meta-value {
    font-size: 16px;
    color: var(--color-secondary);
    font-weight: 500;
}

.meta-value a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.meta-value a:hover {
    color: var(--color-secondary);
}

.btn-full {
    display: block;
    text-align: center;
    width: 100%;
}

/* Адаптивность для телефонов */
@media (max-width: 992px) {
    .project-layout {
        grid-template-columns: 1fr; /* Блоки выстраиваются в одну колонку */
    }
    .project-hero {
        height: 40vh;
    }
    .project-title-large {
        font-size: 36px;
    }
}

/* --- Страница Филиалы --- */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.branch-card {
    background: var(--color-bg-light);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #EAEAEA;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    background: var(--color-white);
    border-color: var(--color-primary);
}

.branch-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.branch-name {
    font-size: 20px;
    color: var(--color-secondary);
    margin-bottom: 10px;
}

.branch-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* --- Страница Контакты --- */
.contacts-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.contact-block {
    background: var(--color-bg-light);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid var(--color-primary);
}

.contact-block h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-list .icon {
    font-size: 20px;
    margin-right: 15px;
}

/* Стили формы */
.form-wrapper {
    background: var(--color-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
    border: 1px solid #EAEAEA;
}

.form-wrapper h3 {
    margin-bottom: 10px;
}

.form-wrapper p {
    color: #777;
    margin-bottom: 25px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-secondary);
}

.custom-contact-form input,
.custom-contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color 0.3s;
}

.custom-contact-form input:focus,
.custom-contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

@media (max-width: 768px) {
    .contacts-layout {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
        gap: 40px;
    }
    .form-wrapper {
        padding: 25px;
    }
}

/* --- Страница "Об организации" --- */
.page-hero-simple {
    background-image: url('/wp-content/uploads/2026/02/head_img.webp');
    background-color: #273b3a;
    background-position: bottom;
    background-size: 30%;
    background-repeat: repeat-x;
    padding: 30px 0 150px;
    margin-bottom: 50px;
}

.page-title-light {
    color: var(--color-white);
    font-size: 40px;
    margin-bottom: 0;
}

.page-subtitle {
    color: var(--color-white);
    font-size: 18px;
}

.about-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.about-main-text h2 {
    color: var(--color-secondary);
    font-size: 28px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-bg-light);
    padding-bottom: 10px;
}

.mt-40 {
    margin-top: 40px;
}

.about-main-text p {
    font-size: 16px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 20px;
}

.styled-list {
    list-style: none;
    padding: 0;
}

.styled-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

.styled-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 18px;
}

/* Вертикальные KPI в сайдбаре */
.kpi-vertical {
    background: var(--color-bg-light);
    padding: 30px;
    border-radius: 8px;
    border-top: 4px solid var(--color-primary);
    position: sticky;
    top: 100px;
}

.kpi-item-vert {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #E0E0E0;
}

.kpi-item-vert:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kpi-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 40px;
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.kpi-text {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--color-secondary);
    font-weight: 600;
}

/* --- Стандартные страницы (page.php) --- */
.page-container {
    max-width: 800px; /* Узкий контейнер для комфортного чтения текста */
    margin: 0 auto;
    padding: 60px 20px 100px;
}

.default-page-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #EAEAEA;
    padding-bottom: 20px;
}

.default-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.default-content h2, .default-content h3 {
    margin-top: 30px;
    color: var(--color-secondary);
}

.default-content ul, .default-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.default-content li {
    margin-bottom: 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .about-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Обновленный Подвал (Footer) --- */
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright p {
    margin: 0;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: var(--color-white);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Слайдер на главной --- */
.slider-container {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 600px;
    overflow: hidden;
    background: var(--color-secondary);
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* Плавная кинематографичная анимация */
}

.slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.slide-label {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.slide-title {
    font-size: 52px;
    color: var(--color-white);
    margin-bottom: 35px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    line-height: 1.2;
}

/* Кнопки перелистывания */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid transparent;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    padding-bottom: 3px;
}

.slider-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: 30px; }
.next-btn { right: 30px; }

/* --- Фильтр по годам --- */
.year-filters {
    margin-top: -30px; /* Подтягиваем ближе к основным фильтрам */
    border-top: 1px solid #EAEAEA;
    padding-top: 20px;
}

.filter-label {
    font-weight: 600;
    color: var(--color-secondary);
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.filter-year-btn {
    padding: 6px 16px;
    font-size: 13px;
}

/* Адаптивность слайдера */
@media (max-width: 768px) {
    .slide-title { font-size: 32px; }
    .slider-btn { width: 40px; height: 40px; }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
    .year-filters { flex-direction: column; align-items: center; }
    .filter-label { margin-right: 0; margin-bottom: 10px; }
}

/* --- Быстрые переходы (Quick Links) --- */
.quick-links-section {
    padding: 40px 0 80px;
    background-color: var(--color-white);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Две равные колонки */
    gap: 30px;
}

.quick-link-box {
    padding: 50px 40px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-secondary);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* Создаем красивый градиентный фон, смешивая серый и зеленый цвета */
.quick-link-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--color-primary);
    z-index: 1;
}

.quick-link-box h3, 
.quick-link-box p, 
.quick-link-box .btn {
    position: relative;
    z-index: 2; /* Текст поверх градиента */
}

.quick-link-box h3 {
    font-size: 28px;
    color: var(--color-white);
    margin-bottom: 15px;
}

.quick-link-box p {
    font-size: 16px;
    color: var(--color-bg-light);
    margin-bottom: 30px;
    line-height: 1.5;
}

/* --- География присутствия (Geography) --- */
.geography-section {
    padding: 80px 0;
    background-color: var(--color-bg-light); /* Светлый фон для контраста */
}

.geography-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.geography-content p {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}

.geo-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Список в две колонки для компактности */
    gap: 15px;
}

.geo-list li {
    font-size: 15px;
    color: var(--color-secondary);
    font-weight: 500;
}

.geography-visual {
    background: var(--color-white);
    height: 350px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #CCCCCC; /* Пунктирная рамка для визуального выделения зоны карты */
}

.map-placeholder {
    text-align: center;
    color: #999;
    font-size: 18px;
    font-weight: 600;
}

.map-icon {
    display: block;
    font-size: 60px;
    margin-bottom: 15px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .quick-links-grid, 
    .geography-layout {
        grid-template-columns: 1fr; /* Блоки встают друг под другом */
        gap: 30px;
    }
    .geo-list {
        grid-template-columns: 1fr; /* Список регионов в одну колонку */
    }
    .quick-link-box {
        padding: 40px 20px;
    }
}

/* --- Сложный макет страницы "Об организации" --- */
.about-layout-complex {
    display: grid;
    grid-template-columns: 300px 1fr; /* Сайдбар 300px, остальное под контент */
    gap: 60px;
    margin-bottom: 80px;
    align-items: start;
}

/* Навигация слева */
.about-nav-sidebar {
    position: sticky;
    top: 120px; /* Прилипает при скролле ниже шапки */
    background: var(--color-bg-light);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

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

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

.about-nav-list li:last-child {
    margin-bottom: 0;
}

.about-nav-list a {
    display: block;
    padding: 10px 15px;
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.about-nav-list a:hover,
.about-nav-list a.active {
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Блоки контента справа */
.about-section-block {
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid #EAEAEA;
    scroll-margin-top: 120px; /* Отступ при якорном клике, чтобы шапка не закрывала заголовок */
}

.about-section-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.about-section-block h2 {
    font-size: 32px;
    color: var(--color-secondary);
    margin-bottom: 25px;
}

.about-section-block p {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* Сетка орг. структуры */
.structure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.structure-card {
    background: var(--color-white);
    border: 1px solid #EAEAEA;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    text-align: center;
}

.structure-card h4 {
    color: var(--color-primary);
    font-size: 18px;
    margin-bottom: 15px;
}

.structure-card p {
    font-size: 14px;
    margin-bottom: 0;
}

/* Адаптивность */
@media (max-width: 992px) {
    .about-layout-complex {
        grid-template-columns: 1fr; /* Сайдбар прыгает наверх на планшетах */
    }
    .about-nav-sidebar {
        position: static;
        margin-bottom: 40px;
    }
}

/* --- Сетка Филиалов (Продвинутая) --- */
.branches-grid-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.branch-card-advanced {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border: 1px solid #EAEAEA;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.branch-photo {
    height: 200px;
    background: var(--color-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.branch-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.branch-photo-placeholder {
    font-size: 50px;
    color: #CCC;
}

.branch-content-advanced {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.branch-title-advanced {
    font-size: 22px;
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.branch-contacts-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.branch-contacts-list li {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.branch-contacts-list .icon {
    margin-right: 10px;
    font-size: 16px;
}

/* --- Индивидуальная страница филиала --- */
.branch-hero-section {
    background: var(--color-bg-light);
    padding: 60px 0;
    margin-bottom: 60px;
    border-bottom: 4px solid var(--color-primary);
}

.branch-hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.branch-hero-text h1 {
    font-size: 40px;
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.branch-desc-large {
    font-size: 18px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 30px;
}

.branch-contact-info p {
    font-size: 16px;
    margin-bottom: 10px;
    background: var(--color-white);
    padding: 10px 15px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 15px;
    border: 1px solid #EAEAEA;
}

.branch-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .branch-hero-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Продвинутая панель фильтров (Каталог проектов) --- */
.advanced-filters-panel {
    background: var(--color-bg-light);
    padding: 25px 30px;
    border-radius: 8px;
    margin-bottom: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    border: 1px solid #EAEAEA;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

.custom-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text);
    background-color: var(--color-white);
    cursor: pointer;
    appearance: none; /* Убираем стандартную стрелку ОС */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.custom-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.reset-group {
    flex: 0;
    min-width: auto;
}

.reset-group .btn {
    padding: 12px 25px;
    margin: 0;
    height: 45px;
}

@media (max-width: 768px) {
    .filter-group {
        min-width: 100%; /* На телефоне фильтры встают друг под другом */
    }
    .reset-group {
        width: 100%;
    }
    .reset-group .btn {
        width: 100%;
    }
}

/* --- Рубрики новостей (Меню фильтрации) --- */
.news-categories {
    margin-bottom: 50px;
    text-align: center;
}

.category-list {
    list-style: none;
    padding: 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.category-list a {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 30px;
    background: var(--color-white);
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: 2px solid #EAEAEA;
    text-transform: uppercase;
}

.category-list a:hover,
.category-list a.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.news-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

.news-meta-top .news-cat {
    background: var(--color-bg-light);
    padding: 4px 12px;
    border-radius: 4px;
    color: var(--color-primary);
    font-weight: 600;
}

/* --- Страница чтения новости (single.php) --- */
.news-reading-container {
    max-width: 800px; /* Узкая колонка идеальна для комфортного чтения */
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.single-news-header {
    margin-bottom: 40px;
}

.single-news-meta {
    font-size: 15px;
    color: #777;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.single-news-meta a {
    color: var(--color-primary);
    text-decoration: none;
}

.single-news-title {
    font-size: 42px;
    color: var(--color-secondary);
    line-height: 1.3;
    margin-bottom: 30px;
}

.single-news-image {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.single-news-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-news-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.single-news-content p {
    margin-bottom: 25px;
}

.single-news-content h2, 
.single-news-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.single-news-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #EAEAEA;
    text-align: center;
}

@media (max-width: 768px) {
    .single-news-title { font-size: 32px; }
    .category-list { flex-direction: column; align-items: stretch; }
    .category-list a { text-align: center; width: 100%; }
}

.news-grid-advanced {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Строго 3 одинаковые колонки */
    gap: 30px;
    margin-bottom: 50px;
}

/* Адаптивность для планшетов (перестраиваем в 2 колонки) */
@media (max-width: 992px) {
    .news-grid-advanced {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Адаптивность для мобильных телефонов (перестраиваем в 1 колонку) */
@media (max-width: 768px) {
    .news-grid-advanced {
        grid-template-columns: 1fr;
    }
}

/* --- Страница "Партнёры и доноры" --- */
.partners-intro {
    max-width: 800px;
    margin: 0 auto 60px;
    font-size: 18px;
    line-height: 1.6;
    color: #555;
}

.partners-section {
    margin-bottom: 80px;
}

.partners-grid {
    display: grid;
    /* Умная сетка: подстраивается под ширину экрана */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.partner-card {
    background: var(--color-white);
    border: 1px solid #EAEAEA;
    padding: 40px 20px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-color: var(--color-primary); /* Подсветка рамки */
}

/* Стили для логотипа (иконки или картинки) */
.partner-logo {
    font-size: 50px;
    margin-bottom: 20px;
    color: var(--color-secondary);
    transition: color 0.3s ease;
}

.partner-card:hover .partner-logo {
    color: var(--color-primary); /* Иконка зеленеет при наведении */
}

.partner-logo img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    filter: grayscale(100%); /* Делает реальные логотипы серыми */
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-card:hover .partner-logo img {
    filter: grayscale(0%); /* Возвращает цвет логотипу при наведении */
    opacity: 1;
}

.partner-card h3 {
    font-size: 16px;
    color: var(--color-secondary);
    margin: 0;
}

.partners-cta {
    margin-top: 50px;
    margin-bottom: 80px;
    padding-top: 40px;
    border-top: 1px solid #EAEAEA;
}

.partners-cta p {
    color: var(--color-secondary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr); /* По 2 карточки на планшете */
    }
}

@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: 1fr; /* По 1 карточке на телефоне */
    }
}

/* --- Страница "Вакансии" --- */
.vacancies-info {
    margin: 0 auto 60px;
}

.vacancies-info h2 {
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.vacancies-info p {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

/* Стили Аккордеона */
.vacancies-accordion-section {
    margin: 0 auto 80px;
}

.accordion-item {
    border: 1px solid #EAEAEA;
    border-radius: 6px;
    margin-bottom: 15px;
    background: var(--color-white);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.accordion-header {
    width: 100%;
    padding: 20px 25px;
    background: var(--color-bg-light);
    border: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    font-family: var(--font-heading);
    color: var(--color-secondary);
    font-size: 18px;
    font-weight: 600;
}

.accordion-header:hover {
    background: #E2E2E2;
}

/* Активное состояние кнопки */
.accordion-header.active {
    background: var(--color-primary);
    color: var(--color-white);
}

.accordion-icon {
    font-size: 24px;
    font-weight: 400;
    transition: transform 0.3s ease;
}

/* Вращение иконки при открытии */
.accordion-header.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out; /* Плавное открытие/закрытие */
    background: var(--color-white);
}

.accordion-body {
    padding: 25px;
    border-top: 1px solid #EAEAEA;
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}

.accordion-body p {
    margin-bottom: 15px;
}
.accordion-body p:last-child {
    margin-bottom: 0;
}

/* Нижний блок CTA */
.vacancies-cta {
    background: var(--color-bg-light);
    padding: 50px 30px;
    border-radius: 8px;
    margin-bottom: 80px;
    border: 1px solid #EAEAEA;
}

.vacancies-cta h3 {
    color: var(--color-secondary);
    margin-bottom: 15px;
}

.vacancies-cta p {
    color: #666;
    margin-bottom: 25px;
}

/* --- Интерактивная карта филиалов (Контакты) --- */
.map-interactive-layout {
    display: flex;
    height: 600px;
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #EAEAEA;
    margin-bottom: 80px;
}

/* Левая панель со списком */
.map-sidebar {
    width: 350px;
    background: #F9F9F9;
    overflow-y: auto;
    border-right: 1px solid #EAEAEA;
}

.map-sidebar-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #EAEAEA;
    cursor: pointer;
    transition: background 0.3s;
}

.map-sidebar-item:hover,
.map-sidebar-item.active {
    background: var(--color-white);
    border-left: 4px solid var(--color-primary);
}

.item-photo {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details h4 {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: var(--color-secondary);
}

.item-details p {
    font-size: 12px;
    color: #666;
    margin: 0 0 3px 0;
}

/* Область самой карты */
.map-container {
    flex-grow: 1;
    height: 100%;
    z-index: 1; /* Чтобы карта не перекрывала шапку сайта */
}

/* Кастомизация всплывающего окна Leaflet */
.leaflet-custom-popup {
    min-width: 200px;
}

/* Адаптивность для мобильных */
@media (max-width: 992px) {
    .map-interactive-layout {
        flex-direction: column;
        height: auto;
    }
    .map-sidebar {
        width: 100%;
        height: 300px; /* Список становится прокручиваемым по высоте */
        border-right: none;
        border-bottom: 1px solid #EAEAEA;
    }
    .map-container {
        height: 400px; /* Фиксированная высота карты на мобильных */
    }
}

/* --- ШАПКА И ГЛАВНОЕ МЕНЮ --- */
.site-header {
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Меню */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px; /* Отступы между 8 пунктами */
}

.nav-menu li a {
    text-decoration: none;
    color: var(--color-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.nav-menu li a:hover {
    color: var(--color-primary);
}

/* АКТИВНЫЙ ПУНКТ МЕНЮ (Зеленый цвет и подчеркивание) */
.nav-menu li.current-menu-item > a,
.nav-menu li.current_page_item > a {
    color: var(--color-primary);
    font-weight: 700;
    position: relative;
}

/* --- ВЫПАДАЮЩИЙ СПИСОК ЯЗЫКОВ --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.custom-lang-switcher {
    position: relative;
    cursor: pointer;
    padding: 10px 0;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-secondary);
    transition: color 0.3s;
}

.lang-current img { width: 18px; height: auto; border-radius: 2px; }
.lang-arrow { font-size: 10px; margin-left: 2px; color: #888; transition: transform 0.3s; }

.custom-lang-switcher:hover .lang-current { color: var(--color-primary); }
.custom-lang-switcher:hover .lang-arrow { transform: rotate(180deg); color: var(--color-primary); }

/* Само выпадающее меню */
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-white);
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 6px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.custom-lang-switcher:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown li { margin: 0; padding: 0; }

.lang-dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.lang-dropdown li a img { width: 18px; height: auto; border-radius: 2px; }
.lang-dropdown li a:hover { background-color: var(--color-bg-light); color: var(--color-primary); }

/* --- АДАПТИВНОСТЬ И МОБИЛЬНОЕ МЕНЮ --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-secondary);
    transition: 0.3s ease;
}

/* Если экран меньше 1150px (Для ноутбуков) - немного уменьшаем шрифт, чтобы 8 пунктов влезли */
@media (max-width: 1150px) {
    .nav-menu { gap: 12px; }
    .nav-menu li a { font-size: 13px; }
}

/* Если экран меньше 992px (Планшеты и телефоны) - прячем меню под гамбургер */
@media (max-width: 992px) {
    .mobile-menu-toggle { display: flex; }
    
    .site-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-white);
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        border-top: 1px solid #eee;
    }

    .site-navigation.active {
        max-height: 500px; /* Открываем меню */
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 10px 20px;
    }

    .nav-menu li { border-bottom: 1px solid #f5f5f5; }
    .nav-menu li:last-child { border-bottom: none; }
    .nav-menu li a { display: block; padding: 12px 0; font-size: 16px; }

    /* Превращаем гамбургер в крестик при открытии */
    .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

/* --- СЕКЦИЯ 1: ВЕРХНЯЯ ПАНЕЛЬ (Логотип и Контакты) --- */
.site-header {
    background-color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.header-top {
    border-bottom: 1px solid #EAEAEA;
    padding: 15px 0;
}

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

.site-logo img {
    max-height: 55px; /* Логотип станет чуть больше и четче */
    width: auto;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s;
}

.header-phone:hover { color: var(--color-primary); }
.phone-icon { font-size: 18px; }

.header-socials {
    display: flex;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid #EAEAEA;
}

.header-socials a {
    height: 25px;
    text-decoration: none;
    font-size: 18px;
    filter: grayscale(100%);
    transition: filter 0.3s, transform 0.3s;
}

.header-socials a:hover {
    filter: grayscale(0%);
    transform: translateY(-2px);
}

/* --- ВЫПАДАЮЩИЙ СПИСОК ЯЗЫКОВ --- */
.custom-lang-switcher {
    position: relative;
    cursor: pointer;
    padding-left: 20px;
    border-left: 1px solid #EAEAEA;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-secondary);
    transition: color 0.3s;
    height: 100%;
}

.lang-current img, .lang-dropdown img { width: 20px; height: auto; border-radius: 2px; }
.lang-arrow { font-size: 10px; margin-left: 2px; color: #888; transition: transform 0.3s; }

.custom-lang-switcher:hover .lang-current { color: var(--color-primary); }
.custom-lang-switcher:hover .lang-arrow { transform: rotate(180deg); color: var(--color-primary); }

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-white);
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 6px;
    list-style: none;
    padding: 8px 0;
    margin: 15px 0 0 0; /* Отступ сверху */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    z-index: 1001;
}

.custom-lang-switcher:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}
.lang-dropdown li a:hover { background-color: var(--color-bg-light); color: var(--color-primary); }

/* --- СЕКЦИЯ 2: ГЛАВНОЕ МЕНЮ (Десктоп) --- */
.header-bottom {
    background: var(--color-white);
}

.nav-menu {
    display: flex;
    justify-content: center; /* Центрируем пункты меню */
    flex-wrap: wrap; /* Если экран узкий, они аккуратно перенесутся */
    list-style: none;
    margin: 0;
    padding: 15px 0;
    gap: 30px; 
}

.nav-menu li a {
    text-decoration: none;
    color: var(--color-secondary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.nav-menu li a:hover { color: var(--color-primary); }

/* АКТИВНЫЙ ПУНКТ МЕНЮ */
.nav-menu li.current-menu-item > a,
.nav-menu li.current_page_item > a {
    color: var(--color-primary);
    position: relative;
}

/* --- АДАПТИВНОСТЬ (Мобильные и планшеты) --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.mobile-menu-toggle span { display: block; width: 100%; height: 2px; background-color: var(--color-secondary); transition: 0.3s ease; }

@media (max-width: 992px) {
    
    .page-hero-simple {
        background-size: 70%;
        padding: 25px 0 80px;
    }
    
    .page-title-light { font-size: 30px; }
    .page-subtitle { font-size: 15px; }
    
    .site-logo img { max-height: 40px; }
    .lang-current img { width: 20px !important; height: 20px !important; border-radius: 100%; border: 1px solid var(--color-secondary); }
    .phone-icon { height: 23px; }
    
    /* Прячем тексты и соцсети */
    .phone-text, .header-socials, .lang-name, .lang-arrow { display: none !important; }
    
    /* Убираем рамки между иконками */
    .custom-lang-switcher { border-left: none; padding-left: 0; }
    .header-info { gap: 20px; }
    
    .mobile-menu-toggle { display: flex; }
    
    .header-bottom {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-white);
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        padding: 0;
    }

    .site-navigation {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .site-navigation.active {
        max-height: 500px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 10px 20px;
    }

    .social-icon { padding: 6px 12px; font-size: 12px; }

    .footer-socials { gap: 8px; }

    .nav-menu li { border-bottom: 1px solid #f5f5f5; }
    .nav-menu li:last-child { border-bottom: none; }
    .nav-menu li a { display: block; padding: 12px 0; font-size: 15px; }

    /* Гамбургер превращается в крестик */
    .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

/* --- СТРАНИЦА 404 (ОШИБКА) --- */
.page-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh; /* Занимает почти весь экран по высоте */
    padding: 60px 20px;
    background-color: var(--color-bg-light, #fafafa);
}

.error-404-content {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-white, #ffffff);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #EAEAEA;
}

.error-code {
    font-size: 140px;
    font-weight: 800;
    color: var(--color-primary, #7CB316);
    line-height: 1;
    margin: 0 0 20px 0;
    text-shadow: 6px 6px 0px rgba(124, 179, 22, 0.1); /* Эффект объемного текста */
}

.error-title {
    font-size: 26px;
    color: var(--color-secondary, #2c3e50);
    margin-bottom: 15px;
}

.error-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 35px;
}

/* Стилизация стандартной формы поиска WordPress */
.error-search p {
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 15px;
}

.error-search form {
    display: flex;
    gap: 10px;
}

.error-search input[type="search"],
.error-search input[type="text"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
}

.error-search input[type="search"]:focus,
.error-search input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

.error-search input[type="submit"],
.error-search button[type="submit"] {
    padding: 12px 25px;
    background: var(--color-secondary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.error-search input[type="submit"]:hover,
.error-search button[type="submit"]:hover {
    background: var(--color-primary);
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {
    .error-404-content { padding: 30px 20px; }
    .error-code { font-size: 100px; }
    .error-title { font-size: 20px; }
    .error-search form { flex-direction: column; }
}

.leaflet-container .leaflet-marker-pane img {
    filter: grayscale(1) invert(1) sepia(87%) saturate(1344%) hue-rotate(44deg) brightness(103%) contrast(83%);
}

.leaflet-container .leaflet-control-attribution { display: none; }

.branch-projects-section { margin-bottom: 60px; }