:root {
    --primary-blue: #003399;
    --primary-red: #cc0000;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --bg-light: #f4f6f9;
    --white: #ffffff;
    --radius-md: 12px;
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body { background-color: var(--bg-light); color: var(--text-dark); padding-top: 60px; }

/* FILTROS */
.filter-section {
    background: var(--white); border-bottom: 1px solid #eee;
    overflow: hidden; max-height: 0; transition: max-height 0.3s ease;
}
.filter-section.open { max-height: 300px; } /* Altura suficiente para abrir */
.filter-container { padding: 15px; display: flex; flex-direction: column; gap: 10px; }

.input-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-gray); margin-bottom: 3px; display: block; }
.input-group input, .input-group select {
    width: 100%; height: 40px; border: 1px solid #ddd; border-radius: 6px;
    padding: 0 10px; font-size: 0.9rem; background: #fff;
}
.row-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn-apply-filters {
    background: var(--primary-blue); color: white; border: none; height: 40px;
    border-radius: 6px; font-weight: bold; margin-top: 5px; cursor: pointer;
}

/* LISTA DE NOTÍCIAS */
.news-feed-container { padding: 15px; display: flex; flex-direction: column; gap: 15px; }

.news-card {
    background: var(--white); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); display: flex; overflow: hidden; height: 120px;
}
.news-img { width: 120px; min-width: 120px; height: 100%; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }

.news-content { padding: 10px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.news-meta { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-gray); margin-bottom: 5px; }
.tag-city { background: #eef2ff; color: var(--primary-blue); padding: 2px 6px; border-radius: 4px; font-weight: bold; }

.news-content h3 { font-size: 0.95rem; line-height: 1.2; color: var(--text-dark); margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-summary { font-size: 0.8rem; color: #555; margin-bottom: auto; }

.btn-open-news {
    align-self: flex-start; background: none; border: none;
    color: var(--primary-red); font-size: 0.8rem; font-weight: 700;
    cursor: pointer; padding: 0; margin-top: 5px;
}

/* ESTADO VAZIO */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-gray); }
.hidden { display: none; }
.empty-state i { font-size: 3rem; margin-bottom: 15px; opacity: 0.3; }
.btn-clear-filters { background: transparent; border: 1px solid var(--text-gray); padding: 8px 15px; border-radius: 20px; margin-top: 15px; }

/* PAGINAÇÃO */
.pagination-container {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 15px; background: var(--white); border-top: 1px solid #eee;
}
.pagination-container button {
    background: var(--white); border: 1px solid #ddd; padding: 8px 16px;
    border-radius: 6px; cursor: pointer; color: var(--primary-blue); font-weight: 600;
}
.pagination-container button:disabled { opacity: 0.5; cursor: not-allowed; }
#page-indicator { font-size: 0.9rem; font-weight: bold; color: var(--text-dark); }

/* =========================================
   MODO NOTURNO (Feed de Notícias)
   ========================================= */
body.dark-theme { background-color: #121212; color: #e0e0e0; }
body.dark-theme .filter-section { background: #1e1e1e; border-bottom-color: #333; }
body.dark-theme .input-group input, 
body.dark-theme .input-group select { background: #2d2d2d; color: #fff; border-color: #444; }
body.dark-theme .news-card { background: #1e1e1e; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
body.dark-theme .news-content h3 { color: #e0e0e0; }
body.dark-theme .news-summary { color: #aaa; }
body.dark-theme .tag-city { background: #0d1b2a; color: #64b5f6; }
body.dark-theme .pagination-container { background: #1e1e1e; border-top-color: #333; }
body.dark-theme .pagination-container button { background: #2d2d2d; border-color: #444; color: #90caf9; }
body.dark-theme #page-indicator { color: #e0e0e0; }
body.dark-theme .empty-state { color: #888; }

/* =========================================
   SKELETON LOADING (Efeito de Carregamento)
   ========================================= */
.skeleton {
    animation: skeleton-loading 1.2s linear infinite alternate;
    background-color: #e2e5e7;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-color: hsl(200, 20%, 80%); }
    100% { background-color: hsl(200, 20%, 95%); }
}

/* Modo Noturno para Skeleton */
body.dark-theme .skeleton { 
    animation: skeleton-loading-dark 1.2s linear infinite alternate; 
}

body.dark-theme .news-card[style*="border: 1px solid #eee;"] {
    border-color: #333 !important;
}

@keyframes skeleton-loading-dark {
    0% { background-color: #252525; }
    100% { background-color: #333333; }
}