/* static/css/event_list.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #f9f9f9; /* Светлый фон, как в Oyna */
    color: #333;
    padding-bottom: 80px; /* Отступ для фиксированного нижнего меню */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* Форма фильтра по видам спорта */
.event-filter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.event-filter-form select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
}

.event-filter-form button {
    background: #FF6A28; /* Оранжевый цвет кнопки, как в Oyna */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.event-filter-form button:hover {
    background: #e05b2c;
}

.btn-reset {
    background: #6C63FF; /* Синий цвет для кнопки сброса */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-reset:hover {
    background: #5a54e0;
}

/* Форма фильтра по городам */
.city-filter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.city-filter-form select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
}

.city-filter-form button {
    background: #FF6A28;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.city-filter-form button:hover {
    background: #e05b2c;
}

/* Список событий */
.event-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Сетка для ПК: несколько событий в строке */
    gap: 20px;
}

.event-card {
    background: white;
    padding: 15px;
    border-radius: 12px; /* Закругление, как в Oyna */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.event-card a {
    font-size: 16px;
    color: #6C63FF; /* Синий цвет ссылок */
    text-decoration: none;
    font-weight: 500;
}

.event-card a:hover {
    text-decoration: underline;
}

/* Прямоугольник с занятыми и свободными слотами */
.slot-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.slot-bar .occupied {
    background: #FF6A28; /* Оранжевый для занятых слотов */
    flex: 1;
}

.slot-bar .free {
    background: #ddd; /* Серый для свободных слотов */
    flex: 1;
}

.slot-info {
    font-size: 14px;
    color: #666;
    text-align: right;
}

/* Пагинация */
.pagination {
    text-align: center;
    margin-top: 30px;
}

.step-links a {
    display: inline-block;
    margin: 0 10px;
    padding: 8px 16px;
    background: #6C63FF; /* Синий цвет кнопок пагинации */
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.step-links a:hover {
    background: #5a54e0;
}

.page-info {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* Верхнее меню */
.top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background: white;
    padding: 15px;
    border-radius: 12px; /* Закругление, как в Oyna */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 120px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.nav-item img {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

.nav-item span {
    font-size: 14px;
    color: #333;
    text-align: center;
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    .top-nav {
        gap: 10px;
    }

    .nav-item {
        width: 100px;
        padding: 10px;
    }

    .nav-item img {
        width: 32px;
        height: 32px;
    }

    .nav-item span {
        font-size: 12px;
    }
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 24px;
    }

    /* Фильтры друг под другом */
    .event-filter-form,
    .city-filter-form {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .event-filter-form select,
    .city-filter-form select {
        font-size: 14px;
        padding: 10px;
        width: 100%;
        max-width: 300px;
    }

    .event-filter-form button,
    .city-filter-form button,
    .btn-reset {
        font-size: 14px;
        padding: 10px 20px;
        width: 48%;
    }

    .event-filter-form .btn-container {
        display: flex;
        gap: 10px;
        width: 100%;
        max-width: 300px;
        justify-content: space-between;
    }

    /* Список событий */
    .event-list {
        display: flex;
        flex-direction: column; /* Столбец для мобильных: 1 событие на строку */
        gap: 15px;
        max-width: 100%;
        margin: 0 auto;
    }

    .event-card {
        padding: 12px;
    }

    .event-card a {
        font-size: 14px;
    }

    .slot-bar {
        height: 6px;
    }

    .slot-info {
        font-size: 12px;
    }

    /* Пагинация */
    .step-links {
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .step-links a {
        padding: 8px 16px;
        font-size: 14px;
    }

    .page-info {
        font-size: 12px;
        margin-top: 10px;
    }
}