/* ==========================================================================
   INSTAGRAM STORIES & OFERTAS IMPERDÍVEIS 24H - UNI VIAGENS
   Design Moderno, Glassmorphism, Gradientes Vibrantes do Instagram
   ========================================================================== */

:root {
    --insta-grad: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --insta-grad-subtle: linear-gradient(135deg, rgba(240, 148, 51, 0.1) 0%, rgba(188, 24, 136, 0.1) 100%);
    --insta-pink: #bc1888;
    --insta-purple: #8a3ab9;
}

/* 1. BARRA DE CÍRCULOS DE STORIES (ESTILO INSTAGRAM) */
.insta-stories-bar-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 16px 20px 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

.insta-stories-bar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--insta-grad);
}

.insta-stories-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.insta-stories-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.insta-stories-title i {
    font-size: 1.15rem;
    background: var(--insta-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.insta-stories-hint {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.insta-stories-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 6px 4px 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.insta-stories-scroll::-webkit-scrollbar {
    height: 4px;
}

.insta-stories-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.insta-story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    width: 82px;
    text-align: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.insta-story-item:hover {
    transform: translateY(-4px);
}

.insta-story-ring {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    padding: 3px;
    background: var(--insta-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(188, 24, 136, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.insta-story-item:hover .insta-story-ring {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(188, 24, 136, 0.4);
}

.insta-story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #ffffff;
    overflow: hidden;
    background: #0f172a;
}

.insta-story-avatar img,
.insta-story-avatar video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.insta-story-badge-live {
    position: absolute;
    bottom: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 8px;
    border: 2px solid #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.insta-story-label {
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #1e293b;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.insta-story-time {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 2px;
}

/* 2. CARDS DE STORIES NO CARROSSEL (PADRÃO DE TAMANHO DOS PACOTES) */
/* ALINHAMENTO E SINCRONIZAÇÃO TOTAL ENTRE PACOTES E STORIES */
.packages-grid {
    display: flex !important;
    align-items: stretch !important; /* Força todos os cards (stories e pacotes) a terem exatamente a mesma altura */
}

.package-card {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    align-self: stretch !important;
}

.package-card-story {
    background: #ffffff !important;
    border: 1px solid #eaeaea !important;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden;
    height: auto !important;
    align-self: stretch !important;
    border-radius: 16px !important;
    transition: var(--transition);
}

.package-card-story:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
}

.story-media-box {
    position: relative;
    width: 100%;
    flex: 1 1 auto !important; /* Ocupa dinamicamente todo o espaço vertical disponível até o rodapé */
    min-height: 420px;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-full-media {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block;
    transition: transform 0.4s ease;
}

.package-card-story:hover .story-full-media {
    transform: scale(1.03);
}

/* SÓ O SÍMBOLO DO INSTAGRAM NO TOPO ESQUERDO */
.story-badge-top {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--insta-grad);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    border: 2px solid #ffffff;
    pointer-events: none;
}

/* RODAPÉ DO CARD COM O BOTÃO WHATSAPP PADRÃO DOS CARDS DO SITE */
.story-footer-action {
    position: relative;
    z-index: 3;
    padding: 16px 20px 20px;
    background: #ffffff;
    border-top: 1px solid #eaeaea;
    margin-top: auto !important; /* Sempre perfeitamente alinhado na base do card */
}

.story-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #25D366;
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.25s ease;
    cursor: pointer;
}

.story-whatsapp-btn:hover {
    background: #1ebc59;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.5);
    color: #ffffff !important;
}

/* 3. VISUALIZADOR MODAL DE STORIES (IMAGEM 100% COMPLETA SEM CORTES) */
.story-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.25s ease forwards;
    padding: 10px;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.story-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 29, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.story-modal-phone {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
    height: 96vh;
    max-height: 860px;
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 480px) {
    .story-modal-overlay {
        padding: 0;
    }

    .story-modal-phone {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
}

/* CABEÇALHO DO MODAL (ESTÁTICO NO TOPO, NÃO COBRE A IMAGEM) */
.story-modal-header-wrap {
    position: relative;
    z-index: 10;
    padding: 10px 14px 8px;
    background: #000000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.story-modal-progress-bar {
    position: relative;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    overflow: hidden;
}

.story-modal-progress-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.story-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}

.story-modal-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-modal-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    object-fit: cover;
}

.story-modal-username {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.story-modal-meta {
    font-size: 11px;
    opacity: 0.75;
}

.story-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-modal-countdown {
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
}

.story-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.story-modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* BOTÃO DE CONTROLE DE ÁUDIO NO MODAL */
.story-modal-sound-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 13px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.story-modal-sound-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

/* BOTÃO DE SOM NO CARD DO CARROSSEL */
.story-card-sound-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    z-index: 5;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.story-card-sound-btn:hover,
.story-card-sound-btn.is-unmuted {
    background: #0d47a1;
    border-color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(13, 71, 161, 0.5);
}

/* ÁREA DA MÍDIA (FLEX 1, NUNCA CORTA A IMAGEM) */
.story-modal-media-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.story-modal-media-wrap img,
.story-modal-media-wrap video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    user-select: none;
    -webkit-user-drag: none;
}

.story-touch-prev,
.story-touch-next {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    z-index: 5;
    cursor: pointer;
}

.story-touch-prev {
    left: 0;
}

.story-touch-next {
    right: 0;
}

/* RODAPÉ DO MODAL (ESTÁTICO NA BASE, ABAIXO DA IMAGEM) */
.story-modal-footer {
    position: relative;
    z-index: 10;
    padding: 12px 14px;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.story-modal-wabtn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.2s ease;
    cursor: pointer;
}

.story-modal-wabtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Setas de navegação laterais (Desktop) */
.story-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 12;
    transition: background 0.2s, transform 0.2s;
}

.story-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.story-nav-prev {
    left: -60px;
}

.story-nav-next {
    right: -60px;
}

@media (max-width: 600px) {
    .story-nav-btn {
        display: none;
        /* No mobile usa toque na tela */
    }
}

/* ==========================================================================
   SINCRONIZAÇÃO TOTAL PARA O APK E MOBILE (MESMA MARGEM E ALTURA DOS PACOTES)
   ========================================================================== */
@media (max-width: 768px) {
    .packages-grid {
        display: flex !important;
        align-items: stretch !important; /* Garante que Story e Pacote tenham rigorosamente a mesma altura no APK */
    }

    .package-card-story {
        height: auto !important;
        align-self: stretch !important; /* Alinhamento idêntico ao card de pacotes */
        display: flex !important;
        flex-direction: column !important;
    }

    .story-media-box {
        flex: 1 1 auto !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 380px !important;
        background: #000000 !important;
        overflow: hidden !important;
    }

    .story-full-media {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* Preenche 100% da área da mídia, eliminando qualquer espaço branco */
        display: block !important;
    }

    .story-footer-action {
        margin-top: auto !important; /* Fixado perfeitamente na base, nivelado com o botão do pacote */
        padding: 14px 16px 18px !important;
        background: #ffffff !important;
    }

    .story-whatsapp-btn {
        padding: 12px 14px !important;
    }
}