.events {
    position: relative;
    padding: 32px 0;
    overflow: hidden;
    background: url(../../img/events/bg.jpg);
    border-bottom: 1px solid #E8E8E8;
    border-top: 1px solid #E8E8E8;
}

.events__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.events .container {
    position: relative;
    z-index: 1;
}

.events-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.events__title {
    font-size: 32px;
    margin-bottom: 40px;
}

/* ===== Date carousel ===== */
.events__dates {
    position: relative;
    margin-bottom: 40px;
}

.swiper-slide-event-date {
    width: auto;
}

.events-dates__slider {
    overflow: hidden;
}

.events-dates__scroll {
    display: flex;
    gap: 60px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.events-dates__scroll::-webkit-scrollbar {
    display: none;
}

.dates-month {
    flex-shrink: 0;
}

.dates-month__grid {
    display: flex;
    gap: 12px;
}

.dates-month__name {
    margin-bottom: 16px;
    font-weight: 400;
    font-size: 18px;
    color: #4f4f4f;
    text-transform: lowercase;
}

.dates-month__grid {
    display: flex;
    gap: 12px;
}

.date-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 56px;
    padding: 8px 0;
    border-radius: 50%;
    color: inherit;
    transition: background 0.2s, opacity 0.2s;
}

.date-cell__day {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 26px;
}

.date-cell__weekday {
    font-size: 18px;
    opacity: 0.7;
}

.date-cell--past {
    opacity: 0.3;
    cursor: not-allowed;
}

.date-cell--weekend .date-cell__weekday {
    color: #d8004d;
}

.date-cell--active .date-cell__day {

    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
    background: linear-gradient(90deg, #ed3953 0%, #a1171b 100%);
    color: #fff;
    border-radius: 50%;
}

/* Date carousel controls */
.events-dates__controls {
    position: relative;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.events-dates__arrow {
    width: 49px;
    height: 49px;
    border: none;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
    background: #fff;
}

.events-dates__arrow::before {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 19px;
    height: 19px;
}

.events-dates__arrow--prev::before {
    content: url(../../img/events/prev.svg)
}

.events-dates__arrow--next::before {
    content: url(../../img/events/next.svg)
}

/* ===== Filters ===== */
.events__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    position: relative;
    z-index: 50;
}

.filter {
    position: relative;
}

.filter--sort {
    margin-left: auto;
}

.filter__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 19px 33px;
    border: none;
    border-radius: 45px;
    color: inherit;
    font-size: 16px;
    background: white;
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
}

.filter__arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.filter__toggle.is-open .filter__arrow {
    transform: rotate(-135deg);
}

.filter__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    color: #1a1a1a;
    z-index: 100;
}

.filter__dropdown--right {
    left: auto;
    right: 0;
}

.filter__dropdown--wide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    min-width: 640px;
}

.filter__dropdown--two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.filter__col-title {
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 12px;
}

/* Checkbox / radio */
.checkbox,
.radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    padding: 4px 0;
}

.checkbox input,
.radio input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    background: #fff;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.radio input {
    border-radius: 50%;
}

.checkbox input:checked,
.radio input:checked {
    background: #e63946;
    border-color: #e63946;
}

/* ===== Events grid ===== */
.events__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}



/* Load more */
.events__more {
    text-align: center;
    margin-top: 60px;
}

.events__more-btn {
    padding: 8px 20px;
    border-radius: 45px;
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
    background: linear-gradient(90deg, #ed3953 0%, #a1171b 100%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 500;
    border: 1px solid white;
    border-radius: 45px;
    width: 100%;
    max-width: 400px;
    height: 71px;
    transition: background 0.2s, color 0.2s;
}

.events__more-btn:hover {
    background: #1a1a1a;
    color: #fff;
}

/* Tablet */
@media (max-width: 1200px) {
    .events__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 900px) {
    .events__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .events__title {
        font-size: 15px;
        margin-bottom: 15px;
        text-align: left;
        margin: 0 auto 15px;
    }

    .events-top-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        text-align: left;
    }

    .dates-month__name {
        margin-bottom: 16px;
        font-weight: 400;
        font-size: 12px;
        color: #4f4f4f;
        text-transform: lowercase;
    }

    .filter__dropdown--wide {
        grid-template-columns: 1fr;
        min-width: auto;
        width: calc(100vw - 32px);
    }

    .filter__toggle {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 7px 13px;
        border: none;
        border-radius: 45px;
        color: inherit;
        font-size: 12px;
        background: white;
        box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
    }

    .events-dates__slider {
        padding-right: 0;
    }

    .events-dates__controls {
        position: static;
        margin-top: 0px;
        justify-content: flex-end;
        margin-left: auto;
        transform: scale(0.7);
        margin-bottom: 12px;
        position: relative;
        z-index: 999;
        margin-right: -19px;
    }
}

span.filter-icon__calendar {
    padding-right: 20px;
}

.date-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    color: #1a1a1a;
    z-index: 200;
}

.date-popup--top {
    top: 80px
}

.date-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.date-popup__title {
    font-weight: 700;
    font-size: 16px;
}

.date-popup__arrow {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1a1a1a;
    border-radius: 50%;
    transition: background 0.2s;
}

.date-popup__arrow:hover {
    background: #f0f0f0;
}

.date-popup__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

.date-popup__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.date-popup__cell {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #1a1a1a;
    border-radius: 50%;
    transition: background 0.2s;
}

.date-popup__cell:hover:not(.is-empty):not(.is-past) {
    background: #f0f0f0;
}

.date-popup__cell.is-empty {
    cursor: default;
}

.date-popup__cell.is-past {
    color: #ccc;
    cursor: not-allowed;
}

.date-popup__cell.is-weekend:not(.is-past):not(.is-active) {
    color: #e63946;
}

.date-popup__cell.is-active {
    background: linear-gradient(90deg, #ed3953 0%, #a1171b 100%);
    color: #fff;
}

/* States */
.events__state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    text-align: center;
    font-size: 16px;
    color: #989fb8;
}

.events__state--error {
    color: #ed3953;
}

.events__state p {
    margin: 0;
}

.events__state-hint {
    font-size: 14px;
    color: #b0b0b0;
}

.events__state button {
    margin-top: 8px;
    padding: 10px 24px;
    border-radius: 45px;
    border: none;
    background: linear-gradient(90deg, #ed3953 0%, #a1171b 100%);
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.events__state button:hover {
    opacity: 0.9;
}

/* Skeleton */
.event-item--skeleton {
    pointer-events: none;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
}

.event-item--skeleton .event-item__media {
    height: 357px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.event-item--skeleton .event-item__body {
    padding: 12px 17px 16px;
}

.skeleton-line {
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    margin-bottom: 8px;
}

.skeleton-line--short {
    width: 40%;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* No more */
.events__no-more {
    padding: 40px 20px;
    text-align: center;
    color: #989fb8;
    font-size: 16px;
}

/* Loading more */
.events__more-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

@media (max-width: 767px) {

    .date-cell__day {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 14px;
    }

    .date-cell {
        gap: 4px;
        width: 28px;
    }

    .date-cell__weekday {
        font-size: 12px;
        opacity: 0.7;
    }

    span.filter-icon__calendar {
        padding-right: 4px;
    }

    .filter-icon__calendar img {
        width: 14px
    }

    .filter--sort {
        margin-left: 0;
    }

    .events__filters {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 40px;
        position: relative;
        z-index: 50;
    }

    .events-dates__arrow {
        width: 39px;
        height: 39px;
        border: none;
        border-radius: 50%;
        position: relative;
        box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
        background: #fff;
    }

    .events__more-btn {
        padding: 8px 20px;
        border-radius: 45px;
        box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
        background: linear-gradient(90deg, #ed3953 0%, #a1171b 100%);
        color: #ffffff;
        font-size: 13px;
        font-weight: 500;
        border: none;
        border-radius: 45px;
        width: 100%;
        max-width: 220px;
        height: 41px;
        transition: background 0.2s, color 0.2s;
    }

    .events__more {
        text-align: center;
        margin-top: 20px;
    }

    .events__dates {
        position: relative;
        margin-bottom: 20px;
    }

    .dates-month__grid {
        display: flex;
        gap: 2px;
    }

}