/* =========================================
   БАЗОВЫЕ СТИЛИ И ФОН
   ========================================= */
html body { 
    margin: 0; padding: 0;
    background-attachment: fixed;
    /* Углубляем градиент, чтобы страница казалась мрачнее и стильнее */
    background: 
        linear-gradient(to bottom, rgba(11, 22, 40, 0.7), rgba(11, 22, 40, 0.95)),
        url("../../img/bg/main_bg.webp") no-repeat center center;
    background-size: cover;
    color: #e0e0e0;
    font-family: 'Montserrat', sans-serif; /* Единый шрифт для всего сайта */
}

/* =========================================
   ШАПКА САЙТА И БАННЕР
   ========================================= */
.tittle99 {
    text-align: center;
    font-size: 2.5em;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    margin: 30px 0 20px 0;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 255, 255, 0.2);
}

.top-banner-container {
    width: 100%;
    max-width: 1280px; /* Ограничиваем ширину центральной колонкой */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    padding: 20px 15px;
    box-sizing: border-box;
}

.main-banner {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* =========================================
   БЛОКИ ИНФОРМАЦИИ (Матовое стекло)
   ========================================= */
.welcome-briefing {
    position: relative;
    margin: 20px auto 40px auto;
    max-width: 1280px; /* Выравниваем по ширине баннера */
    box-sizing: border-box;
    background: rgba(12, 17, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.briefing-label {
    font-size: 0.85em;
    color: #3a75c4; /* Заменяем кислотный циан на благородный синий */
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

.briefing-text {
    color: #e0e0e0;
    font-size: 1.05em;
    line-height: 1.6;
    text-align: left;
}

.briefing-text a {
    color: #8baadb;
    text-decoration: none;
    transition: color 0.3s;
}

.briefing-text a:hover {
    color: #ffffff;
}

/* =========================================
   ПОИСКОВАЯ СТРОКА
   ========================================= */
.search-container {
    margin: 0 auto 40px auto;
    text-align: center;
    max-width: 1280px;
    padding: 0 15px;
}

#eventSearch {
    width: 100%;
    max-width: 600px;
    padding: 15px 25px;
    background: rgba(12, 17, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 30px; /* Элегантная форма капсулы */
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#eventSearch:focus {
    outline: none;
    border-color: #3a75c4;
    background: rgba(12, 17, 26, 0.8);
    box-shadow: 0 5px 20px rgba(58, 117, 196, 0.3);
}

/* =========================================
   СЕТКА ИВЕНТОВ И АРКИ
   ========================================= */
#eventGrid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

.arc-section {
    margin-bottom: 12px;
}

.arc-section.is-open {
    margin-bottom: 40px;
}

.arc-section.is-search-hidden {
    display: none;
}

.arc-heading {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

/* Заголовки категорий. Клик раскрывает плитки. */
.arc-header {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25em;
    font-weight: 500;
    color: #ffffff;
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid #3a75c4;
    border-radius: 4px;
    padding: 16px 22px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    cursor: pointer;
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.arc-header:hover,
.arc-header:focus-visible {
    border-color: rgba(58, 117, 196, 0.85);
    outline: none;
}

.arc-header__name {
    flex: 1;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.arc-header__count {
    font-size: 0.75em;
    letter-spacing: 0;
    text-transform: none;
    color: #8baadb;
    font-weight: 600;
    min-width: 1.6em;
    text-align: right;
}

.arc-chevron {
    flex: none;
    width: 9px;
    height: 9px;
    border-right: 2px solid rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.9);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform 0.2s ease;
}

.arc-section.is-open .arc-chevron {
    transform: rotate(225deg);
    margin-top: 2px;
}

.arc-section:not(.is-open) .event-grid {
    display: none;
}

.arc-section.is-open .event-grid {
    margin-top: 22px;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* Карточки ивентов */
.event-card {
    position: relative;
    height: 200px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15); /* Мягкие белые границы вместо циана */
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.event-card:hover {
    transform: translateY(-5px);
    border-color: rgba(58, 117, 196, 0.8);
    box-shadow: 0 15px 30px rgba(58, 117, 196, 0.4);
}

.card-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
    transition: 0.5s ease; /* Добавляем плавный зум */
}

.event-card:hover .card-bg {
    filter: brightness(0.6);
    transform: scale(1.05); /* Легкое приближение фона при наведении */
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 25px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.en-title {
    font-size: 0.75rem;
    color: #8baadb;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.ru-title {
    margin: 8px 0 0 0;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 500;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.card-desc {
    font-size: 0.85rem;
    color: #d0d0d0;
    font-style: normal; /* Убираем курсив, он портит читаемость */
    padding-top: 15px;
    margin: auto 0 0 0; /* Прижимает описание к нижней части карточки */
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Отделяем текст тонкой линией */
    line-height: 1.5;
}

/* =========================================
   КНОПКА "НАВЕРХ" (Исправленная)
   ========================================= */
#floating-button {
    position: fixed;
    z-index: 100;
    bottom: 30px;
    right: 30px;
    background: rgba(10, 15, 25, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 25px;
    text-align: center;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#floating-button:hover {
    background: rgba(58, 117, 196, 0.6);
    border-color: rgba(58, 117, 196, 1);
    transform: translateY(-3px);
}

/* =========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ========================================= */
@media (max-width: 768px) {
    .tittle99 { font-size: 1.8em; margin: 20px 0 10px 0; padding: 0 15px;}
    .top-banner-container { padding: 10px; }
    .main-banner { border-radius: 8px; }
    .welcome-briefing { margin: 10px 15px 30px 15px; padding: 20px; }
    .search-container { padding: 0 20px; }
    #eventSearch { border-radius: 12px; }
    .arc-header {
        font-size: 1.02em;
        padding: 14px 14px;
        margin: 0;
        display: flex;
        text-align: left;
        border-left: 4px solid #3a75c4;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
    .arc-header__name {
        letter-spacing: 1px;
    }
    .event-grid { grid-template-columns: 1fr; padding: 0; }
    #floating-button { bottom: 15px; right: 15px; padding: 10px 20px; font-size: 0.8em; }
}

/* Акцентный цвет для главных заголовков */
.title-accent {
    color: #182e52f2; /* Тот самый благородный синий */
    font-weight: 700; /* Можно сделать эти слова чуть толще остального текста */
    text-shadow: 0 0 15px rgba(115, 173, 248, 0.6); /* Легкое синее свечение для выразительности */
    font-size: 1.3em;
}