/* ==========================================================================
   Calendar page
   ========================================================================== */

.calendar-page {
    width: 100%;
    background: #fff;
    font-family: var(--font-family);
    color: #151515;
}

.calendar-page__main {
    width: 100%;
    padding-bottom: 80px;
    overflow: visible;
}

.calendar-container {
    width: min(100%, var(--container-max-width));
    margin: 0 auto;
}

/* Hero */

.calendar-hero {
    position: relative;
    height: 271px;
    overflow: hidden;
}

.calendar-hero__bg {
    position: absolute;
    inset: 0;
    background: #3a68d5;
}

.calendar-hero__decor {
    position: absolute;
    right: 0;
    bottom: 0;
    width: auto;
    height: 96%;
    max-width: 60%;
    object-fit: contain;
    object-position: right bottom;
    pointer-events: none;
}

.calendar-hero .calendar-container {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
}

.calendar-hero__title {
    margin: 0;
    max-width: 768px;
    color: #fff;
    font-size: 62px;
    font-weight: 600;
    line-height: 66px;
}

/* Breadcrumbs */

.calendar-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    padding-top: 34px;
    padding-bottom: 36px;
    font-size: 14px;
    font-weight: 300;
    line-height: 24px;
}

.calendar-breadcrumbs a {
    color: #151515;
}

.calendar-breadcrumbs a:hover {
    color: #3a68d5;
}

.calendar-breadcrumbs__sep,
.calendar-breadcrumbs__current {
    color: #777;
}

.calendar-breadcrumbs__current {
    min-width: 0;
}

/* Toolbar */

.calendar-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 56px;
}

.calendar-toolbar__years {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 34px;
}

.calendar-year {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #151515;
    font-family: inherit;
    font-size: 36px;
    font-weight: 600;
    line-height: 46px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.calendar-year:hover {
    color: #3a68d5;
}

.calendar-year--active {
    color: #3a68d5;
}

.calendar-archive__btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 300px;
    height: 44px;
    padding: 0 24px 0 38px;
    border: 1px solid #d4d4d4;
    border-top-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background: #fff;
    color: #151515;
    font-family: inherit;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.calendar-archive__btn:hover {
    border-color: #3a68d5;
}

.calendar-archive {
    position: relative;
}

.calendar-archive__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10;
    display: none;
    min-width: 100%;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    border: 1px solid #d4d4d4;
    border-top-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(21, 21, 21, 0.08);
}

.calendar-archive--open .calendar-archive__menu {
    display: block;
}

.calendar-archive__item {
    display: block;
    width: 100%;
    padding: 10px 38px;
    border: 0;
    background: none;
    color: #151515;
    font-family: inherit;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    text-align: left;
    cursor: pointer;
}

.calendar-archive__item:hover,
.calendar-archive__item--active {
    color: #3a68d5;
}

/* Filters */

.calendar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 30px 30px;
    margin-bottom: 53px;
}

.calendar-filter {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 300px;
    max-width: 100%;
}

.calendar-filter__label {
    color: #777;
    font-size: 14px;
    font-weight: 300;
    line-height: 24px;
}

.calendar-select {
    position: relative;
}

.calendar-select__field {
    appearance: none;
    width: 100%;
    height: 44px;
    padding: 0 44px 0 34px;
    border: 1px solid #d4d4d4;
    border-top-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background: #fff;
    color: #151515;
    font-family: inherit;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.calendar-select__field:hover,
.calendar-select__field:focus {
    border-color: #3a68d5;
    outline: none;
}

.calendar-select__icon {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Month sections */

.calendar-month + .calendar-month {
    margin-top: 42px;
}

.calendar-month__title {
    margin: 0 0 39px;
    font-size: 36px;
    font-weight: 600;
    line-height: 46px;
}

.calendar-month__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
}

/* Event card */

.calendar-event-card {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 160px;
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
    background: #3a68d5;
    color: #fff;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.calendar-event-card:hover {
    background: #F23E01;
}

.calendar-event-card__day {
    position: absolute;
    left: 23.52px;
    top: 28.09px;
    font-size: 42.3px;
    font-weight: 400;
    line-height: 42.3px;
    text-align: center;
}

.calendar-event-card__month {
    position: absolute;
    left: 18.51px;
    top: 75.41px;
    font-size: 16.92px;
    font-weight: 400;
    line-height: 22.56px;
    text-align: center;
}

.calendar-event-card__divider {
    position: absolute;
    left: 93.44px;
    top: 40.87px;
    width: 1px;
    height: 35.06px;
    background: #fff;
    transform: rotate(23deg);
}

.calendar-event-card__title {
    position: absolute;
    left: 120px;
    right: 12px;
    top: 20px;
    width: auto;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 17.5px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: break-word;
    hyphens: auto;
}

.calendar-event-card__sport {
    position: absolute;
    left: 120px;
    right: 12px;
    top: 74px;
    width: auto;
    font-size: 12px;
    font-weight: 300;
    line-height: 16.5px;
    letter-spacing: 0.55px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-card__meta-line {
    position: absolute;
    left: 0;
    top: 115px;
    width: 100%;
    height: 1px;
    background: #fff;
}

.calendar-event-card__meta-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
}

.calendar-event-card__meta-dot--left {
    left: 22px;
    top: 134px;
}

.calendar-event-card__meta-dot--right {
    left: 50%;
    top: 134px;
}

.calendar-event-card__location {
    position: absolute;
    left: 36px;
    right: 50%;
    top: auto;
    bottom: 16px;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-card__status {
    position: absolute;
    left: calc(50% + 14px);
    right: 12px;
    top: auto;
    bottom: 16px;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive */

@media (max-width: 1200px) {
    .calendar-breadcrumbs {
        padding-top: 28px;
        padding-bottom: 36px;
        gap: 14px;
    }

    .calendar-page__main {
        padding-bottom: 64px;
    }

    .calendar-hero {
        height: 240px;
    }

    .calendar-hero__title {
        font-size: 52px;
        line-height: 56px;
    }

    .calendar-toolbar {
        margin-bottom: 48px;
    }

    .calendar-filters {
        margin-bottom: 44px;
    }

    .calendar-month__title {
        font-size: 32px;
        line-height: 40px;
        margin-bottom: 32px;
    }

    .calendar-month__grid {
        gap: 24px;
    }
}

@media (max-width: 999px) {
    .calendar-month__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .calendar-breadcrumbs {
        padding-top: 24px;
        padding-bottom: 28px;
        gap: 12px;
    }

    .calendar-hero {
        height: 220px;
    }

    .calendar-hero__title {
        font-size: 44px;
        line-height: 48px;
    }

    .calendar-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin-bottom: 40px;
    }

    .calendar-toolbar__years {
        gap: 24px;
    }

    .calendar-year {
        font-size: 32px;
        line-height: 40px;
    }

    .calendar-archive__btn {
        width: 100%;
        max-width: 300px;
    }

    .calendar-filters {
        gap: 20px;
        margin-bottom: 36px;
    }

    .calendar-filter {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 800px) {
    .calendar-breadcrumbs {
        padding-top: 20px;
        padding-bottom: 24px;
        gap: 12px;
        font-size: 13px;
        line-height: 20px;
    }

    .calendar-breadcrumbs__current {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }
}

@media (max-width: 799px) {
    .calendar-month__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .calendar-month__title {
        font-size: 28px;
        line-height: 34px;
        margin-bottom: 28px;
    }

    .calendar-month + .calendar-month {
        margin-top: 36px;
    }
}

@media (max-width: 700px) {
    .calendar-toolbar__years {
        gap: 20px;
    }

    .calendar-year {
        font-size: 28px;
        line-height: 34px;
    }

    .calendar-archive__btn,
    .calendar-select__field {
        height: 42px;
        font-size: 16px;
        line-height: 24px;
    }
}

@media (max-width: 479px) {
    .calendar-month__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .calendar-event-card {
        height: 150px;
    }

    .calendar-event-card__day {
        left: 20px;
        top: 24px;
        font-size: 36px;
        line-height: 36px;
    }

    .calendar-event-card__month {
        left: 16px;
        top: 66px;
        font-size: 15px;
        line-height: 20px;
    }

    .calendar-event-card__divider {
        left: 80px;
        top: 36px;
        height: 30px;
    }

    .calendar-event-card__title {
        left: 100px;
        top: 18px;
        font-size: 13px;
        line-height: 17px;
    }

    .calendar-event-card__sport {
        left: 100px;
        top: 66px;
    }

    .calendar-event-card__meta-line {
        top: 108px;
    }

    .calendar-event-card__meta-dot--left {
        left: 18px;
        top: 127px;
    }

    .calendar-event-card__meta-dot--right {
        top: 127px;
    }

    .calendar-event-card__location,
    .calendar-event-card__status {
        bottom: 14px;
        font-size: 11px;
        line-height: 15px;
    }
}

@media (max-width: 480px) {
    .calendar-breadcrumbs {
        padding-top: 16px;
        padding-bottom: 20px;
        gap: 10px;
    }

    .calendar-page__main {
        padding-bottom: 48px;
    }

    .calendar-hero {
        height: 180px;
    }

    .calendar-hero__title {
        font-size: 28px;
        line-height: 32px;
    }

    .calendar-toolbar {
        margin-bottom: 32px;
    }

    .calendar-filters {
        margin-bottom: 28px;
    }

    .calendar-year {
        font-size: 24px;
        line-height: 30px;
    }

    .calendar-month__title {
        font-size: 24px;
        line-height: 30px;
        margin-bottom: 24px;
    }

    .calendar-month + .calendar-month {
        margin-top: 32px;
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .calendar-event-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
    }
}