/*
Theme Name: Slud Lib Theme 2
Version: 2.1.0
Author: Milovich V.
Description: Унифицированная тема для МБУ ЦБ Слюдянского района
*/

/* ==========================================
   1. ROOT VARIABLES
   ========================================== */
:root {
    /* Фирменные цвета */
    --brand: #007a3c;
    --brand-dark: #00612f;
    --brand-light: #00994b;
    --brand-soft: #e6f4ec;
    --brand-pale: #f2f9f5;

    /* Нейтральные */
    --white: #ffffff;
    --gray-50: #fafaf9;
    --gray-100: #f4f4f2;
    --gray-200: #e8e8e5;
    --gray-300: #d1d1ce;
    --gray-400: #b0b0ac;
    --gray-500: #8c8c87;
    --gray-600: #63635f;
    --gray-700: #454542;
    --gray-800: #2d2d2b;
    --gray-900: #1a1a19;

    /* Размеры хедера */
    --wp-adminbar-height: 32px;
    --top-height: 42px;
    --header-height: 76px;
    --total-height: calc(var(--top-height) + var(--header-height));

    /* Тени */
    --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.09);
    --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.12);
    --shadow-brand: 0 4px 16px rgba(0, 122, 60, 0.2);

    /* Скругления */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Анимация */
    --easing: cubic-bezier(0.22, 0.61, 0.36, 1);
    --easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Типографика */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Swiper */
    --swiper-theme-color: var(--brand);
}

/* Темная тема */
[data-theme="dark"] {
    --brand-soft: #1a2e22;
    --brand-pale: #15261c;
    --white: #1a1c1a;
    --gray-50: #202220;
    --gray-100: #262826;
    --gray-200: #323432;
    --gray-300: #525552;
    --gray-400: #7a7d7a;
    --gray-500: #9a9d9a;
    --gray-600: #b8bab8;
    --gray-700: #d4d6d4;
    --gray-800: #e8e9e8;
    --gray-900: #f4f5f4;
    --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.5);
    --shadow-brand: 0 4px 16px rgba(0, 122, 60, 0.35);
}

/* ==========================================
   2. RESET & BASE
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: var(--gray-50);
    font-family: var(--font-stack);
    color: var(--gray-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

/* ==========================================
   3. UTILITY CLASSES
   ========================================== */

/* ---------- Типографика ---------- */
.section-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand);
    background: var(--brand-soft);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
}

.section-heading {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.15;
}

.section-heading--sm {
    font-size: 24px;
}

.section-heading--xs {
    font-size: 20px;
}

.text-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.25s, color 0.25s;
    white-space: nowrap;
}

.text-link:hover {
    gap: 10px;
    color: var(--brand-dark);
}

.text-link i {
    font-size: 11px;
    transition: transform 0.25s;
}

.text-link:hover i {
    transform: translateX(3px);
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-stack);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s var(--easing);
    white-space: nowrap;
    line-height: 1;
}

.btn--brand {
    background: var(--brand);
    color: #fff;
}

.btn--brand:hover {
    background: var(--brand-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}

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

.btn--brand-outline:hover {
    background: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}

.btn--light {
    background: var(--white);
    color: var(--gray-700);
    border: 1.5px solid var(--gray-200);
}

.btn--light:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-900);
}

.btn--sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn--lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn--full {
    width: 100%;
}

.btn i,
.btn svg {
    font-size: 0.85em;
    transition: transform 0.25s;
}

.btn:hover i,
.btn:hover svg {
    transform: translateX(3px);
}

/* ---------- Бейджи ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.badge--brand {
    background: var(--brand-soft);
    color: var(--brand);
}

.badge--red {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.badge--dark {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    backdrop-filter: blur(8px);
}

.badge--white {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.badge--pulse {
    animation: badgePulse 2.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
    }
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

/* ---------- Поля ввода ---------- */
.input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-stack);
    font-size: 15px;
    color: var(--gray-900);
    outline: none;
    transition: all 0.2s var(--easing);
}

.input::placeholder {
    color: var(--gray-400);
}

.input:focus {
    border-color: var(--brand);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 122, 60, 0.08);
}

.input--with-icon {
    padding-right: 52px;
}

/* ---------- Элементы слайдера ---------- */
.slider-arrows {
    display: flex;
    gap: 8px;
}

.slider-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.25s var(--easing);
}

.slider-arrow:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transform: scale(1.05);
    box-shadow: var(--shadow-brand);
}

.slider-arrow.swiper-button-disabled {
    opacity: 0.25;
    pointer-events: none;
}

.slide-counter {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 14px;
    color: var(--gray-500);
}

.slide-counter strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
}

.slide-counter__divider {
    color: var(--gray-400);
}

/* Swiper pagination */
.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: var(--gray-300);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: var(--brand);
    width: 24px;
    border-radius: 4px;
}

/* ---------- Календарь ---------- */
.calendar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.calendar-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-card__month {
    font-weight: 700;
    font-size: 16px;
    color: var(--gray-900);
}

.calendar-card__nav {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.calendar-card__nav:hover {
    background: var(--brand-pale);
    border-color: var(--brand);
    color: var(--brand);
}

.calendar-card__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 4px;
}

.calendar-card__grid--weekdays {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.calendar-day {
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: var(--gray-100);
}

.calendar-day--active {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}

.calendar-day--active.calendar-day--event::after {
    background: #fff;
}

.calendar-day--active:hover,
.calendar-day--event:hover {
    background: var(--brand-dark, #005a2e);
    color: #fff;
}

.calendar-day--empty {
    color: var(--gray-300);
    pointer-events: none;
}

.calendar-day--today {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}

.calendar-day--event {
    position: relative;
    font-weight: 700;
}

.calendar-day--event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand);
}

.calendar-day--today.calendar-day--event::after {
    background: #fff;
}

.calendar-card__legend {
    margin-top: 14px;
    display: flex;
    gap: 14px;
    font-size: 11px;
    color: var(--gray-500);
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    margin-right: 4px;
    vertical-align: middle;
}

.legend-dot--today {
    box-shadow: 0 0 0 3px var(--brand-soft);
}

/* ---------- Таймлайн ---------- */
.timeline {
    position: relative;
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding-bottom: 24px;
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item__date {
    width: 90px;
    flex-shrink: 0;
    text-align: right;
}

.timeline-item__day {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-900);
}

.timeline-item__time {
    font-size: 12px;
    color: var(--gray-500);
}

.timeline-item__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand);
    flex-shrink: 0;
    margin-top: 4px;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 115px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item__content {
    flex: 1;
}

.timeline-item__type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand);
    margin-bottom: 4px;
    display: block;
}

.timeline-item__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.timeline-item__title a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color 0.2s;
}

.timeline-item__title a:hover {
    color: var(--brand);
}

/* ---------- Секции ---------- */
.section {
    padding: 56px 0;
}

.section--bg-white {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

/* ==========================================
   4. SITE HEADER
   ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: var(--white);
}

body.logged-in .site-header {
    top: var(--wp-adminbar-height);
}

/* ---------- Верхняя полоска ---------- */
.header-top {
    background: var(--brand-dark);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    height: var(--top-height);
}

.header-top__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-top__left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-top__link,
.header-top__text {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: color 0.2s;
    font-size: 13px;
}

.header-top__link:hover {
    color: #fff;
}

.header-top__link i,
.header-top__text i {
    font-size: 11px;
    opacity: 0.75;
}

.header-top__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-top__btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    height: 30px;
}

.header-top__btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.header-top__btn i {
    font-size: 11px;
}

/* ---------- Основная часть шапки ---------- */
.header-main {
    position: relative;
    height: var(--header-height);
    background: var(--white);
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.3s, border-color 0.3s;
}

.header-main.scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom-color: var(--brand-light);
}

.header-main__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

/* ---------- Логотип ---------- */
.header-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--gray-900);
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.header-logo:hover {
    opacity: 0.85;
}

.header-logo__icon {
    width: 72px;
    transition: transform 0.3s var(--easing);
}

.header-logo:hover .header-logo__icon {
    transform: scale(1.05);
}

.header-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-logo__title {
    font-weight: 700;
    font-size: 17px;
    color: var(--brand);
    letter-spacing: -0.3px;
}

.header-logo__subtitle {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 400;
}

/* ---------- Навигация ---------- */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    height: 100%;
}

.header-nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
}

.header-nav__list > .menu-item {
    height: 100%;
    position: relative;
}

.header-nav__list > .menu-item > a {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
}

.header-nav__list > .menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s var(--easing);
}

.header-nav__list > .menu-item:hover > a,
.header-nav__list > .menu-item.current-menu-item > a,
.header-nav__list > .menu-item.current-menu-ancestor > a {
    color: var(--brand);
}

.header-nav__list > .menu-item:hover > a::after,
.header-nav__list > .menu-item.current-menu-item > a::after,
.header-nav__list > .menu-item.current-menu-ancestor > a::after {
    transform: scaleX(1);
}

.nav-arrow {
    margin-left: 5px;
    font-size: 9px;
    transition: transform 0.25s var(--easing);
    color: var(--gray-400);
}

.menu-item:hover > a .nav-arrow {
    transform: rotate(180deg);
    color: var(--brand);
}

/* ---------- Дропдаун ---------- */
.header-nav__list .sub-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 8px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s var(--easing);
    box-shadow: var(--shadow-lg);
    z-index: 1020;
}

.header-nav__list .menu-item:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-nav__list .menu-item-has-children > a::before {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0;
    right: 0;
    height: 16px;
    z-index: 1021;
}

.header-nav__list .sub-menu .menu-item {
    margin-bottom: 2px;
}

.header-nav__list .sub-menu .menu-item:last-child {
    margin-bottom: 0;
}

.header-nav__list .sub-menu .menu-item a {
    display: block;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 450;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-xs);
    transition: all 0.2s var(--easing);
    white-space: nowrap;
}

.header-nav__list .sub-menu .menu-item a:hover,
.header-nav__list .sub-menu .menu-item.current-menu-item > a {
    background: var(--brand-soft);
    color: var(--brand);
    padding-left: 22px;
}

.header-nav__list .sub-menu .sub-menu {
    top: -8px;
    left: calc(100% + 8px);
    transform: translateX(8px);
}

.header-nav__list .sub-menu .menu-item:hover > .sub-menu {
    transform: translateX(0);
}

/* ---------- Кнопки действий ---------- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.header-actions__btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    text-decoration: none;
    transition: all 0.25s var(--easing);
    position: relative;
}

.header-actions__btn:hover {
    background: var(--brand-pale);
    border-color: var(--brand-soft);
    color: var(--brand);
}

.header-actions__btn--contacts {
    width: auto;
    padding: 0 16px;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
}

.header-actions__btn--burger {
    flex-direction: column;
    gap: 5px;
    display: none;
}

.header-actions__btn--burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s var(--easing);
    transform-origin: center;
}

.header-actions__btn--burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header-actions__btn--burger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.header-actions__btn--burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Поиск ---------- */
.search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--brand-soft);
    padding: 16px 0;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s var(--easing);
    box-shadow: var(--shadow-md);
    z-index: 1010;
}

.search-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.search-panel__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-panel__form {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
}

.search-panel__submit {
    position: absolute;
    right: 6px;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-xs);
    border: none;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-panel__submit:hover {
    background: var(--brand-dark);
    transform: scale(1.04);
}

.search-panel__close {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-xs);
    border: 1.5px solid var(--gray-200);
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-panel__close:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-700);
}

/* ---------- Мобильное меню ---------- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 370px;
    max-width: 88vw;
    height: 100vh;
    background: var(--white);
    z-index: 2100;
    transform: translateX(100%);
    transition: transform 0.4s var(--easing);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

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

.mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.mobile-menu__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--brand);
}

.mobile-menu__close {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--gray-200);
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-menu__close:hover {
    background: var(--gray-100);
}

.mobile-menu__body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

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

.mobile-menu__nav .menu-item a {
    display: block;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-900);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.mobile-menu__nav .menu-item a:hover,
.mobile-menu__nav .menu-item.current-menu-item > a {
    background: var(--brand-pale);
    border-left-color: var(--brand);
    color: var(--brand);
    padding-left: 28px;
}

.mobile-menu__nav .sub-menu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: none;
}

.mobile-menu__nav .sub-menu.open {
    display: block;
}

.mobile-menu__nav .sub-menu .menu-item a {
    padding-left: 42px;
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-500);
}

.mobile-sub-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-xs);
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.25s;
    vertical-align: middle;
    margin-left: 6px;
}

.mobile-sub-arrow.open {
    transform: rotate(180deg);
    color: var(--brand);
}

.mobile-sub-arrow:hover {
    background: var(--gray-100);
}

.mobile-menu__footer {
    padding: 16px 22px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.mobile-menu__contact {
    font-size: 13px;
    color: var(--gray-600);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
}

.mobile-menu__contact:hover {
    color: var(--brand);
}

.mobile-menu__contact i {
    width: 18px;
    text-align: center;
    color: var(--brand);
}

.header-spacer {
    height: var(--total-height);
}

/* ==========================================
   5. HERO SLIDER
   ========================================== */
.hero-slider-section {
    position: relative;
    margin-top: calc(-1 * var(--header-height));
}

.hero-slider__header {
    position: absolute;
    top: calc(var(--header-height) + 32px);
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

.hero-slider__header-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-slider__title-group {
    pointer-events: all;
}

.hero-slider__heading {
    font-size: 40px;
    font-weight: 900;
    color: #fff;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.hero-slider__controls {
    display: flex;
    align-items: center;
    gap: 16px;
    pointer-events: all;
    flex-shrink: 0;
}

.hero-slide {
    position: relative;
    height: 620px;
    min-height: 500px;
    max-height: 720px;
    overflow: hidden;
}

.hero-slide__bg {
    position: absolute;
    inset: 0;
}

.hero-slide__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-slide-active .hero-slide__img {
    animation: heroZoomIn 8s ease forwards;
}

@keyframes heroZoomIn {
    from {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
    }
}

.hero-slide__img--placeholder {
    background: linear-gradient(135deg, #1a3a2a, #0d2618);
}

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.35) 40%,
            rgba(0, 0, 0, 0.15) 70%,
            rgba(0, 0, 0, 0.05) 100%
    );
}

.hero-slide__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding-bottom: 52px;
}

.hero-slide__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-slide__inner > * + * {
    margin-top: 12px;
}

.hero-slide__title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
    max-width: 620px;
}

.hero-slide__title a {
    color: #fff;
    text-decoration: none;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-slide__title a:hover {
    opacity: 0.85;
}

.hero-slide__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.hero-slide__meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hero-slide__meta-item i {
    color: var(--brand-light);
    font-size: 13px;
}

.hero-slide__excerpt {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.65;
    max-width: 520px;
    margin: 0;
}

.hero-slide__btn {
    margin-top: 8px;
}

.hero-slider__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 10;
}

.hero-slider__progress-bar {
    height: 100%;
    background: var(--brand);
    width: 0;
    transition: width 0.1s linear;
}

/* ==========================================
   6. MAIN CONTENT
   ========================================== */
.main-content {
    padding-bottom: 80px;
}

/* ---------- События + календарь ---------- */
.events-calendar-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.events-upcoming__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

/* ---------- Новости ---------- */
.news-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.news-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.35s var(--easing);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.news-card--featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.news-card--featured .news-card__image-link {
    height: 100%;
}

.news-card__image-link {
    position: relative;
    display: block;
    overflow: hidden;
    height: 200px;
}

.news-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s;
}

.news-card:hover .news-card__image {
    transform: scale(1.05);
}

.news-card__image--placeholder {
    background: var(--brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--brand);
    opacity: 0.5;
}

.news-card__date {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--brand);
    color: #fff;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    line-height: 1;
    font-weight: 600;
    text-decoration: none;
}

.news-card__date-day {
    display: block;
    font-size: 20px;
}

.news-card__date-month {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.85;
}

.news-card__body {
    padding: 20px;
}

.news-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}

.news-card__title a {
    color: var(--gray-900);
    text-decoration: none;
}

.news-card__title a:hover {
    color: var(--brand);
}

.news-card__excerpt {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 14px;
}

.news-card__link {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.25s;
}

.news-card__link:hover {
    gap: 8px;
    color: var(--brand-dark);
}

/* ---------- Интегрируемые разделы ---------- */
.integrated-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.integrated-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.35s var(--easing);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.integrated-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand);
}

.integrated-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.integrated-card__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
}

.integrated-card__desc {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ---------- Виджеты ---------- */
.widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.widget-placeholder {
    background: var(--white);
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: border-color 0.3s;
}

.widget-placeholder:hover {
    border-color: var(--brand);
}

.widget-placeholder i {
    font-size: 28px;
    color: var(--brand);
    margin-bottom: 10px;
    display: block;
}

.widget-placeholder span {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.widget-placeholder small {
    font-size: 12px;
    color: var(--gray-500);
}

/* ==========================================
   7. RESPONSIVE
   ========================================== */
@media (max-width: 1199px) {
    .header-nav {
        display: none;
    }

    .header-actions__btn--burger {
        display: flex;
    }

    .hero-slide {
        height: 520px;
        min-height: 440px;
    }

    .hero-slide__title {
        font-size: 28px;
    }

    .hero-slider__heading {
        font-size: 32px;
    }

    .news-grid {
        grid-template-columns: 1fr 1fr;
    }

    .news-card--featured {
        grid-column: span 2;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .events-calendar-grid {
        grid-template-columns: 1fr;
    }

    .integrated-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-heading {
        font-size: 26px;
    }
}

@media (max-width: 767px) {
    :root {
        --top-height: 0;
        --header-height: 68px;
        --total-height: 68px;
    }

    .header-top {
        display: none !important;
    }

    .header-main {
        border-bottom-width: 2px;
    }

    .header-main__inner {
        padding: 0 14px;
        gap: 12px;
    }

    .header-logo__icon {
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        font-size: 17px;
    }

    .header-logo__text {
        display: none;
    }

    .header-actions__btn {
        width: 40px;
        height: 40px;
    }

    .header-actions__btn--contacts {
        display: none;
    }

    .search-panel__inner {
        padding: 0 14px;
    }

    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }

    .hero-slider__header {
        top: calc(var(--header-height) + 16px);
    }

    .hero-slider__header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-slider__heading {
        font-size: 26px;
    }

    .hero-slide {
        height: 480px;
        min-height: 400px;
        max-height: 600px;
    }

    .hero-slide__content {
        padding-bottom: 36px;
    }

    .hero-slide__title {
        font-size: 22px;
    }

    .hero-slide__excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-slide__btn {
        width: 100%;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card--featured {
        grid-column: span 1;
    }

    .integrated-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .integrated-card {
        padding: 16px;
    }

    .widgets-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .integrated-grid {
        grid-template-columns: 1fr;
    }

    .timeline-item__date {
        width: 70px;
    }
}

/* ==========================================
   8. ANIMATIONS
   ========================================== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-nav__list .sub-menu {
    animation: slideDown 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.search-panel.active .search-panel__inner {
    animation: fadeIn 0.3s ease 0.05s both;
}

/* ==========================================
   9. SITE FOOTER
   ========================================== */

.site-footer {
    background: #1a1a19;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0;
}

[data-theme="dark"] .site-footer {
    background: #0f110f;
    color: rgba(255, 255, 255, 0.55);
}

/* ---------- Основная часть футера ---------- */
.footer-main {
    padding: 64px 0 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-heading {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px;
    letter-spacing: 0.02em;
}

.footer-heading--mt {
    margin-top: 28px;
}

/* ---------- Колонка: О библиотеке ---------- */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo__icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #007a3c, #00994b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.footer-logo__text {
    line-height: 1.2;
}

.footer-logo__title {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
}

.footer-logo__subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-about {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 20px;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s;
}

a.footer-contact:hover {
    color: #ffffff;
}

.footer-contact i {
    width: 16px;
    text-align: center;
    color: #00994b;
    font-size: 12px;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ---------- Навигация ---------- */
.footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-nav a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.footer-nav a:hover {
    color: #ffffff;
    padding-left: 4px;
}

/* ---------- Соцсети ---------- */
.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-social {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    text-decoration: none;
    transition: all 0.25s var(--easing);
}

.footer-social:hover {
    background: #007a3c;
    border-color: #007a3c;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 122, 60, 0.35);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

/* ---------- Обратная связь ---------- */
.footer-feedback-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    margin: 0 0 16px;
}

.footer-col--feedback .btn--brand-outline {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.footer-col--feedback .btn--brand-outline:hover {
    background: #007a3c;
    border-color: #007a3c;
    color: #ffffff;
}

.footer-bvi {
    margin-top: 16px;
}

.footer-bvi .btn--light {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.footer-bvi .btn--light:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---------- Нижняя полоса ---------- */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 0;
}

.footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.35);
}

.footer-dev {
    color: rgba(255, 255, 255, 0.35);
}

.footer-dev a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-dev a:hover {
    color: #00994b;
}

/* ==========================================
   SINGLE STYLES
   ========================================== */

/* Обертка страницы события */
.single-page {
    background: var(--gray-50);
}

/* Галерея */
.event-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
}

.event-gallery .swiper-slide {
    cursor: pointer;
}

.event-gallery img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Дата в человекочитаемом формате */
.event-date-human {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand);
    background: var(--brand-soft);
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

/* Блок с основной информацией */
.event-info-block {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.event-info-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.event-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.event-info-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: var(--brand-soft);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    font-size: 1rem;
    flex-shrink: 0;
}

.event-info-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.event-info-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* Цены */
.event-prices {
    background: var(--brand-pale);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
}

.event-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.event-price-item:last-child {
    border-bottom: none;
}

.event-price-type {
    font-weight: 500;
    color: var(--gray-700);
}

.event-price-value {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--brand);
}

/* Описание */
.event-description {
    line-height: 1.7;
    font-size: 1rem;
    color: var(--gray-700);
}

.event-description h2,
.event-description h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.event-description p {
    margin-bottom: 1rem;
}

/* Дополнительные блоки */
.event-additional {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
