/* === CARROSSEL SG42 ===================================================== */
/* Escopo exclusivo do componente de carrossel */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 24px;
}

.carousel .carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.6s ease;
}

.carousel .slide {
    min-width: 100%;
    position: relative;
    flex-shrink: 0;
}

.carousel .slide img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

.carousel .slide-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 24px 24px 22px;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .75));
    border-radius: 0 0 16px 16px;
}

.carousel .slide-caption h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 6px;
}

.carousel .slide-caption p {
    color: #cfe0f7;
    margin: 0;
}

/* Controles prev/next */
.carousel .carousel-nav {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* garante centrado vertical */
    transform: none;
    /* evita override vindo de outros CSS */
    padding: 0 12px;
    pointer-events: none;
}

.carousel .carousel-nav button {
    pointer-events: auto;
    display: inline-flex;
    /* centralização do glifo */
    align-items: center;
    justify-content: center;
    width: 44px;
    /* área de toque recomendada */
    height: 44px;
    line-height: 1;
    /* evita “subir” o caractere */
    font-size: 22px;
    /* tamanho do ‹ › */
    background: rgba(0, 0, 0, .4);
    border: none;
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel .carousel-nav button:hover {
    background: rgba(0, 0, 0, .7);
}

/* Indicadores (usando PNG passado via --sg-indicator-url) */
.carousel .carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 12px;
}

.carousel .carousel-indicators button {
    width: 22px;
    height: 22px;
    border: none;
    background: none;
    position: relative;
    padding: 0;
}

.carousel .carousel-indicators button::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background-image: var(--sg-indicator-url);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.5;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.carousel .carousel-indicators button.active::before {
    opacity: 1;
    transform: scale(1.1);
}

/* ===== Responsivo ===== */
@media (max-width: 980px) {
    .carousel .slide img {
        height: 240px;
    }
}