/* ===== КАРУСЕЛЬ (Embla + fade) ===== */
.embla {
    overflow: hidden;
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 100%;
    margin: 2rem auto;
}

.embla__viewport {
    overflow: hidden;
}

.embla__container {
    display: flex;
    height: 520px;
    touch-action: pan-y pinch-zoom;
}

.embla__slide {
    flex: 0 0 100%;
    min-width: 0;
    position: relative;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    will-change: opacity;
}

.embla__slide.is-selected {
    opacity: 1;
}

.embla__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none; /* чтобы клик шёл через <a> */
}

.embla__slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 60%);
}

.embla__caption {
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* Кнопки навигации */
.embla__buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.embla__button {
    width: 48px;
    height: 48px;
    background: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.embla__button:hover {
    background: #f0f8ff;
    transform: scale(1.08);
}

.embla__button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .embla__container {
        height: 420px;
    }
}

@media (max-width: 480px) {
    .embla__container {
        height: 320px;
    }

    .embla__caption {
        font-size: 1rem;
    }
}
