/* === Архив Афиша === */

.afisha-archive-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    box-sizing: border-box;
}

/* ----------------------------------------------------------------
   Фильтры
   ---------------------------------------------------------------- */
.afisha-archive-filters {
    margin-bottom: 30px;
}

.afisha-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.afisha-filter-item {
    width: 100%;
    min-width: 0;
}

.afisha-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    line-height: 1.5;
}

.afisha-search-input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Select2 */
.afisha-filter-item .select2-container {
    width: 100% !important;
}

.afisha-filter-item .select2-container--default .select2-selection--single {
    height: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.afisha-filter-item .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 10px 36px 10px 14px;
    line-height: 1.5;
    color: #333;
    font-size: 15px;
}

.afisha-filter-item .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 10px;
}

.afisha-filter-item .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.select2-container--open .select2-dropdown--below {
    margin-top: 30px;
}

.select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #444;
}

/* ----------------------------------------------------------------
   Результаты
   ---------------------------------------------------------------- */
.afisha-archive-results {
    position: relative;
    min-height: 200px;
}

/* ----------------------------------------------------------------
   Список
   ---------------------------------------------------------------- */
.afisha-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

/* Один элемент */
.afisha-item {
    background: #fff;
    border-bottom: 1px solid #ebebeb;
    transition: background 0.2s ease;
}

.afisha-item:last-child {
    border-bottom: none;
}

.afisha-item:hover {
    background: #f9f9f9;
}

/* Ссылка-обёртка */
.afisha-item__link {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
}

/* Фото слева — ширина фиксированная, высота как есть */
.afisha-item__thumb {
    flex-shrink: 0;
    width: 100px;
}

.afisha-item__thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: opacity 0.25s ease;
}

.afisha-item:hover .afisha-item__thumb img {
    opacity: 0.88;
}

/* Контент справа */
.afisha-item__content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

/* Мета: дата + филиал */
.afisha-item__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.afisha-item__date {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

.afisha-item__filial {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Заголовок */
.afisha-item__title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.afisha-item:hover .afisha-item__title {
    color: #111;
}

/* ----------------------------------------------------------------
   Нет результатов
   ---------------------------------------------------------------- */
.afisha-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #999;
}

/* ----------------------------------------------------------------
   Кнопка «Загрузить ещё»
   ---------------------------------------------------------------- */
.afisha-loadmore-wrap {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

.afisha-loadmore-btn {
    display: inline-block;
    padding: 12px 40px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
}

.afisha-loadmore-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* ----------------------------------------------------------------
   Loader
   ---------------------------------------------------------------- */
.afisha-archive-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.afisha-loader-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #444;
    border-radius: 50%;
    animation: afishaArchiveSpin 0.9s linear infinite;
}

@keyframes afishaArchiveSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----------------------------------------------------------------
   Адаптивность
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
    .afisha-filter-row {
        grid-template-columns: 1fr;
    }

    .afisha-item__link {
        padding: 14px 16px;
        gap: 14px;
    }

    .afisha-item__thumb {
        width: 80px;
    }

    .afisha-item__title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .afisha-archive-container {
        padding: 12px;
    }

    .afisha-item__thumb {
        width: 70px;
    }

    .afisha-item__meta {
        gap: 8px;
    }

    .afisha-item__title {
        font-size: 14px;
    }

    .afisha-loadmore-btn {
        width: 100%;
    }
}
