/*
Theme Name: Березовский отдел культуры
Theme URI: https://berezovo-culture.by
Author: Ваше имя
Author URI: https://ваш-сайт.by
Description: Современная тема для отдела культуры Березовского района. Цвета: #4D0C5E, #DDB053, #EAE2EC, #FBF6EB. Полная поддержка Elementor, Yoast SEO, рубрик, меню, виджетов.
Version: 2.0.0
License: GPL v2 or later
Text Domain: berezovo-culture
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #FBF6EB;
    color: #1f1a2c;
    line-height: 1.5;
}

:root {
    --primary: #4D0C5E;
    --primary-dark: #360845;
    --primary-soft: #6B2A7E;
    --secondary: #DDB053;
    --secondary-dark: #C49A3C;
    --bg-lavender: #EAE2EC;
    --bg-warm: #FBF6EB;
    --white: #ffffff;
    --text-dark: #2C2C2C;
    --text-muted: #5a4e62;
    --border-light: #EADCF0;
    --shadow-sm: 0 8px 20px rgba(77, 12, 94, 0.08);
    --shadow-md: 0 20px 30px -12px rgba(77, 12, 94, 0.15);
    --transition: all 0.25s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ШАПКА */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    border-bottom: 2px solid var(--secondary);
}
.top-bar {
    padding: 20px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.site-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.site-logo p {
    font-size: 0.8rem;
    color: var(--primary-soft);
    font-weight: 500;
    margin-top: 4px;
}
.header-actions {
    display: flex;
    gap: 28px;
    align-items: center;
}
.header-contacts a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}
.header-contacts i {
    color: var(--secondary);
    margin-right: 6px;
}
.search-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary);
    transition: var(--transition);
}
.search-button:hover {
    color: var(--secondary);
}

/* НАВИГАЦИЯ */
.main-nav {
    background: var(--primary);
    border-top: 1px solid rgba(221,176,83,0.25);
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2px;
}
.nav-menu li a {
    display: block;
    padding: 14px 24px;
    color: white;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border-radius: 6px 6px 0 0;
}
.nav-menu li a:hover,
.nav-menu .current-menu-item a,
.nav-menu .current_page_item a {
    background: var(--secondary);
    color: var(--primary-dark);
    box-shadow: 0 -2px 0 rgba(0,0,0,0.05);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    padding: 10px 0;
    cursor: pointer;
}

/* HERO */
.hero {
    background: linear-gradient(125deg, var(--primary) 0%, var(--primary-soft) 100%);
    border-radius: 36px;
    margin: 48px 0 56px;
    padding: 64px 48px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.hero::after {
    content: "✦ ✦ ✦";
    position: absolute;
    font-size: 150px;
    opacity: 0.07;
    bottom: -30px;
    right: -20px;
    font-family: monospace;
    pointer-events: none;
}
.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.9rem;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}
.hero p {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 28px;
    opacity: 0.92;
}
.btn-primary {
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 12px 38px;
    border-radius: 60px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: #f0c46c;
    transform: translateY(-3px);
    box-shadow: 0 12px 22px rgba(0,0,0,0.2);
}
.btn-sm {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 6px 18px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: var(--transition);
}

/* СЕКЦИИ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 10px;
    margin-bottom: 32px;
}
.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.2px;
}
.view-all {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}
.view-all:hover {
    color: var(--secondary-dark);
}

/* СЕТКА КАРТОЧЕК */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}
.post-card {
    background: var(--white);
    border-radius: 28px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.post-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
    box-shadow: var(--shadow-md);
}
.card-img {
    height: 210px;
    background: linear-gradient(135deg, #e2d4e5, #d1bfd5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-content {
    padding: 24px;
}
.post-content h3 {
    font-size: 1.35rem;
    margin-bottom: 10px;
    font-weight: 700;
}
.post-content h3 a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: var(--transition);
}
.post-content h3 a:hover {
    color: var(--secondary-dark);
}
.post-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 12px 0;
    display: flex;
    gap: 18px;
}
.read-more {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* МЕРОПРИЯТИЯ */
.events-section {
    background: var(--bg-lavender);
    border-radius: 40px;
    padding: 44px 40px;
    margin: 40px 0 56px;
}
.event-item {
    display: flex;
    gap: 28px;
    background: var(--white);
    border-radius: 28px;
    padding: 20px 24px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    border-left: 7px solid var(--secondary);
    transition: var(--transition);
}
.event-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}
.event-date {
    background: var(--primary);
    color: white;
    text-align: center;
    min-width: 95px;
    padding: 12px 10px;
    border-radius: 28px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}
.event-day {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.event-month {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}
.event-details h3 {
    margin-bottom: 6px;
    font-size: 1.3rem;
}
.event-details h3 a {
    color: var(--primary);
    text-decoration: none;
}
.event-location {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 8px 0 12px;
}

/* САЙДБАР */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 44px;
    margin-bottom: 60px;
}
.widget {
    background: var(--white);
    border-radius: 28px;
    padding: 26px;
    margin-bottom: 32px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}
.widget-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    border-left: 5px solid var(--secondary);
    padding-left: 16px;
    margin-bottom: 20px;
    color: var(--primary);
}
.widget ul {
    list-style: none;
}
.widget li {
    margin-bottom: 12px;
    border-bottom: 1px dashed #e8dced;
    padding-bottom: 8px;
}
.widget li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}
.widget li a:hover {
    color: var(--secondary-dark);
}

/* ПОДВАЛ */
.site-footer {
    background: var(--primary-dark);
    color: #EADCF0;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    padding: 56px 0 48px;
}
.footer-widget h4 {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}
.footer-menu, .contact-info {
    list-style: none;
}
.footer-menu li, .contact-info li {
    margin-bottom: 12px;
}
.footer-menu a, .contact-info a {
    color: #cfc1da;
    text-decoration: none;
    transition: 0.2s;
}
.footer-menu a:hover {
    color: var(--secondary);
}
.footer-bottom {
    background: #240530;
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    border-top: 1px solid rgba(221,176,83,0.2);
}

/* ПАГИНАЦИЯ */
.pagination {
    text-align: center;
    margin: 40px 0;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: var(--white);
    border-radius: 30px;
    text-decoration: none;
    color: var(--primary);
    border: 1px solid var(--border-light);
}
.pagination .current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* АДАПТИВ */
@media (max-width: 880px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
    .hero {
        padding: 44px 24px;
    }
    .hero h2 {
        font-size: 2rem;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        background: var(--primary);
        position: absolute;
        width: 100%;
        left: 0;
        top: 100%;
        z-index: 999;
        padding: 12px 0;
    }
    .nav-menu.show {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .main-nav .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    .event-item {
        flex-direction: column;
        text-align: center;
    }
}
@media (max-width: 560px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 18px;
    }
}


/* Ограничение размера логотипа */
.custom-logo {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
}

.site-logo img {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}



/* Стили для блока Дворца культуры */
.palace-address-block {
    background: var(--white);
    border-radius: 24px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow-sm);
}
.palace-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary);
}
.palace-header i {
    font-size: 2rem;
    color: var(--primary);
}
.palace-header h3 {
    color: var(--primary);
    margin: 0 0 5px 0;
}
.palace-header p {
    margin: 0;
    color: var(--text-muted);
}
.palace-contacts-short {
    background: var(--bg-lavender);
    padding: 12px 15px;
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
}
.palace-contacts-short i {
    color: var(--secondary);
    margin-right: 5px;
}
.palace-contacts-short a {
    color: var(--primary);
    text-decoration: none;
}
.map-container {
    margin: 20px 0;
}
.map-container iframe {
    border-radius: 16px;
}
.route-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}
.route-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.route-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}
.route-btn.yandex { background: #FC3F1D; color: white; }
.route-btn.google { background: #4285F4; color: white; }
.route-btn.double-gis { background: #F9A825; color: #333; }
.route-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.route-note { font-size: 0.7rem; color: var(--text-muted); margin-top: 12px; }
@media (max-width: 600px) {
    .route-buttons { flex-direction: column; }
    .route-btn { justify-content: center; }
}


/* Полное название учреждения */
.site-title-full {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title-full h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.site-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 3px 0 0;
}

/* переключатель языка */


/* Контейнер переключателя */
.language-switcher-dropdown.only-flags {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    background: #fff;
    padding: 6px 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

/* Эффект при наведении на саму кнопку */
.language-switcher-dropdown.only-flags:hover {
    background-color: #f9f9f9;
    border-color: #ddd;
}

/* Текущий выбранный флаг */
.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-current img {
    width: 24px; /* Размер основного флага */
    height: auto;
    display: block;
    border-radius: 2px; /* Легкое скругление углов флага */
}

.lang-current .arrow {
    font-size: 9px;
    color: #888;
    transition: transform 0.2s ease;
}

/* Поворот стрелочки при открытии */
.language-switcher-dropdown.only-flags:hover .arrow {
    transform: rotate(180deg);
}

/* Выпадающий список */
.only-flags .lang-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 9999;
    min-width: 100%; /* Список будет не уже кнопки */
    border-radius: 4px;
}

/* --- ГЛАВНОЕ: Невидимый мостик, чтобы меню не исчезало --- */
.only-flags .lang-list::before {
    content: "";
    position: absolute;
    top: -12px; /* Закрывает пространство между кнопкой и списком */
    left: 0;
    width: 100%;
    height: 12px;
    display: block;
}

/* Отображение списка при наведении */
.only-flags:hover .lang-list {
    display: block;
}

/* Ссылка (элемент списка с флагом) */
.only-flags .lang-list li a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 10px;
    transition: background 0.2s ease;
}

.only-flags .lang-list li a:hover {
    background-color: #f5f5f5;
}

.only-flags .lang-list img {
    width: 24px; /* Тот же размер, что и у основного флага */
    height: auto;
    display: block;
    border-radius: 2px;
}


/* Если плагин добавляет класс к body */
body.wah-greyscale, 
body[data-wah-greyscale="on"],
html.wah-greyscale {
    filter: grayscale(100%) !important;
    -webkit-filter: grayscale(100%) !important;
    transition: filter 0.3s ease;
}

/* Принудительно для всех изображений и фонов */
body.wah-greyscale * {
    filter: grayscale(100%) !important;
}



/* Прячем стандартную плавающую кнопку плагина */
.aicon_image,.wahout.aicon_link {
    display: none !important;
}

/* Стили для новой кнопки в хедере */
.header-contacts {
    display: flex;
    flex-direction: column; /* Ставит элементы друг под другом */
    align-items: flex-end; /* Выравнивает по правому краю (если нужно) */
}

.accessibility-header-link a {
    font-size: 20px; /* Делаем текст чуть меньше основного */
    color: #333; /* Цвет текста */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px; /* Отступ между иконкой и текстом */
    margin-top: 5px;
    transition: color 0.3s ease;
}

.accessibility-header-link a:hover {
    color: #0056b3; /* Цвет при наведении */
}

.accessibility-header-link i {
    font-size: 16px; /* Размер иконки глаза */
}


/* ===== СЛАЙДЕР НА ГЛАВНОЙ ===== */
.hero-slider {
    margin: 40px 0 56px;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.hero-swiper {
    width: 100%;
    height: 500px;
}
.slide-card {
    position: relative;
    width: 100%;
    height: 100%;
}
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}
.slide-bg.no-image {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(77,12,94,0.85) 0%, rgba(107,42,126,0.75) 100%);
}
.slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: white;
    max-width: 700px;
}
.slide-category {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 20px;
    width: fit-content;
}
.slide-category.news { background: #2c5f8a; color: white; }
.slide-category.event { background: #c0392b; color: white; }
.slide-category.collective { background: #27ae60; color: white; }
.slide-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.3;
}
.slide-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    opacity: 0.9;
    flex-wrap: wrap;
}
.slide-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 25px;
    opacity: 0.9;
}
.slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    width: fit-content;
    transition: var(--transition);
}
.slide-btn:hover {
    background: white;
    transform: translateX(5px);
}
.swiper-button-prev, .swiper-button-next {
    color: var(--secondary);
    background: rgba(0,0,0,0.3);
    width: 45px;
    height: 45px;
    border-radius: 50%;
}
.swiper-button-prev:hover, .swiper-button-next:hover {
    background: var(--secondary);
    color: var(--primary-dark);
}
.swiper-pagination-bullet {
    background: white;
    opacity: 0.6;
}
.swiper-pagination-bullet-active {
    background: var(--secondary);
    opacity: 1;
}
@media (max-width: 768px) {
    .hero-swiper { height: 550px; }
    .slide-content { padding: 30px 25px; }
    .slide-content h2 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
    .hero-swiper { height: 600px; }
    .slide-content h2 { font-size: 1.2rem; }
}

/* ===== СЛАЙДЕР ЛОГОТИПОВ ===== */
.parent-orgs-block {
    background: linear-gradient(135deg, var(--bg-lavender) 0%, var(--white) 100%);
    padding: 50px 0;
    margin: 50px 0 0;
    border-top: 1px solid var(--border-light);
}

.parent-orgs-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.parent-orgs-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.parent-orgs-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

.logos-carousel-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.logos-swiper {
    overflow: hidden;
    padding: 15px 5px 30px;
}

.logo-card {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

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

.logo-card img {
    max-width: 140px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 12px;
}

.logo-placeholder {
    width: 140px;
    height: 80px;
    background: var(--bg-lavender);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--text-muted);
}

.logo-name {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.logo-card a {
    text-decoration: none;
}

.logos-empty {
    text-align: center;
    padding: 40px;
    background: var(--white);
    border-radius: 24px;
    color: var(--text-muted);
}

.parent-orgs-note {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 30px;
    opacity: 0.7;
}

/* Swiper настройки */
.logos-swiper .swiper-pagination-bullet-active {
    background: var(--secondary);
}

.logos-swiper .swiper-button-prev,
.logos-swiper .swiper-button-next {
    color: var(--secondary);
    background: rgba(77,12,94,0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.logos-swiper .swiper-button-prev:after,
.logos-swiper .swiper-button-next:after {
    font-size: 1rem;
}

/* Адаптив */
@media (max-width: 768px) {
    .parent-orgs-block { padding: 35px 0; }
    .parent-orgs-title { font-size: 1.3rem; }
    .parent-orgs-line { width: 40px; }
    .logo-card { padding: 15px; }
    .logo-card img { max-width: 100px; max-height: 60px; }
}


/* ===== БЛОК РУБРИК НА ГЛАВНОЙ ===== */
.rubrics-block {
    background: var(--white);
    border-radius: 28px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.rubrics-title {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
}

.rubrics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rubric-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-lavender);
    padding: 6px 16px;
    border-radius: 30px;
    text-decoration: none;
    transition: var(--transition);
}

.rubric-item:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.rubric-name {
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 500;
}

.rubric-count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
}

.all-news-link {
    text-align: center;
    margin-top: 20px;
}

.all-news-link .btn-primary {
    display: inline-block;
    padding: 10px 30px;
}

/* Адаптив */
@media (max-width: 768px) {
    .rubrics-list {
        justify-content: center;
    }
}

/* ===== КАЛЕНДАРЬ СОБЫТИЙ ===== */
/* ===== КАЛЕНДАРЬ СОБЫТИЙ ===== */
.custom-calendar {
    background: var(--white);
    border-radius: 20px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
}

.custom-calendar-header {
    text-align: center;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary);
}

.custom-calendar-month {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.custom-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
}

.custom-weekday {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 5px;
}

.custom-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.custom-day {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    background: var(--bg-lavender);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.custom-day.empty {
    background: transparent;
    cursor: default;
}

.custom-day.has-event {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.custom-day.has-event:hover {
    background: var(--secondary);
    color: var(--primary-dark);
    transform: scale(1.05);
}

.custom-day.today {
    border: 2px solid var(--secondary);
}

.custom-day.active {
    background: var(--secondary);
    color: var(--primary-dark);
}

.event-dot {
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
}

.custom-day.active .event-dot {
    background: var(--primary);
}

.custom-calendar-events {
    background: var(--bg-lavender);
    border-radius: 16px;
    padding: 12px;
}

.events-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-light);
}

.events-list {
    max-height: 180px;
    overflow-y: auto;
}

.event-item {
    background: var(--white);
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.event-item:hover {
    background: var(--secondary);
    transform: translateX(3px);
}

.event-item-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
    margin-bottom: 3px;
}

.event-item-location {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-events {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 12px;
}

/* Блок ближайших событий */
/* ===== БЛИЖАЙШИЕ СОБЫТИЯ ===== */
.events-section {
    background: var(--bg-lavender);
    border-radius: 40px;
    padding: 44px 40px;
    margin: 40px 0 56px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.event-item {
    display: flex;
    gap: 25px;
    background: var(--white);
    border-radius: 28px;
    padding: 20px 24px;
    align-items: center;
    border-left: 7px solid var(--secondary);
    transition: var(--transition);
}

.event-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.event-date {
    background: var(--primary);
    color: white;
    text-align: center;
    min-width: 85px;
    padding: 12px 10px;
    border-radius: 24px;
    flex-shrink: 0;
}

.event-day {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.event-month {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.event-details {
    flex: 1;
}

.event-details h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.event-details h3 a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.event-details h3 a:hover {
    color: var(--secondary-dark);
}

.event-location {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 5px 0 12px;
}

.event-image {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-lavender);
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.event-item:hover .event-image img {
    transform: scale(1.05);
}

.btn-sm {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 6px 18px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: var(--transition);
}

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

.events-footer {
    text-align: center;
    margin-top: 10px;
}

.events-all-link {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.events-all-link:hover {
    background: var(--secondary);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.no-events {
    text-align: center;
    padding: 40px;
    background: var(--white);
    border-radius: 24px;
    color: var(--text-muted);
}

/* Адаптив */
@media (max-width: 768px) {
    .events-section {
        padding: 30px 20px;
    }
    .event-item {
        flex-direction: column;
        text-align: center;
    }
    .event-date {
        margin: 0 auto;
    }
    .event-image {
        width: 100%;
        max-width: 200px;
        height: 150px;
        margin-top: 10px;
    }
    .event-details {
        width: 100%;
    }
    .events-all-link {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}

/* ===== КАРТОЧКИ С РАСПИСАНИЕМ услуги ===== */
.schedule-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--bg-lavender) 100%);
}

.schedule-info {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light);
}

.schedule-info p {
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.schedule-info i {
    width: 24px;
    color: var(--secondary);
}

.schedule-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Жестко запрещаем скролл для самого контейнера списка событий */
#customCalendarEvents .events-list {
    overflow-x: hidden !important;
    overflow-y: hidden !important; /* Если вертикальный скролл там тоже не нужен */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Корректируем сам элемент при наведении */
#customCalendarEvents .event-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Если при ховере элемент пытается вылезти за рамки (из-за shadow или scale) */
#customCalendarEvents .event-item:hover {
    max-width: 100% !important;
    /* Если у вас используется transform: scale, лучше уменьшить его или убрать, 
       чтобы элемент не распирал родителя, например: transform: none; */
}

/* Контейнер для сетки событий */
.events-grid-section {
    margin: 40px 0;
    width: 100%;
}

.events-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
    box-sizing: border-box;
}

/* Карточка события плиточкой */
.event-tile-card {
    background: #ffffff;
    border-radius: 16px;
    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 rgba(0, 0, 0, 0.03);
}

.event-tile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Изображение и обертка */
.event-tile-img-wrapper {
    position: relative;
    height: 200px;
    width: 100%;
    background: #f5f2f7;
}

.event-tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-tile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #8a2be2;
    background: #f1ebf7;
}

/* Красивая круглая или скругленная плашка даты поверх картинки */
.event-tile-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ffd166; /* Желтый цвет как у вас на макете */
    color: #3d0066; /* Темно-фиолетовый текст */
    padding: 8px 14px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    font-weight: bold;
    min-width: 50px;
}

.badge-day {
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 2px;
}

.badge-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Контент карточки */
.event-tile-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-tile-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.event-tile-content h3 a {
    color: #3d0066;
    text-decoration: none;
    transition: color 0.2s;
}

.event-tile-content h3 a:hover {
    color: #8a2be2;
}

.event-tile-location {
    color: #7a7480;
    font-size: 0.9rem;
    margin: 0 0 20px 0;
}

.event-tile-location i {
    color: #ffd166;
    margin-right: 5px;
}

/* Ссылка-кнопка внизу */
.event-tile-link {
    margin-top: auto;
    color: #8a2be2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-block;
    transition: padding-left 0.2s;
}

.event-tile-link:hover {
    padding-left: 5px;
    color: #3d0066;
}
