/* --- 1. СЕКЦИЯ "О ПРОЕКТЕ" (МОДЕРН + ТВОИ ШРИФТЫ) --- */
.events-about {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px; /* Гибкий контейнер */
    margin: 80px auto;
    padding: 0 20px;
    box-sizing: border-box;
    gap: 40px;
}

.events-about-description-field {
    flex: 1 1 477px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;
}

/* ЗАГОЛОВОК: Возвращаем твой Novelist и размер */
.events-title {
    font-family: 'Novelist', serif;
    font-size: 128px;
    line-height: 1;
    color: #5A062A;
    text-transform: uppercase;
    margin: 0;
}
.events-title-small {
    width: 100%;
    max-width: 666px;
    color: #0f0f0c;
    text-align: right;
    /* ЯВНАЯ ПРИВЯЗКА ШРИФТА */
    font-family: 'Gabriola', serif !important;
    font-size: 48px !important;
    line-height: 40px !important;
    margin-bottom: 20px;
    display: block;
}
/* 2. ТЕКСТ ПОД ЗАГОЛОВКОМ (Описание) */
.events-title-description {
    width: 100%;
    max-width: 424px;
    color: #5A062A;
    text-align: justify;
    /* ЯВНАЯ ПРИВЯЗКА ШРИФТА */
    font-family: 'Gabriola', serif !important;
    font-size: 24px !important;
    line-height: 30px !important;
    margin-top: 20px;
}

/* КНОПКА: Современный флекс-центр + Твой стиль */
.events-about-project-btn {
    width: 238px;
    height: 59px;
    background: #5A062A;
    border-radius: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.events-about-project-btn-text {
    font-family: 'Novelist', serif;
    font-size: 32px;
    color: #FFF;
    text-transform: uppercase;
}

/* ФОТО: Резиновое, но с твоими пропорциями */
.events-about-photo-field {
    flex: 1 1 600px;
}

.events-title-photo {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    background: url(/dist/f882269c99f98e191e58.jpg) center / cover no-repeat;
}

/* --- 2. СЕКЦИЯ КВАДРАТОВ (GRID ДЛЯ ИДЕАЛЬНЫХ ОТСТУПОВ) --- */
.events-our-project {
    max-width: 1267px;
    margin: 60px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.events-our-project-title {
    font-family: 'Novelist', serif; /* ГАРАНТИЯ ШРИФТА */
    font-size: 64px;
    line-height: 1.1;
    color: #5A062A;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.events-our-project-square-field {
    display: grid;
    /* 4 колонки на десктопе, авто-адаптив ниже */
    grid-template-columns: repeat(4, 1fr);
    /* ГАРАНТИРОВАННЫЙ ОТСТУП: 20px и сбоку, и между рядами */
    gap: 20px;
}

.events-our-project-square {
    background-color: #5A062A;
    border-radius: 10px;
    aspect-ratio: 1 / 1; /* Идеальный квадрат */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ШРИФТЫ ВНУТРИ */
.events-our-project-square-number {
    font-family: 'Gabriola', serif;
    font-size: 96px;
    color: #F9FED8;
    line-height: 1;
}

.events-our-project-square-text {
    font-family: 'Gabriola', serif;
    font-size: 40px;
    color: #F9FED8;
    text-align: center;
    line-height: 1;
}
.background-3-events {
    width: 100%;
    background-color: #F9FED8;
    padding: 80px 0;
}

.events-announcements {
    display: block !important;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    /* ФИКС СЖАТИЯ: */
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    float: none !important;
    clear: both;
}


.events-announcements-title {
    font-family: 'Novelist', serif;
    font-size: 54px;
    color: #5A062A;
    text-transform: uppercase;
    margin-bottom: 40px;
}

/* ОБЩИЙ СТИЛЬ КАРТОЧКИ */
.item,
.item.collapsible {
    display: flex !important;
    position: relative;
    width: 100% !important;
    max-width: 1200px !important;
    height: auto !important;
    min-height: 226px;
    background: #5A062A;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 40px !important;
    box-sizing: border-box !important;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(90, 6, 42, 0.2);
}

/* КАРТИНКА */
.item-img {
    flex: 0 0 364px !important;
    height: auto !important;
    min-height: 226px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.item-img img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(141, 11, 25, 0.6);
    z-index: 3;
    pointer-events: none;
}

/* КОНТЕНТНЫЙ БЛОК */
.item-content {
    position: relative;
    flex: 1;
    z-index: 10;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box;
    padding: 5px 100px 0 0 !important;
}

.item .title, .item .text, .info-row, .item .address, .item .time,
.events-map-pin-icon, .events-clock-icon {
    position: relative !important;
    z-index: 15 !important;
    margin: 0 !important;
}

.item .title {
    font-family: 'Novelist', serif;
    font-size: 32px;
    color: #FFF !important;
    text-transform: uppercase;
    line-height: 1;
}

.item .text {
    font-family: 'Gabriola', serif;
    font-size: 24px;
    line-height: 1; /* Увеличили для читаемости */
    color: #F9FED8 !important;
}

.info-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

.item .address, .item .time {
    font-family: 'Gabriola', serif;
    font-size: 22px;
    color: #FFF !important;
}

.events-map-pin-icon, .events-clock-icon {
    width: 22px;
    height: 22px;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    flex-shrink: 0;
}
.events-map-pin-icon { background-image: url(/dist/0dfa14f45c14740bc943.svg) !important; }
.events-clock-icon { background-image: url(/dist/8497e076a6b754c95570.svg) !important; }

/* КНОПКА */
.item-button {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 95px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}
.item:hover .item-button-img {
    transform: translateX(5px); /* Стрелка плавно подается вперед */
    filter: brightness(1.2);
}

.item-button-img {
    width: 28px;
    height: 52px;
    background: url(/dist/2c1e7e83fadca903077f.svg) no-repeat center / contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Плавный ход */
    position: absolute;
}

.item-btn { position: absolute; inset: 0; z-index: 25; cursor: pointer; }

/* СКЛАДЫВАНИЕ */
.item.collapsible {
    display: flex !important;
    max-height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
    position: absolute;
    visibility: hidden;
    pointer-events: none;
    /* Сложная анимация сжатия */
    transition:
            max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.2s linear,
            margin 0.4s ease;
}

.item.collapsible.expanded {
    position: relative;
    visibility: visible;
    pointer-events: auto;
    opacity: 1 !important;
    max-height: 1000px !important; /* Достаточно для любого текста */
    margin-bottom: 40px !important;
    /* Плавное "выкатывание" */
    transition:
            max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.4s ease-in 0.1s, /* Проявление с легкой задержкой */
            margin 0.4s ease;
}

/* КНОПКА ПОКАЗАТЬ ВСЕ */
.hide-btn {
    display: block !important;
    margin: 20px auto 0 auto !important;
    /* Дизайн оставляем твой */
    width: 238px;
    height: 59px;
    background: #5A062A;
    border-radius: 45px;
    color: #F9FED8;
    font-family: 'Novelist', serif;
    font-size: 24px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    text-align: center;
    line-height: 59px !important;
    position: relative;
    /* Плавное перемещение кнопки вслед за блоками */
    transition: background 0.3s, transform 0.2s, margin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hide-btn:active {
    transform: translateY(2px) !important;
}

.background-4-events {
    width: 100%;
    background-color: #F9FED8;
    padding: 80px 0;
    overflow: hidden;
}

.events-photo-field,
.events-video-field {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1278px;
    margin: 0 auto 80px auto;
    gap: 40px;
}

.events-photo-title,
.events-video-title {
    font-family: 'Novelist', serif;
    font-size: 64px;
    color: #5A062A;
    text-transform: uppercase;
    line-height: 1.1;
}

/* --- ФОТО-КАРУСЕЛЬ (БЕСКОНЕЧНАЯ) --- */
.events-photo-carousel {
    width: 100%;
    height: 350px;
    overflow: hidden;
    display: flex;
    position: relative;
    /* Эффект растворения по краям */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.events-photo-carousel-group {
    display: flex;
    flex-shrink: 0; /* КРИТИЧНО: не дает флексу сжимать группу */
    gap: 20px;
    padding-right: 20px; /* Зазор между группами должен быть равен gap */
    will-change: transform;
    /* 45s — плавная скорость для 6 длинных фото */
    animation: scroll-six 45s linear infinite;
}

.events-photo-carousel:hover .events-photo-carousel-group {
    animation-play-state: paused;
}

@keyframes scroll-six {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); } /* Сдвиг на длину ОДНОЙ полной группы */
}

.events-photo-card {
    width: 427px;
    height: 347px;
    flex-shrink: 0;
    border-radius: 15px;
    overflow: hidden;
    background: #5A062A;
}

.events-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.events-photo-card:hover img {
    transform: scale(1.1);
}

/* --- ВИДЕО-КАРУСЕЛЬ (ГИБКАЯ СИСТЕМА) --- */
.events-video-field {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 10px;
    box-sizing: border-box;
}

/* ЗАГОЛОВОК (ДЕФОЛТ) */
.events-video-title {
    margin-bottom: 25px;
    text-align: start;
}

.events-video-carousel {
    width: 100%;
    overflow: hidden;
}

.events-video-carousel-group {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    overflow-x: auto;
    justify-content: center;
}

/* Если видео больше 3-х, переключаем на левый край для корректного скролла */
.events-video-carousel-group:has(.events-video-card:nth-child(3)) {
    justify-content: flex-start;
}

.events-video-card {
    flex: 0 0 412px !important;
    width: 412px !important;
    height: 347px !important;
    background: #000 !important;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.video-embed-container,
.video-embed-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
}


/* --- МОДАЛЬНЫЕ ОКНА (ЦЕНТРОВКА) --- */
.events-modal-window {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.events-modal-window:target {
    visibility: visible;
    opacity: 1;
}

/* ГЛАВНЫЙ КОНТЕЙНЕР */
.events-modal-window > div {
    display: flex;
    flex-direction: column; /* Текст строго под фото */
    align-items: center;
    justify-content: center;
    max-width: 90vw;
}

/* ОБЕРТКА КАРТИНКИ: Якорь для стрелок */
.modal-img-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.events-modal-window img {
    max-height: 75vh;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    object-fit: contain;
    display: block;
}

/* ПОДПИСЬ ПОД ФОТО */
.modal-caption {
    margin-top: 25px; /* Отступ от картинки */
    color: #F9FED8;
    font-family: 'Gabriola', serif;
    font-size: 32px;
    text-align: center;
    max-width: 800px;
}

/* КНОПКИ: Теперь они центрируются по высоте КАРТИНКИ */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    border-radius: 50% !important;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-size: 50px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: 0.3s;
    z-index: 2200;
}

.modal-nav-btn:hover {
    background: rgba(90, 6, 42, 0.9);
}

/* Относительно обертки картинки выносим их по бокам */
.prev-btn { left: -100px; }
.next-btn { right: -100px; }

/* КНОПКА ЗАКРЫТИЯ (КРЕСТИК) */
.events-modal-close {
    position: absolute;
    top: 40px;      /* Отступ сверху от края экрана */
    right: 50px;    /* Отступ справа от края экрана */
    color: #fff;
    font-size: 60px;
    font-weight: 300;
    text-decoration: none;
    line-height: 1;
    z-index: 3500;  /* Самый высокий слой */
    transition: transform 0.3s, color 0.3s;
}

.events-modal-close:hover {
    color: #F9FED8;
    transform: rotate(90deg); /* Эффектный поворот при наведении */
}

@media (max-width: 991.98px) {
    /* --- 1. СЕКЦИЯ "О ПРОЕКТЕ" (ПОЛНЫЙ ФИКС ВОЗДУХА) --- */
    .events-about {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0 !important; /* Убираем промежуток между текстом и фото */
        height: auto !important; /* Сброс фиксированной высоты */
        min-height: 0 !important;
        margin: 20px auto !important; /* Внешний отступ всей секции */
        padding: 0 20px !important;
    }

    .events-about-description-field {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        flex: 0 0 auto !important; /* Запрещаем блоку растягиваться вниз */
        height: auto !important;
        gap: 5px !important; /* Плотная склейка заголовков */
        margin-bottom: 20px !important; /* Единственный управляемый отступ до фото */
    }

    .events-title {
        font-size: clamp(48px, 12vw, 64px) !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
    }

    .events-title-small {
        font-size: 28px !important;
        line-height: 1.1 !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .events-title-description {
        font-size: 24px !important;
        line-height: 1.3 !important;
        text-align: center !important;
        max-width: 100% !important;
        margin: 10px 0 !important; /* Небольшой отступ для читаемости */
    }

    .events-about-project-btn {
        margin: 5px auto 0 auto !important; /* Прижимаем кнопку к тексту выше */
        flex-shrink: 0 !important;
    }

    .events-about-photo-field {
        width: 100% !important;
        flex: 0 0 auto !important;
        margin-top: 10px !important;
    }

    .events-title-photo {
        height: 250px !important;
        width: 100% !important;
        background-size: cover !important;
        border-radius: 15px !important;
    }

    /* --- 2. СЕКЦИЯ КВАДРАТОВ (ПО ДВА В РЯД) --- */
    .events-our-project {
        margin: 30px auto !important;
        padding: 0 10px !important; /* Уменьшаем боковые поля всей секции */
    }

    .events-our-project-title {
        font-size: 36px !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }

    .events-our-project-square-field {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* Строго 2 колонки */
        gap: 10px !important; /* Расстояние между квадратами */
        width: 100% !important;
        max-width: 600px !important; /* Ограничиваем общую ширину сетки на планшетах */
        margin: 0 auto !important;
    }

    /* СКРЫВАЕМ ПУСТЫЕ КВАДРАТЫ (если нет цифры внутри) */
    .events-our-project-square:not(:has(.events-our-project-square-number)) {
        display: none !important;
    }

    .events-our-project-square {
        aspect-ratio: 1 / 1 !important;
        padding: 10px !important; /* Минимальный внутренний отступ */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    /* ШРИФТЫ: Уменьшаем, чтобы не "разрывали" маленький квадрат */
    .events-our-project-square-number {
        font-size: clamp(40px, 12vw, 54px) !important; /* Цифры теперь компактнее */
        line-height: 0.9 !important;
        margin: 0 !important;
    }

    .events-our-project-square-text {
        font-size: clamp(16px, 5vw, 22px) !important; /* Текст тоже поджат */
        line-height: 1 !important;
        text-align: center !important;
        margin-top: 5px !important;
    }

    /* 3. АНОНСЫ (Карточки) */
    .background-3-events {
        width: 100% !important;
        height: fit-content !important; /* ПРИНУДИТЕЛЬНОЕ СЖАТИЕ ПО ВЕРТИКАЛИ */
        min-height: 0 !important;
        padding: 40px 0 !important;
        background-color: #F9FED8 !important;
        display: block !important;
    }

    /* 3.2. КОНТЕЙНЕР АНОНСОВ (динамическая высота) */
    .events-announcements {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: fit-content !important; /* ПОДТЯГИВАЕТ НИЗ ПРИ ИСЧЕЗНОВЕНИИ ПОЛЕЙ */
        min-height: 0 !important;
        padding: 0 15px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .events-announcements-title {
        font-size: 32px !important;
        text-align: center !important;
        margin-bottom: 20px !important;
        flex-shrink: 0 !important;
    }

    /* 3.3. КАРТОЧКА АНОНСА */
    .item {
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        width: 100% !important;
        min-height: 180px !important;
        height: auto !important;
        margin-bottom: 15px !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        background: #5A062A !important;
        z-index: 1 !important;
        flex-shrink: 0 !important;
    }

    /* 3.4. ЖЕСТКОЕ СКРЫТИЕ (УБИРАЕМ ДИСТАНЦИЮ ПРИ СКРЫТИИ) */
    .item.collapsible:not(.expanded) {
        display: none !important; /* ПОЛНОЕ ИСКЛЮЧЕНИЕ ИЗ ПОТОКА ДЛЯ СХЛОПЫВАНИЯ */
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 0 !important;
        border: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: none !important;
    }

    .item.collapsible.expanded {
        display: flex !important;
        max-height: 1000px !important;
        margin-bottom: 15px !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transition: max-height 0.5s ease-in-out, opacity 0.3s ease;
    }

    /* 3.5. СЛОИ ВНУТРИ КАРТОЧКИ */
    .item-img {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
    }

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

    .item::before {
        content: "" !important;
        position: absolute !important;
        inset: 0 !important;
        background: rgba(141, 11, 25, 0.7) !important;
        z-index: 2 !important;
        pointer-events: none !important;
    }

    .item-content {
        position: relative !important;
        z-index: 5 !important;
        width: 100% !important;
        padding: 20px 80px 20px 20px !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .item .title { font-size: 22px !important; color: #FFF !important; text-transform: uppercase !important; margin: 0 !important; }
    .item .text { font-size: 19px !important; color: #F9FED8 !important; line-height: 1.1 !important; margin: 0 !important; }
    .info-row { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; margin: 0 !important; }
    .item .address, .item .time { font-size: 16px !important; color: #FFF !important; }

    /* 3.6. КНОПКА-СТРЕЛКА И ССЫЛКА */
    .item-button {
        position: absolute !important;
        right: 0 !important; top: 0 !important; bottom: 0 !important;
        width: 65px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
    }

    .item-btn { position: absolute !important; inset: 0 !important; z-index: 15 !important; cursor: pointer !important; }

    /* 3.7. КНОПКА "ПОКАЗАТЬ ВСЕ" */
    .hide-btn {
        display: block !important;
        width: 220px !important;
        height: 50px !important;
        line-height: 50px !important;
        margin: 10px auto 20px auto !important; /* УМЕНЬШЕННЫЙ MARGIN ДЛЯ ПЛОТНОСТИ */
        font-size: 20px !important;
        flex-shrink: 0 !important;
    }

    /* --- 4. ФОТО-КАРУСЕЛЬ (БЕСКОНЕЧНАЯ) --- */

    /* ФИКС ЗАГОЛОВКА: чтобы точно влез */
    .events-photo-title,
    .events-video-title {
        font-size: clamp(32px, 8vw, 42px) !important;
        text-align: center !important;
        padding: 0 10px !important;
        line-height: 1.1 !important;
    }

    .events-photo-carousel {
        height: 280px !important;
        /* Эффект растворения чуть мягче для мобилок */
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent) !important;
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent) !important;
    }

    .events-photo-carousel-group {
        gap: 15px !important;
        padding-right: 15px !important;
        /* Скорость: 35-40 секунд обычно комфортно для мобилок */
        animation-duration: 35s !important;
    }

    /* ОСТАНОВКА ПРИ НАЖАТИИ ПАЛЬЦЕМ */
    .events-photo-carousel:active .events-photo-carousel-group {
        animation-play-state: paused !important;
    }

    .events-photo-card {
        width: 260px !important; /* Еще чуть уже для лучшего обзора на мелких экранах */
        height: 240px !important;
        flex-shrink: 0 !important;
        border-radius: 12px !important;

    }

    /* --- 5. ВИДЕО-КАРУСЕЛЬ --- */
    events-video-field {
        padding: 20px 0;
    }

    /* ИСПРАВЛЯЕМ ШРИФТ ЗАГОЛОВКА */
    .events-video-title {
        margin-bottom: 15px;
        text-align: center; /* На мобилке заголовок обычно лучше смотрится слева */
    }

    .events-video-carousel-group {
        /* ОБЯЗАТЕЛЬНО слева, иначе скролл сломается */
        justify-content: flex-start !important;
        gap: 15px !important;
        padding: 0 15px 20px 15px !important;
        scrollbar-width: none;
    }

    .events-video-card:first-child,
    .events-video-card:last-child {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .events-video-carousel-group::-webkit-scrollbar {
        display: none;
    }

    .events-video-card {
        flex: 0 0 280px !important;
        width: 280px !important;
        height: 220px !important;
    }

    .events-video-carousel-group:has(.events-video-card:only-child) {
        justify-content: center !important;
    }


    /* --- 5. МОДАЛЬНЫЕ ОКНА (АДАПТАЦИЯ ПОД ТАЧ) --- */

    /* КОНТЕЙНЕР: Картинка теперь может занимать больше места по ширине */
    .events-modal-window > div {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    /* ФОТО: Ограничиваем по высоте, чтобы влезла подпись снизу */
    .events-modal-window img {
        width: 100% !important;
        max-height: 65vh !important; /* Оставляем место под текст и навигацию */
        object-fit: contain !important;
        border-radius: 8px !important;
    }

    /* ПОДПИСЬ ПОД ФОТО (Gabriola) */
    .modal-caption {
        font-size: clamp(20px, 6vw, 28px) !important;
        margin-top: 15px !important;
        padding: 0 20px !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }

    /* НАВИГАЦИЯ (СТРЕЛКИ) */
    .modal-nav-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 32px !important;
        background: rgba(90, 6, 42, 0.6) !important; /* Твой бордовый, но прозрачный */
        backdrop-filter: blur(4px) !important;
        top: 45% !important; /* Центрируем относительно фото */
    }

    /* ВТАСКИВАЕМ СТРЕЛКИ ВНУТРЬ ЭКРАНА */
    .prev-btn {
        left: 15px !important;
    }
    .next-btn {
        right: 15px !important;
    }
}
