/* ============================================================
   AFADA — Landing page institucional V1
   Identidade visual extraída da logo oficial:
   vermelho (destaque), verde (complementar), branco (fundo),
   neutros para textos e divisórias.
   ============================================================ */

:root {
  --red: #c1272d;
  --red-dark: #9e1f24;
  --green: #2e7d32;
  --green-dark: #1f5c23;

  --white: #ffffff;
  --bg-muted: #f6f7f5;
  --ink: #1a1d1a;
  --text: #3a3f3a;
  --muted: #6b706b;
  --border: #e4e6e2;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(26, 29, 26, 0.08);
  --container: 1120px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------- Reset básico ------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

/* ------------------- Acessibilidade / foco ------------------- */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ------------------- Layout ------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow {
  max-width: 780px;
}

.center {
  text-align: center;
}

.hero-actions.center {
  justify-content: center;
}

.section {
  padding: 72px 0;
}

.section-muted {
  background: var(--bg-muted);
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.6em;
}

.section-lead {
  font-size: 1.12rem;
  color: var(--text);
  max-width: 640px;
  margin: 0 0 1.2em;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ------------------- Botões ------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.1;
  min-height: 48px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
}

.btn .icon {
  flex-shrink: 0;
}

.icon {
  display: inline-block;
  vertical-align: middle;
}

.inline-ig {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ------------------- Doação (CTA final) ------------------- */
.donate {
  background: var(--red);
  color: #fff;
  text-align: center;
}

.donate h2 {
  color: #fff;
}

.donate p {
  color: #fff;
  opacity: 0.95;
  max-width: 620px;
  margin: 0 auto 26px;
  font-size: 1.12rem;
}

.donate .btn-primary {
  background: #fff;
  color: var(--red-dark);
  border-color: #fff;
}

.donate .btn-primary:hover {
  background: #fbeaea;
  border-color: #fbeaea;
  color: var(--red-dark);
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

/* ------------------- Cabeçalho ------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

/* A logo é circular sobre fundo escuro no arquivo original;
   mascaramos com border-radius para exibir apenas o círculo. */
.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #fff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.15rem;
  color: var(--red);
  letter-spacing: 0.02em;
}

.brand-text small {
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 210px;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: var(--text);
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
}

.primary-nav a:hover {
  color: var(--ink);
  background: var(--bg-muted);
  text-decoration: none;
}

.primary-nav a.btn-nav {
  min-height: 42px;
  padding: 10px 18px;
  color: #fff;
}

.primary-nav a.btn-nav:hover {
  color: #fff;
  background: var(--red-dark);
}

/* Botão hamburguer (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ------------------- Hero ------------------- */
.hero {
  padding: 72px 0 64px;
  background: linear-gradient(180deg, #fbfcfb 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-dark);
  margin: 0 0 12px;
}

#hero-title {
  font-size: clamp(2rem, 5vw, 3.1rem);
  color: var(--ink);
  margin-bottom: 0.4em;
}

.hero-lead {
  font-size: 1.18rem;
  color: var(--text);
  max-width: 520px;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-figure {
  display: flex;
  justify-content: center;
}

/* Máscara circular para ocultar os cantos escuros do arquivo original. */
.hero-logo {
  width: min(340px, 80vw);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ------------------- Sobre ------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-text p {
  margin: 0 0 1em;
}

.about-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.about-highlights li {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

.highlight-value {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.1rem;
}

.highlight-label {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ------------------- Transparência ------------------- */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.doc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.doc-card-featured {
  grid-column: 1 / -1;
  border-top: 4px solid var(--red);
}

.doc-card-head h3 {
  font-size: 1.4rem;
  margin: 0;
}

.doc-badge {
  display: inline-block;
  background: rgba(193, 39, 45, 0.1);
  color: var(--red-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.doc-meta {
  margin: 18px 0 22px;
  display: grid;
  gap: 10px;
}

.doc-meta div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.doc-meta dt {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}

.doc-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

.doc-desc {
  color: var(--text);
  margin: 12px 0 20px;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.doc-actions:last-child {
  margin-bottom: 0;
}

/* Visualizador incorporado (desktop) */
.doc-viewer {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-muted);
}

.doc-viewer object {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
}

.doc-fallback {
  padding: 24px;
  text-align: center;
  color: var(--text);
}

/* ------------------- Contato ------------------- */
.contact-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.contact-label {
  font-weight: 600;
  color: var(--muted);
  min-width: 110px;
}

/* ------------------- Rodapé ------------------- */
.site-footer {
  background: var(--ink);
  color: #d7dad6;
  padding: 44px 0 28px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 1rem;
}

.footer-brand span {
  display: block;
  font-size: 0.88rem;
  color: #b6bab5;
}

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

.footer-links a {
  color: #fff;
  font-weight: 500;
}

.footer-legal {
  padding-top: 20px;
  font-size: 0.85rem;
  color: #b6bab5;
}

.footer-legal p {
  margin: 0;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-figure {
    order: -1;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 18px;
  }

  .primary-nav a {
    padding: 14px 12px;
    border-radius: var(--radius-sm);
  }

  .btn-nav {
    margin-top: 8px;
    justify-content: center;
  }

  .doc-meta div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .doc-viewer object {
    height: 460px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .section {
    padding: 52px 0;
  }

  .container {
    padding: 0 18px;
  }

  .doc-card {
    padding: 20px;
  }

  .btn {
    width: 100%;
  }

  .doc-actions .btn,
  .hero-actions .btn {
    width: 100%;
  }

  .brand-text small {
    display: none;
  }
}
