/*!
Theme Name: SvetiTheme
Text Domain: svetitheme
Author: Dmitry Smirnov
Version: 1.0.3
*/

/* ==========================================================================
   1. НАША СИСТЕМА СТИЛЕЙ (CSS ПЕРЕМЕННЫЕ)
   ========================================================================== */
:root {
	--color-pink: #ff0072;
	--color-orange: #ff573b;
	--color-dark: #28292a;
	--color-light: #ffffff;
	--font-family-base: 'Open Sans', sans-serif;
	--font-size-heading: clamp(2.5rem, 5vw + 1rem, 4rem);
	--font-size-subheading: clamp(1.5rem, 3vw + 1rem, 2.25rem);
	--font-size-normal: 1rem;
	--font-size-small: 0.875rem;
}

/* ==========================================================================
   2. ГЛОБАЛЬНЫЙ СБРОС И БАЗОВЫЕ СТИЛИ
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-family-base); font-size: var(--font-size-normal); font-weight: 400; line-height: 1.6; color: var(--color-dark); background-color: var(--color-light); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
a { text-decoration: none; color: inherit; }

/* ==========================================================================
   3. ГЛОБАЛЬНЫЕ КОМПОНЕНТЫ И УТИЛИТЫ
   ========================================================================== */
.container { max-width: 1400px; width: 100%; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.button { display: inline-block; padding: 1rem 2.5rem; border: 2px solid transparent; border-radius: 50px; font-weight: 700; text-align: center; transition: all 0.3s ease; }
.button:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); text-decoration: none; }
.button-primary { background-color: var(--color-pink); color: var(--color-light); }
.button-primary:hover { background-color: var(--color-orange); }
.button-secondary { background-color: transparent; color: var(--color-pink); border-color: var(--color-pink); }
.button-secondary:hover { background-color: var(--color-pink); color: var(--color-light); }
.section-subtitle { display: block; font-size: var(--font-size-small); font-weight: 700; color: var(--color-orange); text-transform: uppercase; margin-bottom: 1rem; }
.section-intro { max-width: 600px; margin: 1rem auto 3rem auto; font-size: 1.125rem; color: #666; text-align: center; }
.section-footer { text-align: center; margin-top: 4rem; }
.text-heading { font-size: var(--font-size-heading); font-weight: 800; line-height: 1.2; }
.text-subheading { font-size: var(--font-size-subheading); font-weight: 700; line-height: 1.3; }

/* ==========================================================================
   4. СТИЛИ КОНКРЕТНЫХ СЕКЦИЙ
   ========================================================================== */

/* Шапка */
.site-header { padding: 1.5rem 0; position: absolute; width: 100%; z-index: 10; }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.site-branding .custom-logo { max-width: 150px; }
.site-branding .site-title a { font-size: 1.75rem; font-weight: 700; color: var(--color-dark); }
.main-navigation ul { margin: 0; padding: 0; list-style: none; display: flex; gap: 2.5rem; }

/* Переключатель языков */
ul.lang-switcher { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 1.5rem; }
ul.lang-switcher li a { font-weight: 600; color: var(--color-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.45; transition: opacity 0.2s ease; }
ul.lang-switcher li.current-lang a { opacity: 1; }
ul.lang-switcher li a:hover { opacity: 0.75; }
.home ul.lang-switcher li a,
.single-post ul.lang-switcher li a,
.single-training ul.lang-switcher li a,
.single-expert ul.lang-switcher li a { color: var(--color-light); }
/* Мобильный переключатель языков — скрыт по умолчанию, виден только внутри бургер-меню */
/* Повышаем специфичность чтобы перебить ul.lang-switcher { display: flex } */
ul.lang-switcher.lang-switcher--mobile { display: none; }
@media (max-width: 992px) {
    ul.lang-switcher.lang-switcher--mobile {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid #eee;
    }
    ul.lang-switcher.lang-switcher--mobile li a {
        font-size: 1rem;
        color: var(--color-dark);
        opacity: 0.5;
    }
    ul.lang-switcher.lang-switcher--mobile li.current-lang a { opacity: 1; }
    /* Десктопный переключатель скрываем на мобильных */
    ul.lang-switcher--desktop { display: none; }
}
.main-navigation a { font-weight: 600; color: var(--color-dark); position: relative; padding-bottom: 5px; }
.main-navigation a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--color-pink); transition: width 0.3s ease; }
.main-navigation a:hover::after { width: 100%; }

/* Главный экран — полноширинный */
.hero-section { padding: 0; overflow: hidden; }

.hero-fullscreen {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-color: #28292a; /* fallback если нет фото */
}
.hero-fullscreen__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.1) 100%);
}
.hero-fullscreen__content {
    position: relative;
    z-index: 2;
    padding-top: 8rem;
    padding-bottom: 4rem;
    max-width: 680px;
    text-align: center;
    margin: 0 auto;
}
.hero-fullscreen .hero-subtitle { color: rgba(255,255,255,0.8); }
.hero-fullscreen .text-heading { color: #fff; }
.hero-text { font-size: 1.25rem; line-height: 1.7; margin: 1.5rem 0 2.5rem 0; color: rgba(255,255,255,0.85); }

/* Последняя статья блога (главная страница) */
.latest-post-section { padding: 4rem 0; }
.latest-post-card {
    max-width: 680px;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    min-height: 380px;
    background-size: cover;
    background-position: center;
    background-color: #28292a;
    display: flex;
    align-items: flex-end;
}
.latest-post-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.80) 40%, rgba(0,0,0,0.15) 100%);
}
.latest-post-card__content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    color: #fff;
    width: 100%;
}
.latest-post-card__label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-pink);
    display: block;
    margin-bottom: 0.5rem;
}
.latest-post-card__title { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.75rem; line-height: 1.3; }
.latest-post-card__title a { color: #fff; }
.latest-post-card__title a:hover { opacity: 0.85; }
.latest-post-card__excerpt { opacity: 0.8; margin-bottom: 1.5rem; font-size: 0.95rem; line-height: 1.6; }

/* О проекте (секция удалена, CSS оставлен на случай использования) */
.about-section { padding: 4rem 0; text-align: center; }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin-top: 4rem; text-align: left; }
.feature-card { background-color: var(--color-light); padding: 2.5rem; border-radius: 1rem; box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05); }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; background-color: #FFF0ED; border-radius: 50%; margin-bottom: 1.5rem; }
.feature-icon svg { color: var(--color-orange); }
.feature-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.feature-card p { color: #666; line-height: 1.8; }

/* Эксперты */
.experts-section { background-color: #F9FAFB; padding: 4rem 0; text-align: center; }
.experts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.expert-card {
    background-color: var(--color-light);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* ДОБАВЬТЕ ЭТУ СТРОКУ */
    flex-direction: column; /* И ЭТУ ТОЖЕ */
}

.expert-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); }
.expert-image img { width: 100%; height: 350px; object-fit: cover; }
.expert-info {
    padding: 1rem;
    display: flex; /* Включаем Flexbox! */
    flex-direction: column; /* Элементы будут идти друг под другом */
    flex-grow: 1; /* Разрешаем этому блоку растягиваться */
}

.expert-text {
    flex-grow: 1; /* Это главный трюк! Этот блок займет все свободное место */
}

.expert-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.expert-info span {
    display: block;
    color: var(--color-orange);
    font-weight: 600;

}

.expert-theses {
    padding: 0;
    margin: 2rem 0; /* Отступ сверху и снизу */
    font-size: var(--font-size-small);
    color: #666;
    text-align: center;
    line-height: 1.5; /* Увеличим межстрочный интервал */
}

/* Стили для страницы одного эксперта */
.expert-profile-section { padding: 10rem 0 4rem 0; }
.expert-profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 4rem; align-items: flex-start; }
.expert-sidebar { text-align: center; }
.expert-sidebar-photo img { width: 100%; border-radius: 1rem; }
.expert-sidebar-name { font-size: 2rem; font-weight: 700; margin: 1.5rem 0 0.5rem 0; }
.expert-sidebar-profession { color: var(--color-orange); font-weight: 600; margin-bottom: 2rem; }
.expert-main-content .expert-theses-long { background-color: #F9FAFB; padding: 2rem; border-radius: 0.5rem; margin-bottom: 2rem; line-height: 1.8; }
.expert-description { line-height: 1.8; }
.expert-description h1, .expert-description h2, .expert-description h3 { margin-bottom: 1rem; font-weight: 700; }
.expert-description p { margin-bottom: 1.5rem; }
.expert-description ul, .expert-description ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }

/* CTA-блок */
.cta-section { background-color: #FFF0ED; color: var(--color-dark); padding: 0; overflow: hidden; }
.cta-container { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem; }
.cta-content { padding: 4rem 0; }
.cta-content .text-subheading { color: var(--color-dark); }
.cta-content p { color: #555; margin-bottom: 2rem; }
.cta-image img { width: 100%; height: 100%; object-fit: cover; }

.page-header {
    background-color: #F9FAFB;
    padding-top: 10rem;
    padding-bottom: 4rem;
    text-align: center;
}

/* 5. Стили для ленты новостей */
.news-feed-section { padding: 4rem 0 4rem 0; }
.news-feed-list { display: grid; gap: 4rem; }
.news-feed-item { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: center; }
.news-feed-item__image img { border-radius: 0.5rem; width: 100%; height: 180px; object-fit: cover; }
.news-feed-item__title { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; }
.news-feed-item__title a:hover { color: var(--color-pink); }
.news-feed-item__excerpt { color: #666; }
.news-feed-item__meta { font-size: var(--font-size-small); color: #888; margin-top: 1.5rem; }
.news-feed-item__meta a { font-weight: 600; color: var(--color-dark); }
.news-feed-item__meta a:hover { text-decoration: underline; }

/* 6. Стили для одной новости */
.news-header { position: relative; min-height: 400px; display: flex; align-items: center; text-align: center; background-size: cover; background-position: center; }
.news-header__overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); }
.news-header .container { position: relative; z-index: 2; }
.news-header .text-heading { color: var(--color-light); }
.news-content-container { max-width: 800px; }
.news-lead { font-size: 1.5rem; font-weight: 300; color: var(--color-orange); margin: 4rem 0; line-height: 1.6; text-align: center; }
.news-content { line-height: 1.8; }
.news-content h2, .news-content h3 { font-weight: 700; margin: 2.5rem 0 1rem 0; }
.news-content p { margin-bottom: 1.5rem; }
.news-content ul, .news-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.news-author-box { display: flex; align-items: center; gap: 1.5rem; margin-top: 4rem; padding-top: 3rem; border-top: 1px solid #eee; }
.news-author-box__photo { flex-shrink: 0; }
.news-author-box__photo img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; display: block; }
.news-author-box__label { font-size: var(--font-size-small); color: #888; }
.news-author-box__name { font-size: 1.5rem; font-weight: 700; margin: 0.25rem 0; }
.news-author-box__name a:hover { color: var(--color-pink); }
.news-author-box__profession { color: #666; margin: 0; }

.single-post .main-navigation a,
.single-training .main-navigation a,
.home .main-navigation a {
    color: var(--color-light);
}

/* На мобильных пункты меню всегда тёмные (панель белая) */
@media (max-width: 992px) {
    .single-post .main-navigation a,
    .single-training .main-navigation a,
    .single-expert .main-navigation a,
    .home .main-navigation a { color: var(--color-dark); }
}

/* 
 * Цвет подчеркивания при наведении (Розовый)
 */
.single-post .main-navigation a::after,
.single-training .main-navigation a::after {
    background-color: var(--color-pink);
}

/* 
 * Если используется текстовое название сайта вместо логотипа
 */
.single-post .site-branding .site-title a,
.single-training .site-branding .site-title a {
    color: var(--color-light);
}

/* Подвал */
.site-footer { background-color: var(--color-dark); color: #a0a0a0; padding: 3rem 0; text-align: center; }

/* Обновленный подвал карточки */
.event-footer {
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Выравнивание по низу */
}

.event-prices-list {
    display: flex;
    flex-direction: column; /* Цены одна под другой */
    gap: 0.25rem;
}

.price-tag {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-dark);
}

.price-tag.free {
    color: var(--color-pink);
    text-transform: uppercase;
    font-size: 0.875rem;
}

/* --- Стили для списка мероприятий --- */
.events-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.event-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.event-card:hover {
    transform: translateY(-5px);
}

/* ЧЕРНО-БЕЛЫЙ ЭФФЕКТ ДЛЯ ПРОШЕДШИХ */
.event-card.is-past .event-card__image,
.event-card.is-past .event-card__date-badge {
    filter: grayscale(100%);
    opacity: 0.7;
}

.event-card__image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.event-card__date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #fff;
    padding: 5px 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    line-height: 1.2;
    color: var(--color-dark);
    z-index: 2;
}
.event-card__date-badge .day { font-size: 1.2rem; display: block; color: var(--color-pink); }
.event-card__date-badge .month { font-size: 0.8rem; text-transform: uppercase; }

.event-card__content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.event-title { font-size: 1.25rem; margin-bottom: 0.5rem; line-height: 1.3; }
.event-title a:hover { color: var(--color-pink); }
.event-excerpt { font-size: 0.9rem; color: #666; margin-bottom: 1.5rem; flex-grow: 1; }

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.price-tag { font-weight: 700; font-size: 0.9rem; margin-right: 5px; white-space: nowrap; }
.button-small { padding: 0.5rem 1.2rem; font-size: 0.9rem; }


/* ==========================================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ МЕРОПРИЯТИЯ (SINGLE EVENT)
   ========================================================================== */

/* Контейнер пошире, чтобы вместить сайдбар */
.news-content-container-wide {
    max-width: 1100px; 
    width: 100%;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* --- 1. ВЕРХНЯЯ ПЛАШКА (ДАТА, ЦЕНА, КНОПКА) --- */

.event-top-bar {
    background-color: #fff;
    border-radius: 1rem;
    padding: 2.5rem 3rem;
    margin-top: -5rem; /* Наезжает на картинку */
    margin-bottom: 4rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.event-top-bar__info {
    display: flex;
    gap: 4rem; /* Расстояние между блоком даты и цены */
    align-items: center;
}

/* Колонка (Дата или Цена) */
.event-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

/* Разделительная вертикальная линия между Датой и Ценой */
.event-meta-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 1px;
    background-color: #e0e0e0;
}

/* Заголовки (КОГДА, СТОИМОСТЬ) */
.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Розовая точка перед заголовком */
.meta-label::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background-color: var(--color-pink);
    border-radius: 50%;
}

/* Значения (Цифры) */
.meta-value {
    font-size: 1.75rem; /* Крупно */
    font-weight: 800; /* Жирно */
    color: var(--color-dark);
    line-height: 1.1;
}

/* Ряд цен */
.prices-row {
    display: flex;
    align-items: baseline;
    gap: 0;
}

.prices-row span {
    margin-right: 12px;
    font-feature-settings: "tnum"; /* Моноширинные цифры для красоты */
}

/* Слэш между ценами */
.prices-row span:not(:last-child)::after {
    content: '/';
    color: #ddd;
    font-weight: 300;
    margin-left: 12px;
    font-size: 1.25rem;
}

/* Кнопка в баре */
.event-top-bar__action .button {
    padding: 1.2rem 3rem; /* Чуть больше кнопка */
    font-size: 1.1rem;
}


/* --- 2. ОСНОВНОЙ КОНТЕНТ И САЙДБАР --- */

.event-body-grid {
    display: grid;
    grid-template-columns: 1fr 300px; /* Контент гибкий, сайдбар фикс 300px */
    gap: 4rem;
    align-items: flex-start;
}

/* Стили текста */
.event-body-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}
.event-body-content h2 { margin-top: 0; }


/* --- 3. КАРТОЧКА ЭКСПЕРТА В САЙДБАРЕ --- */

.sidebar-expert-card {
    background: #F9FAFB;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    position: sticky;
    top: 2rem; /* Блок "липнет" при скролле */
    border: 1px solid #eee;
}

.sidebar-expert-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.sidebar-expert-link {
    text-decoration: none;
    display: block;
    transition: transform 0.2s;
}

.sidebar-expert-link:hover {
    transform: translateY(-3px);
}

.sidebar-expert-link img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border: 3px solid #fff;
}

.sidebar-expert-link .name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.sidebar-expert-link .prof {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.2rem;
    line-height: 1.4;
    display: block;
}

.sidebar-expert-link .link-text {
    font-size: 0.85rem;
    color: var(--color-pink);
    font-weight: 700;
    text-transform: uppercase;
}

/* СТИЛИ МОДАЛЬНОГО ОКНА */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 99999; /* Поверх всего */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px); /* Красивое размытие фона */
    align-items: center;
    justify-content: center;
}

.custom-modal-content {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 450px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    line-height: 1;
    color: #ccc;
    cursor: pointer;
    transition: 0.2s;
}
.close-modal:hover { color: var(--color-pink); }

.messengers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Две колонки */
    gap: 15px;
    margin-bottom: 20px;
}

.messenger-btn {
    display: flex;
    flex-direction: column; /* Иконка сверху, текст снизу */
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--color-dark);
    background: #f9f9f9;
    cursor: pointer;
}
.messenger-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.messenger-btn img { width: 32px; height: 32px; margin-bottom: 8px; }

/* Брендовые цвета при наведении */
.messenger-btn.wa:hover { background-color: #e6fffa; color: #25D366; }
.messenger-btn.tg:hover { background-color: #f0f8ff; color: #0088cc; }
.messenger-btn.vb:hover { background-color: #f3f0ff; color: #665CAC; }
.messenger-btn.fb:hover { background-color: #f0f6ff; color: #1877F2; }
.messenger-btn.email:hover { background-color: #fff5f5; color: #EA4335; }

/* Форма */
#email-form-container {
    border-top: 1px solid #eee;
    padding-top: 20px;
    text-align: left;
}
.email-request-form input, .email-request-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-family: inherit;
}
.email-request-form input[type="submit"] {
    background-color: var(--color-pink);
    color: white;
    font-weight: 700;
    cursor: pointer;
    border: none;
    margin-top: 10px;
}

/* --- Обновленные стили Магазина --- */

.shop-section {
    background-color: var(--color-orange);
}

/* Фильтр по странам */
.shop-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3rem;
}
.filter-btn {
    display: inline-block;
    padding: 0.55rem 1.5rem;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 50px;
    background-color: transparent;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.filter-btn:hover {
    border-color: #fff;
    background-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}
.filter-btn.active {
    background-color: #fff;
    border-color: #fff;
    color: var(--color-orange);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    border: 1px solid #ffeef5; /* Легкая розовая рамка */
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.product-text {
    flex-grow: 1; /* Текст занимает место, толкая кнопку вниз */
}

.product-info h3 { 
    font-size: 1.2rem; 
    margin-bottom: 0.5rem; 
    font-weight: 700; 
}

.product-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-price { 
    font-size: 1.25rem; 
    font-weight: 800; 
    color: var(--color-pink); 
    margin-bottom: 1.5rem; 
}

@media (max-width: 992px) { 
    .products-grid { grid-template-columns: 1fr 1fr; } 
}
@media (max-width: 576px) { 
    .products-grid { grid-template-columns: 1fr; } 
}


/* --- 4. АДАПТИВНОСТЬ --- */

@media (max-width: 992px) {
    .event-body-grid {
        grid-template-columns: 1fr; /* Одна колонка */
    }
    .event-body-sidebar {
        order: -1; /* Эксперт над текстом */
        margin-bottom: 3rem;
    }
    .sidebar-expert-card {
        position: static; /* Отключаем липкость */
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }
    .sidebar-expert-link {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    .sidebar-expert-link img { margin: 0; width: 80px; height: 80px; }
    .sidebar-expert-link:hover { transform: none; }
}

@media (max-width: 768px) {
    .event-top-bar {
        flex-direction: column;
        align-items: stretch; /* Растянуть на всю ширину */
        padding: 2rem;
        gap: 2rem;
    }
    .event-top-bar__info {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    .event-meta-item:not(:last-child)::after {
        display: none; /* Скрываем черту */
    }
    .prices-row {
        flex-wrap: wrap;
    }
    .event-top-bar__action .button {
        width: 100%; /* Кнопка на всю ширину */
    }
    
    /* Упрощаем карточку эксперта на мобильном */
    .sidebar-expert-card {
        display: block;
        text-align: center;
    }
    .sidebar-expert-link {
        display: block;
    }
    .sidebar-expert-link img { margin: 0 auto 1rem auto; }
}

/* ==========================================================================
   СТИЛИ ДЛЯ КОРЗИНЫ (ВОЗВРАЩАЕМ)
   ========================================================================== */

/* Плавающая кнопка корзины */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--color-dark);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.floating-cart:hover {
    transform: scale(1.1);
    background: var(--color-pink);
}

.cart-icon {
    font-size: 24px;
    line-height: 1;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-pink);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Внутренности окна корзины */
.cart-items-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    text-align: left;
    border-top: 1px solid #eee;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-dark);
}

.cart-item-price {
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
}

.remove-item {
    color: #ff4d4d;
    cursor: pointer;
    margin-left: 15px;
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.7;
    transition: 0.2s;
}

.remove-item:hover {
    opacity: 1;
    transform: scale(1.1);
}

.cart-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f5f5f5;
}

.cart-total {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: right;
    color: var(--color-dark);
}

.close-cart {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: 0.2s;
}
.close-cart:hover { color: var(--color-dark); }

.empty-cart-msg {
    text-align: center;
    color: #999;
    padding: 2rem 0;
}

/* --- Стили для Логотипа --- */
.logo-link img {
    max-height: 60px; /* Регулируй высоту логотипа здесь */
    width: auto;
    display: block;
}

/* --- Стили для Слайдера в CTA --- */
.slideshow-wrapper {
    position: relative;
    width: 100%;
    height: 400px; /* Высота блока с картинками */
    overflow: hidden;
}

.cta-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; /* По умолчанию скрыты */
    transition: opacity 1s ease-in-out; /* Плавное появление за 1 сек */
}

.cta-slide.active {
    opacity: 1; /* Активный слайд виден */
}

/* Адаптив для слайдера */
@media (max-width: 992px) {
    .slideshow-wrapper {
        height: 300px;
        margin-bottom: 2rem;
    }
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero-container, .cta-container { grid-template-columns: 1fr; text-align: center; }
    .hero-content { order: 2; }
    .hero-image { order: 1; margin-bottom: 2rem; }
    .experts-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-content { padding: 4rem 0; }
}

/* Гамбургер белый на страницах с тёмным hero */
.home .menu-toggle span,
.single-post .menu-toggle span,
.single-training .menu-toggle span { background-color: var(--color-light); }

/* --- Мобильное меню (гамбургер) --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 4px;
    z-index: 1100;
}
.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--color-dark);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s, background-color 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); background-color: var(--color-pink); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); background-color: var(--color-pink); }

@media (max-width: 992px) {
    .menu-toggle { display: flex; }
    /* Когда меню открыто — кнопка × фиксируется в правом углу панели */
    .menu-toggle.active {
        position: fixed;
        top: 1.25rem;
        right: 1rem;
        z-index: 1200;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        padding: 5rem 1.5rem 2rem;
        box-shadow: -5px 0 20px rgba(0,0,0,0.15);
        transition: right 0.3s ease;
        z-index: 1050;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .main-navigation.active { right: 0; }

    /* Пункты навигации — по центру, кликабельны */
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        align-items: center;
        width: 100%;
    }
    .main-navigation ul li { width: 100%; text-align: center; }
    .main-navigation ul li a {
        display: block;
        padding: 0.9rem 0;
        font-size: 1.1rem;
        color: var(--color-dark);
        border-bottom: 1px solid #f0f0f0;
    }
    .main-navigation ul li a:hover { color: var(--color-pink); }
    .main-navigation ul li a::after { display: none; } /* убираем десктопный underline-эффект */

    /* Переключатель языков — горизонтально, по центру */
    ul.lang-switcher.lang-switcher--mobile {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        width: 100%;
    }
}

.nav-overlay { display: none; }
@media (max-width: 768px) {
    .features-grid, .experts-grid { grid-template-columns: 1fr; }

    /* Screen1: новости — картинка сверху, текст снизу */
    .news-feed-item { grid-template-columns: 1fr; }
    .news-feed-item__image img { height: 220px; }

    /* Screen3: страница эксперта — описание под фото */
    .expert-profile-grid { grid-template-columns: 1fr; gap: 2rem; }

    /* Screen4: мероприятия — один в ряд */
    .events-list { grid-template-columns: 1fr; }
}

.pad-top-4 {
    padding-top: 4rem;
}

.pad-bot-4 {
    padding-bottom: 4rem;
}

.w-100 { width: 100%; }

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 1.25rem 2rem;
    z-index: 99998;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.cookie-banner__content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.cookie-banner__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 200px;
}
.cookie-banner__text strong { font-weight: 700; font-size: 1rem; }
.cookie-banner__text span { font-size: 0.875rem; color: #666; }
.cookie-banner__actions { display: flex; gap: 0.75rem; flex-shrink: 0; }
.cookie-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}
.cookie-btn--reject { background: var(--color-dark); color: #fff; }
.cookie-btn--reject:hover { background: #444; }
.cookie-btn--accept { background: var(--color-pink); color: #fff; }
.cookie-btn--accept:hover { opacity: 0.85; }
@media (max-width: 576px) {
    .cookie-banner { padding: 1rem; }
    .cookie-banner__actions { width: 100%; justify-content: flex-end; }
}

/* --- Табы на странице эксперта --- */
.expert-tabs-nav { display: flex; gap: 2rem; border-bottom: 2px solid #eee; margin-bottom: 2rem; flex-wrap: wrap; }
.tab-btn { background: none; border: none; font-size: 1.1rem; font-weight: 600; color: #888; padding-bottom: 1rem; position: relative; cursor: pointer; transition: color 0.2s; }
.tab-btn.active { color: var(--color-pink); }
.tab-btn.active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 3px; background: var(--color-pink); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Галерея отзывов и дипломов */
.expert-gallery-content { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.expert-gallery-content img { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; cursor: pointer; transition: opacity 0.2s; }
.expert-gallery-content img:hover { opacity: 0.85; }
@media (max-width: 600px) {
    .expert-gallery-content { grid-template-columns: repeat(2, 1fr); }
    .expert-gallery-content img { height: 120px; }
}

/* Цены на странице эксперта */
.expert-prices-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: #f9f9f9; border-radius: 0.5rem; }
.price-row span { color: #888; font-size: 0.875rem; font-weight: 700; text-transform: uppercase; }
.price-row b { font-size: 1.25rem; color: var(--color-dark); }

/* ─────────────────────────────────────────────────
   СТРАНИЦА ЗАНЯТИЙ
   ───────────────────────────────────────────────── */
.zaniatia-section { padding: 3rem 0 5rem; }

.zaniatia-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.zaniatia-card {
    background: #fdf8f6;
    border-radius: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.zaniatia-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

/* Бейдж-пилюля с днём недели */
.zaniatia-card__badge {
    background: linear-gradient(135deg, var(--color-pink), var(--color-orange));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    white-space: nowrap;
}

/* Блок с временем */
.zaniatia-card__time-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin-bottom: 1rem;
    line-height: 1;
}
.zaniatia-card__time {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--color-orange);
    line-height: 1;
}
.zaniatia-card__period {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    opacity: 0.55;
    align-self: flex-end;
    padding-bottom: 0.25rem;
}

/* Название занятия */
.zaniatia-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.65rem;
}

/* Описание */
.zaniatia-card__desc {
    font-size: 0.875rem;
    color: #777;
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* Кнопка */
.zaniatia-card__footer { margin-top: auto; width: 100%; }
.zaniatia-card__btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Пустое состояние */
.zaniatia-empty {
    text-align: center;
    color: #aaa;
    font-size: 1.1rem;
    padding: 3rem 0;
}

/* Адаптив */
@media (max-width: 1100px) {
    .zaniatia-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .zaniatia-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .zaniatia-grid { grid-template-columns: 1fr; }
    .zaniatia-card__time { font-size: 2.75rem; }
}

/* ──────────────────────────────────────────────────────────────
   ПОЕЗДКИ
────────────────────────────────────────────────────────────── */
.poezdki-section { padding: 0; background: #fff; }

/* Карточка — полная ширина, фоновое изображение */
.poezdka-card {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e;
    padding: 5rem 0;
}

/* Тёмный оверлей поверх изображения */
.poezdka-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 30, 0.62);
    z-index: 0;
}

/* Внутренний контейнер (использует .container для отступов) */
.poezdka-card__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4rem;
}

/* Левая колонка — текстовая информация */
.poezdka-card__info {
    flex: 1;
    color: #fff;
}

.poezdka-card__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.poezdka-card__desc {
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 1.75rem;
}

.poezdka-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.poezdka-card__meta-item {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.poezdka-card__meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #f4a0a0;
    font-weight: 700;
    white-space: nowrap;
}

.poezdka-card__meta-value {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
}

/* Правая колонка — полупрозрачная форма */
.poezdka-card__right {
    flex: 0 0 400px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: 2.5rem;
}

.poezdka-form__heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
}

.poezdka-form__field { margin-bottom: 1rem; }

.poezdka-form__input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: rgba(255, 255, 255, 0.9);
    color: #28292a;
    box-sizing: border-box;
}

.poezdka-form__input::placeholder { color: #777; }

.poezdka-form__input:focus {
    outline: none;
    border-color: var(--color-pink);
    background: #fff;
}

.poezdka-form__submit {
    width: 100%;
    margin-top: 0.5rem;
}

.poezdka-form__success {
    color: #a8f0c0;
    font-weight: 600;
    margin-top: 0.75rem;
}

.poezdka-form__error {
    color: #ffb3b3;
    font-weight: 600;
    margin-top: 0.75rem;
}

/* Разделитель между карточками */
.poezdka-divider {
    height: 6px;
    background: #ffffff;
}

/* Мобильный адаптив */
@media (max-width: 900px) {
    .poezdka-card { padding: 3rem 0; }
    .poezdka-card__inner {
        flex-direction: column;
        gap: 2rem;
    }
    .poezdka-card__right {
        flex: none;
        width: 100%;
    }
    .poezdka-card__title { font-size: 1.75rem; }
}