/**
 * CSS FINAL - Bloco de Notícias Mercantil
 * Baseado nas medidas EXATAS do Figma
 * SEM DUPLICAÇÕES
 */

/* ==========================================
   IMPORTAR FONTE
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ==========================================
   VARIÁVEIS DO FIGMA
   ========================================== */
:root {
  /* Cores */
  --blue: #1526FF;
  --blue-hover: #0D1DD9;
  --text-dark: #02082F;
  --text-light: #6B7280;
  --bg-gray: #FAFAFA;
  --bg-white: #FFFFFF;
  --border: #86888C;
  
  /* Raios */
  --radius-card: 15.34px;
  --radius-container: 24px;
  --radius-hero-top: 23.01px;
  
  /* Transições */
  --transition: all 0.3s ease;
}

/* ==========================================
   RESET BASE
   ========================================== */
* {
  box-sizing: border-box;
}

/* ==========================================
   LAYOUT PRINCIPAL - 2 COLUNAS
   MÁXIMA PRIORIDADE PARA SOBRESCREVER TEMA
   ========================================== */
.layout.layout--twocol-section.layout--twocol-section--67-33,
.layout.layout--twocol-section.layout--twocol-section--50-50,
.layout.layout--twocol-section {
  width: 1582px !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 24px !important;
  gap: 23px !important;
  background: var(--bg-gray) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-container) !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  font-family: 'Manrope', sans-serif !important;
  position: relative !important;
}

/* FORÇAR BLOCOS SEREM INLINE */
.layout--twocol-section > * {
  display: inline-block !important;
}

/* Coluna esquerda - Hero (67%) */
.layout.layout--twocol-section .layout__region.layout__region--first {
  flex: 0 0 67% !important;
  max-width: 67% !important;
  width: 67% !important;
  min-width: 67% !important;
  position: relative !important;
  display: block !important;
}

/* Coluna direita - Sidebar (33%) */
.layout.layout--twocol-section .layout__region.layout__region--second {
  flex: 0 0 33% !important;
  max-width: 33% !important;
  width: 33% !important;
  min-width: 33% !important;
  display: block !important;
}

/* Divisor vertical entre colunas */
.layout.layout--twocol-section::before {
  content: '' !important;
  position: absolute !important;
  left: calc(67% + 12px) !important;
  top: 24px !important;
  width: 1px !important;
  height: calc(100% - 48px) !important;
  background: var(--border) !important;
  z-index: 1 !important;
  display: block !important;
  margin-left: -30px;
}

/* ==========================================
   ESCONDER ELEMENTOS INDESEJADOS
   ========================================== */
.layout__region--first > div > h2,
.field__label,
.view-footer {
  display: none !important;
}

/* ==========================================
   HERO - NOTÍCIA EM DESTAQUE
   ========================================== */
.news-hero {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-white);
  border-radius: var(--radius-hero-top);
  overflow: hidden;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); */
  transition: var(--transition);
}

/* .news-hero:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
} */

.news-hero__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Imagem Hero */
.news-hero__image-wrapper {
  position: relative;
  width: 100%;
  height: 468px;
  background: linear-gradient(203.77deg, rgba(0, 0, 0, 0) 62.61%, rgba(0, 0, 0, 0.2) 88.01%);
  border-top-left-radius: var(--radius-hero-top);
  border-top-right-radius: var(--radius-hero-top);
  padding: 24px 23.01px;
  overflow: hidden;
}

.news-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-top-left-radius: 23.01px;
  border-top-right-radius: 23.01px;
}

/* Badges no Hero */
.news-hero__badges {
  position: absolute;
  top: 24px;
  left: 23.01px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
}

.badge--category {
  background: var(--blue);
  color: white;
}

/* Conteúdo Hero */
.news-hero__content {
  width: 100%;
  padding: 16px 24px;
  gap: 16px;
  display: flex;
  flex-direction: column;
}

.news-hero__title {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 125%;
  color: var(--text-dark);
  margin: 0;
}

.news-hero__summary {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  color: var(--text-light);
  margin: 0;
}

.news-hero__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
}

.news-hero__date {
  font-weight: 600;
}

.news-hero__separator {
  color: var(--border);
}

.news-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 600;
  font-size: 16px;
  margin-top: 12px;
  transition: var(--transition);
}

.news-hero:hover .news-hero__cta {
  gap: 12px;
}

/* ==========================================
   SIDEBAR - NOTÍCIAS LATERAIS
   ========================================== */
.news-block {
  font-family: 'Manrope', sans-serif;
  height: 100%;
}

.news-block__header {
  display: none !important;
}

.news-block__container {
  display: block;
}

.news-block__hero {
  display: none !important;
}

.news-block__sidebar {
  background: var(--bg-gray);
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

/* ==========================================
   TABS
   ========================================== */
.news-block__tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: var(--bg-white);
  border-radius: 100px;
  width: fit-content;
  margin-left: 6%;
}

.news-block__tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  background: transparent;
  border-radius: 100px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.news-block__tab:hover {
  background: rgba(21, 38, 255, 0.05);
}

.news-block__tab--active {
  background: var(--blue) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(21, 38, 255, 0.25);
}

/* ==========================================
   TAB CONTENT
   ========================================== */
.news-block__tab-content {
  display: none;
}

.news-block__tab-content--active {
  display: block !important;
}

/* ==========================================
   CARDS - NOTÍCIAS LATERAIS
   ========================================== */
.news-card {
  background: var(--bg-white);
  /* border-radius: var(--radius-card); */
  margin-bottom: 12px;
  transition: var(--transition);
}

.news-card:hover {
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); */
  transform: translateX(4px);
}

.news-card:last-child {
  margin-bottom: 0;
}

.news-card__link {
  display: flex;
  align-items: center;
  gap: 15.34px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
}

/* Conteúdo do Card */
.news-card__content {
  width: 141px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Badge Categoria */
.news-card__category {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.category-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category-badge svg {
  width: 14px;
  height: 14px;
  color: white;
}

/* Título do Card */
.news-card__title {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 125%;
  color: var(--text-dark);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta */
.news-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-light);
}

.news-card__date {
  font-weight: 600;
}

.news-card__meta::before {
  content: '•';
}

/* Seta */
.news-card__arrow {
  width: 20px;
  height: 20px;
  color: var(--text-light);
  flex-shrink: 0;
  transition: var(--transition);
}

.news-card:hover .news-card__arrow {
  color: var(--blue);
  transform: translateX(4px);
}

/* Imagem do Card */
.news-card__image {
  width: 126px;
  height: 98px;
  flex-shrink: 0;
  border-top-right-radius: var(--radius-card);
  border-bottom-right-radius: var(--radius-card);
  overflow: hidden;
  order: 1;
}

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

/* ==========================================
   BOTÃO - ACESSAR TODAS
   ========================================== */
.news-block__footer {
  margin-top: auto;
  padding-top: 72px;
}

.news-block__cta {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0 24px;
  background: var(--blue) !important;
  color: white !important;
  border: none;
  border-radius: 9999px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(21, 38, 255, 0.25);
}

.news-block__cta:hover {
  background: var(--blue-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(21, 38, 255, 0.35);
  color: white !important;
}

/* ==========================================
   RESPONSIVO
   ========================================== */
@media (max-width: 1200px) {
  .layout--twocol-section {
    width: 100%;
    flex-direction: column;
  }
  
  .layout--twocol-section::after {
    display: none;
  }
  
  .layout__region--first,
  .layout__region--second {
    flex: 1;
    max-width: 100%;
  }
  
  .news-hero__image-wrapper,
  .news-hero__content {
    width: 100%;
  }
  
  .news-hero__image-wrapper {
    height: 360px;
  }
}

@media (max-width: 768px) {
  .layout--twocol-section {
    padding: 16px;
  }
  
  .news-hero__image-wrapper {
    height: 280px;
  }
  
  .news-hero__title {
    font-size: 18px;
  }
  
  .news-card__image {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .news-hero__image-wrapper {
    height: 220px;
  }
  
  .news-card__link {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .news-card__image {
    width: 100%;
    height: 160px;
    border-radius: var(--radius-card);
    order: 0;
  }
  
  .news-card__content {
    width: 100%;
  }
}

.news-hero__summary {
    display: none;
}

.news-card__image {
  width: 126px !important;
  height: 98px !important;
  flex-shrink: 0;
  border-top-right-radius: 15.34px !important;
  border-bottom-right-radius: 15.34px !important;
  overflow: hidden;
  order: 1;
}

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

/* Garantir que a div interna também tenha o tamanho correto */
.news-card__image .field,
.news-card__image .field__item {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.news-hero__image-wrapper {
  width: 100%;
  height: 468px;
  border-top-left-radius: 23.01px;
  border-top-right-radius: 23.01px;
  padding: 24px 23.01px;
}
/* META + BOTÃO NA MESMA LINHA */
.news-hero__footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-top: 16px !important;
}

.news-hero__meta {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
}

/* Botão com SUA IMAGEM */
.news-hero__cta {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  background: #E1E2E0 !important;
  border: 1px solid #E1E2E0 !important;
  border-radius: 9999px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.news-hero__cta:hover {
  background: #D1D2D0 !important;
  transform: translateX(4px) !important;
}

/* Esconder texto e SVG */
.news-hero__cta .cta-text,
.news-hero__cta .cta-arrow {
  display: none !important;
}

/* SUA IMAGEM seta-news.png */
.news-hero__cta::after {
  content: '' !important;
  display: block !important;
  width: 40px !important;
  height: 40px !important;
  background-image: url('../img/seta-news.png') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

.field.field--name-field-news-block-home.field--type-entity-reference-revisions.field--label-above {
  margin-left: -8px;
  margin-right: 25px;
}

.node--view-mode-teaser {
  border-bottom: none;
}