:root {
  --azul-escuro: #1c2a44;
  --azul-claro: #0078d4;
  --cinza-claro: #f5f5f5;
  --branco: #ffffff;
  --texto: #2b2b2b;

  /* Tipografia fluida */
  --fs-300: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --fs-400: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  --fs-500: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
  --fs-600: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  --fs-700: clamp(1.9rem, 1.4rem + 2.2vw, 2.8rem);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

/* Compensa a altura da barra fixa no topo */
body {
  margin: 0;
  padding-top: 70px; /* ajuste se seu header ficar mais alto/baixo */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--texto);
  background-color: var(--branco);
  line-height: 1.6;
  font-size: var(--fs-300);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Acessibilidade: link para pular conteúdo */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--azul-claro);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  z-index: 1000;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  outline: 3px solid #fff;
}

/* Layout base */
.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

.topo {
  position: fixed;   /* sempre no topo */
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;      /* acima do conteúdo */
  background-color: var(--azul-escuro);
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
  border-bottom: none;
}

.topo__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.brand img {
  display: block;
  height: 56px;
  width: auto;
}

/* Menu / navegação */
.nav { display: contents; }

.menu {
  list-style: none;
  display: flex;
  gap: clamp(0.5rem, 2vw, 1.25rem);
  align-items: center;
  margin: 0;
  padding: 0;
}

.menu a {
  color: var(--branco);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-300);
  padding: .5rem .75rem;
  border-radius: 8px;
}
.menu a:hover,
.menu a:focus-visible {
  background-color: rgba(255,255,255,.12);
  outline: none;
}

/* Botão hambúrguer (esconde no desktop) */
.nav-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: .5rem;
  border-radius: 8px;
}
.nav-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nav-toggle__bar {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  margin: 4px 0;
}

/* Hero */
.hero {
  position: relative;
  overflow: clip;
  background: #0a0f18;
}
.hero img {
  width: 100%;
  height: clamp(240px, 38vw, 520px);
  object-fit: cover;
  display: block;
  filter: contrast(1.05) saturate(1.05);
}
.hero-texto {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(1rem, 2vw, 2rem);
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  color: #fff;
}
.hero-texto h1 {
  font-size: var(--fs-700);
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

/* Seções */
.section { 
  padding: clamp(2rem, 5vw, 4rem) 1rem;
  scroll-margin-top: 90px; /* evita colar ao navegar por âncoras */
}
.bg-light { background-color: var(--cinza-claro); }

h2 {
  font-size: var(--fs-600);
  color: var(--azul-escuro);
  margin: 0 0 1rem 0;
  padding-top: 0.5rem; /* respiro extra */
}

.content > p + p { margin-top: .5rem; }

ul { padding-left: 1rem; }
ul li { margin: .35rem 0; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
}

.img-full {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

/* Botões */
.btn {
  display: inline-block;
  background: var(--azul-claro);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  padding: .75rem 1rem;
  border-radius: 10px;
  line-height: 1;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 4px 12px rgba(0,120,212,.25);
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,120,212,.35);
}

/* Mapa */
.mapa { margin-top: 1rem; }

/* Rodapé */
footer {
  background-color: var(--azul-escuro);
  color: var(--branco);
  text-align: center;
  padding: 2rem 1rem;
}
footer a {
  color: var(--azul-claro);
  text-decoration: none;
  font-weight: bold;
}

/* Modal certificados */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}
.modal-content {
  background: var(--branco);
  color: var(--texto);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  line-height: 1.7;
}
.modal-content h2 {
  margin-top: 0;
  color: var(--azul-escuro);
  font-size: var(--fs-500);
}
.modal-content p { margin-bottom: 1rem; }
.modal-content a { color: var(--azul-claro); font-weight: bold; }
.modal-close {
  position: absolute;
  top: .8rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--texto);
  line-height: 1;
}
.modal-close:hover { color: var(--azul-claro); }
.modal-texto-upper {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: #555;
  text-align: justify;
}

/* ===== Responsividade ===== */
@media (max-width: 900px) {
  .topo__inner {
    grid-template-columns: auto 1fr auto;
  }

  /* mostra o hambúrguer, esconde o menu até abrir */
  .nav-toggle { display: inline-block; }
  .menu {
    position: fixed;
    inset: 70px 0 auto 0; /* fica abaixo do header fixo */
    background: var(--azul-escuro);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  body.nav-open .menu { max-height: 60vh; }
  .menu li { border-radius: 8px; }
  .menu a { padding: .9rem 1rem; font-size: 1rem; }

  .grid-2 { grid-template-columns: 1fr; }

  .brand img { height: 48px; }
}

/* Redução de movimento (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .menu { transition: none; }
}
