
/* ==========================================
   SIMPLE CAROUSEL
========================================== */

.simple-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 1470 / 327;

    overflow: hidden;
    border-radius: 12px;
    background: #f5f5f5;

    margin-bottom: 20px;
    box-sizing: border-box;

    touch-action: pan-y;
}

/* ==========================================
   SLIDES
========================================== */

.simple-carousel > a,
.simple-carousel > img {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

/* Exibe a primeira imagem antes do JS carregar */
.simple-carousel:not(.sc-initialized) > :first-child {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Slide ativo */
.simple-carousel > .sc-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

/* Imagens */
.simple-carousel img {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: contain;

    user-select: none;
    -webkit-user-drag: none;
}

/* ==========================================
   SETAS DE NAVEGAÇÃO
========================================== */

.simple-carousel .sc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.30);
    color: #ffffff;

    cursor: pointer;

    transition: background 0.2s ease;
}

.simple-carousel .sc-arrow:hover {
    background: rgba(0, 0, 0, 0.70);
}

.simple-carousel .sc-prev {
    left: 12px;
}

.simple-carousel .sc-next {
    right: 12px;
}

.simple-carousel .sc-arrow svg {
    width: 20px;
    height: 20px;
}

/* ==========================================
   INDICADORES
========================================== */

.simple-carousel .sc-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;
    padding: 5px 9px;

    background: rgba(0, 0, 0, 0.20);
    border-radius: 20px;

    z-index: 5;
}

.simple-carousel .sc-dot {
    width: 8px;
    height: 8px;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.55);

    cursor: pointer;

    transition:
        width 0.25s ease,
        background 0.25s ease;
}

.simple-carousel .sc-dot.sc-active {
    width: 22px;
    background: #ffffff;
}

/* ==========================================
   ACESSIBILIDADE
========================================== */

.simple-carousel button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* ==========================================
   RESPONSIVIDADE
========================================== */

@media (max-width: 768px) {

    .simple-carousel {
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .simple-carousel .sc-arrow {
        width: 26px;
        height: 26px;
    }

    .simple-carousel .sc-arrow svg {
        width: 16px;
        height: 16px;
    }

    .simple-carousel .sc-prev {
        left: 5px;
    }

    .simple-carousel .sc-next {
        right: 5px;
    }

    .simple-carousel .sc-dots {
        bottom: 5px;
        gap: 4px;
        padding: 4px 6px;
    }

    .simple-carousel .sc-dot {
        width: 5px;
        height: 5px;
    }

    .simple-carousel .sc-dot.sc-active {
        width: 14px;
    }
}

/* Respeita a preferência por menos animações */
@media (prefers-reduced-motion: reduce) {

    .simple-carousel > a,
    .simple-carousel > img,
    .simple-carousel .sc-dot {
        transition: none;
    }
}


/* ==========================================
   IMAGENS RESPONSIVAS - DESKTOP E MOBILE
========================================== */

.simple-carousel {
    aspect-ratio: 4.5 / 1;
}

/* Suporte à tag picture */
.simple-carousel picture {
    display: block;
    width: 100%;
    height: 100%;
}

.simple-carousel picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Proporção exclusiva para mobile */
@media (max-width: 768px) {

    .simple-carousel {
        aspect-ratio: 16 / 9;
    }

    .simple-carousel .sc-arrow {
        width: 32px;
        height: 32px;
    }

    .simple-carousel .sc-dots {
        bottom: 8px;
        gap: 6px;
    }

    .simple-carousel .sc-dot {
        width: 7px;
        height: 7px;
    }

    .simple-carousel .sc-dot.sc-active {
        width: 18px;
    }
}
