/* Основные стили контейнера */
.banya-chess-wrapper {
    
    margin: 40px auto;
    
}

/* Заголовки раздела */
.section-title {
    font-size: 36px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
    padding-bottom: 20px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #8b5a2b, #a0785a);
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 300;
}

/* Шахматный блок */
.chess-block {
    display: flex;
    
    margin-bottom: 60px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chess-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Блок с текстом */
.chess-text {
    flex: 1;
    padding: 40px 30px;
    background: #fff;
}

.chess-text-title {
    font-size: 28px;
    color: #8b5a2b;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.chess-text-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #8b5a2b, #d4a762);
}

/* Список */
.chess-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chess-list li {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #444;
    position: relative;
    padding-left: 35px;
    font-size: 15px;
}

.chess-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23d4a762" d="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M11,16.5L18,9.5L16.5,8L11,13.5L7.5,10L6,11.5L11,16.5Z"/></svg>') no-repeat;
    background-size: contain;
}

/* Блок с изображением */
.chess-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.chess-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.chess-block:hover .chess-image img {
    transform: scale(1.05);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    padding: 30px 20px 15px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.chess-block:hover .image-caption {
    transform: translateY(0);
}

/* Реверсивный блок (картинка слева) */
.chess-block.reverse {
    flex-direction: row-reverse;
}


@media (min-width: 992px) {
    .chess-image  {
        width: 50%;
        flex: none;
    }
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    .chess-block {
        gap: 30px;
    }
    
    .chess-text {
        padding: 30px 20px;
    }
    
    .chess-text-title {
        font-size: 24px;
    }
    
    .chess-image {
        min-height: 350px;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .chess-block {
        flex-direction: column !important; /* Отменяем reverse на мобилках */
        gap: 0;
        margin-bottom: 40px;
    }
    
    .chess-text {
        padding: 30px 20px;
    }
    
    .chess-image {
        min-height: 300px;
        order: -1; /* Картинка всегда сверху на мобилках */
    }
    
    .chess-text-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .chess-list li {
        font-size: 14px;
        margin-bottom: 15px;
        padding-left: 30px;
    }
    
    .chess-list li:before {
        width: 18px;
        height: 18px;
        top: 4px;
    }
    
    .image-caption {
        transform: translateY(0); /* Всегда показываем подпись на мобилках */
        background: linear-gradient(to right, #8b5a2b, #a0785a);
        padding: 12px;
    }
}

/* Для маленьких мобильных устройств */
@media (max-width: 480px) {
    .banya-chess-wrapper {
        padding: 0 15px;
    }
    
    .chess-text {
        padding: 25px 15px;
    }
    
    .chess-image {
        min-height: 250px;
    }
}

/* Анимация появления блоков при скролле (опционально) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chess-block {
    animation: fadeInUp 0.6s ease-out forwards;
}

.chess-block:nth-child(2) {
    animation-delay: 0.2s;
}

.chess-block:nth-child(3) {
    animation-delay: 0.4s;
}

.chess-block:nth-child(4) {
    animation-delay: 0.6s;
}