/* --- CONFIGURAÇÃO PADRÃO (DESKTOP: 3 slides) --- */
.gws-carousel-container {
    position: relative;
    max-width: 900px; /* Largura para 3 slides */
    margin: 0 auto;
    padding: 20px 0;
}

.gws-stories-carousel-wrapper {
    overflow: hidden;
    height: 550px; 
    border-radius: 12px; 
}

.gws-stories-carousel-wrapper .swiper-wrapper {
    display: flex;
    align-items: center; 
}

.gws-stories-carousel-wrapper .swiper-slide {
    flex-shrink: 0; 
    height: 520px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: scale(0.9); 
    opacity: 0.7;
}

.gws-stories-carousel-wrapper .swiper-slide-active {
    transform: scale(1); 
    opacity: 1;
}

.gws-story-card {
    position: relative;
    width: 100%;
    height: 100%; 
    cursor: pointer;
}

.gws-story-card-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.8);
    border-radius: 12px;
}

.gws-story-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 15px 15px 15px; /* Mais padding inferior */
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.gws-story-info h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
    color: #fff;
}

/* Setas (Padrão: Visível para Desktop) */
.gws-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
    display: flex; 
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background-color 0.2s, opacity 0.2s, left 0.3s, right 0.3s;
}
.gws-nav-arrow:hover {
    background-color: #fff;
}
.gws-nav-arrow::after {
    font-family: 'swiper-icons';
    font-size: 18px;
    color: #333;
}
.gws-nav-arrow.gws-nav-arrow-prev { left: -50px; } 
.gws-nav-arrow.gws-nav-arrow-prev::after { content: 'prev'; }
.gws-nav-arrow.gws-nav-arrow-next { right: -50px; } 
.gws-nav-arrow.gws-nav-arrow-next::after { content: 'next'; }
.gws-nav-arrow.swiper-button-disabled {
    opacity: 0;
    cursor: auto;
    pointer-events: none;
}

/* Paginação (Padrão: Escondido) */
.gws-swiper-pagination {
    position: relative; 
    bottom: 0;
    padding-top: 20px; /* Aumentado o espaço */
    text-align: center;
    display: none; /* Escondido por padrão */
}
.gws-swiper-pagination .swiper-pagination-bullet {
    width: 9px;
    height: 9px;
    background-color: #ccc;
    opacity: 0.8;
    margin: 0 5px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}
.gws-swiper-pagination .swiper-pagination-bullet-active {
    background-color: #eb5e28; 
    opacity: 1;
}


/* --- BREAKPOINT: TABLET (1023px ou menos) --- */
@media (max-width: 1023px) {
    .gws-carousel-container {
        max-width: 650px; /* Largura para 2 slides + espaço da seta */
    }
    .gws-stories-carousel-wrapper {
        height: 500px;
    }
    .gws-stories-carousel-wrapper .swiper-slide {
        height: 480px;
        transform: scale(1); /* Sem escala no tablet */
        opacity: 1;
    }
    
    /* CORREÇÃO 1: Setas mais distantes no Tablet */
    .gws-nav-arrow.gws-nav-arrow-prev { left: -40px; } 
    .gws-nav-arrow.gws-nav-arrow-next { right: -40px; } 
}


/* --- BREAKPOINT: MOBILE (767px ou menos) --- */
@media (max-width: 767px) {
    .gws-carousel-container {
        max-width: 100%;
        /* CORREÇÃO 3: Adiciona padding lateral no mobile */
        padding: 20px 40px; 
    }
    
    .gws-stories-carousel-wrapper {
        height: 480px; /* Altura menor no mobile */
        border-radius: 12px;
    }
    
    .gws-stories-carousel-wrapper .swiper-slide {
        height: 100%; /* Ocupa a altura total do wrapper */
        transform: scale(1);
        opacity: 1;
    }

    /* CORREÇÃO 2: Diminui o título no mobile */
    .gws-story-info h3 {
        font-size: 16px;
    }

    /* Esconde setas no mobile */
    .gws-nav-arrow {
        display: none; 
    }
    
    /* CORREÇÃO 3: Mostra pontinhos no mobile */
    .gws-swiper-pagination {
        display: block;
    }
}


/* --- Web Story Viewer Overlay (Modal) --- */
#gws-story-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: none; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#gws-story-overlay.active {
    display: flex;
}
.gws-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 100001;
    opacity: 0.8;
}

.gws-viewer-main-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px; 
    height: 80vh; 
}

.gws-story-viewer-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 10px; 
}

.gws-viewer-swiper {
    width: 100%;
    height: 100%;
}
.gws-slide-content {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}
.gws-slide-content::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0.9) 100%);
}
.gws-slide-text {
    position: relative;
    z-index: 2;
    padding: 20px 20px 40px 20px;
    color: white;
}
.gws-slide-text h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 20px;
}
.gws-slide-text p {
    color: #eee;
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
}
.gws-story-progress-container {
    position: absolute;
    top: 10px;
    left: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    z-index: 10;
}
.gws-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}
.gws-progress-bar .progress-inner {
    height: 100%;
    width: 0%;
    background: #fff;
    transition: width 0.1s linear;
    transition-play-state: running;
}
.gws-progress-bar.active .progress-inner {
    width: 100%; 
}
.gws-progress-bar.viewed .progress-inner {
    width: 100%;
}
.gws-viewer-swiper .swiper-slide {
    height: 100%;
    width: 100%;
}

/* --- Setas do Modal --- */
.gws-viewer-nav-arrow {
    position: relative; 
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    z-index: 100002; 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex-shrink: 0; 
    color: white;
}
.gws-viewer-nav-arrow:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.gws-viewer-nav-arrow::after {
    font-family: 'swiper-icons';
    font-size: 20px;
    color: #fff;
}

.gws-viewer-nav-arrow.gws-viewer-nav-prev::after { content: 'prev'; }
.gws-viewer-nav-arrow.gws-viewer-nav-next::after { content: 'next'; }

.gws-viewer-nav-arrow.swiper-button-disabled {
    opacity: 0.2;
    pointer-events: none;
}

/* --- ÍCONE DE "PLAY" (quando pausado) --- */
.gws-story-viewer-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 30px solid transparent;
    border-bottom: 30px solid transparent;
    border-left: 50px solid rgba(255, 255, 255, 0.8);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

#gws-story-overlay.is-paused .gws-story-viewer-container::after {
    opacity: 1;
}


/* --- Mobile (Modal) --- */
@media (max-width: 767px) {
    .gws-viewer-main-wrapper {
        height: 100%;
        max-width: 100%;
    }
    .gws-story-viewer-container {
        margin: 0;
        border-radius: 0;
    }
    .gws-viewer-nav-arrow {
        display: none;
    }
}