:root {
    --bg-color: #F5F5F5;
    --text-color: #0A0A0A;
    --card-color: #FFF;
    --label-color: #737373;
    --date-color: #171717;
    --link-color: #177DDC;
    --input-text-color: #0A0A0A;
    --input-bg-color: #FFF;
    --filter-bg-color: #F5F5F5;
    --filter-color: #0A0A0A;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Rubik, sans-serif;
    background: var(--bg-color);
}

.event-list {
    min-height: 100vh;
    background: var(--bg-color);
    padding: 48px 112px 200px;
    box-sizing: border-box;
}

.event-list--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 112px;
}

.event-list--centered .event-list__container {
    align-items: center;
}

.event-list__container {
    display: flex;
    flex-direction: column;
    gap: 50px;
    width: 100%;
}

.event-list__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-color);
    padding-top: 24px;
    padding-bottom: 16px;
    margin-top: -24px;
}

.event-list__fade {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 179px;
    pointer-events: none;
    z-index: 5;
}

.event-list__tabs {
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 99px;
    border: 1px solid #E5E5E5;
    background: var(--filter-bg-color);
}

.event-list__tab {
    display: flex;
    min-width: 29px;
    min-height: 29px;
    padding: 4px 8px;
    justify-content: center;
    align-items: center;
    gap: 6px;
    border-radius: 99px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.event-list__tab--active {
    background: #FFF;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10);
}

.event-list__tab-text {
    color: var(--filter-color);
    font-family: Geist, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 150%;
    letter-spacing: 0.07px;
}

.event-list__tab-count {
    display: flex;
    height: 16px;
    min-width: 16px;
    padding: 0 4px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    background: #D4D4D4;
    color: #0A0A0A;
    text-align: center;
    font-family: Geist, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 150%;
    letter-spacing: 0.18px;
}

.event-list__search {
    position: relative;
    display: flex;
    align-items: center;
    width: 248px;
    min-height: 40px;
    padding: 9.5px 16px;
    gap: 12px;
    border-radius: 99px;
    border: 1px solid #E5E5E5;
    background: var(--input-bg-color);
}

.event-list__search-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.event-list__search-input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--input-text-color);
    font-family: Rubik, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 150%;
    letter-spacing: 0.07px;
    width: 100%;
    min-width: 0;
}

.event-list__search-input::placeholder {
    color: #737373;
}

.event-list__search:has(.event-list__search-input:disabled) {
    background: #F5F5F5;
    border-color: #E5E5E5;
    cursor: not-allowed;
}

.event-list__search-input:disabled {
    cursor: not-allowed;
    color: #A3A3A3;
}

.event-list__search-input:disabled::placeholder {
    color: #A3A3A3;
}

.event-list__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: 16px;
    row-gap: 60px;
    width: 100%;
}

.event-list__grid--no-images {
    row-gap: 16px;
}

.event-list__card-slot {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.event-list__empty {
    grid-column: 1 / -1;
    margin: 0;
    color: #737373;
    font-family: Rubik, sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    width: 100%;
    padding: 32px 0;
}


.event-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    padding: 20px;
    width: 100%;
    border-radius: 24px;
    background: var(--card-color);
    box-sizing: border-box;
}

.event-card--with-image {
    min-height: 208px;
    padding-left: 292px;
}

.event-card__image {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 252px;
    height: 252px;
    border-radius: 8px;
    border: 1px solid #FFF;
    background-color: #D4D4D4;
    background-position: 50% 50%;
    background-size: cover;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.event-card__image--fallback {
    background-color: #FFF;
    background-size: contain;
    border: 1px solid #E5E5E5;
}

.event-card__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.event-card__head {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-bottom: 1px solid #E5E5E5;
}

.event-card__name {
    margin: 0;
    color: var(--text-color);
    font-family: Rubik, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 28px;
}

.event-card__dates {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.event-card__date {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 0;
    border-radius: 4px;
    width: 100%;
}

.event-card__date--end {
    border-top: 1px solid #E5E5E5;
}

.event-card__label {
    color: var(--label-color);
    font-family: Rubik, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
    text-transform: uppercase;
}

.event-card__value {
    color: var(--date-color);
    font-family: Rubik, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 18px;
}

.event-card__timezone {
    margin: 0;
    color: var(--label-color);
    font-family: Rubik, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
}

.event-card__footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.event-card:not(.event-card--with-image) .event-card__footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.event-card__access {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 99px;
    color: var(--link-color);
    font-family: Rubik, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    text-align: center;
}

.event-card__access:hover { opacity: 0.85; }

.event-card__access svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}


.event-list__empty-live {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 40px;
    width: 100%;
    max-width: 1048px;
    margin: 0 auto;
    border-radius: 24px;
    background: var(--card-color);
    box-sizing: border-box;
}

.event-list__empty-live__title {
    margin: 0;
    width: 100%;
    color: var(--text-color);
    text-align: center;
    font-family: Rubik, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
}

.event-list__empty-live__logo {
    height: 40px;
    width: auto;
}

.event-list__empty-live__contacts {
    display: flex;
    align-items: stretch;
    gap: 24px;
    width: 100%;
}

.event-list__empty-live__contacts:empty {
    display: none;
}

.event-list__contact {
    display: flex;
    flex: 1 0 0;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: var(--bg-color);
    min-width: 0;
}

.event-list__contact__icon {
    display: flex;
    width: 56px;
    height: 56px;
    padding: 0 11px;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
    border-radius: 42.9px;
    background: rgba(23, 125, 220, 0.10);
    color: var(--link-color);
    flex-shrink: 0;
    box-sizing: border-box;
}

.event-list__contact__icon svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.event-list__contact__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.event-list__contact__label {
    color: var(--label-color);
    font-family: Rubik, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-transform: uppercase;
}

.event-list__contact__value {
    color: var(--text-color);
    font-family: Rubik, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    word-break: break-word;
}


.event-list__loading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}

.event-list__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(23, 125, 220, 0.15);
    border-top-color: #177DDC;
    border-radius: 50%;
    animation: event-list-spin 0.8s linear infinite;
}

@keyframes event-list-spin {
    to { transform: rotate(360deg); }
}


@media (max-width: 1250px) {
    .event-list {
        padding: 24px 16px;
    }

    .event-list__top {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .event-list__tabs {
        align-self: flex-start;
    }

    .event-list__search {
        width: 100%;
    }

    .event-list__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .event-list__card-slot {
        width: 100%;
    }

    .event-list__card-slot--with-image {
        margin-top: 44px;
    }

    .event-card {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-end;
        gap: 20px;
        padding: 20px;
    }

    .event-card--with-image {
        padding-top: 112px;
        padding-left: 20px;
        min-height: unset;
    }

    .event-card--with-image .event-card__image {
        left: 50%;
        top: -44px;
        transform: translateX(-50%);
        width: 140px;
        height: 140px;
    }

    .event-card__info {
        width: 100%;
        align-items: stretch;
        gap: 20px;
    }

    .event-card--with-image .event-card__info {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .event-card--with-image .event-card__name {
        font-size: 24px;
        line-height: 32px;
        text-align: center;
        width: 100%;
    }

    .event-card--with-image .event-card__date {
        justify-content: center;
    }

    .event-card--with-image .event-card__timezone {
        text-align: center;
        width: 100%;
    }

    .event-card__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .event-card__access {
        width: 100%;
        justify-content: center;
    }

    .event-list__empty-live {
        gap: 40px;
        padding: 24px;
    }

    .event-list__empty-live__title {
        font-size: 20px;
        line-height: 28px;
    }

    .event-list__empty-live__logo {
        height: 64px;
    }

    .event-list__empty-live__contacts {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .event-list__contact {
        width: 100%;
    }
}

@media (max-width: 550px) {
    .event-list__grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 2560px) {
    .event-list { padding: 64px 160px; }
    .event-list__container { gap: 32px; }

    .event-list__tab { padding: 6px 12px; min-height: 32px; }
    .event-list__tab-text { font-size: 16px; }
    .event-list__tab-count { font-size: 13px; height: 18px; min-width: 18px; }

    .event-list__search { width: 320px; min-height: 48px; padding: 12px 20px; }
    .event-list__search-input { font-size: 16px; }
    .event-list__search-icon { width: 22px; height: 22px; }

    .event-card { gap: 24px; padding: 24px; border-radius: 28px; }
    .event-card--with-image { min-height: 240px; padding-left: 332px; }
    .event-card__image { left: 24px; width: 288px; height: 288px; border-radius: 10px; }
    .event-card__name { font-size: 24px; line-height: 32px; }
    .event-card__label { font-size: 14px; line-height: 18px; }
    .event-card__value { font-size: 16px; line-height: 22px; }
    .event-card__timezone { font-size: 14px; line-height: 18px; }
    .event-card__access { font-size: 18px; line-height: 26px; }
    .event-card__access svg { width: 26px; height: 26px; }

    .event-list__empty-live__title { font-size: 28px; line-height: 36px; }
    .event-list__empty-live__logo { height: 100px; }
    .event-list__contact__label { font-size: 16px; line-height: 22px; }
    .event-list__contact__value { font-size: 18px; line-height: 26px; }
}

@media (min-width: 3840px) {
    .event-list { padding: 96px 240px; }
    .event-list__container { gap: 48px; }
    .event-list__grid { gap: 24px; }

    .event-list__tab { padding: 10px 18px; min-height: 44px; }
    .event-list__tab-text { font-size: 24px; }
    .event-list__tab-count { font-size: 20px; height: 28px; min-width: 28px; padding: 0 10px; }

    .event-list__search { width: 480px; min-height: 68px; padding: 18px 32px; }
    .event-list__search-input { font-size: 24px; }
    .event-list__search-icon { width: 32px; height: 32px; }

    .event-card { gap: 32px; padding: 32px; border-radius: 36px; }
    .event-card--with-image { min-height: 320px; padding-left: 432px; }
    .event-card__image { left: 32px; width: 384px; height: 384px; border-radius: 14px; }
    .event-card__name { font-size: 36px; line-height: 46px; }
    .event-card__label { font-size: 20px; line-height: 26px; }
    .event-card__value { font-size: 24px; line-height: 32px; }
    .event-card__timezone { font-size: 20px; line-height: 26px; }
    .event-card__access { font-size: 26px; line-height: 36px; }
    .event-card__access svg { width: 36px; height: 36px; }

    .event-list__empty-live { gap: 72px; padding: 72px; border-radius: 36px; }
    .event-list__empty-live__title { font-size: 44px; line-height: 56px; }
    .event-list__empty-live__logo { height: 160px; }
    .event-list__contact { gap: 32px; padding: 32px; border-radius: 28px; }
    .event-list__contact__icon { width: 96px; height: 96px; }
    .event-list__contact__icon svg { width: 52px; height: 52px; }
    .event-list__contact__label { font-size: 24px; line-height: 32px; }
    .event-list__contact__value { font-size: 28px; line-height: 36px; }
}

#floatingBackButton{
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10001;

    display: flex;
    align-items: center;
    gap: 8px;

    height: 48px;
    padding: 20px;

    border: none;
    border-radius: 999px;

    background: rgba(20,20,20,0.72);
    backdrop-filter: blur(12px);

    color: #fff;

    font-family: 'Geist', sans-serif;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;

    transition:
        transform .2s ease,
        background .2s ease,
        opacity .2s ease;

    box-shadow:
        0 8px 24px rgba(0,0,0,.28);
}

#floatingBackButton:hover{
    background: rgba(20,20,20,0.9);
    transform: translateY(-2px);
}

#floatingBackButton:active{
    transform: scale(.96);
}

#floatingBackButton svg{
    flex-shrink: 0;
}
