/* ============================================
   WS Archive - Estilos Completos v1.5.3
   Fonte: Inter (Google Fonts)
   ============================================ */

:root {
    --ws-primary: #6c63ff;
    --ws-primary-dark: #5046e5;
    --ws-carousel-active: #961b1b;
    --ws-text: #1a1a2e;
    --ws-text-muted: #6b7280;
    --ws-bg: #f8f9fa;
    --ws-white: #ffffff;
    --ws-border: #e5e7eb;
    --ws-radius: 16px;
    --ws-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --ws-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --ws-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GRID ARCHIVE
   ============================================ */

.ws-archive-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    padding: 0;
    position: relative;
}

.ws-archive-header {
    margin-bottom: 40px;
}

.ws-archive-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--ws-text);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ============================================
   GRID DE STORIES
   ============================================ */

.ws-stories-container {
    position: relative;
    min-height: 400px;
}

.ws-stories-grid {
    display: grid;
    gap: 24px;
    align-items: start;
}

.ws-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ws-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ws-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ws-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ============================================
   CARD DE STORY
   ============================================ */

.ws-story-card {
    position: relative;
    border-radius: var(--ws-radius);
    overflow: hidden;
    background: var(--ws-white);
    box-shadow: var(--ws-shadow);
    transition: var(--ws-transition);
}

.ws-story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ws-shadow-hover);
}

.ws-story-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ws-story-thumb {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: var(--ws-radius);
}

.ws-story-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ws-story-card:hover .ws-story-bg {
    transform: scale(1.08);
}

.ws-story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.05) 30%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.85) 85%,
        rgba(0, 0, 0, 0.95) 100%
    );
    transition: var(--ws-transition);
}

.ws-story-card:hover .ws-story-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.15) 30%,
        rgba(0, 0, 0, 0.6) 60%,
        rgba(0, 0, 0, 0.9) 85%,
        rgba(0, 0, 0, 0.98) 100%
    );
}

.ws-story-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--ws-primary);
    color: var(--ws-white);
    font-size: 10px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ws-story-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    z-index: 2;
}

.ws-story-card:hover .ws-story-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.ws-story-thumb-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 18px 18px;
    z-index: 2;
}

.ws-story-title {
    color: var(--ws-white);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.01em;
}

.ws-story-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

/* ============================================
   PAGINAÇÃO
   ============================================ */

.ws-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: var(--ws-white);
    color: var(--ws-text);
    border: 2px solid var(--ws-border);
    transition: var(--ws-transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ws-pagination .page-numbers:hover,
.ws-pagination .page-numbers.current {
    background: var(--ws-primary);
    border-color: var(--ws-primary);
    color: var(--ws-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.ws-pagination .prev,
.ws-pagination .next {
    padding: 0 20px;
}

/* ============================================
   NENHUMA STORY
   ============================================ */

.ws-no-stories {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--ws-bg);
    border-radius: var(--ws-radius);
    border: 2px dashed var(--ws-border);
}

.ws-no-stories-icon {
    color: var(--ws-border);
    margin-bottom: 20px;
}

.ws-no-stories h3 {
    font-size: 22px;
    color: var(--ws-text);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Erro */
.ws-error {
    padding: 18px 24px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    color: #856404;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   MODAL LIGHTBOX
   ============================================ */

.ws-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ws-modal-fadein 0.3s ease;
}

@keyframes ws-modal-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.ws-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.ws-modal-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 90vh;
    max-height: 750px;
    z-index: 2;
    animation: ws-modal-slidein 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ws-modal-slidein {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ws-modal-iframe {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
    background: #1a1a2e;
}

.ws-modal-close {
    position: absolute;
    top: -56px;
    right: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    z-index: 3;
}

.ws-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: rotate(90deg) scale(1.1);
}

body.ws-modal-open {
    overflow: hidden;
}

/* ============================================
   ANIMAÇÕES DE ENTRADA
   ============================================ */

.ws-card-hidden {
    opacity: 0;
    transform: translateY(30px);
}

.ws-card-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shimmer de loading */
.ws-story-bg:not(.ws-loaded) {
    background-image: none !important;
    background: linear-gradient(
        90deg,
        #e0e0e0 0%,
        #f0f0f0 50%,
        #e0e0e0 100%
    );
    background-size: 200% 100%;
    animation: ws-shimmer 1.8s ease-in-out infinite;
}

@keyframes ws-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   CARROSSEL DE WEB STORIES
   ============================================ */

.ws-carousel-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    margin: 0 0 60px;
    padding: 0;
    box-sizing: border-box;
}

/* Container fixo em 1200px */
.ws-carousel-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Header */
.ws-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.ws-carousel-title {
    flex: 1;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 48px;
    margin-left: 0;
    padding-top: 0;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
    color: #000000;
    font-size: 36px;
    text-transform: none;
    font-family: "Poppins";
    font-weight: 600;
    font-style: normal;
    line-height: 1;
}

/* Botões de navegação */
.ws-carousel-nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ws-carousel-button-prev-header,
.ws-carousel-button-next-header {
    background-color: transparent;
    border: 1px solid #585858;
    border-radius: 100px;
    color: #585858;
    height: 36px;
    width: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.ws-carousel-button-prev-header i,
.ws-carousel-button-next-header i {
    font-size: 13px;
    line-height: 1;
    display: block;
}

.ws-carousel-button-prev-header:hover,
.ws-carousel-button-next-header:hover {
    background-color: #961b1b;
    border-color: #ffffff;
    color: #ffffff;
}

.ws-carousel-button-prev-header.swiper-button-disabled,
.ws-carousel-button-next-header.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Container Swiper */
.ws-carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ws-carousel-container .swiper {
    width: 100%;
    overflow: hidden;
    padding-bottom: 8px;
}

.ws-carousel-container .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.ws-carousel-container .swiper-slide {
    height: auto;
    display: flex;
    flex-shrink: 0;
    box-sizing: border-box;
}

.ws-carousel-container .ws-story-card {
    width: 100%;
    margin: 0;
    flex: 1;
}

/* ============================================
   PAGINAÇÃO DO CARROSSEL (BULLETS)
   ============================================ */

.ws-carousel-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    width: 100% !important;
    position: relative !important;
    bottom: auto !important;
}

.ws-carousel-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #cccccc;
    opacity: 1;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    margin: 0 !important;
    flex-shrink: 0;
}

.ws-carousel-pagination .swiper-pagination-bullet-active {
    background: #961b1b !important;
    width: 24px;
    border-radius: 4px;
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 1200px) {
    .ws-cols-5 { grid-template-columns: repeat(4, 1fr); }
    .ws-carousel-inner { max-width: 100%; }
}

@media (max-width: 1024px) {
    .ws-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .ws-archive-title { font-size: 28px; }

    .ws-cols-5,
    .ws-cols-4,
    .ws-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ws-stories-grid { gap: 16px; }

    .ws-modal-content {
        max-width: 95%;
        max-height: 85vh;
    }

    .ws-modal-close {
        top: -60px;
        right: 0;
    }

    .ws-carousel-inner { padding: 0 16px; }
    .ws-carousel-title { font-size: 22px; }

    .ws-carousel-button-prev-header,
    .ws-carousel-button-next-header {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .ws-carousel-button-prev-header i,
    .ws-carousel-button-next-header i {
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .ws-archive-title { font-size: 24px; }

    .ws-cols-5,
    .ws-cols-4,
    .ws-cols-3,
    .ws-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ws-stories-grid { gap: 12px; }

    .ws-story-title {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .ws-story-description {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .ws-story-play {
        width: 48px;
        height: 48px;
    }

    .ws-modal-content {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
    }

    .ws-modal-iframe { border-radius: 0; }

    .ws-modal-close {
        top: 16px;
        right: 16px;
        background: rgba(0, 0, 0, 0.7);
        border-color: rgba(255, 255, 255, 0.4);
    }

    .ws-carousel-inner { padding: 0 12px; }

    .ws-carousel-header {
        flex-wrap: wrap;
        margin-bottom: 16px;
    }

    .ws-carousel-title {
        font-size: 20px;
        width: 100%;
    }

    .ws-carousel-nav-header { margin-top: 8px; }

    .ws-carousel-pagination { margin-top: 16px; }
}

@media (max-width: 380px) {
    .ws-cols-5,
    .ws-cols-4,
    .ws-cols-3,
    .ws-cols-2 {
        grid-template-columns: 1fr;
    }

    .ws-carousel-button-prev-header,
    .ws-carousel-button-next-header {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    .ws-carousel-button-prev-header i,
    .ws-carousel-button-next-header i {
        font-size: 10px;
    }
}