:root {
  --navy: #082f63;
  --blue: #0865c6;
  --blue-dark: #064c9b;
  --teal: #087f8c;
  --green: #16a34a;
  --ink: #11294c;
  --muted: #5a6f8e;
  --line: #dbe6f2;
  --soft: #f3f8fc;
  --white: #fff;
  --shadow: 0 14px 38px rgba(19, 54, 96, .1);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { background: var(--white); color: var(--ink); margin: 0; }
button, input { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.shell { margin-inline: auto; max-width: 1280px; padding-inline: 24px; width: 100%; }
.sr-only { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.skip-link { background: var(--navy); color: white; left: 16px; padding: 10px 14px; position: fixed; top: -80px; z-index: 100; }
.skip-link:focus { top: 12px; }

.site-header { background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(219,230,242,.9); position: sticky; top: 0; z-index: 30; }
.header-inner { align-items: center; display: grid; gap: 24px; grid-template-columns: auto 1fr auto; min-height: 78px; }
.brand { align-items: center; display: inline-flex; gap: 11px; text-decoration: none; }
.brand > span:last-child, .footer-brand > div { display: grid; }
.brand strong { color: var(--navy); font-size: 18px; line-height: 1.05; }
.brand small { color: var(--muted); font-size: 10px; }
.brand-logo { flex: 0 0 auto; height: 56px; object-fit: contain; width: 56px; }
.site-nav { align-items: stretch; align-self: stretch; display: flex; justify-content: center; }
.site-nav a { align-items: center; border-bottom: 3px solid transparent; color: #29456e; display: flex; font-size: 14px; padding: 0 20px; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.is-active { border-color: var(--blue); color: var(--blue-dark); }
.header-tools { align-items: center; display: flex; gap: 12px; }
.search-box { align-items: center; background: #f5f8fc; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); display: flex; gap: 9px; padding: 9px 15px; width: 225px; }
.search-box input { background: transparent; border: 0; color: var(--ink); min-width: 0; outline: 0; width: 100%; }
.access-button, .primary-button { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); border: 0; border-radius: 11px; color: white; cursor: pointer; font-weight: 700; padding: 12px 17px; text-decoration: none; }
.access-panel { background: var(--navy); color: white; }
.access-panel .shell { align-items: center; display: flex; gap: 10px; min-height: 52px; }
.access-panel button { background: transparent; border: 1px solid rgba(255,255,255,.55); border-radius: 7px; color: white; cursor: pointer; padding: 7px 10px; }
.menu-button { background: transparent; border: 0; display: none; padding: 8px; }
.menu-button span { background: var(--navy); display: block; height: 2px; margin: 5px; width: 25px; }

.hero { background: #eaf5ff; min-height: 455px; overflow: hidden; position: relative; }
.hero-photo { background-image: linear-gradient(90deg, #fff 1%, rgba(255,255,255,.96) 21%, rgba(255,255,255,.72) 35%, rgba(255,255,255,.18) 51%, rgba(255,255,255,0) 62%), url('./assets/novafriburgo.jpg'); background-position: center, center; background-size: cover; inset: 0; position: absolute; }
.hero::after { background: radial-gradient(ellipse, rgba(25,177,117,.18), transparent 66%); border-radius: 50%; bottom: -115px; content: ''; height: 260px; left: -95px; position: absolute; width: 300px; }
.hero-inner { align-items: center; display: flex; justify-content: space-between; min-height: 455px; position: relative; z-index: 1; }
.hero-copy { max-width: 520px; padding-block: 52px; }
.eyebrow { color: var(--blue); display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; margin-bottom: 10px; text-transform: uppercase; }
.hero h1 { color: var(--navy); font-size: clamp(40px, 4.6vw, 64px); letter-spacing: -.045em; line-height: .98; margin: 0 0 18px; max-width: 520px; }
.hero h1 em { color: var(--teal); font-style: normal; }
.hero-copy > p { color: #31547e; font-size: 19px; line-height: 1.55; margin: 0 0 28px; max-width: 560px; }
.primary-button { border-radius: 999px; display: inline-flex; gap: 18px; padding: 14px 23px; }
.hero-message { align-items: flex-start; backdrop-filter: blur(10px); background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9); border-radius: 18px; box-shadow: var(--shadow); display: flex; gap: 13px; margin: 0 0 215px 24px; max-width: 290px; padding: 20px; }
.hero-message strong { color: var(--navy); }
.hero-message p { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 7px 0 0; }
.hero-message-logo { flex: 0 0 auto; height: 72px; margin: -10px -8px -10px -12px; object-fit: contain; width: 86px; }

.case-strip { background: white; border-bottom: 1px solid var(--line); padding: 18px 0 12px; }
.case-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case-card { align-items: center; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(19,54,96,.06); display: flex; gap: 14px; min-height: 100px; padding: 16px; }
.case-icon { align-items: center; background: color-mix(in srgb, var(--accent) 11%, white); border-radius: 50%; color: var(--accent); display: flex; flex: 0 0 auto; font-size: 27px; height: 62px; justify-content: center; width: 62px; }
.case-copy { display: grid; }
.case-copy span { font-size: 13px; font-weight: 800; }
.case-copy strong { color: var(--accent); font-size: 29px; line-height: 1; margin: 3px 0; }
.case-copy small, .data-note { color: var(--muted); font-size: 11px; }
.data-note { margin-bottom: 0; text-align: right; }
.skeleton { animation: pulse 1.2s infinite alternate; background: #edf3f8; border-color: transparent; }
@keyframes pulse { to { opacity: .55; } }

.section { padding-block: 72px; }
.section-soft { background: linear-gradient(135deg, #f0faf7, #f4f9ff); padding-block: 70px; }
.section-heading { align-items: flex-end; display: flex; justify-content: space-between; margin-bottom: 26px; }
.section-heading h2, .about-copy h2 { color: var(--navy); font-size: clamp(29px, 3vw, 42px); letter-spacing: -.03em; margin: 0; }
.section-heading > a { color: var(--blue); font-size: 14px; font-weight: 800; text-decoration: none; }
.disease-grid { display: grid; gap: 18px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.disease-card { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(19,54,96,.055); display: flex; flex-direction: column; min-height: 335px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.disease-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.disease-visual { align-items: center; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 18%, white), color-mix(in srgb, var(--accent) 5%, white)); background-position: center; background-size: cover; color: var(--accent); display: flex; font-size: 54px; height: 128px; justify-content: center; }
.disease-card h3, .disease-card p, .disease-card .text-button { margin-inline: 16px; }
.disease-card h3 { color: var(--navy); font-size: 18px; margin-bottom: 7px; margin-top: 17px; }
.disease-card p { color: var(--muted); flex: 1; font-size: 14px; line-height: 1.48; margin-bottom: 14px; margin-top: 0; }
.text-button { background: transparent; border: 1px solid #a9d0f6; border-radius: 8px; color: var(--blue); cursor: pointer; font-weight: 800; margin-bottom: 16px; padding: 9px 12px; }

.guidance-layout { align-items: start; display: grid; gap: 42px; grid-template-columns: 1.45fr .55fr; }
.guidance-list { background: white; border: 1px solid #dcece8; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.guidance-item { align-items: center; border-bottom: 1px solid #e5efed; display: flex; gap: 15px; padding: 17px 20px; }
.guidance-item:last-child { border-bottom: 0; }
.guidance-icon { align-items: center; background: color-mix(in srgb, var(--accent) 12%, white); border-radius: 10px; color: var(--accent); display: flex; flex: 0 0 auto; font-weight: 900; height: 42px; justify-content: center; width: 42px; }
.guidance-item p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.municipality-card { background: linear-gradient(145deg, #0865c6, #063a7d); border-radius: 20px; box-shadow: var(--shadow); color: white; padding: 28px; }
.municipality-card img { margin-bottom: 22px; width: 240px; }
.municipality-card h3 { font-size: 24px; margin: 0 0 10px; }
.municipality-card p { color: #dcecff; line-height: 1.6; }
.municipality-card a { font-weight: 800; }

.news-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-card { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(19,54,96,.06); overflow: hidden; }
.news-visual { background-position: center; background-size: cover; height: 170px; }
.news-visual--default { background-image: linear-gradient(135deg, rgba(6,101,198,.78), rgba(8,127,140,.6)), url('./assets/novafriburgo.jpg'); }
.news-content { padding: 19px; }
.news-category { background: #e8f3ff; border-radius: 999px; color: var(--blue); display: inline-block; font-size: 10px; font-weight: 900; letter-spacing: .06em; padding: 5px 9px; text-transform: uppercase; }
.news-content h3 { color: var(--navy); font-size: 19px; margin: 12px 0 7px; }
.news-content p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.news-content small { color: #7487a0; display: block; margin-bottom: 13px; }
.news-content .text-button { margin: 0; width: 100%; }
.empty-message { color: var(--muted); grid-column: 1 / -1; padding: 34px; text-align: center; }

.about-section { background: #f5f9fd; padding-block: 82px; }
.about-layout { align-items: stretch; display: grid; grid-template-columns: 1fr 1fr; }
.about-photo { background: url('./assets/novafriburgo.jpg') center/cover; border-radius: 24px 0 0 24px; min-height: 390px; }
.about-copy { background: white; border-radius: 0 24px 24px 0; padding: 58px; }
.about-copy p { color: var(--muted); font-size: 17px; line-height: 1.75; }
.secondary-button { border: 1px solid var(--blue); border-radius: 999px; color: var(--blue); display: inline-block; font-weight: 800; margin-top: 12px; padding: 12px 20px; text-decoration: none; }

.site-footer { background: #061f43; color: white; }
.footer-main { align-items: center; display: grid; gap: 50px; grid-template-columns: 1fr 1fr auto; padding-block: 40px; }
.footer-brand { align-items: center; display: flex; gap: 14px; }
.footer-brand strong { font-size: 19px; }
.footer-brand small, .footer-main p, .footer-bottom { color: #b9cee7; }
.footer-main > img { width: 310px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.13); display: flex; font-size: 12px; justify-content: space-between; padding-block: 17px; }

.content-dialog { border: 0; border-radius: 20px; box-shadow: 0 28px 80px rgba(4,27,59,.32); color: var(--ink); max-width: 660px; padding: 40px; width: calc(100% - 32px); }
.content-dialog::backdrop { background: rgba(4,22,48,.72); }
.content-dialog h2 { color: var(--navy); font-size: 34px; margin: 0 0 14px; }
.content-dialog p { color: var(--muted); line-height: 1.75; white-space: pre-line; }
.dialog-close { background: #eef4fa; border: 0; border-radius: 50%; cursor: pointer; font-size: 24px; height: 38px; position: absolute; right: 16px; top: 16px; width: 38px; }
.toast { background: var(--navy); border-radius: 10px; bottom: 20px; box-shadow: var(--shadow); color: white; left: 50%; padding: 13px 18px; position: fixed; transform: translateX(-50%); z-index: 60; }

.high-contrast { --navy: #000; --blue: #0048ff; --blue-dark: #000; --ink: #000; --muted: #222; --line: #000; --soft: #fff; }
.high-contrast .site-header, .high-contrast .case-card, .high-contrast .disease-card, .high-contrast .news-card { border-color: #000; }

@media (max-width: 1100px) {
  .header-inner { grid-template-columns: auto auto 1fr; }
  .menu-button { display: block; }
  .site-nav { background: white; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; left: 0; padding: 12px 24px; position: absolute; right: 0; top: 78px; }
  .site-nav.is-open { display: grid; }
  .site-nav a { border-bottom: 0; border-left: 3px solid transparent; padding: 13px; }
  .header-tools { justify-self: end; }
  .disease-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-message { display: none; }
}

@media (max-width: 780px) {
  .shell { padding-inline: 18px; }
  .header-inner { gap: 10px; grid-template-columns: 1fr auto auto; }
  .header-tools .search-box { display: none; }
  .access-button { font-size: 0; padding: 10px; }
  .access-button span { font-size: 18px; }
  .hero, .hero-inner { min-height: 540px; }
  .hero-photo { background-image: linear-gradient(180deg, rgba(255,255,255,.98) 0 43%, rgba(255,255,255,.45) 75%, rgba(255,255,255,.08)), url('./assets/novafriburgo.jpg'); background-position: center; }
  .hero-inner { align-items: flex-start; }
  .hero-copy { padding-top: 65px; }
  .hero h1 { font-size: 45px; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .disease-grid, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guidance-layout, .about-layout { grid-template-columns: 1fr; }
  .about-photo { border-radius: 22px 22px 0 0; min-height: 270px; }
  .about-copy { border-radius: 0 0 22px 22px; padding: 36px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-main > img { max-width: 280px; }
  .footer-bottom { gap: 12px; flex-direction: column; }
}

@media (max-width: 520px) {
  .brand small { display: none; }
  .brand strong { font-size: 15px; }
  .section { padding-block: 54px; }
  .case-grid, .disease-grid, .news-grid { grid-template-columns: 1fr; }
  .case-card { min-height: 86px; }
  .data-note { text-align: left; }
  .section-heading { align-items: flex-start; gap: 14px; }
  .section-heading > a { display: none; }
  .access-panel .shell { align-items: stretch; flex-direction: column; padding-block: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
