/* Блок Афиша - Основные стили */
.afisha-block {
    max-width: 1140px;
    margin: 0 auto;
}

.afisha-block-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 70px;
    margin-top: 180px;
}
.afisha-block-title {
    font-weight: 500;
    font-size: 74px;
    line-height: 100%;
    text-align: center;
    text-transform: uppercase;
    color: #fff;
}
.afisha-block-subtitle {
    font-family: "Manrope", sans-serif;
    font-weight: 400;
    font-size: 20px;
    color: #fff;
}

/* ===== ВКЛАДКИ ===== */
.afisha-tabs {
    min-height: 50px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap; /* Запрещаем перенос */
    gap: 0; /* Убираем gap, используем padding */
    margin-bottom: 50px;
    justify-content: space-between; /* Равномерное распределение */
    width: 100%;
}

.afisha-tab {
    flex: 1; /* Все табы занимают равную ширину */
    text-align: center;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap; /* Запрещаем перенос текста */
    font-weight: 400;
    font-size: 36px;
    line-height: 100%;
    color: #656362;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid #2f2c2b;
    padding-top: 20px;
    outline: none; /* Убирает стандартную рамку фокуса */
    box-shadow: none; /* Убирает тень при фокусе */
}
.afisha-tab-year {
    font-family: "Manrope", sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.65);
}

.afisha-tab:hover {
    color: #fff;
}

.afisha-tab.active {
    font-weight: 400;
    font-size: 36px;
    line-height: 100%;
    color: #fff;
    border-top: 2px solid #FFF;
    padding-top: 19px;
}

.afisha-tab-separator {
    /*color: #ccc;
    font-size: 24px;
    font-weight: 300;
    user-select: none;*/
    display: none;
}

/* ===== СПИСОК МЕРОПРИЯТИЙ ===== */
.afisha-events-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    padding: 32px;
}


/* ===== УГОЛКИ ===== */
.afisha-events-list {
    position: relative;
    min-height: 350px;
}

.afisha-corner {
    position: absolute;
    width: 45px;
    height: 45px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    background-image: url('ugol.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Каждый уголок с индивидуальным поворотом */
.afisha-corner-tl {
    top: -2px;
    left: -2px;
    --rotate: 0deg;
    transform: translate(-10px, -10px) scale(0.8) rotate(var(--rotate));
}

.afisha-corner-tr {
    top: -2px;
    right: -2px;
    --rotate: 90deg;
    transform: translate(10px, -10px) scale(0.8) rotate(var(--rotate));
}

.afisha-corner-br {
    bottom: -2px;
    right: -2px;
    --rotate: 180deg;
    transform: translate(10px, 10px) scale(0.8) rotate(var(--rotate));
}

.afisha-corner-bl {
    bottom: -2px;
    left: -2px;
    --rotate: 270deg;
    transform: translate(-10px, 10px) scale(0.8) rotate(var(--rotate));
}

/* Активное состояние */
.afisha-events-list.active .afisha-corner {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(var(--rotate));
}

/* Задержки для каждого уголка */
.afisha-events-list.active .afisha-corner-tl { transition-delay: 0.1s; }
.afisha-events-list.active .afisha-corner-tr { transition-delay: 0.2s; }
.afisha-events-list.active .afisha-corner-br { transition-delay: 0.3s; }
.afisha-events-list.active .afisha-corner-bl { transition-delay: 0.4s; }


/* ===== ОТДЕЛЬНОЕ МЕРОПРИЯТИЕ ===== */
.afisha-event {
    display: flex;
    align-items: center;
    background: #241f1e;
    padding: 30px;
    gap: 50px;
    transition: all 0.3s ease;
    position: relative;
}

.afisha-event:hover {
    /*background: radial-gradient(100% 100% at 80% 66%, #bd8a7a 0%, rgba(218, 135, 108, 0) 120%);*/
    background: radial-gradient(100% 100% at 96% 70%, #ad563c 0%, #402920 120%)
}

/* Левая часть - Дата */
.afisha-event-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    flex-shrink: 0;
    padding-right: 50px;
    gap: 5px;
    border-right: solid 1px rgba(255, 255, 255, 0.12);
}

.afisha-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.afisha-event-day {
    font-weight: 400;
    font-size: 36px;
    line-height: 115%;
    color: #fff;
}

.afisha-event-month {
    font-family: "Manrope", sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #656362;
    text-transform: uppercase;
}

.afisha-event-time {
    font-family: "Manrope", sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #656362;
}
.afisha-event:hover .afisha-event-month,
.afisha-event:hover .afisha-event-time {
    color: #FFF;
}

/* Средняя часть - Название */
.afisha-event-middle {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 6px;
}

.afisha-event-title {
    font-family: "Manrope", sans-serif;
    font-weight: 400;
    font-size: 18px;
    color: #fff;
    margin: 0;
}

/* Правая часть - Кнопка */
.afisha-event-right {
    flex-shrink: 0;
}

.afisha-event-button,
.afisha-load-more{
    border: 1px solid #918f8e;
    font-family: "Manrope", sans-serif;
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}
.afisha-event-button div,
.afisha-load-more div {
    padding: 21px 22px;
}
.afisha-event-button div:first-child,
.afisha-load-more div:first-child {
    border-right: 1px solid #918f8e;
}
.afisha-event-button .right-arr,
.right-arr {
    display: flex;
}
.afisha-event:hover .afisha-event-button,
.afisha-event:hover .afisha-load-more,
.afisha-event-button:hover,
.afisha-load-more:hover {
    background: #ad563c;
    color: #ffffff;
    transform: translateY(-1px);
}
.afisha-event:hover .afisha-event-button,
.afisha-event:hover .afisha-load-more {
    border: 1px solid #ad563c;
}
.afisha-event:hover .afisha-event-button div:first-child,
.afisha-load-more:hover div:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

/* ===== ПОСЛЕДНИЙ ЭЛЕМЕНТ С ЗАТЕНЕНИЕМ ===== */
.afisha-event-last {
    position: relative;
}

.afisha-event-last::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.9) 80%, #ffffff);
    pointer-events: none;
}

/* ===== КНОПКА "ПОКАЗАТЬ ЕЩЕ" ===== */
.afisha-load-more-wrapper {
    text-align: center;
    padding-top: 10px;
}
.afisha-load-more:hover {
    border: 0;
}
.afisha-load-more {
    margin: 0 auto; /* Центрирует по горизонтали */
    width: fit-content;
    margin-top: -70px;
}
/*
.afisha-load-more {
    padding: 12px 40px;
    background: transparent;
    color: #007cba;
    border: 2px solid #007cba;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.afisha-load-more:hover {
    background: #007cba;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
}
*/


.afisha-load-more.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .afisha-block {
        padding: 20px 15px;
    }

    .afisha-tab {
        font-size: 18px;
        padding: 6px 10px;
    }

    .afisha-tab-separator {
        font-size: 18px;
    }

    .afisha-event {
        padding: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .afisha-event-left {
        min-width: 60px;
        flex-direction: row;
        gap: 12px;
        align-items: center;
        width: 100%;
    }

    .afisha-event-date {
        flex-direction: row;
        gap: 6px;
        align-items: baseline;
    }

    .afisha-event-day {
        font-size: 24px;
    }

    .afisha-event-month {
        font-size: 12px;
    }

    .afisha-event-time {
        font-size: 12px;
        margin-top: 0;
    }

    .afisha-event-middle {
        width: 100%;
        order: 3;
    }

    .afisha-event-title {
        font-size: 16px;
    }

    .afisha-event-right {
        width: 100%;
        order: 4;
    }

    .afisha-event-button {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    .afisha-load-more {
        width: 100%;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .afisha-tabs {
        gap: 4px;
    }

    .afisha-tab {
        font-size: 14px;
        padding: 4px 8px;
    }

    .afisha-tab-separator {
        font-size: 14px;
    }

    .afisha-event-day {
        font-size: 20px;
    }

    .afisha-event-title {
        font-size: 14px;
    }
}




/* ===== ФИКСИРОВАННАЯ ВЫСОТА ДЛЯ СПИСКА ===== */
.afisha-events-list {
    min-height: 350px; /* Фиксированная высота для 5 мероприятий */
    position: relative;
    transition: min-height 0.3s ease;
}

/* ===== ИНДИКАТОР ЗАГРУЗКИ ===== */
.afisha-loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 20px;
    color: #666;
    font-size: 16px;
}

.afisha-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ПЛАВНАЯ ЗАГРУЗКА ===== */
.afisha-event {
    animation: fadeIn 0.3s ease;
    opacity: 1;
    transition: opacity 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ЗАТЕНЕНИЕ ПОСЛЕДНЕГО ЭЛЕМЕНТА ===== */
.afisha-event-last {
    position: relative;
}

.afisha-event-last::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, #120f0e00 40%, #120f0eba 80%, #120f0e);
    pointer-events: none;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .afisha-events-list {
        min-height: 400px;
    }

    .afisha-loading-wrapper {
        min-height: 350px;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ===== */

/* Стили для пустого состояния */
.afisha-no-events {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #fff;
}

/* Стили для ошибки */
.afisha-error {
    text-align: center;
    padding: 20px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 4px;
}

/* Стили для загрузки */
.afisha-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}