/*
 * ========================================
 * LISTAGEM DE NOTÍCIAS FILTRADAS
 * Layout do Figma: Grid 3 colunas com cards horizontais
 * ========================================
 */

/* Container Principal */
.news-listing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Breadcrumb */
.news-listing__breadcrumb {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #585E6A;
    margin-bottom: 20px;
}

.news-listing__breadcrumb a {
    color: #585E6A;
    text-decoration: none;
}

.news-listing__breadcrumb a:hover {
    color: #126BF8;
}

/* Texto "Filtrado por" */
.news-listing__filter-text {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: #02082F;
    margin-bottom: 30px;
}

.news-listing__filter-category {
    color: #126BF8;
    font-weight: 600;
}

/* Grid de 3 colunas */
.news-listing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px;
    margin-bottom: 40px;
}

/* Responsivo */
@media (max-width: 992px) {
    .news-listing__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-listing__grid {
        grid-template-columns: 1fr;
    }
}

/*
 * ========================================
 * CARD DE NOTÍCIA (Layout Horizontal)
 * ========================================
 */

.news-card {
    position: relative;
}

.news-card__link {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform 0.2s ease;
}

.news-card__link:hover {
    transform: translateX(5px);
}

/* Imagem */
.news-card__image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 24px;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Conteúdo do Card */
.news-card__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
    padding-right: 20px; /* Espaço para a seta */
}

/* Título */
.news-card__title {
    font-family: 'Praktika', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 125%;
    color: #126BF8;
    margin: 0 0 8px 0;
    
    /* Limita a 2 linhas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Resumo */
.news-card__summary {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 150%;
    color: #02082F;
    margin: 0 0 8px 0;
    
    /* Limita a 2 linhas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Data */
.news-card__date {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #585E6A;
    margin-top: auto;
}

/* Seta de navegação (→) */
.news-card__link::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 5px;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-top: 2px solid #126BF8;
    border-right: 2px solid #126BF8;
    transform: rotate(45deg);
    transition: right 0.2s ease;
}

.news-card__link:hover::after {
    right: 0;
}

/*
 * ========================================
 * BOTÃO "CARREGAR MAIS NOTÍCIAS"
 * ========================================
 */

.news-listing__pager {
    text-align: center;
    margin-top: 40px;
}

/* Esconde a paginação padrão do Drupal */
.news-listing__pager .pager__items {
    display: none;
}

/* Botão customizado */
.news-listing__load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #126BF8;
    background: transparent;
    border: 2px solid #126BF8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-listing__load-more:hover {
    background: #126BF8;
    color: #fff;
}

/* Ícone de seta para baixo */
.news-listing__load-more::before {
    content: '↓';
    font-size: 18px;
}

/* Remove estilos padrão da View */
.news-listing .views-view-grid,
.news-listing .views-row {
    display: contents !important;
    width: auto !important;
}

/* Grid de 3 colunas - CORRIGIDO */
.news-listing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px;
    margin-bottom: 40px;
}

/* Remove margens/paddings da view */
.news-listing .view-content {
    display: contents;
}

/* Card ocupa 1 célula do grid */
.news-card {
    position: relative;
    width: 100%;
}

/* Link do card - Layout horizontal */
.news-card__link {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform 0.2s ease;
    padding: 15px;
    border-radius: 8px;
}

.news-card__link:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

/* Imagem fixa 120x120 */
.news-card__image {
    width: 120px;
    height: 120px;
    min-width: 120px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 24px;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Conteúdo alinhado verticalmente */
.news-card__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
    padding-right: 25px;
    gap: 5px;
}

/* Título - máximo 2 linhas */
.news-card__title {
    font-family: 'Praktika', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 125%;
    color: #126BF8;
    margin: 0;
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card__title a {
    color: inherit;
    text-decoration: none;
}

/* Resumo - máximo 2 linhas */
.news-card__summary {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 150%;
    color: #02082F;
    margin: 0;
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Data */
.news-card__date {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #585E6A;
    margin-top: auto;
}

/* Seta azul → */
.news-card__link::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-top: 2px solid #126BF8;
    border-right: 2px solid #126BF8;
    transform: rotate(45deg);
    transition: right 0.2s ease;
}

.news-card__link:hover::after {
    right: 5px;
}

/*
 * CORREÇÃO CRÍTICA DO GRID
 * Força o View Content a usar o Grid de 3 colunas e ignora a estrutura de linha Bootstrap.
 */
.view-content.row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px; /* Espaçamento entre as colunas e linhas */
}

/* Remove a largura forçada do views-row para que ele se ajuste na coluna Grid */
.view-content .views-row {
    width: 100% !important; 
    margin: 0 !important;
    border-top: 1px solid #86888C;
    
}

/*
 * ATIVAÇÃO DO GRID DE 3 COLUNAS
 */
.news-list-page__columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* Garante que o container interno (news-column) não interfira no Grid */
.news-column {
    display: contents; /* CRÍTICO: Faz com que os filhos diretos da Views se comportem como se estivessem no Grid-Container principal */
}

/* GARANTE QUE OS ITENS SEJAM ESTILIZADOS CORRETAMENTE */
.news-column__item--card .news-card {
    background: #FAFAFA;
    transition: all 0.3s ease;
    border-top: 1px solid #86888C;
}

/* Imagem fixa 80x80 (Geralmente usada nos cards) */
.news-column__item--card .news-card__image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    order: 1;
}

/*
 * ========================================
 * LISTAGEM DE NOTÍCIAS FILTRADAS
 * Layout do Figma
 * ========================================
 */

/* Container Principal */
.news-listing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Breadcrumb */
.news-listing__breadcrumb {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #585E6A;
    margin-bottom: 20px;
}

.news-listing__breadcrumb a {
    color: #585E6A;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-listing__breadcrumb a:hover {
    color: #126BF8;
}

/* Texto "Filtrado por [categoria]" */
.news-listing__filter-text {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #02082F;
    margin-bottom: 40px;
    margin-top: 10px;
}

.news-listing__filter-category {
    color: #126BF8;
    font-weight: 600;
}

/* Remove estilos padrão da View */
.news-listing .views-view-grid,
.news-listing .views-row {
    display: contents !important;
    width: auto !important;
}

.news-listing .view-content {
    display: contents;
}

/* Grid de 3 colunas */
.news-listing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px;
    margin-bottom: 50px;
}

/* Responsivo */
@media (max-width: 992px) {
    .news-listing__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-listing__grid {
        grid-template-columns: 1fr;
    }
}

/*
 * ========================================
 * CARD DE NOTÍCIA (Layout Horizontal)
 * ========================================
 */

.news-card {
    position: relative;
    width: 100%;
}

.news-card__link {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform 0.2s ease;
    padding: 10px;
    border-radius: 8px;
}


/* Imagem fixa 120x120 com border-radius 24px */
.news-card__image {
    width: 120px;
    height: 120px;
    min-width: 120px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 24px;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Conteúdo do card */
.news-card__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
    padding-right: 25px;
    gap: 5px;
}

/* Título - máximo 2 linhas */
.news-card__title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 16px;
  line-height: 125%;
  letter-spacing: normal;
  color: #126BF8;
}


.news-card__title a {
    color: inherit;
    text-decoration: none;
}

/* Resumo - máximo 2 linhas */
.news-card__meta {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
  line-height: 150%;
  letter-spacing: normal;
  color: #02082F;
}


/* Data */
.news-card__date {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #585E6A;
    margin-top: auto;
}

/*
 * ========================================
 * SETA COM CORES DINÂMICAS (→)
 * Baseado no campo field_target_audience
 * ========================================
 */

/* Seta padrão */
.news-card__link::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-top: 2px solid #126BF8; /* Azul - Todos (padrão) */
    border-right: 2px solid #126BF8;
    transform: rotate(45deg);
    transition: right 0.2s ease;
}

.news-card__link:hover::after {
    right: 5px;
}

/* Todos - Azul #126BF8 */
.news-card[data-audience="todos"] .news-card__link::after {
    border-top-color: #126BF8;
    border-right-color: #126BF8;
}

/* Sede - Verde #1AAE54 */
.news-card[data-audience="sede"] .news-card__link::after {
    border-top-color: #1AAE54;
    border-right-color: #1AAE54;
}

/* Pontos de Atendimento - Roxo #BD41D8 */
.news-card[data-audience="pontos de atendimento"] .news-card__link::after,
.news-card[data-audience="pontos"] .news-card__link::after {
    border-top-color: #BD41D8;
    border-right-color: #BD41D8;
}

/*
 * ========================================
 * BOTÃO "CARREGAR MAIS NOTÍCIAS" (Figma)
 * ========================================
 */

.news-listing__footer {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 50px;
}

.btn-load-more-news {
    /* Layout */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: #faebd700;
    
    /* Dimensões */
    padding: 12px 24px;
    min-width: 220px;
    
    /* Tipografia (Figma) */
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #126BF8;
    text-align: center;
    
    /* Visual */
    cursor: pointer;
    
    /* Transições */
    transition: all 0.3s ease;
}

/* Ícone da seta para baixo */
.btn-load-more-news__icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* Hover */
.btn-load-more-news:hover {
    background: #126BF8;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 107, 248, 0.25);
}

.btn-load-more-news:hover .btn-load-more-news__icon {
    transform: translateY(3px);
}

/* Estado de Loading */
.btn-load-more-news.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.btn-load-more-news.loading .btn-load-more-news__icon {
    animation: bounce-icon 1s infinite;
}

@keyframes bounce-icon {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(5px); 
    }
}

/* Estado Disabled (todas notícias carregadas) */
.btn-load-more-news:disabled {
    background: #F5F5F5;
    border-color: #CCCCCC;
    color: #999999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-load-more-news:disabled:hover {
    transform: none;
}

/* Esconde o pager nativo do Drupal */
.news-listing__pager {
    display: none !important;
}

/* Empty state */
.news-listing__empty {
    text-align: center;
    padding: 60px 20px;
    color: #585E6A;
    font-family: 'Manrope', sans-serif;
}

/* ========================================
   REMOVER TODOS OS EFEITOS DE HOVER
   ======================================== */

/* Links do card */
.news-card__link:hover {
    background: none !important;
    transform: none !important;
}


/* Resumo / Meta */
.news-card__meta:hover {
    color: inherit !important;
}

/* Breadcrumb */
.news-listing__breadcrumb a:hover {
    color: inherit !important;
}

/* Seta do card */
.news-card__link:hover::after {
    right: 10px !important; /* valor default */
}

/* Botão "carregar mais" */
.btn-load-more-news:hover {
    background: none !important;
    color: #126BF8 !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-load-more-news:hover .btn-load-more-news__icon {
    transform: none !important;
}

/* Outros links gerais */
a:hover {
    color: inherit !important;
    text-decoration: none !important;
}

.news-card {
    width: 359px;
    height: 130px;
    transform: rotate(0deg);
    opacity: 1;
    gap: 16px;
    border-top: 1px solid #86888C;

}

/* ========================================
   BOTÃO CARREGAR MAIS
   ======================================== */

.news-list-page__footer {
  text-align: center;
  padding: 40px 0;
}

.btn-load-more-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    background: #fafafa;
    border: none;
    border-radius: 100px;
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.01em;
    text-align: center;
    color: #1526FF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more-all svg {
  stroke: #1526FF;
  fill: none;
  order: -1;
  flex-shrink: 0;
}

/*
 * ========================================
 * TÍTULO "Filtrado por [Categoria]" (Figma)
 * ========================================
 */

.news-listing__filter-title {
    margin-bottom: 40px;
    margin-top: 20px;
}

/* Texto "Filtrado por" - Preto #02082F */
.news-listing__filter-label {
    font-family: 'Praktika', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 125%;
    color: #02082F;
}

/* Nome da Categoria - Azul #1526FF */
.news-listing__filter-category {
    font-family: 'Praktika', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 125%;
    color: #1526FF;
    margin-left: 5px; /* Pequeno espaço entre "Filtrado por" e o nome */
}