/* ============================================================
 * Fulget Carousel — 2 cards + 0.4 peek, clip no container
 * ============================================================ */

.fulget-carousel {
    --fulget-cards: 2;
    --fulget-gap: 24px;
    --fulget-inactive-opacity: 1;
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 24px 0 40px;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.fulget-carousel__inner {
    position: relative;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .fulget-carousel__inner {
        padding: 0 20px;
    }
}

.fulget-carousel__swiper {
    overflow: visible !important;
    position: relative;
    width: 100%;
}

/* ============================================================
 * Slide width — controlado por var --fulget-cards
 * ============================================================ */
.fulget-carousel__swiper .swiper-slide {
    width: calc((100% - (var(--fulget-gap) * (var(--fulget-cards) - 1))) / var(--fulget-cards)) !important;
    height: auto;
    flex-shrink: 0;
    transition: opacity .4s ease;
    box-sizing: border-box;
}

.fulget-carousel__swiper .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-next) {
    opacity: var(--fulget-inactive-opacity, 0.35);
}

/* ============================================================
 * Fade-in CSS (sem dependencia de JS)
 * Substitui o reveal cortina do snippet GSAP para garantir
 * que os slides sempre aparecam, mesmo se ScrollTrigger falhar.
 * ============================================================ */
@keyframes fulget-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fulget-carousel__swiper .swiper-slide {
    animation: fulget-fade-in .5s ease-out both;
}
.fulget-carousel__swiper .swiper-slide:nth-child(2) { animation-delay: .08s; }
.fulget-carousel__swiper .swiper-slide:nth-child(3) { animation-delay: .16s; }
.fulget-carousel__swiper .swiper-slide:nth-child(4) { animation-delay: .24s; }
.fulget-carousel__swiper .swiper-slide:nth-child(5) { animation-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
    .fulget-carousel__swiper .swiper-slide {
        animation: none;
    }
}

/* ============================================================
 * Slide card
 * ============================================================ */
.fulget-slide {
    position: relative;
    overflow: hidden;
    background-position: center;
    background-size: var(--fulget-bg-size, cover);
    background-repeat: no-repeat;
    background-color: #f0eee9;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    height: 474px;
    box-sizing: border-box;
}

.fulget-carousel--bg-contain .fulget-slide {
    --fulget-bg-size: contain;
}
.fulget-carousel--bg-contain .fulget-slide {
    background-position: right center;
}

.fulget-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Link que cobre o card inteiro — clicavel em qualquer area */
.fulget-slide__link {
    position: absolute;
    inset: 0;
    z-index: 2;
    text-indent: -9999px;
    overflow: hidden;
    background: transparent;
    /* Some focus/outline accessibility */
}
.fulget-slide__link:focus-visible {
    outline: 2px solid var(--fulget-slide-color, #111827);
    outline-offset: -4px;
}

.fulget-slide--clickable {
    cursor: pointer;
}

/* Conteudo do slide e botao precisam ficar ACIMA do link overlay */
.fulget-slide__content,
.fulget-slide__badge-wrap {
    z-index: 3;
}

/* Botao mantem clicabilidade propria (hover state visivel) */
.fulget-slide__button {
    position: relative;
    z-index: 4;
}

.fulget-slide__badge-wrap {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fulget-slide__badge-text {
    font-size: 11px;
    line-height: 1.2;
    color: var(--fulget-slide-color, #1f2937);
    text-align: right;
    max-width: 90px;
    white-space: pre-line;
}

.fulget-slide__badge-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.fulget-slide__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    max-width: 80%;
}

.fulget-slide__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--fulget-slide-color, var(--fulget-label-color, #1f2937));
}

.fulget-slide__label::before {
    content: "";
    width: 8px;
    height: 8px;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    display: inline-block;
}

.fulget-slide__title {
    font-size: 26px;
    line-height: 1.15;
    font-weight: 400;
    margin: 0;
    color: var(--fulget-slide-color, var(--fulget-title-color, #111827));
}

.fulget-slide__subtitle {
    font-size: 14px;
    line-height: 1.4;
    color: var(--fulget-slide-color, var(--fulget-subtitle-color, #374151));
    margin: 0;
}

.fulget-slide__button {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    border: 1px solid var(--fulget-slide-color, var(--fulget-button-color, #111827));
    border-radius: 999px;
    color: var(--fulget-slide-color, var(--fulget-button-color, #111827));
    background: transparent;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background .2s ease, color .2s ease;
}

.fulget-slide__button:hover {
    background: var(--fulget-slide-color, var(--fulget-button-hover-bg, #111827));
    color: var(--fulget-slide-bg, #fff);
}

/* ============================================================
 * Setas — sempre dentro do inner (1200px), alinhadas
 * ============================================================ */
.fulget-carousel__nav {
    position: absolute;
    top: -75px;
    display: flex;
    gap: 16px;
    z-index: 10;
}

@media (max-width: 768px) {
    .fulget-carousel__nav {
        top: -40px;
    }
}

/* DESKTOP (>1024px) */
@media (min-width: 1025px) {
    .fulget-carousel--arrows-desktop-top-right .fulget-carousel__nav {
        left: auto; right: 16px; transform: none;
    }
    .fulget-carousel--arrows-desktop-top-left .fulget-carousel__nav {
        right: auto; left: 16px; transform: none;
    }
    .fulget-carousel--arrows-desktop-top-center .fulget-carousel__nav {
        right: auto; left: 50%; transform: translateX(-50%);
    }
}

/* TABLET (769-1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .fulget-carousel--arrows-tablet-top-right .fulget-carousel__nav {
        left: auto; right: 16px; transform: none;
    }
    .fulget-carousel--arrows-tablet-top-left .fulget-carousel__nav {
        right: auto; left: 16px; transform: none;
    }
    .fulget-carousel--arrows-tablet-top-center .fulget-carousel__nav {
        right: auto; left: 50%; transform: translateX(-50%);
    }
}

/* MOBILE (≤768px) */
@media (max-width: 768px) {
    .fulget-carousel--arrows-mobile-top-right .fulget-carousel__nav {
        left: auto; right: 16px; transform: none;
    }
    .fulget-carousel--arrows-mobile-top-left .fulget-carousel__nav {
        right: auto; left: 16px; transform: none;
    }
    .fulget-carousel--arrows-mobile-top-center .fulget-carousel__nav {
        right: auto; left: 50%; transform: translateX(-50%);
    }
}

.fulget-carousel__arrow,
.fulget-carousel__arrow:hover,
.fulget-carousel__arrow:focus,
.fulget-carousel__arrow:active,
button.fulget-carousel__arrow {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    opacity: .55;
    cursor: pointer;
    transition: opacity .25s ease, color .25s ease, transform .25s ease;
}

.fulget-carousel__arrow svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

.fulget-carousel__arrow:hover {
    opacity: 1;
    color: #111827;
    transform: scale(1.08);
}

.fulget-carousel__arrow:disabled,
.fulget-carousel__arrow.swiper-button-disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
 * Responsivo
 * ============================================================ */
/* Defaults responsivos — sobrescritos por controles do widget */

/* Notebooks (1025-1599px) — 2.2 cards = 2 cheios + ~20% peek */
@media (max-width: 1599px) and (min-width: 1025px) {
    .fulget-carousel {
        --fulget-cards: 2.2 !important;
        --fulget-gap: 24px !important;
    }
    .fulget-carousel__inner {
        padding: 56px 16px 0;
    }
    .fulget-slide {
        padding: 26px;
    }
    .fulget-slide__title {
        font-size: 23px;
    }
}

/* Notebooks pequenos (1025-1280px) — 2.15 cards */
@media (max-width: 1280px) and (min-width: 1025px) {
    .fulget-carousel {
        --fulget-cards: 2.15 !important;
    }
    .fulget-slide {
        padding: 22px;
    }
    .fulget-slide__title {
        font-size: 21px;
    }
}

/* Tablets (769-1024px) — 1.7 cards visiveis pra dar respiro */
@media (max-width: 1024px) and (min-width: 769px) {
    .fulget-carousel {
        --fulget-cards: 1.7 !important;
        --fulget-gap: 20px !important;
    }
    .fulget-carousel__inner {
        padding: 52px 24px 0;
    }
    .fulget-slide {
        padding: 22px;
    }
    .fulget-slide__title {
        font-size: 21px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .fulget-carousel {
        --fulget-cards: 1 !important;
        --fulget-gap: 16px !important;
        padding: 16px 0 24px;
    }
    .fulget-slide__title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .fulget-slide__title {
        font-size: 18px;
    }
}

/* Direcao RTL */
.fulget-carousel--dir-rtl .fulget-carousel__swiper {
    direction: rtl;
}
