:root {
    --branco-principal: #f8f8f8;
    --cinza-secundario: #999999;
    --fundo: #1b1b1b;
    --verde-principal: #156815;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -ms-overflow-style: none;
    width: 100%;
}

html::-webkit-scrollbar, 
body::-webkit-scrollbar,
.Principal::-webkit-scrollbar {
    display: none;            
}

body {
    background-color: var(--fundo);
    color: var(--branco-principal);
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; 
    background: linear-gradient(to bottom, var(--verde-principal), rgba(27, 27, 27, 0.9));
    display: flex;
    justify-content: space-between;
    align-items: center;     
    padding: 0 20px;         
    z-index: 1000;           
    border-bottom: 2px solid var(--fundo);
}

header::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--verde-principal), transparent);
    z-index: -1;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px; 
    max-width: 75%; /* Evita que a logo estoure em telas minúsculas */
    overflow: hidden;
}

.logo-container img {
    height: 50px; 
    width: auto;
    object-fit: contain;
}

.logo-container h1 {
    font-size: 1.5rem;
    color: var(--branco-principal);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Corta com reticências se o título for gigante */
}

.menu-superior {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.menu-superior ul {
    display: flex;
    list-style: none;
    gap: 30px;
    color: var(--branco-principal);
    margin: 0;
    padding: 0;
}

.menu-superior li {
    margin: 0; 
}

.menu-superior ul li a {
    text-decoration: none; 
    color: var(--branco-principal);        
}

.menu-superior ul li a:hover {
    color: var(--cinza-secundario); 
    transition: color 0.3s ease;
}

.menu_lateral {
    position: relative;   
    top: auto;             
    right: auto;           
    z-index: 9999;           
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--branco-principal); 
    display: flex;                
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu_lateral svg {
    width: 28px;
    height: 28px;
    stroke: var(--branco-principal); 
    display: block;
}

.containerlateral {
    position: fixed;
    top: 0;
    right: -100%; 
    width: 85%; /* Responsivo: ocupa 85% da tela no mobile */
    max-width: 320px;
    height: 100vh;
    background-color: #111111;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.7);
    transition: right 0.3s ease-in-out;
    z-index: 9999;
    overflow-y: auto;
}

.containerlateral.active {
    right: 0; 
}

.cabecalholateral {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #222;
}

.cabecalholateralprincipal {
    padding: 20px 0;
}

.sidebar-section {
    list-style: none;
}

.sidebar-section li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--branco-principal);
    text-decoration: none;
    transition: background 0.2s;
}

.sidebar-section li a:hover {
    background-color: #222;
    color: var(--verde-principal);
}

.sidebar-section svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* --- BLOCOS DE CONTEÚDO --- */

.destaque, .Principal {
    width: 100%;
    min-height: 200px;
    height: auto;
    max-width: 1200px;        
    margin: 35px auto;
    background-color: transparent; 
    border: 1px solid var(--branco-principal);
    border-radius: 10px;         
    padding: 20px 30px;        
    box-sizing: border-box;
    overflow-x: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.destaque-midia img, .card-post img, .capa {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.destaque {
    margin-top: 90px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;  
    align-items: center;
    gap: 15px; 
}

.destaque-midia {
    width: 100%;
    height: 300px; 
    overflow: hidden;
    border-radius: 6px;
    background-color: #222; 
}

.card-post img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.card-post a, 
.card-post a:visited, 
.card-post a:active {
    color: var(--verde-principal);
    text-decoration: none;
}

.card-post a:hover {
    color: #1ed760; 
    text-decoration: underline;
}

.Principal-container {
    position: relative;
    max-width: 1200px;
    margin: 30px auto;
}

.Principal {
    display: flex; 
    gap: 20px;
    overflow-x: auto; 
    scroll-behavior: smooth; 
    scroll-snap-type: x mandatory; 
    padding: 20px 30px 20px 10px;
    z-index: 1;
    border: 1px solid var(--branco-principal);
    border-radius: 10px;
    transition: border-color 0.3s ease;
    width: 100%;
    scrollbar-width: none;
}

.Principal::-webkit-scrollbar {
    display: none;
}

.Principal:hover {
    border-color: var(--verde-principal);
}

.card-post {
    flex: 0 0 calc(33.333% - 14px); 
    min-width: 280px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-carrossel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--branco-principal);
    border: 1px solid var(--branco-principal);
    font-size: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s ease;
    pointer-events: auto;
}

.btn-carrossel:hover {
    background: var(--verde-principal);
    border-color: var(--verde-principal);
}

.btn-carrossel.prev { left: -20px; }
.btn-carrossel.next { right: -20px; }

.destaque:hover, .Principal:hover {
    border-color: var(--verde-principal);
    box-shadow: 0 0 12px rgba(21, 104, 21, 0.4);
}

.footer {
    width: 100%;
    height: 60px;
    background-color: transparent;  
    color: var(--branco-principal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
    padding: 0 15px;
}

.footer p {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================
   RESPONSIVIDADE (MOBILE & TABLETS)
   ========================================== */

/* Tablets e dispositivos médios (até 1024px) */
@media (max-width: 1024px) {
    .destaque, 
    .Principal-container {
        max-width: 92%;
    }

    .btn-carrossel.prev { left: -10px; }
    .btn-carrossel.next { right: -10px; }
}

/* Celulares e telas menores (até 768px) */
@media (max-width: 768px) {
    header {
        padding: 0 15px;
        height: 60px;
    }

    .logo-container img {
        height: 38px;
    }

    .logo-container h1 {
        font-size: 1.2rem;
    }

    .menu-superior {
        display: none;
    }

    .destaque {
        margin-top: 80px;
        grid-template-columns: 1fr; 
        gap: 15px;
        padding: 15px;
        max-width: 94%;
    }

    .destaque-midia {
        height: 220px;
    }

    .Principal-container {
        max-width: 94%;
        margin: 20px auto;
    }

    .Principal {
        padding: 15px;
        gap: 12px;
    }

    .card-post {
        flex: 0 0 85%; /* O card ocupa 85% da largura da tela, facilitando a navegação lateral */
        min-width: unset;
    }

    .card-post img {
        height: 150px;
    }

    /* Ajuste crítico: esconde os botões de seta do carrossel em mobile onde o toque lateral natural (swipe) funciona melhor, evitando poluição visual */
    .btn-carrossel {
        display: none; 
    }
}

/* Celulares muito pequenos (até 480px) */
@media (max-width: 480px) {
    .logo-container h1 {
        font-size: 1rem; 
    }

    .destaque {
        padding: 12px;
        max-width: 96%;
    }

    .Principal-container {
        max-width: 96%;
    }

    .card-post {
        flex: 0 0 92%; 
    }
}