/* ============================================================
   1. ESTILOS GERAIS E PARA PC (Telas maiores que 1024px)
   ============================================================ */
:root {
    --primary-blue: #0056b3;
    --light-blue: #e3f2fd;
    --accent-orange: #ff9800;
    --text-dark: #333;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6;
    color: var(--text-dark);
    overflow-x: hidden;
}

main { flex: 1; }

/* HEADER E FUNDO AZUL */
.main-header {
    position: relative;
    width: 100%;
    min-height: 170px;
    z-index: 1000;
}

.main-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), #003366);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    z-index: -1;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo { margin-top: -20px; z-index: 10; }
.logo img { max-width: 350px; height: auto; }

/* NAVBAR DESKTOP */
.navbar {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: -75px;
    padding: 0 5%;
    z-index: 20;
}

.nav-links { display: flex; list-style: none; gap: 15px; }

.nav-links a, .category-btn {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 8px 15px;
    transition: var(--transition);
    background: transparent;
    border: none;
    cursor: pointer;
}

.category-btn:hover, .nav-links a:hover { color: var(--accent-orange); }

/* MENU DROPDOWN (O que faltava) */
.dropdown-wrapper { position: relative; }

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    list-style: none;
    padding: 10px 0;
    display: none; /* Escondido por padrão */
    z-index: 1001;
    font-family: 'Poppins', sans-serif;
}

.dropdown-content.show { display: block; } /* Classe ativada pelo JS */

.dropdown-content li a {
    padding: 10px 20px;
    display: block;
    color: var(--text-dark);
    text-decoration: none;
}

.dropdown-content li a:hover { background: var(--accent-orange); }

/* GRIDS DE POSTAGENS */
.content { padding: 40px 20px; max-width: 1100px; margin: 0 auto; }
.section-box { margin-bottom: 40px; }
h2 { margin-bottom: 20px; border-left: 5px solid var(--primary-blue); padding-left: 10px; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.post-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* CARROSSEL */
.carousel {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    scrollbar-width: thin;
}

.carousel-item {
    min-width: 250px;
    height: 150px;
    background: var(--light-blue);
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   2. REGRAS PARA MOBILE E TABLETS (Abaixo de 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .main-header { min-height: auto; padding-bottom: 50px; }
    
    .main-header::before {
        clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    }

    .header-container { padding: 15px 0; }
    .logo { margin-top: 10px; }
    .logo img { max-width: 200px; }

    .navbar {
        margin-top: 0 !important;
        justify-content: right;
        flex-direction: row; 
        gap: 10px;
        padding: 0;
    }

    .nav-links { order: 1; gap: 5px; }
    .dropdown-wrapper { order: 2; }

    .nav-links a, .category-btn {
        font-size: 0.7rem;
        padding: 6px 8px;
    }

    .dropdown-content {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .carousel-item { min-width: 80%; }
}

footer { background: #eee; text-align: center; padding: 30px 15px; font-size: 0.8rem; font-weight: bold;}