/* CSS para página de Agências de Comunicação */
/* Compatível com design system existente */

:root {
    --orange-color: #F15F56;
    --light-orange-bg: #fff7f5;
    --border-color: #e3e7ed;
    --text-light-gray: #6e7a8e;
    --text-medium-gray: #4b5a6c;
    --text-dark-gray: #212529;
    --agencias-sidebar-w: 370px;
    --agencias-page-max: min(100vw, 1536px);
}

/* Wrapper Principal */
.agencias-main-wrapper {
    background: #fff;
    max-width: var(--agencias-page-max);
    margin: 0 auto;
    width: 100%;
    padding: 18px 34px 24px 34px;
}

.agencias-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Barra de Filtros Superior */
.agencias-filter-bar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.filter-bar-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

/* Label "Agências" */
.filter-label-wrapper {
    flex: 0 0 auto;
}

.filter-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark-gray);
    white-space: nowrap;
}

/* Checkbox "Ver todas" */
.filter-checkbox-wrapper {
    flex: 0 0 auto;
}

/* Logos das Agências com Scroll */
.agencies-logos-filter {
    position: relative;
    flex: 3;
    min-width: 500px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agencies-logos-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    flex: 1;
}

.agencies-logos-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.agencies-logos-list {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 0;
}

.agency-logo-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: 174px;
    height: 52px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #E8E8E8;
    background: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.agency-logo-item:hover {
    border-color: var(--orange-color);
}

.agency-logo-item.selected {
    background-color: #FEF2F1;
}

.agency-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 2px;
    flex-shrink: 0;
}

.agency-logo-name {
    font-size: 14px;
    color: var(--text-medium-gray);
    text-align: left;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}

.agency-logo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #F15F56;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #ACB5BD;
    border-radius: 3px;
    background-color: #fff;
    position: relative;
    flex-shrink: 0;
}

.agency-logo-item input[type="checkbox"]:checked {
    background-color: #F15F56;
    border-color: #F15F56;
}

.agency-logo-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.agency-logo-item input[type="checkbox"]:indeterminate {
    background-color: #F15F56;
    border-color: #F15F56;
}

.agency-logo-item input[type="checkbox"]:indeterminate::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 7px;
    width: 10px;
    height: 2px;
    background-color: white;
    transform: none;
    border: none;
}

.agency-logo-item input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.agencies-logos-controls {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 8px;
}

.scroll-btn {
    background: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-medium-gray);
    transition: all 0.2s ease;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn:hover {
    background: var(--light-orange-bg);
    border-color: var(--orange-color);
    color: var(--orange-color);
}

.scroll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scroll-btn:focus {
    outline: none;
}


/* Checkbox "Ver todas" */
.filter-checkbox-wrapper {
    display: flex;
    align-items: center;
}

.filter-checkbox-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-medium-gray);
    height: 52px;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #E8E8E8;
    background: transparent;
    transition: all 0.2s ease;
    justify-content: space-between;
    margin: 0;
}

.filter-checkbox-label span {
    flex: 1;
    text-align: left;
}

.filter-checkbox-label:hover {
    border-color: var(--orange-color);
}

.filter-checkbox-label.selected {
    background-color: #FEF2F1;
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #F15F56;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #ACB5BD;
    border-radius: 3px;
    background-color: #fff;
    position: relative;
    flex-shrink: 0;
}

.filter-checkbox:checked {
    background-color: #F15F56;
    border-color: #F15F56;
}

.filter-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox:indeterminate {
    background-color: #F15F56;
    border-color: #F15F56;
}

.filter-checkbox:indeterminate::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 7px;
    width: 10px;
    height: 2px;
    background-color: white;
    transform: none;
    border: none;
}

.filter-checkbox:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* Date Range Picker */
.filter-date-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    /* Removido flex e width da definição base para evitar conflitos */
}

/* ============================================
   RESPONSIVIDADE PARA TELAS MÉDIAS (TABLETS)
   ============================================ */
@media (min-width: 769px) and (max-width: 1290px) {

    /* Reorganizar barra de filtros usando grid para permitir quebras */
    .filter-bar-content {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        grid-template-rows: auto auto;
        gap: 12px 16px;
        align-items: center;
    }

    /* Label "Agências" - canto superior esquerdo */
    .filter-label-wrapper {
        grid-column: 1;
        grid-row: 1;
    }

    /* Checkbox "Ver todas" - ao lado do label */
    .filter-checkbox-wrapper {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
    }

    /* Logos das Agências - ocupa toda a largura da segunda linha */
    .agencies-logos-filter {
        grid-column: 1 / -1;
        grid-row: 2;
        flex: none;
        min-width: auto;
        max-width: 100%;
    }

    /* Busca de Notícias - ao lado do date picker */
    .filter-search-wrapper {
        grid-column: 4;
    }

    /* Ajustar tamanho mínimo dos logos para telas médias */
    .agencies-logos-filter {
        min-width: 300px;
    }

    /* Ajustar controles de scroll para telas médias */
    .agencies-logos-controls .scroll-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Mobile override for date wrapper */
@media (max-width: 768px) {

    /* Forçar expansão do WRAPPER do Flatpickr em mobile */
    .flatpickr-wrapper,
    .flatpickr-wrapper:not(.flatpickr-mobile) {
        width: 100% !important;
    }

    /* Forçar expansão de QUALQUER elemento pai do input Flatpickr */
    #dateRangePicker+*,
    .filter-date-wrapper>*,
    .filter-date-wrapper * {
        max-width: none !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        /* Capturar qualquer wrapper ou elemento criado pelo Flatpickr */
    }

    /* Desktop override - restaurar largura normal */
    @media (min-width: 769px) {

        .filter-date-input,
        #dateRangePicker,
        #dateRangePicker.flatpickr-input,
        .flatpickr-input,
        input[type="text"]#dateRangePicker {
            width: 100% !important;
            max-width: none !important;
            /* Restaurar largura normal para desktop */
        }

        /* Restaurar wrapper do Flatpickr para desktop */
        .flatpickr-wrapper,
        .flatpickr-wrapper:not(.flatpickr-mobile) {
            width: 100% !important;
            max-width: none !important;
            /* Restaurar largura normal do wrapper para desktop */
        }

        /* Restaurar elementos pais do input para desktop */
        #dateRangePicker+*,
        .filter-date-wrapper>*,
        .filter-date-wrapper * {
            width: 100% !important;
            max-width: none !important;
            /* Restaurar largura normal dos elementos para desktop */
        }
    }
}

.filter-date-input {
    padding: 10px 40px 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark-gray);
    width: 100%;
    /* Ocupar toda largura do wrapper */
    cursor: pointer;
    box-sizing: border-box;
    /* Incluir padding e border na largura */
}

.filter-date-input:focus {
    outline: none;
    border-color: var(--orange-color);
    box-shadow: 0 0 0 2px rgba(241, 95, 86, 0.1);
}

.calendar-icon {
    position: absolute;
    right: 12px;
    color: var(--text-light-gray);
    pointer-events: none;
}

/* Busca de Notícias */
.filter-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    /* Removido flex e width da definição base para evitar conflitos */
}

/* Mobile override for search wrapper */
@media (max-width: 768px) {
    .filter-search-wrapper {
        width: 100% !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
}

.filter-search-input {
    width: 100%;
    padding: 10px 16px;
    padding-right: 40px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    background: #f6f7fa;
    color: #4b5a6c;
    outline: none;
    box-shadow: none;
    font-style: italic;
}

.filter-search-input::placeholder {
    color: #b0b8c6;
}

.filter-search-wrapper .search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23b0b8c6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: auto;
    /* permite clique */
    z-index: 2;
    /* garante que fique acima do input */
}

.filter-search-wrapper .search-icon i {
    display: none;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-light-gray);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: none;
}

.clear-search-btn:hover {
    background: var(--light-orange-bg);
    color: var(--orange-color);
}

/* Título Principal */
.agencias-main-title-wrapper {
    margin-bottom: 24px;
}

.main-section-title {
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1.4;
    gap: 12px;
}

.main-section-title .title-icon {
    display: inline-block;
    width: 8px;
    height: 20px;
    background-color: #F15F56;
    border-radius: 4px;
    flex-shrink: 0;
}

.main-section-title .main-title-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark-gray);
}

.main-section-title .title-separator {
    font-size: 16px;
    font-weight: 400;
    color: #E8E8E8;
}

.main-section-title .title-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #858E96;
}

/* Conteúdo Principal */
.agencias-content-wrapper {
    display: grid;
    grid-template-columns: 1fr var(--agencias-sidebar-w);
    grid-template-areas:
        "mainTop sidebarTop"
        "mainBottom mainBottom";
    gap: 24px;
    align-items: start;
}

/* Main - linha superior (somente carrossel) */
.agencias-main-content--top {
    grid-area: mainTop;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
    /* evita overflow horizontal em grid */
}

/* Sidebar - linha superior */
.agencias-sidebar--top {
    grid-area: sidebarTop;
}

/* Main - linha inferior (Veja Também + demais seções) */
.agencias-main-content--bottom {
    grid-area: mainBottom;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

/* Base sidebar */
.agencias-sidebar {
    width: var(--agencias-sidebar-w);
    min-width: var(--agencias-sidebar-w);
    max-width: var(--agencias-sidebar-w);
}

/* Seções */
.agencias-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark-gray);
    margin: 0;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 4px 0;
    padding: 0;
}

/* Título dentro de mais-lidas-section - igual ao disclaimer h4 da Home */
.mais-lidas-section .sidebar-title {
    font-weight: 700;
    font-size: 18px;
    color: #212529;
    padding-left: 10px;
}

.sidebar-section {
    margin-bottom: 32px;
}

/* Container "MAIS LIDAS" - igual ao news-agencies da Home */
.mais-lidas-section {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #E8E8E8;
    padding: 24px 16px 24px 14px;
    max-height: 510px;
    overflow-y: auto;
    margin-bottom: 0;
}

/* Seção "Mais Recentes" - Carrossel */
.mais-recentes-section {
    margin-bottom: 32px;
}

.mais-recentes-carousel-wrapper {
    position: relative;
    max-width: 1000px;
    width: 100%;
}

.mais-recentes-carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox - oculta barra de rolagem */
    -ms-overflow-style: none;
    /* IE/Edge - oculta barra de rolagem */
    padding: 0;
    width: 100%;
}

.mais-recentes-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari - oculta barra de rolagem */
}

.mais-recentes-card {
    flex: 0 0 317px;
    width: 317px;
    height: 511px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.mais-recentes-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.mais-recentes-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.mais-recentes-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f8f9fa;
    transition: opacity 0.3s ease;
}

.mais-recentes-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    padding: 26px 22px;
    color: #fff;
}

.mais-recentes-card-agency {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.mais-recentes-card-agency-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

.mais-recentes-card-agency-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.mais-recentes-card-title {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 16px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mais-recentes-card-timestamp {
    font-size: 14px;
    color: #CED4DA;
    display: block;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-nav-btn:hover {
    background: var(--orange-color);
    color: #fff;
    border-color: var(--orange-color);
}

.carousel-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-prev {
    left: 16px;
}

.carousel-prev:focus {
    outline: none;
}

.carousel-next {
    right: 16px;
}

.carousel-next:focus {
    outline: none;
}

/* Indicadores do Carrossel - REMOVIDOS */
.carousel-indicators {
    display: none !important;
}

.carousel-indicator {
    display: none !important;
}

/* Cursor para carrossel com drag */
.mais-recentes-carousel {
    cursor: grab;
}

.mais-recentes-carousel:active {
    cursor: grabbing;
}

/* ============================================
   ESTILOS PARA MODO BUSCA
   ============================================ */

/* Container de Resultados da Busca */
.agencias-search-results-wrapper {
    width: 100%;
}

/* Contador de Resultados (padrão Acervo - barra azul) */
.agencias-results-count {
    margin-top: 8px;
    margin-bottom: 24px;
    padding: 8px 12px;
    background: #E3F2FD;
    border-left: 3px solid #1976D2;
    border-radius: 4px;
    font-size: 13px;
    color: #1976D2;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.5;
}

.agencias-results-count i {
    font-size: 14px;
    color: #1976D2;
    flex-shrink: 0;
}

.agencias-results-count strong {
    font-weight: 600;
    color: #0D47A1;
}

/* Grid de Resultados - 3 colunas fixas (igual à imagem) */
.agencias-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

/* Garante que os cards não se esticam além da largura da coluna */
.agencias-results-grid .veja-tambem-card {
    max-width: 100%;
    width: 100%;
}

/* Estados de loading e empty */
.agencias-results-grid .loading-state,
.agencias-results-grid .empty-state {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
}

.agencias-results-grid .empty-state-message {
    color: var(--text-medium-gray);
    font-size: 14px;
}

.agencias-results-grid .empty-state-icon {
    font-size: 48px;
    color: var(--text-light-gray);
    margin-bottom: 16px;
}

/* Centralizar loading-state no carousel */
.mais-recentes-carousel .loading-state {
    justify-content: center;
    width: 100%;
    flex-direction: column;
    text-align: center;
}

/* Classe utilitária para ocultar conteúdo padrão quando em modo busca */
.agencias-mode-search .agencias-default-content {
    display: none !important;
}

.agencias-mode-search .agencias-search-results-wrapper {
    display: block !important;
}

/* Seção "Mais Notícias" (antigo Veja Também) */
.veja-tambem-section {
    margin-bottom: 32px;
}

.veja-tambem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
}

.veja-tambem-card {
    background: #fff;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.veja-tambem-card:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Wrapper da imagem com padding interno */
.veja-tambem-card-image-wrapper {
    padding: 16px 16px 0 16px;
}

.veja-tambem-card-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* Área de conteúdo (título e descrição) */
.veja-tambem-card-body {
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.veja-tambem-card-title {
    font-size: 16px;
    font-weight: 500;
    color: #212529;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.veja-tambem-card-description {
    font-size: 14px;
    color: #3E3232BF;
    margin: 0;
    line-height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rodapé do card com fundo cinza */
.veja-tambem-card-footer {
    padding: 0 16px 16px 16px;
    margin-top: auto;
}

.veja-tambem-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #F5F5F5;
    border-radius: 12px;
}

.veja-tambem-card-agency {
    display: flex;
    align-items: center;
    gap: 12px;
}

.veja-tambem-card-agency-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Informações da agência (nome + data em coluna) */
.veja-tambem-card-agency-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.veja-tambem-card-agency-name {
    font-size: 14px;
    font-weight: 500;
    color: #3E3232;
}

.veja-tambem-card-date {
    font-size: 12px;
    color: #3E3232BF;
    font-weight: 400;
}

/* Título "Mais Notícias" com ícone laranja à esquerda */
.veja-tambem-section .section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 24px 0;
}

.veja-tambem-section .section-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 20px;
    background-color: #F15F56;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Banner Comercial */
.banner-section {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
}

.commercial-banner {
    width: 100%;
    max-width: 100%;
    height: 272px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

.commercial-banner-link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.commercial-banner-link:focus-visible {
    outline: 2px solid #F15F56;
    outline-offset: 2px;
}

.commercial-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    opacity: 1;
}

/* Seção "Veja Também" (antiga "Mais Notícias") */
.mais-noticias-section {
    margin-bottom: 32px;
}

.mais-noticias-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.mais-noticias-section .section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.mais-noticias-section .section-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 20px;
    background-color: #F15F56;
    border-radius: 4px;
    flex-shrink: 0;
}

.mais-noticias-controls {
    display: flex;
    gap: 8px;
}

.mais-noticias-nav-btn {
    background: #fff;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #3E3232;
    font-size: 14px;
}

.mais-noticias-nav-btn:hover {
    background: #F5F5F5;
    border-color: #D0D0D0;
}

.mais-noticias-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mais-noticias-wrapper {
    position: relative;
    overflow: hidden;
}

.mais-noticias-list {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding-bottom: 50px;
}

.mais-noticias-list::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Cards estilo veja-tambem mas sem imagem */
.mais-noticias-item {
    background: #fff;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    flex: 0 0 380px;
    /* Largura fixa igual ao veja-tambem-card */
    min-width: 0;
}

.mais-noticias-item:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Body com título e descrição (igual ao veja-tambem) */
.mais-noticias-item-body {
    padding: 26px 22px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.mais-noticias-item-title {
    font-size: 16px;
    font-weight: 500;
    color: #212529;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mais-noticias-item-description {
    font-size: 14px;
    color: #3E3232BF;
    margin: 0;
    line-height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer com fundo cinza (igual ao veja-tambem) */
.mais-noticias-item-footer {
    padding: 0 16px 16px 16px;
    margin-top: auto;
}

.mais-noticias-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #F5F5F5;
    border-radius: 12px;
}

.mais-noticias-item-agency {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mais-noticias-item-agency-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Informações da agência (nome + data em coluna) */
.mais-noticias-item-agency-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mais-noticias-item-agency-name {
    font-size: 14px;
    font-weight: 500;
    color: #3E3232;
}

.mais-noticias-item-date {
    font-size: 12px;
    color: #3E3232BF;
    font-weight: 400;
}

/* Sidebar "MAIS LIDAS" - Baseado em news-agencies da Home */
.mais-lidas-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mais-lidas-item {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    padding: 6px 0 8px 0;
    border-radius: 0;
    list-style: none;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #E8E8E8;
}

.mais-lidas-item:last-child {
    border-bottom: none;
}

.mais-lidas-item-rank {
    flex: 0 0 auto;
    font-size: 24px;
    font-weight: 500;
    color: #ACB5BD;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    text-align: center;
}

.mais-lidas-item-content {
    flex: 1;
    min-width: 0;
}

.mais-lidas-item .agency-item {
    display: flex;
    align-items: center;
    padding-bottom: 10px;
    padding-top: 8px;
}

.mais-lidas-item .agency-logo {
    width: 20px;
    height: 18px;
    margin-right: 6px;
    border-radius: 5px;
    object-fit: contain;
}

.mais-lidas-item .agency-name {
    font-size: 14px;
    color: #858E96;
    font-weight: 400;
}

.mais-lidas-item .news-title {
    font-size: 16px;
    font-weight: 500;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    text-decoration: none;
    line-height: 1.4;
}

.mais-lidas-item .news-title:hover {
    color: #000000;
}

.mais-lidas-item .news-date {
    font-size: 14px;
    color: #858E96;
    margin: 10px 0 6px 0;
}

/* Estados de Loading */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-light-gray);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--orange-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Estados Vazios */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-light-gray);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-message {
    font-size: 14px;
}

/* Estilos para conteúdo do modal de notícias */
.news-modal-image-wrapper {
    margin-bottom: 20px !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

.news-modal-image {
    width: 100% !important;
    height: 310px !important;
    border-radius: 8px !important;
    background: #ADADAD1C !important;
    object-fit: cover !important;
    display: block !important;
}

.news-modal-agency-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--light-orange-bg);
    border-radius: 8px;
}

.news-modal-agency-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.news-modal-agency-name {
    font-weight: 600;
    color: var(--text-dark-gray);
    font-size: 14px;
}

.news-modal-description {
    line-height: 1.6;
    color: var(--text-dark-gray);
    font-size: 15px;
}

.news-modal-description p {
    margin-bottom: 16px;
}

.news-modal-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.news-modal-no-content {
    color: var(--text-light-gray);
    font-style: italic;
    text-align: center;
    padding: 40px;
}

/* Responsividade - Desktop First */
@media (max-width: 1200px) {
    .veja-tambem-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .agencias-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile muito pequeno: 1 coluna para melhor legibilidade */
@media (max-width: 480px) {
    .agencies-logos-list {
        grid-template-columns: 1fr;
        /* 1 coluna em telas muito pequenas */
        gap: 6px;
        /* Gap menor para economizar espaço */
        padding: 8px;
        /* Padding menor */
    }

    .agency-logo-item {
        padding: 8px;
        /* Padding menor nos itens */
    }
}

@media (max-width: 768px) {
    .agencias-content-wrapper {
        grid-template-columns: 1fr;
        grid-template-areas:
            "mainTop"
            "sidebarTop"
            "mainBottom";
    }

    .agencias-sidebar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .veja-tambem-grid {
        grid-template-columns: 1fr;
    }

    .agencias-results-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar-content {
        flex-direction: column;
        align-items: stretch;
    }

    .agencies-logos-filter {
        width: 100%;
        min-width: unset;
        border: 1px solid #E8E8E8;
        border-radius: 8px;
        background: #fff;
    }

    .agencies-logos-scroll {
        max-height: 250px;
        /* Altura limitada aplicada ao scroll container */
        overflow-y: auto;
        /* Scroll vertical no container correto */
        scrollbar-width: auto;
        /* Mostrar scrollbar no Firefox */
        -ms-overflow-style: auto;
        /* Mostrar scrollbar no IE/Edge */
    }

    .agencies-logos-scroll::-webkit-scrollbar {
        width: 8px;
        /* Largura da scrollbar */
        display: block;
        /* Mostrar scrollbar no Chrome/Safari */
    }

    .agencies-logos-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        /* Fundo da trilha */
        border-radius: 4px;
    }

    .agencies-logos-scroll::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        /* Cor do indicador */
        border-radius: 4px;
    }

    .agencies-logos-scroll::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
        /* Cor ao passar o mouse */
    }

    .agencies-logos-list {
        display: block;
        /* Lista vertical simples */
        padding: 12px;
        width: 100%;
    }

    .agency-logo-item {
        width: 100%;
        max-width: none;
        flex-shrink: 1;
        justify-content: flex-start;
        margin-bottom: 8px;
        /* Espaçamento entre itens */
    }

    .agency-logo-item:last-child {
        margin-bottom: 0;
        /* Remover margem do último item */
    }

    /* Ocultar controles de navegação em mobile */
    .agencies-logos-controls {
        display: none;
    }

    /* Ajustar setinhas do carrossel para mobile */
    .carousel-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .carousel-prev {
        left: 8px;
    }

    .carousel-next {
        right: 8px;
    }

    /* Reorganizar título principal em mobile para economizar espaço */
    .main-section-title {
        display: block;
        /* Desabilitar flexbox para ter controle total */
        text-align: left;
    }

    /* Ocultar separador em mobile para layout mais limpo */
    .main-section-title .title-separator {
        display: none;
    }

    /* Primeira linha: ícone + título */
    .main-section-title .title-icon {
        display: inline-block;
        margin-right: 12px;
        vertical-align: middle;
    }

    .main-section-title .main-title-text {
        display: inline-block;
        font-size: 24px;
        vertical-align: middle;
    }

    /* Quebrar para segunda linha */
    .main-section-title .main-title-text::after {
        content: "";
        display: block;
        margin-bottom: 4px;
    }

    /* Segunda linha: apenas subtítulo */
    .main-section-title .title-subtitle {
        display: inline-block;
        font-size: 14px;
        line-height: 1.3;
        vertical-align: middle;
        margin-top: 10px;
    }
}

/* ============================================
   DATEPICKER CUSTOMIZADO (IGUAL PÁGINA IMAGEM)
   ============================================ */

/* Calendário Flatpickr */
.agencias-main-wrapper .flatpickr-calendar {
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.agencias-main-wrapper .flatpickr-day.selected {
    background: #F15F56;
    border-color: #F15F56;
    color: white !important;
    font-weight: 600;
}

.agencias-main-wrapper .flatpickr-day.selected:hover {
    background: #E04E47;
    border-color: #E04E47;
}

.agencias-main-wrapper .flatpickr-day.today {
    border-color: #F15F56;
    color: #F15F56 !important;
    background: transparent;
    font-weight: 600;
}

.agencias-main-wrapper .flatpickr-day.today:hover {
    background-color: rgba(241, 95, 86, 0.1) !important;
}

.agencias-main-wrapper .flatpickr-day:hover {
    background: rgba(241, 95, 86, 0.08) !important;
    border-color: rgba(241, 95, 86, 0.25) !important;
}

.agencias-main-wrapper .flatpickr-day.other-month {
    color: #b0b8c6;
}

.agencias-main-wrapper .flatpickr-day.other-month:hover {
    background: rgba(110, 122, 142, 0.1);
    color: #6e7a8e;
}

/* Interface personalizada do header */
.flatpickr-custom-header {
    background: white;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #e3e7ed;
}

.flatpickr-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    text-align: center;
}

.flatpickr-date-inputs {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.flatpickr-date-input-group {
    flex: 1;
}

.flatpickr-date-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #6e7a8e;
    margin-bottom: 4px;
    text-transform: none;
}

.flatpickr-date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.flatpickr-date-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e3e7ed;
    border-radius: 4px;
    font-size: 12px;
    color: #2c3e50;
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.flatpickr-date-input:focus {
    border-color: #F15F56 !important;
    box-shadow: 0 0 0 2px rgba(241, 95, 86, 0.2) !important;
}

.flatpickr-date-input:invalid {
    border-color: #dc3545;
}

.flatpickr-date-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.flatpickr-calendar-icon-small {
    position: absolute;
    right: 8px;
    width: 12px;
    height: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%236e7a8e" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
}

/* Container unificado para botões de ação */
.flatpickr-calendar .flatpickr-action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border-top: 1px solid #e3e7ed;
    border-radius: 0 0 8px 8px;
}

/* Grupos de botões - esquerda e direita */
.flatpickr-buttons-left,
.flatpickr-buttons-right {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Setas de navegação de mês */
.flatpickr-prev-month,
.flatpickr-next-month {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6e7a8e;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.2s;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    color: #F15F56;
}

/* Botões de ação */
.flatpickr-calendar .flatpickr-action-buttons button {
    background: transparent;
    border: none;
    color: #E04E47;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.flatpickr-calendar .flatpickr-action-buttons button:hover {
    background: rgba(224, 78, 71, 0.15) !important;
}

/* Estilos unificados para botão aplicar */
.flatpickr-calendar .flatpickr-action-buttons button.flatpickr-apply {
    background: #E04E47;
    color: white;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 4px;
}

.flatpickr-calendar .flatpickr-action-buttons button.flatpickr-clear:hover,
.flatpickr-calendar .flatpickr-action-buttons button.flatpickr-today:hover {
    background: rgba(224, 78, 71, 0.1);
}

/* Estilos específicos para botão Cancelar */
.flatpickr-calendar .flatpickr-action-buttons button.flatpickr-cancel {
    background: #fff;
    color: #E04E47;
    border: 1px solid #E04E47;
    font-weight: 600;
}

.flatpickr-calendar .flatpickr-action-buttons button.flatpickr-cancel:hover {
    background: rgb(224 78 71 / 4%) !important;
}

.flatpickr-calendar .flatpickr-action-buttons button.flatpickr-apply:hover {
    background: #c73d36 !important;
}

/* Removendo borda preta dos botões quando selecionados */
.flatpickr-calendar .flatpickr-action-buttons button:focus,
.flatpickr-calendar .flatpickr-action-buttons button:active {
    border: none !important;
    outline: none !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .flatpickr-calendar {
        width: 280px;
        max-width: calc(100vw - 40px);
    }

    .flatpickr-months,
    .flatpickr-weekdays,
    .flatpickr-days {
        padding-left: 14px;
        padding-right: 14px;
    }

    .flatpickr-date-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .flatpickr-custom-header {
        padding: 14px 14px 10px;
    }
}

/* ============================================
   DESTAQUE DE BUSCA (AMARELO)
   ============================================ */

.search-highlight {
    background-color: #ffeb3b;
    border-radius: 2px;
    padding: 0;
    font-weight: inherit;
    color: inherit;
}
@media (max-width: 1200px) {
    /* Banner: abaixo de 1200px, preservar arte completa (sem cortes laterais). */
    .commercial-banner {
        height: auto;
    }

    .commercial-banner-image {
        height: auto;
        object-fit: contain;
    }
}

