/* =========================================================================
   MÓDULO DE NOTÍCIAS: FILTROS, GRADE E CARROSSEL
   ========================================================================= */

/* --- Filtros --- */
.cage-news-filters-box { background: #ffffff; border-radius: 12px; padding: 20px; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05); margin-bottom: 40px; border: 1px solid #e2e8f0; font-family: 'Roboto', sans-serif;}
.cage-news-filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 15px; width: 100%; align-items: center; }
.cage-news-search { display: flex; width: 100%; }
.cage-news-search input { flex-grow: 1; height: 50px; border-radius: 8px 0 0 8px; border: 1px solid #e2e8f0; border-right: none; padding: 0 15px; font-size: 14px; color: #4a5568; outline: none; transition: border-color 0.3s; }
.cage-news-search input:focus { border-color: #003d68; }
.cage-news-search-btn { width: 50px; height: 50px; background: #003d68; color: #fff; border: none; border-radius: 0 8px 8px 0; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.3s; }
.cage-news-search-btn:hover { background: #00233c; }

.cage-multi-wrapper { width: 100%; position: relative; }
.cage-multi-header { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; height: 50px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: #4a5568; cursor: pointer; user-select: none; transition: border-color 0.3s; }
.cage-multi-header::after { content: "▼"; font-size: 10px; color: #a0aec0; transition: transform 0.3s; }
.cage-multi-wrapper.open .cage-multi-header { border-color: #003d68; }
.cage-multi-wrapper.open .cage-multi-header::after { transform: rotate(180deg); }
.cage-multi-dropdown { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); z-index: 100; max-height: 250px; overflow-y: auto; display: none; padding: 8px; }
.cage-multi-wrapper.open .cage-multi-dropdown { display: block; }
.cage-check-label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; font-size: 14px; color: #4a5568; border-radius: 6px; margin: 0; transition: background 0.2s; }
.cage-check-label:hover { background: #f8fafc; }
.cage-check-label input { accent-color: #004587; width: 16px; height: 16px; cursor: pointer; margin: 0; }

/* --- Cards e Grade --- */
.cage-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; font-family: 'Roboto', sans-serif;}
.cage-news-card { position: relative; background: #f8fafc; border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.3s, box-shadow 0.3s; height: 100%; border: 1px solid #e2e8f0;}
.cage-news-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.cage-news-img-wrap { width: 100%; height: 239px; position: relative; overflow: hidden; } 
.cage-news-img-wrap picture { display: block; width: 100%; height: 100%; }
.cage-news-img-wrap img, .cage-news-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.cage-news-card:hover .cage-news-img { transform: scale(1.05); }

.cage-news-body { padding: 24px 32px; display: flex; flex-direction: column; flex-grow: 1; background: #ffffff; border-top: none; border-radius: 0 0 24px 24px;}
.cage-news-date { font-size: 14px; color: #595959; font-weight: 500; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.cage-news-date svg { fill: #004587; width: 18px; height: 18px; }
.cage-news-divider { width: 100%; height: 1px; background: #e2e8f0; margin-bottom: 12px; }

.cage-news-title { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 600; color: #2F3542; margin: 0 0 12px 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cage-news-title a { color: inherit; text-decoration: none; outline: none; transition: color 0.2s; }
.cage-news-card:hover .cage-news-title a { color: #004587; }

.cage-news-excerpt { font-size: 14px; color: #4a5568; line-height: 1.6; margin: 0 0 15px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.cage-news-tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 2; }
.cage-news-tag { background: #004587; color: #fff; font-size: 11px; padding: 4px 12px; border-radius: 99px; font-weight: 600; text-transform: uppercase; text-decoration: none; transition: background 0.2s;}
.cage-news-tag:hover { background: #f58220; color: #fff; }

/* --- Estado Vazio e Paginação --- */
.cage-news-empty { text-align: center; padding: 50px 20px; background: #f8fafc; border-radius: 24px; font-family: 'Roboto', sans-serif; }
.cage-news-empty svg { color: #a0aec0; margin-bottom: 15px; }
.cage-news-empty h3 { color: #2d3748; margin-bottom: 10px; }
.cage-news-empty p { color: #718096; margin-bottom: 20px; }
#cage-news-clear { background: #004587; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: bold; position: relative; z-index: 3;}
#cage-news-clear:hover { background: #003060; }
.cage-news-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; font-family: 'Roboto', sans-serif; }
.cage-pg-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; color: #4a5568; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.cage-pg-btn:hover:not(:disabled) { background: #f8fafc; border-color: #004587; color: #004587; }
.cage-pg-btn.active { background: #004587; color: #fff; border-color: #004587; cursor: default; }
.cage-pg-btn:disabled { opacity: 0.75; cursor: not-allowed; }

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

/* --- Carrossel de Notícias --- */
.cage-carousel-wrapper { width: 100%; max-width: 1440px; margin: 0 auto; padding: 20px 0; font-family: 'Roboto', sans-serif; }
.cage-carousel-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cage-carousel-heading { font-family: 'Poppins', sans-serif; font-size: 24px; font-weight: 600; color: #2F3542; margin: 0; }
.cage-carousel-controls button { background: #fff; border: 1px solid #cbd5e0; color: #4a5568; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; font-size: 14px; margin-left: 5px; }
.cage-carousel-controls button:hover { border-color: #f58220; color: #f58220; background: #fffaf5; }
.cage-carousel-container { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-block: 15px; -ms-overflow-style: none; scrollbar-width: none; align-items: stretch; }
.cage-carousel-container::-webkit-scrollbar { display: none; }
.cage-carousel-item { flex: 0 0 calc(25% - 18px); scroll-snap-align: start; }
.cage-home-foco-container { width: 100%; max-width: 1440px; margin: 0 auto; font-family: 'Roboto', sans-serif; }

/* --- Responsividade --- */
@media (max-width: 1024px) {
    .cage-news-grid { grid-template-columns: repeat(2, 1fr); }
    .cage-news-filters { grid-template-columns: 1fr 1fr; }
    .cage-carousel-item { flex: 0 0 calc(50% - 12px); }
}
@media (max-width: 768px) {
    .cage-news-grid { grid-template-columns: 1fr; gap: 20px;}
    .cage-news-filters { grid-template-columns: 1fr; }
    .cage-news-body { padding: 20px; }
    .cage-news-filters-box { padding: 15px; }
    .cage-carousel-wrapper { padding: 15px; }
    .cage-carousel-item { flex: 0 0 100%; }
    .limit-mobile-4 .cage-news-card:nth-child(n+5) { display: none !important; }
}