/* Base CSS — Mobile-first responsive styles for Radar Local portals.
 * Theme values are injected as CSS custom properties in :root by the EJS layout.
 * Fallback values ensure usable rendering even without theme_config.
 *
 * Architecture (sections):
 *   1. Design Tokens (palette, typography, spacing, borders, shadows, transitions, ratios, weights)
 *   2. Reset & Base
 *   3. Layout (container, grid utilities)
 *   4. Global Components (header, footer, news card, badge, button, tags, ad slot, pagination)
 *   5. Blocks (headline, latest, by-location, highlights, ad)
 *   6. Pages (home, article, category)
 *   7. Utilities (visually-hidden, line-clamp, img-wrap)
 *   8. Responsive (tablet 768px+, desktop 1024px+, wide 1280px+)
 *   9. Print
 *  10. Dark mode
 *  11. Reduced motion
 */

/* ============================================================
   === 1. Design Tokens ===
   ============================================================ */

/* --- 1.1 Palette — derived from Radar São Paulo logo ---
 * Navy #0D2337: logo background (header, footer, sobreposições escuras)
 * Blue #1D6FA4: azul radar (primário interativo — links, CTAs, foco)
 * Light blue #4A9FD4: arcos do radar (superfícies, destaques suaves)
 * Red #DC2626: agulha do radar (urgência, breaking news, erros)
 */
:root {
  --theme-palette-primary:          #1D6FA4; /* azul radar — links, CTAs, foco */
  --theme-palette-primary-hover:    #145278; /* azul escuro hover */
  --theme-palette-primary-subtle:   #E6F3FB; /* azul muito claro — fundo de badges */
  --theme-palette-secondary:        #0D2337; /* navy do logo — header/footer */
  --theme-palette-accent:           #DC2626; /* vermelho agulha — breaking news */
  --theme-palette-accent-alt:       #4A9FD4; /* azul médio — elementos secundários */
  --theme-palette-background:       #F5F8FC; /* fundo com leve tom azulado */
  --theme-palette-surface:          #EDF3FA; /* fundo de cards e seções */
  --theme-palette-surface-raised:   #FFFFFF; /* cards elevados */
  --theme-palette-divider:          #C8DAEA; /* separadores azulados */
  --theme-palette-text:             #0D2337; /* navy do logo como texto principal */
  --theme-palette-text-secondary:   #3D5A7A; /* navy médio */
  --theme-palette-text-disabled:    #7E9AB5;
  --theme-palette-border:           #B4CEDF;
  --theme-palette-error:            #DC2626;
  --theme-palette-success:          #1A7A3B;
  --theme-palette-overlay:          rgba(13, 27, 46, 0.65); /* navy overlay */
}

/* --- 1.2 Typography --- */
:root {
  --theme-typography-font-family:         'Source Serif 4', Georgia, serif;
  --theme-typography-heading-font-family: 'Sora', system-ui, -apple-system, sans-serif;
  /* Nota: headings usam serifa para credibilidade jornalística.
     Portais que preferirem sans-serif sobrescrevem este token. */

  --theme-typography-base-font-size:      17px; /* aumentado de 16px para conforto de leitura */
  --theme-typography-line-height:         1.7;  /* aumentado de 1.6 para artigos longos */
  --theme-typography-heading-line-height: 1.2;
  --theme-typography-tight-line-height:   1.1;  /* títulos muito grandes no hero */
  --theme-typography-caption-line-height: 1.4;

  /* Type scale (rem, base = 17px) */
  --type-scale-xs:      0.75rem;   /* ~13px — labels, badges, timestamps */
  --type-scale-sm:      0.8125rem; /* ~14px — captions, meta secundário */
  --type-scale-base:    1rem;      /* 17px  — corpo de texto */
  --type-scale-md:      1.125rem;  /* ~19px — lead/subtítulo, resumo */
  --type-scale-lg:      1.375rem;  /* ~23px — h3, títulos de seção */
  --type-scale-xl:      1.75rem;   /* ~30px — h2, título de artigo (mobile) */
  --type-scale-2xl:     2.25rem;   /* ~38px — h1 hero (tablet) */
  --type-scale-3xl:     3rem;      /* ~51px — h1 hero (desktop) */
  --type-scale-display: 3.75rem;   /* ~64px — manchete principal (wide) */
}

/* --- 1.3 Spacing aliases --- */
:root {
  --theme-spacing-unit: 8px;
  --theme-spacing-scale: 1;

  --space-1:   8px;  /* calc(var(--theme-spacing-unit) * 1)  */
  --space-2:  16px;  /* calc(var(--theme-spacing-unit) * 2)  */
  --space-3:  24px;  /* calc(var(--theme-spacing-unit) * 3)  */
  --space-4:  32px;  /* calc(var(--theme-spacing-unit) * 4)  */
  --space-5:  40px;  /* calc(var(--theme-spacing-unit) * 5)  */
  --space-6:  48px;  /* calc(var(--theme-spacing-unit) * 6)  */
  --space-8:  64px;  /* calc(var(--theme-spacing-unit) * 8)  */
  --space-10: 80px;  /* calc(var(--theme-spacing-unit) * 10) */
  --space-12: 96px;  /* calc(var(--theme-spacing-unit) * 12) */
}

/* --- 1.4 Borders --- */
:root {
  --theme-borders-radius:      6px;    /* aumentado de 4px — mais moderno */
  --theme-borders-radius-sm:   4px;    /* badges, tags pequenas */
  --theme-borders-radius-lg:   12px;   /* cards grandes, hero image */
  --theme-borders-radius-full: 9999px; /* pílulas, avatars */
  --theme-borders-width:       1px;
  --theme-borders-width-md:    2px;    /* bordas de seção, destaques */
  --theme-borders-width-lg:    3px;    /* blockquotes, accent lines */
}

/* --- 1.5 Shadows --- */
:root {
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.16), 0 8px 16px rgba(0,0,0,0.10);
}

/* --- 1.6 Transitions --- */
:root {
  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-slow:   300ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- 1.7 Aspect ratios --- */
:root {
  --ratio-hero:      56.25%; /* 16:9 — imagem principal do artigo, hero do bloco headline */
  --ratio-card:      56.25%; /* 16:9 — cards do highlights e related */
  --ratio-thumbnail: 75%;    /* 4:3  — thumbnails do bloco latest e by-location */
  --ratio-square:    100%;   /* 1:1  — avatars, ícones de localidade */
  --ratio-wide:      42.85%; /* 21:9 — banner publicitário wide */
}

/* --- 1.8 Font weights --- */
:root {
  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;
  --font-weight-black:    900; /* manchetes de destaque */
}


/* ============================================================
   === 2. Reset & Base ===
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--theme-typography-base-font-size);
  line-height: var(--theme-typography-line-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--theme-typography-font-family);
  color: var(--theme-palette-text);
  background-color: var(--theme-palette-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--theme-typography-heading-font-family);
  line-height: var(--theme-typography-heading-line-height);
  color: var(--theme-palette-text);
  margin-bottom: var(--space-2);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: var(--space-2);
}

a {
  color: var(--theme-palette-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--theme-palette-primary);
  outline-offset: 2px;
}


/* ============================================================
   === 3. Layout ===
   ============================================================ */

/* --- 3.1 Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* --- 3.2 Grid utilities --- */
.grid {
  display: grid;
  gap: var(--space-2);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-12 {
  grid-template-columns: repeat(12, 1fr);
}


/* ============================================================
   === 4. Global Components ===
   ============================================================ */

/* --- 4.1 Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  background: var(--theme-palette-primary);
  color: #ffffff;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--theme-borders-radius);
  font-size: var(--type-scale-sm);
  font-weight: var(--font-weight-semibold);
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-1);
  text-decoration: none;
}

/* --- 4.2 Header + Nav (3-layer system) --- */

/* Base header wrapper */
.site-header {
  position: relative;
  z-index: 100;
}

/* Layer 1: Top bar */
.site-header__top-bar {
  display: none; /* hidden on mobile */
  background-color: var(--theme-palette-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.site-header__top-bar .container {
  display: flex;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
}

.site-header__date {
  font-size: var(--type-scale-xs);
  color: rgba(255, 255, 255, 0.55);
  font-weight: var(--font-weight-normal);
}

/* Layer 2: Brand bar */
.site-header__brand-bar {
  background-color: var(--theme-palette-secondary);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.site-header__brand-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

/* Logo */
.site-logo {
  display: flex;
  flex-direction: column;
  color: #ffffff;
  text-decoration: none;
  gap: 2px;
}

.site-logo:hover {
  text-decoration: none;
}

.site-logo__name {
  font-family: var(--theme-typography-heading-font-family);
  font-size: var(--type-scale-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--theme-typography-tight-line-height);
  color: #ffffff;
}

.site-logo__tagline {
  font-size: var(--type-scale-sm);
  opacity: 0.85;
  color: #ffffff;
  font-family: var(--theme-typography-font-family);
}

.site-logo__img {
  display: block;
  max-height: 48px;
  width: auto;
}

/* Legacy aliases — kept for backward compatibility */
.site-title {
  font-size: 1.5rem;
  margin-bottom: 0;
  color: #ffffff;
}

.site-tagline {
  font-size: 0.875rem;
  opacity: 0.85;
  margin-bottom: 0;
}

/* Layer 3: Navigation bar */
.site-nav {
  background-color: var(--theme-palette-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition-slow), box-shadow var(--transition-slow);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 44px;
}

/* Nav list — hidden on mobile, shown inline on tablet+ */
.site-nav__list {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  display: block;
  color: rgba(255, 255, 255, 0.90);
  text-decoration: none;
  font-size: var(--type-scale-sm);
  font-weight: var(--font-weight-medium);
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.site-nav__link:hover {
  color: #ffffff;
  text-decoration: none;
  border-bottom-color: rgba(255, 255, 255, 0.60);
}

.site-nav__link[aria-current="page"] {
  color: #ffffff;
  border-bottom-color: var(--theme-palette-accent-alt);
  font-weight: var(--font-weight-semibold);
}

/* Hamburger button */
.site-nav__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--theme-borders-radius);
  transition: background-color var(--transition-fast);
  margin-left: auto;
}

.site-nav__hamburger:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.site-nav__hamburger:focus-visible {
  outline: 2px solid var(--theme-palette-accent);
  outline-offset: 2px;
}

.site-nav__hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
  transform-origin: center;
}

/* Hamburger → X animation when menu is open */
.site-nav--open .site-nav__hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav--open .site-nav__hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.site-nav--open .site-nav__hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel (slides open below nav bar) */
.site-nav--open .site-nav__list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--theme-palette-background);
  box-shadow: var(--shadow-lg);
  z-index: 900;
  padding: 0;
  gap: 0;
  animation: slideDown var(--transition-slow) ease both;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-nav--open .site-nav__link {
  color: var(--theme-palette-text);
  border-bottom: var(--theme-borders-width) solid var(--theme-palette-divider);
  padding: var(--space-2) var(--space-2);
  font-size: var(--type-scale-base);
}

.site-nav--open .site-nav__link:hover {
  color: var(--theme-palette-primary);
  background-color: var(--theme-palette-primary-subtle);
}

.site-nav--open .site-nav__link[aria-current="page"] {
  color: var(--theme-palette-primary);
  border-left: var(--theme-borders-width-lg) solid var(--theme-palette-primary);
  background-color: var(--theme-palette-primary-subtle);
}

.site-nav--open .site-nav__item:last-child .site-nav__link {
  border-bottom: none;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* Scrolled state — top-bar and brand-bar fade out */
.site-header--scrolled .site-header__top-bar,
.site-header--scrolled .site-header__brand-bar {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  position: absolute;
  width: 100%;
}

.site-header--scrolled .site-nav {
  box-shadow: var(--shadow-md);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: var(--space-3);
  right: var(--space-3);
  z-index: 200;
  width: 44px;
  height: 44px;
  background-color: var(--theme-palette-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--theme-borders-radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition-slow), transform var(--transition-slow), background-color var(--transition-fast);
  pointer-events: none;
}

.back-to-top--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background-color: var(--theme-palette-primary-hover);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--theme-palette-accent);
  outline-offset: 2px;
}

/* --- 4.3 Footer --- */
.site-footer {
  background-color: var(--theme-palette-secondary);
  border-top: none;
  margin-top: auto;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}

.site-footer__main {
  padding: var(--space-6, 2rem) 0;
}

.site-footer__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 1.5rem);
}

.site-footer__col {
  min-width: 0;
}

.site-footer__col--brand {
  /* stacked on mobile, flex: 0 0 240px on tablet+ */
}

.site-footer__portal-name {
  display: block;
  font-size: var(--type-scale-lg, 1.375rem);
  font-weight: var(--font-weight-bold, 700);
  color: #ffffff;
  margin-bottom: var(--space-2, 0.5rem);
}

.site-footer__about {
  margin: 0 0 var(--space-1, 0.25rem) 0;
  line-height: 1.5;
}

.site-footer__location {
  font-style: normal;
  font-size: var(--type-scale-xs, 0.75rem);
}

.site-footer__col-title {
  font-size: var(--type-scale-sm, 0.875rem);
  font-weight: var(--font-weight-semibold, 600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-palette-accent-alt);
  margin: 0 0 var(--space-2, 0.5rem) 0;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1, 0.25rem);
}

.site-footer__links a {
  color: rgba(255, 255, 255, 0.70);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer__bottom {
  background-color: rgba(0, 0, 0, 0.30);
  padding: var(--space-3, 1rem) 0;
}

.site-footer__bottom .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-1, 0.25rem);
  align-items: flex-start;
}

.site-footer__copyright {
  margin: 0;
  font-size: var(--type-scale-xs, 0.75rem);
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__powered {
  font-size: var(--type-scale-xs, 0.75rem);
  opacity: 0.6;
}

.site-footer__powered a {
  color: inherit;
  text-decoration: none;
}

.site-footer__powered a:hover,
.site-footer__powered a:focus {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .site-footer__grid {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .site-footer__col--brand {
    flex: 0 0 240px;
  }

  .site-footer__col:not(.site-footer__col--brand) {
    flex: 1;
  }

  .site-footer__bottom .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1200px) {
  .site-footer .container {
    max-width: 1200px;
  }
}

/* --- 4.4 News card (all variants) --- */
/* (Existing card classes maintained for backward compatibility — see section 5) */

/* Base card — shared elements across all variants */
.news-card {
  position: relative;
}

.news-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.news-card__link:focus-visible {
  outline: 2px solid var(--theme-palette-primary);
  outline-offset: 2px;
}

.news-card__body {
  padding: var(--space-2);
}

.news-card__title {
  font-weight: var(--font-weight-semibold);
  line-height: var(--theme-typography-heading-line-height);
  margin-bottom: var(--space-1);
  transition: color var(--transition-fast);
}

.news-card__summary {
  color: var(--theme-palette-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-1);
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--type-scale-xs);
  color: var(--theme-palette-text-secondary);
}

.news-card__time {
  font-size: var(--type-scale-xs);
  color: var(--theme-palette-text-secondary);
}

.news-card__link:hover .news-card__title {
  color: var(--theme-palette-primary);
}

/* ---- Variant A: Card with image (highlights, related) ---- */
.news-card--image {
  background: var(--theme-palette-surface-raised);
  border-radius: var(--theme-borders-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.news-card--image:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-card--image .news-card__link:focus-visible {
  outline-offset: 0;
}

.news-card--image .news-card__image-wrap {
  position: relative;
  padding-bottom: var(--ratio-card);
  overflow: hidden;
}

.news-card--image .news-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card--image .news-card__category-badge {
  position: absolute;
  bottom: var(--space-1);
  left: var(--space-1);
}

.news-card--image .news-card__body {
  padding: var(--space-2);
}

.news-card--image .news-card__title {
  font-size: var(--type-scale-md);
}

/* ---- Variant B: Horizontal compact card (latest, by-location) ---- */
.news-card--horizontal .news-card__link {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.news-card--horizontal .news-card__thumb-wrap {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: var(--theme-borders-radius);
}

.news-card--horizontal .news-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card--horizontal .news-card__body {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.news-card--horizontal .news-card__title {
  font-size: var(--type-scale-base);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card--horizontal + .news-card--horizontal {
  border-top: var(--theme-borders-width) solid var(--theme-palette-divider);
  padding-top: var(--space-2);
  margin-top: var(--space-2);
}

/* ---- Variant C: Secondary headline card (hero secondary, no image) ---- */
.news-card--secondary-headline .news-card__link {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}

.news-card--secondary-headline .news-card__accent-line {
  flex-shrink: 0;
  width: 3px;
  background-color: var(--theme-palette-primary);
  border-radius: var(--theme-borders-radius-sm);
}

.news-card--secondary-headline .news-card__body {
  padding: 2px var(--space-1);
}

.news-card--secondary-headline .news-card__title {
  font-size: var(--type-scale-md);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 4px;
}

/* ---- Variant D: Breaking / urgent news card ---- */
.news-card--breaking {
  background-color: rgba(229, 57, 53, 0.10); /* --theme-palette-accent at 10% */
  border-left: 4px solid var(--theme-palette-accent);
  border-radius: var(--theme-borders-radius);
  padding: var(--space-2);
}

.news-card--breaking .news-card__link {
  display: block;
}

.news-card--breaking .news-card__body {
  padding: 0;
}

.news-card--breaking .news-card__breaking-label {
  display: inline-block;
  font-size: var(--type-scale-xs);
  font-weight: var(--font-weight-bold);
  color: var(--theme-palette-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.news-card--breaking .news-card__title {
  font-size: var(--type-scale-base);
  color: var(--theme-palette-text);
}

/* --- 4.5 Category badge --- */
.news-category,
.category-badge {
  background-color: var(--theme-palette-primary);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: var(--theme-borders-radius-sm);
  font-size: var(--type-scale-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-block;
}

.category-badge--outline {
  background: transparent;
  border: 1px solid var(--theme-palette-primary);
  color: var(--theme-palette-primary);
}

.category-badge--on-image {
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* --- 4.6 Location badge --- */
.news-location,
.location-badge {
  background-color: var(--theme-palette-surface);
  color: var(--theme-palette-text-secondary);
  padding: 2px 8px 2px 6px;
  border-radius: var(--theme-borders-radius-sm);
  font-size: var(--type-scale-xs);
  border: 1px solid var(--theme-palette-divider);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* --- 4.7 Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--theme-typography-font-family);
  font-size: var(--type-scale-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--theme-borders-radius);
  padding: 10px 20px;
  border: none;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn--primary {
  background: var(--theme-palette-primary);
  color: #ffffff;
  border: none;
}

.btn--primary:hover {
  background: var(--theme-palette-primary-hover);
  text-decoration: none;
  color: #ffffff;
}

.btn--secondary {
  background: transparent;
  color: var(--theme-palette-primary);
  border: 2px solid var(--theme-palette-primary);
}

.btn--secondary:hover {
  background: var(--theme-palette-primary-subtle);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--theme-palette-text-secondary);
  border: 1px solid var(--theme-palette-border);
}

.btn--ghost:hover {
  background: var(--theme-palette-surface);
  text-decoration: none;
}

.btn--sm {
  padding: 6px 12px;
  font-size: var(--type-scale-sm);
}

.btn--lg {
  padding: 14px 28px;
  font-size: var(--type-scale-md);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Report submit (legacy alias) */
.report-submit {
  align-self: flex-start;
  font-family: var(--theme-typography-font-family);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  padding: var(--space-1) var(--space-3);
  background-color: var(--theme-palette-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--theme-borders-radius);
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.report-submit:hover {
  opacity: 0.9;
}

.report-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- 4.8 Tags --- */
.news-tag {
  background-color: var(--theme-palette-surface);
  color: var(--theme-palette-text-secondary);
  padding: 4px 12px;
  border-radius: var(--theme-borders-radius-full);
  font-size: var(--type-scale-sm);
  border: var(--theme-borders-width) solid var(--theme-palette-border);
  display: inline-block;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.news-tag:hover {
  background: var(--theme-palette-primary-subtle);
  color: var(--theme-palette-primary);
  border-color: var(--theme-palette-primary);
  text-decoration: none;
}

/* --- 4.9 Ad slot --- */
.ad-slot {
  min-height: 90px;
  background-color: var(--theme-palette-surface);
  border-radius: var(--theme-borders-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Legacy dashed border variant kept for fallback */
.ad-slot--dashed {
  border: var(--theme-borders-width) dashed var(--theme-palette-border);
}

.ad-slot--banner {
  min-height: 90px;
}

.ad-slot--rectangle {
  min-height: 250px;
}

.ad-slot__label {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: var(--type-scale-xs);
  color: var(--theme-palette-text-disabled);
}

/* --- 4.10 Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-6) 0;
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination__page,
.pagination__prev,
.pagination__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 4px 8px;
  border: var(--theme-borders-width) solid var(--theme-palette-border);
  border-radius: var(--theme-borders-radius);
  font-size: var(--type-scale-sm);
  color: var(--theme-palette-text);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.pagination__page:hover,
.pagination__prev:hover,
.pagination__next:hover {
  background: var(--theme-palette-surface);
  text-decoration: none;
}

.pagination__page--active {
  background: var(--theme-palette-primary);
  color: #ffffff;
  border-color: var(--theme-palette-primary);
}

.pagination__ellipsis {
  padding: 0 4px;
  color: var(--theme-palette-text-secondary);
}


/* ============================================================
   === 5. Blocks ===
   ============================================================ */

/* --- 5.1 Block base (title, empty state) --- */
.site-main {
  flex: 1;
  padding: var(--space-3) 0;
}

.portal-home {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.block {
  padding: var(--space-2) 0;
  border-bottom: var(--theme-borders-width) solid var(--theme-palette-border);
}

.block:last-child {
  border-bottom: none;
}

.block-title {
  font-size: var(--type-scale-lg);
  font-weight: var(--font-weight-bold);
  font-family: var(--theme-typography-heading-font-family);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: var(--theme-borders-width-md) solid var(--theme-palette-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.block-empty {
  color: var(--theme-palette-text-secondary);
  font-style: italic;
}

/* No-blocks fallback */
.no-blocks {
  text-align: center;
  padding: var(--space-6) 0;
}

.no-blocks h2 {
  margin-bottom: var(--space-2);
}

/* --- 5.2 Block: headline --- */
.headline-main {
  margin-bottom: var(--space-3);
}

.headline-link {
  color: inherit;
  text-decoration: none;
}

.headline-link:hover {
  text-decoration: none;
}

.headline-link:hover .headline-title {
  color: var(--theme-palette-primary);
}

.headline-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-1);
  transition: color var(--transition-base);
}

.headline-subtitle {
  font-size: 1.125rem;
  color: var(--theme-palette-text-secondary);
  margin-bottom: var(--space-1);
}

.headline-summary {
  color: var(--theme-palette-text-secondary);
  margin-bottom: var(--space-1);
}

.headline-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--theme-palette-text-secondary);
}

.headline-secondary {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.headline-secondary-item h3 {
  font-size: 1rem;
  margin-bottom: calc(var(--theme-spacing-unit) * 0.5);
}

.headline-secondary-item a {
  color: inherit;
  text-decoration: none;
}

.headline-secondary-item a:hover h3 {
  color: var(--theme-palette-primary);
}

.headline-secondary-item time {
  font-size: 0.8125rem;
  color: var(--theme-palette-text-secondary);
}

/* Headline image overlay (new spec) */
.headline-main__image-wrap {
  position: relative;
  padding-bottom: var(--ratio-hero);
  border-radius: var(--theme-borders-radius-lg);
  overflow: hidden;
  background: var(--theme-palette-text);
}

.headline-main__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.headline-main__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.80) 0%,
    rgba(0,0,0,0.40) 40%,
    transparent 70%
  );
}

.headline-main__text-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-3);
  z-index: 1;
  color: #ffffff;
  max-height: 60%;
  overflow: hidden;
}

.headline-main__title {
  font-size: clamp(1.125rem, 2.4vw, 1.75rem);
  line-height: 1.25;
  margin: 0 0 calc(var(--theme-spacing-unit) * 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.headline-main__subtitle {
  font-size: clamp(0.875rem, 1.4vw, 1rem);
  line-height: 1.4;
  margin: 0 0 calc(var(--theme-spacing-unit) * 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.92;
}

/* --- 5.3 Block: latest --- */
.latest-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.latest-item {
  padding-bottom: var(--space-2);
  border-bottom: var(--theme-borders-width) solid var(--theme-palette-border);
}

.latest-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.latest-link {
  color: inherit;
  text-decoration: none;
}

.latest-link:hover .latest-item-title {
  color: var(--theme-palette-primary);
}

.latest-item-title {
  font-size: 1rem;
  margin-bottom: calc(var(--theme-spacing-unit) * 0.5);
  transition: color var(--transition-base);
}

.latest-item-summary {
  font-size: 0.875rem;
  color: var(--theme-palette-text-secondary);
  margin-bottom: calc(var(--theme-spacing-unit) * 0.5);
}

.latest-item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--theme-palette-text-secondary);
}

/* --- 5.4 Block: by-location --- */
.location-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.location-item {
  padding-bottom: var(--space-2);
  border-bottom: var(--theme-borders-width) solid var(--theme-palette-border);
}

.location-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.location-link {
  color: inherit;
  text-decoration: none;
}

.location-link:hover .location-item-title {
  color: var(--theme-palette-primary);
}

.location-item-title {
  font-size: 1rem;
  margin-bottom: calc(var(--theme-spacing-unit) * 0.5);
  transition: color var(--transition-base);
}

.location-item-summary {
  font-size: 0.875rem;
  color: var(--theme-palette-text-secondary);
  margin-bottom: calc(var(--theme-spacing-unit) * 0.5);
}

.location-item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--theme-palette-text-secondary);
}

/* --- 5.5 Block: highlights --- */
.highlights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.highlights-card {
  background-color: var(--theme-palette-surface-raised);
  border-radius: var(--theme-borders-radius);
  overflow: hidden;
  border: var(--theme-borders-width) solid var(--theme-palette-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.highlights-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.highlights-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: var(--space-2);
}

.highlights-card-title {
  font-size: 1rem;
  margin-bottom: var(--space-1);
}

.highlights-link:hover .highlights-card-title {
  color: var(--theme-palette-primary);
}

.highlights-card-summary {
  font-size: 0.875rem;
  color: var(--theme-palette-text-secondary);
  margin-bottom: var(--space-1);
}

.highlights-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.8125rem;
  color: var(--theme-palette-text-secondary);
}


/* --- 5.6 Block grids (unified card system) --- */

/* headline-grid: hero full-width on mobile, side-by-side on tablet+ */
.headline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

/* headline-secondary reuses existing flex column from legacy styles */

/* latest-grid: single col mobile, 2 cols tablet+ */
.latest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* location-grid: single col mobile, 2 cols tablet+ */
.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* block-by-location: visual distinction from other blocks */
.block-by-location {
  background-color: var(--theme-palette-surface-raised);
  border-radius: var(--theme-borders-radius);
  padding: var(--space-3);
  border-bottom: none;
}

/* highlights-grid--featured: first item spans full width when 5+ items */
.highlights-grid--featured .news-card:first-child {
  grid-column: 1 / -1;
}

/* ============================================================
   === 6. Pages ===
   ============================================================ */

/* --- 6.1 Home page --- */
/* (portal-home block structure defined in section 5) */

/* --- 6.2 Article page --- */
.article-page { max-width: 100%; }

/* Breadcrumb */
.breadcrumb { font-size: var(--type-scale-sm); color: var(--theme-palette-text-secondary); margin-bottom: var(--space-3); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.breadcrumb a { color: var(--theme-palette-text-secondary); }
.breadcrumb a:hover { color: var(--theme-palette-primary); text-decoration: none; }
.breadcrumb__sep { color: var(--theme-palette-text-disabled); }
.breadcrumb__current { color: var(--theme-palette-text); }

/* Article layout (single col mobile, 2-col on desktop) */
.article-layout { display: block; }
.article-content { max-width: 100%; }

/* Article header */
.article-header { margin-bottom: var(--space-4); }
.article-header .category-badge { display: inline-block; margin-bottom: var(--space-2); }
.article-header__title { font-family: var(--theme-typography-heading-font-family); font-size: var(--type-scale-xl); font-weight: var(--font-weight-black); line-height: var(--theme-typography-tight-line-height); margin-bottom: var(--space-2); }
.article-header__subtitle { font-size: var(--type-scale-md); color: var(--theme-palette-text-secondary); line-height: 1.5; margin-bottom: var(--space-2); }
.article-header__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--type-scale-sm); color: var(--theme-palette-text-secondary); padding-bottom: var(--space-3); border-bottom: 1px solid var(--theme-palette-divider); }
.article-header__reading-time { display: flex; align-items: center; gap: 4px; }

/* Hero image */
.article-hero { margin: 0 calc(var(--space-2) * -1) var(--space-4); }
.article-videos { margin: var(--space-4) 0; }
.article-videos__title { font-size: 1.25rem; margin-bottom: var(--space-2); }
.article-videos__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 768px) { .article-videos__grid { grid-template-columns: repeat(2, 1fr); } }
.article-videos__item { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--theme-borders-radius-lg); background: #000; }
.article-videos__item iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.article-hero__image-wrap { position: relative; padding-bottom: var(--ratio-hero); overflow: hidden; border-radius: var(--theme-borders-radius-lg); max-height: 480px; }
.article-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.article-hero__ai-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.article-hero__caption {
  font-size: 0.8125rem;
  color: var(--theme-colors-secondary, #64748b);
  margin-top: var(--space-1);
  font-style: italic;
}

/* Article body typography (spec 4.4) */
.article-body { max-width: 680px; margin: 0 auto var(--space-6); font-size: var(--type-scale-base); line-height: var(--theme-typography-line-height); }
.article-body p { margin-bottom: var(--space-2); }
.article-body h2 { font-family: var(--theme-typography-heading-font-family); font-size: var(--type-scale-xl); font-weight: var(--font-weight-bold); margin-top: var(--space-6); margin-bottom: var(--space-2); }
.article-body h3 { font-family: var(--theme-typography-heading-font-family); font-size: var(--type-scale-lg); font-weight: var(--font-weight-semibold); margin-top: var(--space-4); margin-bottom: var(--space-2); }
.article-body blockquote { border-left: 4px solid var(--theme-palette-primary); padding-left: var(--space-3); margin: var(--space-4) 0; font-size: var(--type-scale-md); color: var(--theme-palette-text-secondary); font-style: italic; }
.article-body ul, .article-body ol { padding-left: var(--space-4); margin-bottom: var(--space-2); list-style: revert; }
.article-body li { margin-bottom: var(--space-1); }
.article-body a { color: var(--theme-palette-primary); text-decoration: underline; text-decoration-thickness: 1px; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--theme-borders-radius-lg); display: block; margin: var(--space-4) auto; }
.article-body figure { margin: var(--space-4) 0; }
.article-body figcaption { font-size: var(--type-scale-sm); color: var(--theme-palette-text-secondary); text-align: center; margin-top: var(--space-1); }
.article-body code { font-family: monospace; background: var(--theme-palette-surface); padding: 2px 4px; border-radius: var(--theme-borders-radius-sm); font-size: var(--type-scale-sm); }
.article-body hr { border: none; border-top: 1px solid var(--theme-palette-divider); margin: var(--space-6) 0; }

/* Share section */
.article-share { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--theme-palette-divider); border-bottom: 1px solid var(--theme-palette-divider); }
.article-share__label { font-size: var(--type-scale-sm); font-weight: var(--font-weight-medium); color: var(--theme-palette-text-secondary); }
.article-share__buttons { display: flex; gap: var(--space-1); }
.share-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--theme-borders-radius-full); border: none; cursor: pointer; transition: transform var(--transition-spring); flex-shrink: 0; }
.share-btn:hover { transform: scale(1.1); }
.share-btn--whatsapp { background: #25D366; color: #ffffff; text-decoration: none; }
.share-btn--copy { background: var(--theme-palette-surface); color: var(--theme-palette-text-secondary); border: 1px solid var(--theme-palette-border); }

/* Tags section */
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin-bottom: var(--space-4); padding-top: var(--space-3); }
.article-tags__label { font-size: var(--type-scale-sm); font-weight: var(--font-weight-medium); color: var(--theme-palette-text-secondary); margin-right: var(--space-1); }
.article-tags__list { display: flex; flex-wrap: wrap; gap: var(--space-1); }

/* Sources section */
.article-sources { background: var(--theme-palette-surface); border-left: 3px solid var(--theme-palette-primary); border-radius: 0 var(--theme-borders-radius-lg) var(--theme-borders-radius-lg) 0; padding: var(--space-3); margin-bottom: var(--space-4); }
.article-sources__title { font-size: var(--type-scale-md); font-weight: var(--font-weight-semibold); margin-bottom: var(--space-2); }
.article-sources__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.article-sources__item { font-size: var(--type-scale-sm); }
.article-sources__item a { color: var(--theme-palette-primary); display: inline-flex; align-items: center; gap: 4px; }
.article-sources__item a:hover { text-decoration: underline; }
.article-sources__external-icon { flex-shrink: 0; }

/* Related news section */
.article-related { margin-bottom: var(--space-6); }
.article-related__title { font-size: var(--type-scale-lg); font-weight: var(--font-weight-bold); margin-bottom: var(--space-3); padding-left: var(--space-2); border-left: 3px solid var(--theme-palette-primary); }
.article-related__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }

/* Report form (collapsible details) */
.article-report { margin-top: var(--space-4); border-top: 1px solid var(--theme-palette-divider); padding-top: var(--space-3); }
.article-report__summary { font-size: var(--type-scale-sm); color: var(--theme-palette-text-secondary); cursor: pointer; padding: var(--space-1) 0; list-style: none; }
.article-report__summary::-webkit-details-marker { display: none; }
.article-report__summary:hover { color: var(--theme-palette-primary); }
.article-report[open] .report-form { margin-top: var(--space-3); }

/* Sidebar (desktop only) */
.article-sidebar { display: none; }

/* --- 6.2 Report Form (shared with article-report) --- */
.news-report {
  border-top: var(--theme-borders-width) solid var(--theme-palette-border);
  padding-top: var(--space-3);
  margin-top: var(--space-4);
}

.news-report-title {
  font-size: 1.125rem;
  margin-bottom: var(--space-2);
}

/* Legacy article classes — kept for backward compatibility */
.news-article { max-width: 800px; }
.news-header { margin-bottom: var(--space-3); }
.news-header .news-category { display: inline-block; margin-bottom: calc(var(--theme-spacing-unit) * 1.5); }
.news-title { font-size: 1.5rem; margin-bottom: var(--space-1); }
.news-subtitle { font-size: 1.125rem; color: var(--theme-palette-text-secondary); margin-bottom: calc(var(--theme-spacing-unit) * 1.5); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 0.875rem; color: var(--theme-palette-text-secondary); }
.news-image { margin-bottom: var(--space-3); }
.news-image img { width: 100%; height: auto; border-radius: var(--theme-borders-radius); display: block; }
.news-body { margin-bottom: var(--space-4); line-height: var(--theme-typography-line-height); }
.news-body p { margin-bottom: var(--space-2); }
.news-body h2, .news-body h3 { margin-top: var(--space-3); margin-bottom: calc(var(--theme-spacing-unit) * 1.5); }
.news-body img { max-width: 100%; height: auto; border-radius: var(--theme-borders-radius); }
.news-body blockquote { border-left: var(--theme-borders-width-lg) solid var(--theme-palette-primary); padding-left: var(--space-2); margin: var(--space-2) 0; color: var(--theme-palette-text-secondary); font-style: italic; }
.news-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-4); }
.news-sources { padding: var(--space-3); background-color: var(--theme-palette-surface); border-left: var(--theme-borders-width-lg) solid var(--theme-palette-primary); border-radius: 0 var(--theme-borders-radius-lg) var(--theme-borders-radius-lg) 0; margin-bottom: var(--space-4); }
.news-sources-title { font-size: 1.125rem; margin-bottom: var(--space-2); }
.news-sources-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-1); }
.news-source-item { font-size: 0.875rem; padding-bottom: var(--space-1); border-bottom: var(--theme-borders-width) solid var(--theme-palette-border); }
.news-source-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-source-detail { color: var(--theme-palette-text-secondary); font-size: 0.8125rem; }
.news-related { border-top: var(--theme-borders-width) solid var(--theme-palette-border); padding-top: var(--space-3); }
.news-related-title { font-size: 1.25rem; margin-bottom: var(--space-2); }
.news-related-list { display: flex; flex-direction: column; gap: var(--space-2); }
.news-related-item { display: block; color: inherit; text-decoration: none; padding: var(--space-2); background-color: var(--theme-palette-surface); border-radius: var(--theme-borders-radius); border: var(--theme-borders-width) solid var(--theme-palette-border); box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-base); }
.news-related-item:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.news-related-item-title { font-size: 1rem; margin-bottom: calc(var(--theme-spacing-unit) * 0.5); }
.news-related-item-summary { font-size: 0.875rem; color: var(--theme-palette-text-secondary); margin-bottom: var(--space-1); }
.news-related-item-meta { display: flex; align-items: center; gap: var(--space-1); font-size: 0.8125rem; color: var(--theme-palette-text-secondary); }

.report-form {
  display: flex;
  flex-direction: column;
  gap: calc(var(--theme-spacing-unit) * 1.5);
  max-width: 480px;
}

.report-label {
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  color: var(--theme-palette-text);
}

.report-select,
.report-textarea {
  font-family: var(--theme-typography-font-family);
  font-size: 0.875rem;
  padding: var(--space-1) calc(var(--theme-spacing-unit) * 1.5);
  border: var(--theme-borders-width) solid var(--theme-palette-border);
  border-radius: var(--theme-borders-radius);
  background-color: var(--theme-palette-background);
  color: var(--theme-palette-text);
  width: 100%;
}

.report-select:focus,
.report-textarea:focus {
  outline: 2px solid var(--theme-palette-primary);
  outline-offset: 1px;
  border-color: var(--theme-palette-primary);
}

.report-textarea {
  resize: vertical;
  min-height: 60px;
}

.report-feedback {
  font-size: 0.875rem;
  min-height: 1.25em;
}

.report-feedback--success {
  color: var(--theme-palette-success);
}

.report-feedback--error {
  color: var(--theme-palette-error);
}

/* --- 6.3 Category page --- */
.page-category { }

.category-header { background: var(--theme-palette-surface); padding: var(--space-4) 0 var(--space-6); margin-bottom: var(--space-4); }
.category-header__name { font-family: var(--theme-typography-heading-font-family); font-size: var(--type-scale-2xl); font-weight: var(--font-weight-black); margin-bottom: var(--space-2); }
.category-header__accent { width: 48px; height: 3px; background: var(--theme-palette-primary); margin-bottom: var(--space-2); }
.category-header__count { font-size: var(--type-scale-sm); color: var(--theme-palette-text-secondary); }

.category-layout { display: block; }
.category-main { }

.category-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin-bottom: var(--space-6); }

.category-empty { text-align: center; padding: var(--space-8) 0; }
.category-empty p { margin-bottom: var(--space-3); color: var(--theme-palette-text-secondary); }

.category-sidebar { display: none; }


/* ============================================================
   === 7. Utilities ===
   ============================================================ */

/* --- 7.1 Visually hidden --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- 7.2 Line clamp --- */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* --- 7.3 Image aspect ratio wraps --- */
.img-wrap {
  position: relative;
  padding-bottom: var(--ratio-hero); /* default: 16:9 */
  overflow: hidden;
}

.img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-wrap--hero {
  padding-bottom: var(--ratio-hero);
}

.img-wrap--card {
  padding-bottom: var(--ratio-card);
}

.img-wrap--thumbnail {
  padding-bottom: var(--ratio-thumbnail);
}

.img-wrap--square {
  padding-bottom: var(--ratio-square);
}

.img-wrap--wide {
  padding-bottom: var(--ratio-wide);
}


/* ============================================================
   === 8. Responsive ===
   ============================================================ */

/* --- 8.1 Tablet (768px+) --- */
@media (min-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.375rem; }

  .site-title {
    font-size: 1.75rem;
  }

  .container {
    padding: 0 var(--space-3);
  }

  /* Header: show top-bar, taller brand-bar, inline nav */
  .site-header__top-bar {
    display: block;
  }

  .site-header__brand-bar .container {
    min-height: 72px;
  }

  .site-logo__name {
    font-size: var(--type-scale-2xl);
  }

  /* Show nav list inline, hide hamburger */
  .site-nav__list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
  }

  .site-nav__hamburger {
    display: none;
  }

  /* Override mobile-open panel styles to stay horizontal on tablet+ */
  .site-nav--open .site-nav__list {
    position: static;
    flex-direction: row;
    align-items: center;
    background-color: transparent;
    box-shadow: none;
    animation: none;
    gap: var(--space-3);
    padding: 0;
  }

  .site-nav--open .site-nav__link {
    color: rgba(255, 255, 255, 0.90);
    border-bottom: 2px solid transparent;
    padding: var(--space-1) 0;
    font-size: var(--type-scale-sm);
  }

  .site-nav--open .site-nav__link:hover {
    color: #ffffff;
    background-color: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.60);
  }

  .site-nav--open .site-nav__link[aria-current="page"] {
    color: #ffffff;
    border-left: none;
    border-bottom-color: #ffffff;
    background-color: transparent;
  }

  .site-nav--open .site-nav__item:last-child .site-nav__link {
    border-bottom: 2px solid transparent;
  }

  .headline-title {
    font-size: 1.75rem;
  }

  .headline-grid {
    grid-template-columns: 8fr 4fr;
  }

  .headline-secondary {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .headline-secondary-item {
    flex: 1 1 calc(50% - var(--theme-spacing-unit) * 2);
  }

  .latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .location-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-title {
    font-size: 1.75rem;
  }

  .news-related-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .news-related-item {
    flex: 1 1 calc(50% - var(--theme-spacing-unit) * 2);
  }

  /* Article page — tablet */
  .article-header__title { font-size: var(--type-scale-2xl); }
  .article-hero { margin: 0 0 var(--space-4); border-radius: var(--theme-borders-radius-lg); overflow: hidden; }
  .article-related__grid { grid-template-columns: repeat(2, 1fr); }

  /* Category page — tablet */
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- 8.2 Desktop (1024px+) --- */
@media (min-width: 1024px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 2rem; }

  .site-title {
    font-size: 2rem;
  }

  /* Header: taller brand-bar, wider nav spacing */
  .site-header__brand-bar .container {
    min-height: 80px;
  }

  .site-logo__name {
    font-size: var(--type-scale-2xl);
  }

  .site-nav__list {
    gap: var(--space-4);
  }

  .site-nav--open .site-nav__list {
    gap: var(--space-4);
  }

  .headline-title {
    font-size: 2rem;
  }

  .headline-secondary-item {
    flex: 1 1 calc(33.333% - var(--theme-spacing-unit) * 2);
  }

  .latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .location-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlights-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .news-title {
    font-size: 2rem;
  }

  .news-related-item {
    flex: 1 1 calc(33.333% - var(--theme-spacing-unit) * 2);
  }

  /* Article page — desktop */
  .article-layout { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-6); }
  .article-sidebar { display: block; position: sticky; top: 80px; align-self: start; }
  .article-related__grid { grid-template-columns: repeat(3, 1fr); }

  /* Category page — desktop */
  .category-layout { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-6); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .category-sidebar { display: block; position: sticky; top: 80px; align-self: start; }
}

/* --- 8.3 Wide (1280px+) --- */
@media (min-width: 1280px) {
  .container {
    max-width: 1440px;
  }
}


/* ============================================================
   === 9. Print ===
   ============================================================ */

@media print {
  .site-header,
  .site-nav,
  .site-footer,
  .ad-slot,
  .article-share,
  .article-report,
  .article-related,
  .article-tags,
  .article-sidebar,
  .back-to-top,
  .news-report,
  .news-related,
  .news-tags {
    display: none !important;
  }

  .article-body {
    max-width: 100%;
    font-size: 12pt;
    line-height: 1.5;
  }

  .article-header__title,
  .news-title {
    font-size: 20pt;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 9pt;
  }

  .article-hero {
    break-after: avoid;
  }

  body {
    background: white;
    color: black;
  }
}


/* ============================================================
   === 10. Dark mode ===
   ============================================================ */

[data-theme="dark"] {
  --theme-palette-background:     #0F1117;
  --theme-palette-surface:        #1A1F2E;
  --theme-palette-surface-raised: #242B3D;
  --theme-palette-divider:        #2D3748;
  --theme-palette-text:           #E8ECF4;
  --theme-palette-text-secondary: #94A3B8;
  --theme-palette-border:         #2D3748;
  --theme-palette-primary-subtle: #1A2744;
  /* primary, accent e secondary mantêm os mesmos valores */
}


/* ============================================================
   === 11. Reduced motion ===
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .site-header {
    transition: none;
  }

  .news-card,
  .highlights-card,
  .news-related-item {
    transform: none !important;
  }
}
