.events-section {
    padding: 30px 50px;
    max-width: 1200px; /* Ограничиваем ширину контента */
    margin: 20px auto; /* Центрируем секцию */
    background-color: #1c1c1c; /* Чуть светлее, чем фон body */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}



.events-title {
    color: #ccc; /* Цвет заголовка */
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    letter-spacing: 1px;
}

/* Стили для контейнера фильтров */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 8px;
}

.filter-label {
    display: flex;
    align-items: center;
    color: #e0e0e0;
    font-family: 'Manrope', sans-serif;
    font-size: 0.95em;
}

.filter-text {
    margin-right: 10px;
    white-space: nowrap; /* Чтобы текст не переносился */
}

.filter-select,
.filter-input {
    padding: 8px 12px;
    border: 1px solid #ccc; /* Граница цвета акцента */
    border-radius: 5px;
    background-color: #333;
    color: white;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9em;
    outline: none;
    cursor: pointer;
}

.filter-select:focus,
.filter-input:focus {
    border-color: #ccc; /* Ярче при фокусе */
    box-shadow: 0 0 5px rgba(0, 188, 212, 0.5);
}

/* Стили для кнопок переключения вида */
.view-switcher {
    text-align: center;
    margin-bottom: 30px;
}

.view-btn {
    background-color: #ccc; /* Основной цвет кнопки */
    color: black; /* Темный текст для контраста */
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 150px; /* Чтобы кнопки были примерно одного размера */
}

.view-btn:hover {
    background-color: #ccc; /* Светлее при наведении */
    transform: translateY(-2px);
}

.view-btn:active {
    transform: translateY(0);
    background-color: #818181; /* Темнее при нажатии */
}

/* --- Стили для карточек (Card View) --- */
.events-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Адаптивная сетка */
    gap: 25px;
    padding: 10px;
}

.event-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: flex-start; /* выравнивание по верхнему краю */
    gap: 10px; /* расстояние между изображением и текстом */
    max-width: 100%;
    overflow: hidden;
}

.event-card img {
    width: 130px;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

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

.event-card h3 {
    color: #dbdbdb;
    font-size: 1em;
    margin-top: 0;
    margin-bottom: 15px;
    font-family: 'Unbounded', sans-serif;
}

.event-card p {
    color: #e0e0e0;
    margin-bottom: 8px;
    line-height: 1.5;
}

.event-card p strong {
    color: #cccccc;
    margin-right: 5px;
}

/* --- Стили для таблицы (Table View) --- */
.events-table-view {
    overflow-x: auto; /* Позволяет прокручивать таблицу, если она слишком широка */
}

.events-table {
    width: 100%;
    border-collapse: collapse; /* Убирает двойные границы */
    margin-top: 20px;
    font-family: 'Manrope', sans-serif;
}

.events-table a {
    text-decoration: none;
    color: #e0e0e0;
}
.events-table th,
.events-table td {
    border: 1px solid #333; /* Границы ячеек */
    padding: 12px 15px;
    text-align: left;
    color: #e0e0e0;
}

.events-table th {
    background-color: #ccc; /* Цвет фона заголовков таблицы */
    color: black; /* Темный текст для заголовков */
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.events-table tbody tr:nth-child(odd) {
    background-color: #2a2a2a; /* Чередующийся фон строк */
}

.events-table tbody tr:nth-child(even) {
    background-color: #1f1f1f;
}

.events-table tbody tr:hover {
    background-color: #383838; /* Фон при наведении на строку */
}

/* Стили для сообщения "No events found" */
.events-section > p { /* Если p внутри events-section, но не внутри .event-card или таблицы */
    text-align: center;
    font-size: 1.2em;
    color: #ff6347; /* Красный цвет для предупреждения */
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    margin-top: 20px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .events-section {
        padding: 20px 20px;
        margin: 10px auto;
    }

    .events-title {
        font-size: 2em;
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .view-btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .events-grid-view {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
    }



    .events-table th,
    .events-table td {
        padding: 10px;
        font-size: 0.85em;
    }
}
