/* Общие стили */
main {
    font-family: Arial, sans-serif;
    /* margin-top наследуется из header-nav.css для отступа от fixed header */
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: calc(100vw - 60px);
}

/* Горизонтальный календарь */
.calendar {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.calendar::-webkit-scrollbar {
    display: none;
}

.calendar-item {
    background-color: #ddd;
    padding: 8px 16px;
    border-radius: var(--radius-2xl);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--transition-base);
}

.calendar-item.active {
    background-color: var(--color-accent);
    color: var(--color-text-primary);
}

.calendar-item:hover {
    background-color: #bbb;
}

/* Секция событий */
.events-section {
    margin-bottom: 40px;
}

.events-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, 280px);
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.event-card-link {
    text-decoration: none; /* Убираем подчеркивание */
    color: inherit; /* Наследуем цвет текста */
    display: block; /* Делаем ссылку блочной, чтобы она охватывала весь event-card */
}

.event-card {
    width: 280px;
    height: 180px;
    background-color: #fff;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    cursor: pointer; /* Курсор указывает на кликабельность */
    position: relative;
}

.event-card > * {
    margin: 0;
}

.event-content {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    width: 100%;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.event-content h3 {
    margin: 0 0 5px;
    font-size: 16px;
}

.event-content p {
    margin: 0;
    font-size: 13px;
}

/* Лента новостей */
.news-section {
    margin-bottom: 40px;
}

/*
.news-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}
*/

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background-color: #fff;
    padding: 15px;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.news-item h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.news-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Адаптивность */
@media (max-width: 767px) {
    .container {
        padding: 15px;
    }

    .calendar {
        gap: 8px;
    }

    .calendar-item {
        padding: 6px 12px;
        font-size: 14px;
    }

    .events-section h2,
    .news-section h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .events-list {
        gap: 10px;
    }

    .event-content h3 {
        font-size: 14px;
    }

    .event-content p {
        font-size: 12px;
    }
}

@media (max-width: 340px) {
    .events-list {
        grid-template-columns: 1fr;
    }

    .event-card {
        #width: 100%;
        height: 160px;
    }

    .event-content h3 {
        font-size: 13px;
    }

    .event-content p {
        font-size: 11px;
    }

    .news-item h3 {
        font-size: 16px;
    }

    .news-item p {
        font-size: 13px;
    }
}
