/* 1. VARIÁVEIS E RESET BÁSICO */
:root {
    --primary-color: #00028a; /* Azul Escuro (Corporativo) */
    --secondary-color: #22aeff; /* Laranja (Ação/Destaque) */
    --text-color: #333333;
    --light-text-color: #555555;
    --card-background: #ffffff;
    --bg-light: #f4f7f9;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    
    --border-radius: 8px;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Sora', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

/* 2. BOTÕES GERAIS */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(34, 174, 255, 0.4);
}

.btn-primary:hover {
    background-color: #192ee6;
    transform: translateY(-2px);
}


/* 3. CABEÇALHO (STICKY) */
.main-header {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.header-logo-img {
    max-height: 60px; 
    width: auto;
    display: block;
}

.main-nav a {
    margin-left: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--card-background);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--card-background);
}


/* 4. SEÇÃO HERO (INDEX) */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2b1cff 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.hero-tagline {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Título responsivo */
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}


/* 5. SEÇÃO DESTAQUES/CATEGORIAS (INDEX) */
.featured-section {
    padding: var(--spacing-lg) 0;
}

.featured-section h2, .main-feed-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.category-card {
    background-color: var(--card-background);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    border-top: 5px solid var(--bg-color); /* Cor customizada por categoria */
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card i {
    font-size: 2.5rem;
    color: var(--bg-color);
    margin-bottom: 10px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}


/* 6. GRID DE POSTS (Index) */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.post-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-card-content {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--text-color);
}

.post-card-content p {
    color: var(--light-text-color);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.post-read-more {
    margin-top: auto; /* Empurra para o rodapé do card */
    display: block;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Estilo de carregamento */
.loading-message {
    grid-column: 1 / -1; 
    text-align: center;
    padding: var(--spacing-lg);
    font-size: 1.2rem;
    color: var(--light-text-color);
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* 7. RODAPÉ (FOOTER) */
.footer {
    background-color: var(--text-color);
    color: #fff;
    padding-top: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-lg);
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-col p, .footer-col a {
    font-size: 0.9rem;
    color: #ccc;
    display: block;
    margin-bottom: 8px;
}

.footer-col a:hover {
    color: white;
}

.footer-col i {
    margin-right: 8px;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding: 15px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #999;
}


/* 8. BOTÃO FLUTUANTE (FAB) */
.fab-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.6);
    z-index: 999;
    transition: background-color 0.3s, transform 0.3s;
}

.fab-btn:hover {
    background-color: #e64a19;
    transform: scale(1.05);
}


/* 9. RESPONSIVIDADE */
@media (max-width: 900px) {
    
    .main-nav {
        display: none; /* Oculta a navegação no mobile */
    }
    
    .menu-toggle {
        display: block; /* Mostra o ícone de menu */
    }

    .hero-section {
        padding: 60px var(--spacing-md);
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    /* Reduz espaçamento geral no mobile */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .post-grid, .footer-content {
        gap: var(--spacing-md);
    }
    
    .fab-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }
}
