/* ===== ПЕРЕВОРАЧИВАЮЩИЕСЯ КАРТОЧКИ С ГОРИЗОНТАЛЬНОЙ ПРОКРУТКОЙ ===== */
.flip-cards-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 40px 0;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--border-color);
    -webkit-overflow-scrolling: touch;
}

.flip-cards-wrapper::-webkit-scrollbar {
    height: 6px;
}

.flip-cards-wrapper::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px;
}

.flip-cards-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.flip-cards-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: max-content;
    padding: 0 20px;
}

.flip-card {
    background-color: transparent;
    width: 280px;
    height: 220px;
    perspective: 1000px;
    cursor: pointer;
    flex-shrink: 0;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 16px;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Фоновые изображения для каждой карточки (светлые, полупрозрачные) */
.flip-card[data-card="0"] .flip-card-front {
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url('/static/slider_images/slide1.jpg');
    background-size: cover;
    background-position: center;
    color: #2C1810;
}
.flip-card[data-card="1"] .flip-card-front {
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url('/static/slider_images/slide2.jpg');
    background-size: cover;
    background-position: center;
    color: #2C1810;
}
.flip-card[data-card="2"] .flip-card-front {
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url('/static/slider_images/slide3.jpg');
    background-size: cover;
    background-position: center;
    color: #2C1810;
}
.flip-card[data-card="3"] .flip-card-front {
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url('/static/slider_images/slide4.jpg');
    background-size: cover;
    background-position: center;
    color: #2C1810;
}
.flip-card[data-card="4"] .flip-card-front {
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url('/static/slider_images/slide5.jpg');
    background-size: cover;
    background-position: center;
    color: #2C1810;
}
.flip-card[data-card="5"] .flip-card-front {
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url('/static/slider_images/slide6.jpg');
    background-size: cover;
    background-position: center;
    color: #2C1810;
}

.flip-card-front {
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.flip-card-back {
    background: var(--bg-card);
    color: var(--text-primary);
    transform: rotateY(180deg);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    font-size: 0.9em;
    line-height: 1.5;
    text-align: center;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .flip-card {
        width: 240px;
        height: 200px;
    }
    .flip-card-front {
        font-size: 0.9em;
    }
    .flip-card-back {
        font-size: 0.8em;
    }
}