/* ============================================
   CATEGORY & SEARCH PAGES STYLES
   Central de Notícias Brasil
   ============================================ */

/* ====== VARIÁVEIS ====== */
:root {
    --cat-primary: #0a2463;
    --cat-accent: #d4af37;
    --cat-text: #1a1a1a;
    --cat-text-light: #666;
    --cat-border: #e5e7eb;
    --cat-bg: #f8fafc;
    --cat-white: #ffffff;
}

/* ====== HERO DA CATEGORIA ====== */
.category-hero {
    background: linear-gradient(135deg, var(--cat-primary) 0%, #1e40af 100%);
    padding: 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.category-hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.category-hero-main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.category-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.category-icon-wrapper:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 2rem;
    display: block;
    line-height: 1;
}

.category-hero-text {
    flex: 1;
}

.category-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.2;
    color: white;
}

.category-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 1.2rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cat-accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

/* ====== HERO DE BUSCA ====== */
.search-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 50px 20px;
    color: white;
}

.search-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.search-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.search-hero-form {
    margin-bottom: 20px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 8px 8px 8px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.search-input-wrapper .search-icon {
    color: #999;
    flex-shrink: 0;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 1.1rem;
    color: var(--cat-text);
    background: transparent;
}

.search-input-wrapper input:focus {
    outline: none;
}

.search-hero-btn {
    background: linear-gradient(135deg, var(--cat-primary) 0%, #1e40af 100%);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-hero-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(10, 36, 99, 0.4);
}

.search-suggestions {
    font-size: 0.9rem;
    opacity: 0.8;
}

.search-suggestions span {
    margin-right: 10px;
}

.search-suggestions a {
    color: var(--cat-accent);
    text-decoration: none;
    margin: 0 8px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.search-suggestions a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ====== LAYOUT PRINCIPAL ====== */
.category-page,
.search-page {
    background: var(--cat-bg);
    padding: 0 0 60px;
    min-height: 100vh;
    color: var(--cat-text);
}

.category-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 20px;
}

/* ====== BREADCRUMB ====== */
.breadcrumb {
    padding: 20px 0;
    font-size: 0.85rem;
    color: var(--cat-text-light);
}

.breadcrumb a {
    color: var(--cat-primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--cat-accent);
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ccc;
}

/* ====== INFO DE RESULTADOS ====== */
.search-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-results-info p {
    font-size: 1rem;
    color: var(--cat-text);
}

.search-results-info p mark {
    background: rgba(212, 175, 55, 0.3);
    color: inherit;
    padding: 0 4px;
    border-radius: 4px;
}

.search-time {
    font-size: 0.85rem;
    color: var(--cat-text-light);
}

/* Nenhum resultado */
.search-no-results {
    padding: 60px 20px;
    text-align: center;
}

.no-results-content {
    max-width: 600px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
}

.no-results-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cat-text);
    margin-bottom: 16px;
}

.no-results-content p {
    font-size: 1.1rem;
    color: var(--cat-text-light);
    margin-bottom: 12px;
}

.no-results-content p strong {
    color: var(--cat-primary);
}

/* ====== LISTA DE NOTÍCIAS ====== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.list-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cat-text);
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--cat-border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--cat-text);
    background: white;
    cursor: pointer;
}

/* Tabs de Resultados */
.results-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 10px 20px;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cat-text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #e2e8f0;
}

.tab-btn.active {
    background: var(--cat-primary);
    color: white;
}

.tab-btn span {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 4px;
}

/* ====== ITEM DE NOTÍCIA ====== */
.news-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.news-item a {
    display: grid;
    grid-template-columns: 300px 1fr;
    text-decoration: none;
}

.news-item.featured a {
    grid-template-columns: 1fr;
}

.news-image {
    position: relative;
    overflow: hidden;
}

.news-item:not(.featured) .news-image {
    height: 100%;
}

.news-item:not(.featured) .news-image img {
    height: 100%;
    object-fit: cover;
}

.news-item.featured .news-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.news-image img {
    width: 100%;
    transition: transform 0.5s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.news-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--cat-accent);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.news-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cat-text);
    line-height: 1.4;
    margin-bottom: 12px;
}

.news-item.featured .news-info h3 {
    font-size: 1.5rem;
}

.news-info h3 mark {
    background: rgba(212, 175, 55, 0.3);
    color: inherit;
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 600;
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--cat-text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt mark {
    background: rgba(212, 175, 55, 0.3);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Destaque para resultados de busca */
.search-result .news-info h3 mark,
.search-result .news-excerpt mark {
    background: rgba(212, 175, 55, 0.4);
    color: var(--cat-primary);
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
}

.news-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--cat-text-light);
}

/* ====== PAGINAÇÃO ====== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 30px 0;
}

.page-btn,
.page-num {
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--cat-border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--cat-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-btn:hover:not(.disabled),
.page-num:hover {
    background: var(--cat-primary);
    color: white;
    border-color: var(--cat-primary);
}

.page-num.active {
    background: var(--cat-primary);
    color: white;
    border-color: var(--cat-primary);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: var(--cat-text-light);
}

/* ====== SIDEBAR ====== */
.category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cat-text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cat-accent);
}

/* Subcategorias */
.subcategory-list {
    list-style: none;
}

.subcategory-list li {
    margin-bottom: 0;
}

.subcategory-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: var(--cat-text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.subcategory-list a:hover {
    background: #f8fafc;
    color: var(--cat-primary);
}

.subcategory-list span {
    font-size: 0.8rem;
    color: var(--cat-text-light);
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Mais Lidas */
.most-read-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.most-read-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.most-read-item:hover {
    background: #f8fafc;
}

.most-read-item .rank {
    width: 28px;
    height: 28px;
    background: var(--cat-primary);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.most-read-item:nth-child(1) .rank { background: linear-gradient(135deg, #d4af37 0%, #f59e0b 100%); }
.most-read-item:nth-child(2) .rank { background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%); }
.most-read-item:nth-child(3) .rank { background: linear-gradient(135deg, #cd7c32 0%, #a16207 100%); }

.most-read-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cat-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--cat-primary) 0%, #1e40af 100%);
    color: white;
}

.newsletter-widget .widget-title {
    color: white;
    border-bottom-color: var(--cat-accent);
}

.newsletter-widget p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

.sidebar-newsletter {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-newsletter input {
    padding: 14px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
}

.sidebar-newsletter button {
    padding: 14px;
    background: var(--cat-accent);
    color: var(--cat-primary);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-newsletter button:hover {
    background: white;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-cloud .tag {
    background: #f1f5f9;
    color: var(--cat-text);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tags-cloud .tag:hover {
    background: var(--cat-primary);
    color: white;
}

/* Filtros de Busca */
.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-checkbox,
.filter-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-checkbox:hover,
.filter-radio:hover {
    background: #f8fafc;
}

.filter-checkbox input,
.filter-radio input {
    width: 18px;
    height: 18px;
    accent-color: var(--cat-primary);
}

.filter-checkbox span,
.filter-radio span {
    flex: 1;
    font-size: 0.9rem;
    color: var(--cat-text);
}

.filter-checkbox .count {
    font-size: 0.8rem;
    color: var(--cat-text-light);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Buscas Populares */
.popular-searches {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popular-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: var(--cat-text);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.popular-search-item:hover {
    background: var(--cat-primary);
    color: white;
}

.trend-icon {
    font-size: 0.8rem;
}

/* Ad */
.sidebar-ad {
    background: #f1f5f9;
    border-radius: 16px;
    overflow: hidden;
}

.ad-label {
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: var(--cat-text-light);
    padding: 8px;
    background: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--cat-text-light);
    font-size: 0.85rem;
    text-align: center;
}

.ad-placeholder span {
    font-size: 1.2rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
}

/* ====== RESPONSIVO ====== */
@media (max-width: 1200px) {
    .category-layout {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .category-layout {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .sidebar-ad {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .category-hero-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        gap: 20px;
    }

    .category-hero-main {
        width: 100%;
    }

    .category-icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .category-icon {
        font-size: 1.5rem;
    }

    .category-hero h1 {
        font-size: 1.5rem;
    }

    .category-description {
        font-size: 0.85rem;
    }

    .category-stats {
        width: 100%;
        justify-content: space-around;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .stat-item {
        min-width: auto;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .search-hero h1 {
        font-size: 1.5rem;
    }

    .search-input-wrapper {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 12px;
    }

    .search-input-wrapper input {
        width: 100%;
        padding: 12px;
    }

    .search-hero-btn {
        width: 100%;
        margin-top: 8px;
    }

    .search-suggestions {
        display: none;
    }

    .news-item a {
        grid-template-columns: 1fr;
    }

    .news-item:not(.featured) .news-image {
        height: 180px;
    }

    .list-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .results-tabs {
        flex-wrap: wrap;
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
    }

    .search-results-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .category-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-ad {
        grid-column: auto;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .category-stats {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .category-stats .separator {
        display: none;
    }

    .news-info h3 {
        font-size: 1rem;
    }

    .news-item.featured .news-info h3 {
        font-size: 1.2rem;
    }

    .news-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
}

