.afisha-header {
    background: #445878;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.afisha-header-text {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    letter-spacing: 2px;
}

.afisha-container {
    font-family: 'Bebas Neue', Arial, sans-serif;
    position: relative;
    width: 100%;
    padding: 20px 0px 40px 0px;
}

.afisha-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.afisha-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #384b69;
    min-height: 80px;
    position: relative;
}

.afisha-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.afisha-item.selected {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: #f8f9fa;
}

/* Стиль для PUSHK = 1 */
.afisha-item.pushk-highlight {
    background-image: url('/bitrix/templates/MIA/images/pk-afish.png') !important;
    background-size: 50%;
    border-left-color: #8bf790 !important;
}

/* Стиль для GOS = 1 */
.afisha-item.gos-glow {
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.2) !important;
    position: relative;
    z-index: 1;
    border-left-color: #007bff !important;
}

.afisha-content {
    flex: 1;
    min-width: 0;
    margin-right: 20px;
}

.afisha-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.afisha-title {
    color: #384b69;
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    line-height: 1.3;
}

.afisha-description {
    font-size: 18px;
    color: #666;
    margin: 0;
    line-height: 1.4;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.afisha-date-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
    min-width: 60px;
}

.afisha-date-container.with-type {
    margin-right: 180px;
}

.afisha-date {
    font-size: 22px;
    color: #384b69;
    font-weight: bold;
    margin-bottom: 4px;
}

.afisha-time {
    font-size: 22px;
    color: #e74c3c;
    font-weight: bold;
}

/* Зона с типом мероприятия */
.afisha-type-container {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    clip-path: polygon(0% 0, 100% 0, 100% 100%, 0 100%);
}

/* Цвета для платных мероприятий */
.afisha-item .afisha-type-container.type-paid {
    background-color: #384b69;
}

.afisha-item.pushk-highlight .afisha-type-container.type-paid {
    background-color: rgba(139, 247, 144, 0.8);
}

.afisha-item.gos-glow .afisha-type-container.type-paid {
    background-color: #007bff;
}

/* Цвета для бесплатных мероприятий */
.afisha-item .afisha-type-container.type-free {
    background-color: #384b69;
}

.afisha-item.pushk-highlight .afisha-type-container.type-free {
    background-color: #8bf790;
}

.afisha-item.gos-glow .afisha-type-container.type-free {
    background-color: #007bff;
}

.afisha-type-content {
    text-align: center;
}

/* Цвет текста для зоны типа мероприятия */
.afisha-item:not(.pushk-highlight) .afisha-type-content {
    color: white;
}

.afisha-item.pushk-highlight .afisha-type-content {
    color: #384b69;
}

.afisha-type-text {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 5px;
    margin-right: 0px;
}

.afisha-type-info {
    font-size: 12px;
    line-height: 1.2;
    opacity: 0.9;
    margin-right: 0px;
    letter-spacing: 1px;
}

.afisha-more {
    padding: 8px 16px;
    background-color: #384b69;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    opacity: 0;
}

.afisha-item.selected .afisha-more {
    opacity: 1;
}

.afisha-more:hover {
    background-color: #2c3a4f;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 8px;
}

.pagination button {
    background: #384b69;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.pagination button:hover {
    background: #2c3a4f;
    transform: translateY(-2px);
}

.pagination button.active {
    background: #2c3a4f;
    transform: scale(1.1);
}

.pagination button:disabled {
    background: #ddd;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    text-align: center;
    padding: 30px;
    color: #384b69;
    font-size: 16px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .afisha-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 15px;
        padding-right: 140px;
    }
    
    .afisha-content {
        margin-right: 0;
        width: 100%;
    }
    
    .afisha-date-container {
        flex-direction: row;
        gap: 15px;
        margin-right: 0;
        align-self: flex-start;
    }
    
    .afisha-date-container.with-type {
        margin-right: 120px;
    }
    
    .afisha-date, .afisha-time {
        margin-bottom: 0;
    }
    
    .afisha-type-container {
        width: 120px;
        clip-path: polygon(0% 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .afisha-type-text {
        font-size: 14px;
    }
    
    .afisha-type-info {
        font-size: 10px;
    }
    
    .afisha-more {
        margin-left: 0;
        align-self: flex-end;
        opacity: 1;
        padding: 6px 12px;
    }
    
    .afisha-title {
        font-size: 16px;
    }
    
    .afisha-description {
        font-size: 13px;
    }
    
    .afisha-date {
        font-size: 14px;
    }
    
    .afisha-time {
        font-size: 13px;
    }
    
    .pagination button {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .afisha-header-text {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .afisha-item {
        padding: 12px;
        padding-right: 100px;
    }
    
    .afisha-date-container {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    
    .afisha-date-container.with-type {
        margin-right: 90px;
    }
    
    .afisha-type-container {
        width: 90px;
        padding: 0 10px;
    }
    
    .afisha-type-text {
        font-size: 12px;
    }
    
    .afisha-type-info {
        font-size: 9px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination button {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
}