/* ========================================
   NEWS LIST - ESTILO DASHBOARD
   ======================================== */

/* Reset para evitar conflitos */
.news-hero-modern *,
.news-container *,
.filters-bar *,
.category-pill {
    box-sizing: border-box;
}

/* Hero Section - Estilo Dashboard */
.news-hero-modern {
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.hero-content p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

/* Remover overlay se existir */
.hero-overlay,
.news-hero-modern::before,
.news-hero-modern::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* Container Principal */
.news-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    background: #f8fafc;
}

/* Barra de Filtros - Estilo Dashboard */
.filters-bar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 10;
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer !important;
    transition: all 0.2s;
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
}

.category-pill:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.category-pill.active {
    background: #eff6ff;
    color: #2563eb;
    border-color: #2563eb;
}

/* Campo de Busca */
.search-box {
    min-width: 280px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Info de Resultados */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.count-text {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.featured-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.featured-toggle input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Grid de Notícias */
.news-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    min-height: 400px;
}

/* Card de Notícia - Estilo Dashboard */
.news-card-modern {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.news-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-color: #cbd5e1;
}

.featured-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #fef3c7;
    color: #92400e;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    border: 1px solid #fde68a;
}

/* Imagem do Card */
.card-image {
    position: relative;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f1f5f9;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 100%);
}

.category-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 5;
}

.category-badge[style*="atualizacao"] {
    background: #2563eb !important;
}

.category-badge[style*="evento"] {
    background: #dc2626 !important;
}

.category-badge[style*="item"] {
    background: #9333ea !important;
}

.category-badge[style*="manutencao"] {
    background: #ea580c !important;
}

.category-badge[style*="geral"] {
    background: #64748b !important;
}

/* Corpo do Card */
.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer do Card */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.meta-info {
    display: flex;
    gap: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.read-more {
    background: #eff6ff;
    color: #2563eb;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.read-more:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Paginação */
.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 20px;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

/* Loading */
.loading-modern,
.empty-modern,
.error-modern {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f5f9;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-modern p,
.empty-modern p,
.error-modern p {
    margin-top: 16px;
    color: #64748b;
    font-size: 15px;
}

.empty-icon,
.error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-modern h3,
.error-modern h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

/* Responsividade */
@media (max-width: 1024px) {
    .news-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .news-container {
        padding: 30px 15px 40px;
    }

    .hero-content h1 {
        font-size: 26px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .filters-bar {
        padding: 16px;
        gap: 12px;
    }

    .filter-group {
        width: 100%;
    }

    .search-box {
        width: 100%;
        min-width: 100%;
    }

    .news-grid-modern {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .results-info {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .pagination-bar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .page-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .category-pill {
        font-size: 13px;
        padding: 8px 14px;
    }

    .card-image {
        height: 180px;
    }

    .card-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 22px;
    }

    .card-body {
        padding: 16px;
    }

    .category-pill {
        width: 100%;
        justify-content: center;
    }
}
