body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111;
    color: white;
    overflow-x: hidden;
}

/* MENUS SUPERIOR FIXO */
nav {
    display: flex;
    overflow-x: auto;
    background: rgba(0,0,0,0.85);
    position: fixed;
    top: 0;
    z-index: 999;
    width: 100%;
    backdrop-filter: blur(10px);
}

nav button {
    padding: 15px 20px;
    border: none;
    background: none;
    color: #eee;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.85rem;
}

nav button.active {
    border-bottom: 3px solid #e31837;
    color: white;
}

/* ANIMAÇÃO DE CARREGAMENTO */
.skeleton {
    height: calc(100dvh - 45px);
    width: 100%;
    background: linear-gradient(90deg, #111, #222, #111);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* MAIN WRAPPER: Fixar Altura para impedir que o Slick faça Bleed (1 artigo de cada vez) */
#app {
    padding-top: 45px; /* Altura do menu topo */
    height: 100dvh; /* Bloqueia o wrap inteiro ao ecrã limpo */
    box-sizing: border-box;
    overflow: hidden; /* Corta tudo o que passe para baixo */
}

/* OBRIGATÓRIO PARA VERTICAL SLICK */
.slick-list, .slick-track {
    height: 100% !important; 
}

/* MÓDULO DO CODEPEN (HERO VERTICAL SLIDER) */
.hero-slider {
    position: relative;
    width: 100%;
}

.hero-slider .slide {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: calc(100dvh - 45px) !important; 
    padding: 60px 20px 40px 20px;
    /* Corrigir o Zoom da Imagem de Destaque */
    background-size: cover; 
    background-position: top center; /* Focar no topo evita cortar as cabeças em modo retrato */
    background-color: #111; 
    background-repeat: no-repeat;
    box-sizing: border-box;
    cursor: pointer;
}

/* MÓDULO DO CODEPEN (CAIXA GLASSMORPHISM) */
.hero-slider .slide .slide-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    padding: 25px;
    color: #ffffff;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, .1);
    background: rgba(0, 0, 0, 0.35); 
    backdrop-filter: blur(15px) brightness(85%); 
    -webkit-backdrop-filter: blur(15px) brightness(85%);
    border-radius: 20px;
    box-sizing: border-box;
    text-shadow: 0px 2px 5px rgba(0,0,0,0.8);
}

.slide-content h2 {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    line-height: 1.3;
}

.slide-content .excerpt-wrapper {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
    /* Truncar sumários de API demasiados longos em 3 linhas máximo */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Evitar que os parágrafos nativos do WordPress (P) rasguem a caixa translúcida */
.slide-content .excerpt-wrapper p {
    margin: 0;
}

.slide-content small {
    display: block;
    margin-top: 15px;
    font-size: 0.8rem;
    opacity: 0.6;
    text-transform: uppercase;
    font-weight: bold;
}

/* AS BOLINHAS LATERAIS (DOTS) NATIVAS DO SLICK */
.slick-dots {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translate(0, -50%);
    padding: 15px 8px;
    margin: 0;
    list-style: none;
    border-radius: 30px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    z-index: 10;
}
.slick-dots li { margin: 8px 0; }
.slick-dots li button {
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    width: 8px;
    height: 8px;
    border: none;
    color: transparent;
    padding: 0;
    cursor: pointer;
}
.slick-dots li.slick-active button {
    background: #e31837;
    transform: scale(1.4);
}

/* =========================================
   MODAL DO ARTIGO (OVERLAY SEM MATAR SLIDER)
   ========================================= */
#article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: #111;
    z-index: 1000; /* Sobrepõe tudo, incluindo nav superior */
    overflow-y: auto;
    display: none;
    color: #eee;
}

#article-modal.active {
    display: block;
    animation: slideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    position: sticky;
    top: 0;
    background: rgba(17,17,17,0.95);
    padding: 15px;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.btn-close {
    background: #e31837;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.modal-body {
    padding: 20px;
    padding-bottom: 60px; /* gap ao fim */
}

.modal-body img {
    max-width: 100%;
    max-height: 45vh; 
    object-fit: contain; 
    border-radius: 12px;
    margin: 0 auto 25px auto;
    display: block;
}

/* =========================================
   WRAPPER RESPONSIVO PARA VÍDEOS (16:9)
   ========================================= */
.modal-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.modal-video-wrapper iframe,
.modal-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
}

.modal-conteudo {
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.9;
}

.modal-body h1 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 20px;
}

.modal-conteudo img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
}

.modal-conteudo a {
    color: #e31837;
    text-decoration: underline;
}
