/* =========================
   THEME.CSS — PORTAL ANA (FINAL LIMPO)
   ========================= */

:root{
  --ana-azul-escuro:#1C3782;
  --ana-azul:#0093DD;
  --ana-azul-claro:#80B4E0;

  --layout-max: 980px;
  --content-max: 900px;

  --bg:#f5f7fb;
  --text:#1f2a44;
  --muted:#4a5a78;
  --muted-2:#61708c;

  --radius:18px;
  --shadow-sm:0 10px 30px rgba(0,0,0,.06);
  --shadow-lg:0 24px 60px rgba(0,0,0,.20);
}

/* =========================
   Base
   ========================= */
html, body{
  height:100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
html{ scroll-behavior:smooth; } /* âncoras com scroll suave */

body{
  margin:0;
  font-family:"Outfit", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(128,180,224,.25), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(0,147,221,.18), transparent 60%),
    var(--bg);
  color:var(--text);
}

a{ color:inherit; }
a:hover{ text-decoration:none; }

/* Remove cabeçalho padrão do RMarkdown (título/autor/data) */
h1.title, h2.subtitle, p.author, p.date,
p.author_name, p.author_affiliation,
div.author, div.date{
  display:none !important;
}

/* Container principal (desktop) */
.main-container{
  max-width: var(--layout-max) !important;
  width: 100%;
  margin: 0 auto;
}

/* =========================
   TOPNAV (navbar.html)
   ========================= */
.topnav{
  position: sticky;
  top: 0;
  z-index: 9999;

  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;

  background: linear-gradient(90deg, rgba(15, 47, 114, .95), rgba(0, 118, 186, .92));
  color: #fff;
  backdrop-filter: blur(4px);

  padding: 12px calc((100% - var(--layout-max)) / 2 + 18px);
  border-bottom: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 24px rgba(9, 36, 92, .28);
}

/* Brand */
.topnav .brand{
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content: center;
  gap: 6px;

  text-decoration:none;
  color:#fff;
  font-weight: 700;
  letter-spacing: -0.01em;
  min-width: 260px;
}

.topnav .brand img{
  height: 34px;
  width: auto;
  display:block;
}

.topnav .brand span{
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  max-width: 320px;
}

/* Links (desktop) */
.topnav .nav-links{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.topnav .nav-links a{
  color:#fff;
  text-decoration:none;
  font-weight: 700;
  font-size: 14px;

  padding: 10px 12px;
  border-radius: 12px;

  opacity: .96;
  transition: background .15s ease, opacity .15s ease, transform .15s ease;
}

.topnav .nav-links a:hover{
  background: rgba(255,255,255,.14);
  opacity: 1;
  transform: translateY(-1px);
}

.topnav .nav-links a.is-active,
.topnav .nav-links a[aria-current="page"]{
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
  opacity: 1;
}

/* Toggle */
.nav-toggle{ display:none; }

.nav-burger{
  display:none;
  cursor:pointer;
  padding: 8px 10px;
  border-radius: 12px;
}

.nav-burger span{
  display:block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background:#fff;
  border-radius: 3px;
}

/* =========================
   Hero com imagem
   ========================= */
.hero{
  position:relative;
  isolation: isolate;
  margin-top:0;
  border-radius:0;
  overflow:hidden;
  min-height:420px;

 /* background: url("../img/hero_agua_2560x800_overlay.jpg") center / cover no-repeat;*/
  background: url("../img/hero-background.svg") center / cover no-repeat;
  display:flex;
  align-items:center;
  justify-content:center;

  width: 100%;
  margin-left:0;
  margin-right:0;

  box-shadow: 0 22px 50px rgba(28,55,130,.20);
}

.hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 34, 74, 0.42);
  z-index: 0;
}

.hero-content{
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  padding: 84px 28px;
  text-align:center;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
  margin: 0 auto;
}

.hero h1{
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.hero .section-head h2{
  color: #ffffff;
}

.hero p{
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.55;
  margin: 0 auto;
  max-width: 820px;
  opacity: 0.95;
}

.hero .meta{
  margin-top:22px;
  font-size:14px;
  opacity:.85;
  letter-spacing:.02em;
}

/* CTA */
a.cta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration:none;
  font-weight: 700;
  color:#ffffff;
  background: linear-gradient(135deg, var(--ana-azul-escuro), var(--ana-azul));
  box-shadow: 0 12px 26px rgba(28,55,130,.25);
}
a.cta:hover{ filter: brightness(1.03); }

a.cta.cta--ghost{
  background: transparent !important;
  color: var(--ana-azul-escuro) !important;
  border: 1px solid rgba(28,55,130,.35);
  box-shadow: none !important;
}

/* =========================
   Seções e painéis
   ========================= */
.section{
  max-width: var(--content-max);
  margin-left:auto !important;
  margin-right:auto !important;
  text-align:center;
  padding-left: 24px;
  padding-right: 24px;
}

.section-head h2{
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.01em;
}
.section-head h2:empty{
  display: none;
}
.section-head p{
  margin: 0 0 18px;
  color: var(--muted);
}

/* leitura confortável: título central / texto alinhado à esquerda */
.section p,
.panel p{
  text-align:left;
}

.section h2,
.panel h3{
  text-align:center;
}

.footnote{
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted-2);
  margin-top: 8px;
}

.grid-2{
  max-width: var(--content-max);
  margin-left:auto;
  margin-right:auto;
  padding-left: 24px;
  padding-right: 24px;

  display:grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.panel{
  background:#ffffff;
  border:1px solid rgba(28,55,130,.12);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.panel h3{
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.panel p{
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* Painel técnico (texto longo + figura) */
.panel--wide{
  max-width: var(--content-max);
  margin-left:auto;
  margin-right:auto;
  padding-left: 24px;
  padding-right: 24px;
}
.panel--wide h3{
  font-size: 22px;
  margin-bottom: 16px;
}
.panel--wide p{
  line-height: 1.65;
  margin-bottom: 14px;
}

/* =========================
   Box interpretativo (reutilizável)
   ========================= */
.panel--interpretative{
  position: relative;
  padding: 18px 20px;
}

.panel--interpretative h4{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
}

.panel--interpretative p{
  margin: 0 0 10px;
  line-height: 1.55;
}

.panel--interpretative p:last-child{
  margin-bottom: 0;
}

/* Barra lateral suave (institucional) */
.panel--interpretative::before{
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 6px;
  border-radius: 6px;
  background: rgba(0, 88, 153, .35); /* ajuste se tiver variável ANA */
}

/* (Opcional) leve fundo diferenciado */
.panel--interpretative{
  background: rgba(0, 88, 153, .04);
}

/* =========================
   Charts 
   ========================= */

.chart-block{
  margin: 28px 0 44px;
}

.chart-block + .chart-block{
  margin-top: 56px;
}

.chart-block .dygraph{
  margin: 0 auto 12px auto;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15,23,42,.06);
  background: #ffffff;
  padding: 16px;
}

.chart-block h3{
  margin: 0 0 10px;
}

.chart-block .dygraph{
  width: 100%;
}

/* Figura dentro do painel */
.panel-figure{
  margin: 22px 0 26px;
  text-align:center;
}
.panel-figure img{
  max-width:100%;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(28,55,130,.18);
}
.panel-figure figcaption{
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted-2);
}

/* Listas do painel */
.panel-list{
  padding-left: 20px;
  margin: 12px 0 18px;
}
.panel-list li{
  margin-bottom: 10px;
  line-height: 1.55;
  color: var(--muted);
  text-align:left;
}

/* Enquadramento cards */
.eq-card{
  position: relative;
  padding-left: 98px;
}

/* Header: ícone + título */
.eq-card__header{
  display: flex;
  align-items: left;
  gap: 14px;
  margin-bottom: 2px;
}

.eq-card__header{
  margin-bottom: -14px;
  text-align: left;
}

.eq-card::before{
  content:"";
  position:absolute;
  left:0;
  top:18px;
  bottom:18px;
  width: 6px;
  border-radius: 6px;
  background: var(--ana-azul-escuro);
}
.eq-especial::before{ background:#1D4ED8; }
.eq-c1::before{ background:#22C55E; }
.eq-c2::before{ background:#F59E0B; }
.eq-c3::before{ background:#F97316; }
.eq-c4::before{ background:#EF4444; }
.eq-od::before{ background:#0093DD; }
.eq-dbo::before{ background:#1C3782; }
.eq-fosforo::before{ background:#22C55E; }
.eq-iqa::before{ background:#F59E0B; }
.eq-od::before{ background: #0B6FAE; }
.eq-dbo::before{ background: #1F8A70; }
.eq-pt::before{ background: #8A5A00; }
.eq-iqa::before{ background: #6B4EFF; }

.eq-card .eq-icon{
  position: absolute;
  left: 13px;     /* entre a barra e o texto */
  top: 16px;
  bottom: 16px;

  width: 77px;
  height: auto;

  object-fit: contain;
}

/* Ícone consistente (não “estoura” layout)
.eq-icon{
  width: 48px;
  height: 72px;
  flex: 0 0 48px;
  object-fit: contain;
} */

/* .eq-icon{
  position: absolute;
  left: 18px;             
  top: 16px;
  bottom: 16px;

  width: 42px;
  height: auto;

  display: flex;
  align-items: center;

  object-fit: contain;
} 

/* Tipografia */
.eq-title{
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  color: #0A2540;
}

.eq-text{
  margin: 0;
  color: #3B4A5A;
  line-height: 1.45;
  max-width: 75ch; /* melhora leitura */
}

/* Hover sutil */
.eq-card:hover{
  border-color: rgba(12, 74, 110, .20);
  box-shadow: 0 14px 34px rgba(0,0,0,.08);
}

/* =========================
   CTA box (faixa de chamada)
   ========================= */
.section--cta{
  width: 100%;
  background: transparent;
  border: 0;
  padding: 18px 0 0;
}

.section--cta .cta-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;

  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.84));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(28,55,130,.22);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 18px 40px rgba(28,55,130,.18);
  position: relative;
  overflow: hidden;

  max-width: var(--content-max);
  margin-left:auto;
  margin-right:auto;
}

.section--cta .cta-box::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(240px 140px at 12% 0%, rgba(128,180,224,.35), transparent 60%),
    radial-gradient(220px 120px at 85% 10%, rgba(0,147,221,.25), transparent 60%);
  pointer-events: none;
}

.section--cta .cta-box::after{
  content: "";
  position: absolute;
  right: 26px;
  top: 20px;
  width: 72px;
  height: 72px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .75;
  pointer-events: none;
}

.section--cta .cta-box h2{
  margin:0 0 6px;
  font-size: 28px;
  letter-spacing: -0.01em;
}

.section--cta .cta-box p{
  margin:0;
  color: var(--muted);
  font-size: 15px;
}

.cta-actions{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section--cta .cta-actions a.cta{
  padding: 10px 16px;
  font-size: 14px;
  letter-spacing: .01em;
  border-radius: 12px;
}

.section--cta .cta-actions a.cta.cta--ghost{
  background: rgba(255,255,255,.75) !important;
}

/* =========================
   Leaflet (mapas)
   ========================= */
.leaflet-container{
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: 0 14px 36px rgba(28,55,130,.14);
  margin: 12px 0 18px;
  min-height: 520px;
}

.legend-media,
.legend-nc{
  background: rgba(255,255,255,.92) !important;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  padding: 8px 10px !important;
  text-align: left;
}

.legend-media{
  margin-top: 46px;
}

.legend-nc{
  margin-top: 122px;
}

.legend-media i,
.legend-nc i{
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-right: 6px;
  opacity: 1;
}

/* Leaflet dentro do painel */
.panel .leaflet-container{
  width: 100% !important;
  max-width: 100%;
  margin: 20px auto 24px auto;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.12);
}

/* =========================
   Rodapé (refinado)
   ========================= */
.footer{
  margin-top: 64px;
  background: linear-gradient(90deg, var(--ana-azul-escuro), var(--ana-azul));
  color: #ffffff;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.footer a,
.footer a:visited{
  color:#ffffff;
}

.footer a:hover{
  opacity: .95;
}

.footer-container{
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 36px max(20px, calc((100% - var(--layout-max)) / 2 + 24px)) 20px;
}

.section--cta .cta-box{
  padding-left: 24px;
  padding-right: 24px;
}

.footer-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  margin-bottom: 18px;
}

.footer-brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 320px;
}

.footer-brand img{
  height: 32px;
  width: auto;
  object-fit: contain;
  display:block;
}

.footer-logo{
  width: 40px;
  height: 40px;
  object-fit: contain;
  display:block;
}

.footer-org{
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.footer-gov{
  margin-top: 2px;
  font-size: 13px;
  opacity: .85;
}

.footer-links{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a{
  color:#ffffff;
  text-decoration:none;
  font-weight: 600;
  opacity: .88;
  padding: 6px 10px;
  border-radius: 10px;
}

.footer-links a:hover{
  opacity: 1;
  background: rgba(255,255,255,.10);
}

.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 26px;
}

.footer-col h4{
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .92;
}

.footer-col p{
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  opacity: .88;
}

.footer-col ul{
  list-style:none;
  padding:0;
  margin:0;
}

.footer-col li{
  font-size: 14px;
  line-height: 1.55;
  opacity: .88;
  margin-bottom: 8px;
}

.footer-mail{
  display:inline-block;
  color:#ffffff;
  font-weight: 700;
  text-decoration:none;
  border-bottom: 1px dotted rgba(255,255,255,.65);
  padding-bottom: 1px;
}
.footer-mail:hover{
  border-bottom-style: solid;
}

.footer-bottom{
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.14);
}

.footer-bottom p{
  margin: 0;
  font-size: 12.5px;
  opacity: .85;
}

/* =========================
   Responsivo (consolidado)
   ========================= */

@media (max-width: 1020px){
  .topnav{
    padding: 12px 18px;
  }
}

/* Tablet e abaixo */
@media (max-width: 900px){
  .topnav{ padding: 10px 14px; }
  .nav-burger{ display:block; }
  .topnav .brand span{ font-size: 14px; }

  .topnav .nav-links{
    position:absolute;
    left:0;
    right:0;
    top:64px;

    display:none;
    flex-direction:column;
    align-items:flex-start;

    width:100%;
    background: rgba(14, 42, 103, .98);
    padding: 10px 14px 14px;

    border-top: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
  }

  .topnav .nav-links a{
    width:100%;
    padding: 12px 12px;
  }

  .nav-toggle:checked ~ .nav-links{ display:flex; }

  .section--cta .cta-box{
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid{ grid-template-columns: 1fr; }
  .footer-top{
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-brand{ min-width: 0; }
}

/* Mobile */
@media (max-width: 768px){
  .main-container{
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* topnav: largura + tipografia */
  .topnav{
    width: 100%;
    padding: 10px 12px;
  }

  .topnav .brand{
    min-width: 0;
    gap: 6px;
  }

  .topnav .brand img{ height: 28px; }

  .topnav .brand span{
    font-size: 10px;
    line-height: 1.2;
    max-width: 180px;
  }

  .topnav .nav-links{
    left: 0;
    right: 0;
    width: 100%;
  }

  /* hero: full-width */
  .hero{
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;

    border-radius: 0;
    min-height: 300px;
  /*   background-image: url("../img/hero-background.svg");*/
 background-image: url("../img/hero-background.svg");
    background-size: cover;
    background-position: 62% center;
  }

  .hero::before{
    background: rgba(8, 34, 74, 0.55);
  }

  .hero-content{ padding: 36px 16px; }

  .hero h1{
    font-size: 24px;
    line-height: 1.18;
    margin-bottom: 10px;
  }

  .hero .section-head h2{
    font-size: 20px;
    line-height: 1.28;
    margin: 0 auto;
    max-width: 34ch;
  }
  .hero p{ font-size: 15px; }
  .hero .meta{ font-size: 12px; }

  .leaflet-container{ min-height: 420px; }

  .footer-container{
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* =========================
   Quadro resumo – Cards (Enquadramento x Indicadores)
   ========================= */

.qa-grid{
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

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

@media (max-width: 900px){
  .qa-grid--4{ grid-template-columns: 1fr; }
}

.qa-card{
  position: relative;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  overflow: hidden;
}

.qa-card__head{
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, rgba(0,88,153,.08), rgba(0,88,153,0));
  text-align: center;
  
}

.qa-card__title{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.qa-card__title .eq-icon{
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 28px;
}

.qa-card__title h4{
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  text-align: left;
}

.qa-sub{
  margin: 0;
  font-size: 13px;
  opacity: .75;
}

.qa-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  background: rgba(0,88,153,.10);
  color: #0b3d66;
  border: 1px solid rgba(0,88,153,.18);
}

.qa-card__body{
  padding: 12px 16px 16px;
  text-align: left;
}

.qa-row{
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed rgba(0,0,0,.10);
}

.qa-row:first-child{
  border-top: none;
  padding-top: 0;
}

@media (max-width: 520px){
  .qa-row{ grid-template-columns: 1fr; }
}

.qa-label{
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  opacity: .70;
}

.qa-text{
  font-size: 14px;
  line-height: 1.55;
}

.qa-bullets{
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
}

.qa-bullets li{ margin: 4px 0; }

/* Barra lateral colorida por indicador */
.qa-card::before{
  content:"";
  position:absolute;
  left:0;
  top:12px;
  bottom:12px;
  width: 6px;
  border-radius: 999px;
  background: rgba(0,88,153,.35);
}

/* Cores por indicador (ajuste livre) */
.qa-card--od::before{  background: rgba(0, 153, 204, .60); }
.qa-card--dbo::before{ background: rgba(255, 140, 0, .65); }
.qa-card--p::before{   background: rgba(140, 70, 190, .65); }
.qa-card--iqa::before{ background: rgba(0, 160, 90, .65); }

/* Texto "muted" se ainda não existir */
.muted{ opacity:.75; }


/* =========================
   MOBILE PEQUENO (até 420px)
   Alvo: 375px
   ========================= */
@media (max-width: 420px){

  /* TOPNAV: compacta sem quebrar */
  .topnav{
    padding: 8px 10px;
    gap: 10px;
  }

  .topnav .brand{
    gap: 6px;
    min-width: 0;
    flex: 1;
  }

  .topnav .brand img{
    height: 24px;
  }

  /* Encorta o texto da marca (vira 2 linhas no máximo) */
  .topnav .brand span{
    font-size: 9px;
    line-height: 1.15;
    max-width: 160px;

    display: -webkit-box;
    -webkit-line-clamp: 2;      /* no máximo 2 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* HAMBURGUER menor */
  .nav-burger{
    padding: 6px 8px;
  }
  .nav-burger span{
    width: 22px;
    height: 3px;
    margin: 4px 0;
  }

  /* MENU: vira drawer (lateral) para não esmagar conteúdo */
  .topnav .nav-links{
    top: 52px;                  /* acompanha a altura menor da topnav */
    left: auto;
    right: 0;

    width: min(86vw, 320px);    /* drawer lateral */
    border-left: 1px solid rgba(255,255,255,.14);
    border-top: 0;
    border-bottom-left-radius: 14px;

    max-height: calc(100vh - 56px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding: 10px 10px 12px;
  }

  .topnav .nav-links a{
    padding: 12px 12px;
    border-radius: 12px;
    font-size: 14px;
  }

  /* HERO: full-bleed e mais compacto */
  .hero{
    margin-top: 10px;
    border-radius: 0;
    min-height: 230px;
   /* background-image: url("../img/hero-background.svg");*/
    background-image: url("../img/hero-background.svg");
    background-size: cover;
    background-position: 68% center;
  }

  .hero-content{
    padding: 28px 14px;
  }

  .hero h1{
    font-size: 20px;
    line-height: 1.15;
    margin-bottom: 8px;
  }

  .hero .section-head h2{
    font-size: 17px;
    line-height: 1.3;
    margin: 0 auto;
    max-width: 30ch;
  }

  .hero p{
    font-size: 14px;
    line-height: 1.45;
  }

  .hero .meta{
    font-size: 11px;
    margin-top: 14px;
  }

  /* Sections: breathing room */
  .section,
  .grid-2,
  .section--cta .cta-box{
    max-width: 100%;
  }

  .panel{
    padding: 16px;
    border-radius: 16px;
  }

  /* Leaflet: altura menor no 375 */
  .leaflet-container{
    min-height: 360px;
  }
  
  .dygraph-axis-label-x{
    font-size: 11px !important;
    width: 44px !important;
    transform: rotate(-35deg);
    transform-origin: top center;
    margin-top: 6px;
  }
  .dygraph-label.dygraph-xlabel{
    font-size: 13px !important;
  }
  .dygraph-legend{
    font-size: 12px !important;
  }

  .footer-container{
    padding-left: 14px;
    padding-right: 14px;
  }
  
}

/* =========================
   CORREÇÃO DE CORTE LATERAL (GLOBAL)
   ========================= */

/* 1) box-sizing consistente evita estouro por padding/borda */
*, *::before, *::after{
  box-sizing: border-box;
}

/* 3) imagens e mídias sempre responsivas */
img, svg, video, canvas{
  max-width: 100%;
  height: auto;
}

/* 4) iframes/htmlwidgets (Leaflet/plotly etc.) não podem passar de 100% */
iframe{
  max-width: 100%;
}

/* 5) tabelas longas viram scroll horizontal (não cortam o layout) */
table{
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 6) blocos de código quebram linha (evita “estouro” silencioso) */
pre, code{
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* 7) containers comuns que às vezes causam overflow */
.section, .panel, .grid-2{
  width: 100%;
}

/* 8) Leaflet e htmlwidgets: garante largura 100% */
.leaflet-container,
.html-widget,
.html-widget-static-bound,
div[id^="htmlwidget-"]{
  max-width: 100% !important;
}

/* 9) em mobile, reduz padding interno para não “apertar” */
@media (max-width: 768px){
  .panel{
    padding: 16px;
  }
}



