/*
  Território do Futuro - painel web
  Personalização rápida: altere as variáveis abaixo para mudar cores, raios, sombras e fonte.
*/
@font-face {
  font-family: "Cocon";
  src: url("../fonts/CoconRegularFont.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-title: "Cocon", "Cooper Black", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Cocon", "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --brown-900: #2f1608;
  --brown-800: #4e270d;
  --brown-700: #63340f;
  --cream-100: #fff8e1;
  --cream-200: #f1dfa8;
  --cream-300: #e6cd86;
  --leaf-900: #063d37;
  --leaf-700: #0b5d54;
  --leaf-500: #537a41;
  --leaf-300: #a7ce3a;
  --magenta-700: #8e084d;
  --magenta-500: #b51664;
  --orange-600: #d47a26;
  --orange-400: #eda943;
  --white: #fffaf0;
  --black: #0a0906;
  --shadow-soft: 0 22px 80px rgba(47, 22, 8, 0.22);
  --shadow-strong: 0 30px 100px rgba(0, 0, 0, 0.28);
  --radius-lg: 34px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --wrapper: min(1160px, calc(100vw - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--brown-900);
  background:
    radial-gradient(circle at 10% 0%, rgba(181, 22, 100, 0.09), transparent 32rem),
    radial-gradient(circle at 90% 20%, rgba(212, 122, 38, 0.11), transparent 34rem),
    linear-gradient(180deg, #fff8e2 0%, #f3dfac 42%, #fff7df 100%);
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; font-family: var(--font-body); }

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 1000;
  background: var(--leaf-900);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 999px;
}
.skip-link:focus { top: 16px; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: transparent;
  z-index: 999;
}
.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--magenta-500), var(--orange-400), var(--leaf-300));
  transition: width 0.08s linear;
}

.wrapper { width: var(--wrapper); margin: 0 auto; }
.section { padding: clamp(72px, 8vw, 124px) 0; position: relative; }
.panel-dark {
  color: var(--white);
  background:
    radial-gradient(circle at 18% 22%, rgba(181, 22, 100, 0.25), transparent 25rem),
    radial-gradient(circle at 84% 12%, rgba(237, 169, 67, 0.2), transparent 28rem),
    linear-gradient(135deg, var(--brown-900), var(--brown-800));
}
.panel-cream {
  background:
    radial-gradient(circle at 15% 10%, rgba(167, 206, 58, 0.16), transparent 28rem),
    radial-gradient(circle at 95% 28%, rgba(181, 22, 100, 0.12), transparent 22rem),
    linear-gradient(180deg, var(--cream-200), var(--cream-100));
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: rgba(47, 22, 8, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 248, 225, 0.14);
  transition: background 0.3s ease, padding 0.3s ease;
}
.site-header.scrolled {
  padding-block: 8px;
  background: rgba(47, 22, 8, 0.92);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-title);
  letter-spacing: 0.02em;
  font-size: clamp(1rem, 1.8vw, 1.28rem);
}
.brand img {
  width: 52px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 5px 18px rgba(0,0,0,0.28));
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  text-decoration: none;
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.94rem;
  color: rgba(255, 250, 240, 0.88);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--brown-900);
  background: var(--cream-200);
  transform: translateY(-1px);
}
.menu-toggle {
  display: none;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.menu-toggle strong { margin-left: 6px; font-size: 0.88rem; }

.hero {
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding-top: 112px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.78fr);
  gap: clamp(30px, 7vw, 90px);
  align-items: center;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--magenta-500);
  font-family: var(--font-title);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.panel-dark .eyebrow { color: var(--orange-400); }
h1, h2, h3, h4 {
  font-family: var(--font-title);
  line-height: 0.98;
  letter-spacing: 0.01em;
}
h1 {
  margin: 0;
  font-size: clamp(5rem, 14vw, 11rem);
  color: var(--cream-100);
  text-shadow: 0 16px 40px rgba(0,0,0,0.24);
}
h2 { margin: 0; font-size: clamp(2.4rem, 6vw, 5.2rem); color: var(--leaf-900); }
.panel-dark h2 { color: var(--cream-100); }
h3 { font-size: clamp(1.8rem, 3.2vw, 3rem); margin: 0 0 16px; }
h4 { font-size: clamp(1.22rem, 2vw, 1.6rem); margin: 0 0 8px; }
.subtitle {
  margin: 12px 0 0;
  max-width: 740px;
  color: var(--leaf-300);
  font-family: var(--font-title);
  font-size: clamp(1.45rem, 3.6vw, 3.4rem);
  line-height: 1.02;
}
.lead {
  max-width: 650px;
  margin: 26px 0 0;
  font-size: clamp(1.05rem, 1.45vw, 1.24rem);
  color: rgba(255, 250, 240, 0.86);
}
.hero-actions, .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--leaf-300); color: var(--brown-900); }
.button.ghost { color: var(--white); border-color: rgba(255, 250, 240, 0.42); }
.button.small { min-height: 40px; padding: 9px 16px; font-size: 0.95rem; background: var(--brown-800); color: var(--cream-100); }
.hero-logo {
  position: relative;
  margin: 0;
  padding: clamp(18px, 4vw, 40px);
  border-radius: 45% 55% 52% 48% / 42% 48% 52% 58%;
  background: radial-gradient(circle at 50% 40%, rgba(99, 52, 15, 0.95), rgba(54, 24, 8, 0.42));
  box-shadow: var(--shadow-strong);
}
.hero-logo img {
  margin: 0 auto;
  max-height: min(72vh, 560px);
  width: auto;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.32));
}
.hero-logo figcaption {
  margin-top: 14px;
  text-align: center;
  color: rgba(255, 250, 240, 0.74);
  font-weight: 800;
}
.organic-frame {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(60px, 10vw, 140px);
  opacity: 0.85;
  pointer-events: none;
  background-size: 48px 48px;
  background-image: radial-gradient(circle at 22px 22px, rgba(255,255,255,.14) 2px, transparent 2.5px), radial-gradient(circle at 32px 32px, rgba(0,0,0,.08) 2px, transparent 2.5px);
}
.organic-left {
  left: -26px;
  background-color: var(--magenta-700);
  border-radius: 0 60% 45% 0 / 0 18% 70% 0;
}
.organic-right {
  right: -26px;
  background-color: var(--orange-600);
  border-radius: 55% 0 0 60% / 18% 0 0 70%;
}

.intro-ribbon {
  padding: 36px 0;
  background: var(--leaf-900);
  color: var(--cream-100);
}
.ribbon-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) 1fr;
  gap: clamp(20px, 5vw, 70px);
  align-items: center;
}
.ribbon-grid h2 { font-size: clamp(2rem, 4.2vw, 4rem); color: var(--cream-100); }
.ribbon-grid p:last-child { margin: 0; font-size: 1.12rem; }

.section-heading {
  max-width: 900px;
  margin-bottom: clamp(30px, 5vw, 64px);
}
.section-heading.compact { margin-bottom: 24px; }
.section-heading.compact h3 { color: var(--leaf-900); }
.panel-dark .section-heading.compact h3 { color: var(--cream-100); }

.split-layout,
.chapter-grid,
.voices-grid,
.video-grid,
.credits-grid {
  display: grid;
  gap: clamp(18px, 3vw, 32px);
}
.split-layout, .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.story-card,
.chapter-card,
.memory-panel,
.developer-note,
.video-card,
.voice-card,
.map-section,
.closing-text {
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 240, 0.76);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(78, 39, 13, 0.12);
}
.story-card,
.chapter-card,
.memory-panel,
.developer-note,
.closing-text { padding: clamp(22px, 3.4vw, 38px); }
.story-card h3,
.chapter-card h3 { color: var(--leaf-900); }
.story-card p,
.chapter-card p,
.memory-panel p,
.developer-note p,
.closing-text p { margin: 0 0 16px; }
.story-card p:last-child,
.chapter-card p:last-child,
.memory-panel p:last-child,
.developer-note p:last-child,
.closing-text p:last-child { margin-bottom: 0; }
.tag {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--cream-100);
  background: var(--magenta-700);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.memory-panel {
  margin-top: 28px;
  background: linear-gradient(135deg, rgba(6,61,55,0.96), rgba(11,93,84,0.9));
  color: var(--cream-100);
}
.developer-note {
  margin-top: 28px;
  background: rgba(255, 250, 240, 0.88);
}
.developer-note code {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--cream-100);
  background: var(--brown-800);
}

.map-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 32px;
  padding: clamp(18px, 3vw, 28px);
  background: var(--cream-100);
}
.map-copy { padding: 12px; }
.map-copy h3 { color: var(--leaf-900); }
.map-copy label { display: block; margin: 18px 0 10px; font-weight: 900; }
.map-copy input[type="range"] { width: 100%; accent-color: var(--magenta-700); }
.timeline-note {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(167, 206, 58, 0.22);
  border: 1px solid rgba(83, 122, 65, 0.2);
}
.map {
  min-height: 430px;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, #8db7a3, #f0d999);
  z-index: 1;
}
.map-fallback {
  height: 100%;
  min-height: 430px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  color: var(--leaf-900);
}
.map-fallback span { font-family: var(--font-title); font-size: 2rem; }
.leaflet-popup-content-wrapper,
.leaflet-popup-tip { background: var(--cream-100); color: var(--brown-900); }

.territory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.territory-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--brown-900);
  background: rgba(255, 250, 240, 0.76);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(47, 22, 8, 0.08);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.territory-tabs button:hover { transform: translateY(-2px); }
.territory-tabs button.active { color: var(--cream-100); background: var(--leaf-900); }
.chapter-card {
  position: relative;
  overflow: hidden;
}
.chapter-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -50px;
  width: 170px;
  height: 170px;
  opacity: 0.08;
  background: var(--leaf-900);
  border-radius: 62% 38% 50% 50% / 48% 54% 46% 52%;
}
.chapter-card.is-hidden { display: none; }
blockquote {
  margin: 22px 0;
  padding: 18px 18px 18px 22px;
  border-left: 6px solid var(--orange-600);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(212, 122, 38, 0.11);
  font-weight: 700;
}
blockquote cite {
  display: block;
  margin-top: 10px;
  color: var(--leaf-700);
  font-style: normal;
  font-weight: 900;
}

.media-section { margin-top: clamp(34px, 5vw, 64px); }
.video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.video-card {
  overflow: hidden;
  background: var(--white);
  padding: 0;
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--cream-100);
  background:
    linear-gradient(145deg, rgba(6, 61, 55, .88), rgba(78, 39, 13, .92)),
    radial-gradient(circle at 50% 50%, rgba(167,206,58,0.35), transparent 60%);
}
.video-frame::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 26px;
  border: 1px solid rgba(255, 250, 240, 0.18);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-frame button {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  border: 0;
  border-radius: 999px;
  padding: 12px;
  color: var(--brown-900);
  background: var(--leaf-300);
  font-family: var(--font-title);
  line-height: 1.04;
  cursor: pointer;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}
.video-info { padding: 20px; }
.video-info h4 { color: var(--leaf-900); }
.video-info p { margin: 0 0 12px; }
.video-info a {
  font-weight: 900;
  color: var(--magenta-700);
}

.gallery-section { overflow: hidden; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.gallery-grid figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  min-height: 310px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  background: var(--brown-800);
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  min-height: 310px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-grid figure:hover img { transform: scale(1.055); }
.gallery-grid figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(47, 22, 8, 0.82);
  color: var(--cream-100);
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.closing-text { margin-top: 34px; background: rgba(6,61,55,0.95); color: var(--cream-100); }
.voices-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.voice-card {
  margin: 0;
  padding: clamp(24px, 4vw, 42px);
  font-size: clamp(1.04rem, 1.6vw, 1.28rem);
  background: linear-gradient(135deg, rgba(255,250,240,.86), rgba(241,223,168,.92));
}
.final-videos { margin-top: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.credits { overflow: hidden; }
.credits-grid { grid-template-columns: 0.9fr 0.9fr 1.15fr; align-items: start; }
.credits-logo { max-width: 220px; margin-bottom: 16px; }
.support-box,
.contact-box {
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 250, 240, 0.08);
  border: 1px solid rgba(255, 250, 240, 0.16);
}
.support-box img { max-height: 230px; margin-bottom: 16px; object-fit: contain; }
.support-box ul { padding-left: 18px; margin: 0; }
.contact-box p { margin: 0 0 10px; }
.contact-box a { color: var(--leaf-300); font-weight: 900; }
.social { margin-top: 18px !important; }

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 850;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--brown-900);
  background: var(--leaf-300);
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 15px 35px rgba(0,0,0,0.22);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.12s; }

@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: 67px 12px auto 12px;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border-radius: 26px;
    background: rgba(47, 22, 8, 0.96);
    box-shadow: var(--shadow-strong);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease;
  }
  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a { padding: 12px 14px; }
  .hero-grid,
  .ribbon-grid,
  .map-section,
  .credits-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-logo { max-width: 560px; margin: 0 auto; }
  .split-layout,
  .chapter-grid,
  .video-grid,
  .voices-grid,
  .final-videos { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --wrapper: min(100% - 28px, 1160px); }
  .site-header { padding-inline: 14px; }
  .brand span { display: none; }
  .brand img { width: 48px; }
  h1 { font-size: clamp(4.4rem, 15vw, 7rem); }
  .subtitle { font-size: 1.75rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .gallery-grid { grid-template-columns: 1fr; }
  .organic-frame { opacity: 0.35; width: 60px; }
  .map { min-height: 340px; }
  .map-fallback { min-height: 340px; }
  .section { padding-block: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

.custom-marker span {
  display: block;
  width: 28px;
  height: 28px;
  border: 4px solid var(--cream-100);
  border-radius: 50% 50% 50% 8px;
  background: var(--magenta-700);
  box-shadow: 0 10px 25px rgba(0,0,0,0.28);
  transform: rotate(-45deg);
}
.custom-marker span::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--leaf-300);
}

/* Histórias e Faça Parte — adições mantendo o layout da versão 1 */
.stories-section { overflow: hidden; }
.stories-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.stories-head .section-heading { margin-bottom: 0; }
.stories-head p:not(.eyebrow) {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 250, 240, 0.82);
}
.carousel-controls {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}
.carousel-controls button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 999px;
  color: var(--brown-900);
  background: var(--cream-200);
  font-size: 1.35rem;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, background 0.25s ease;
}
.carousel-controls button:hover { transform: translateY(-2px); background: var(--leaf-300); }
.story-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 430px);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding: 4px 0 18px;
  scrollbar-color: var(--orange-400) rgba(255, 250, 240, 0.12);
}
.story-slide {
  scroll-snap-align: start;
  min-height: 360px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius-lg);
  color: var(--brown-900);
  background:
    radial-gradient(circle at 90% 0%, rgba(167, 206, 58, 0.18), transparent 12rem),
    linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(241, 223, 168, 0.96));
  border: 1px solid rgba(255, 250, 240, 0.18);
  box-shadow: var(--shadow-strong);
}
.story-slide h3 { color: var(--leaf-900); }
.story-slide p { margin: 0 0 20px; }
.story-slide cite {
  display: block;
  margin-top: auto;
  color: var(--magenta-700);
  font-style: normal;
  font-weight: 1000;
}
.story-slide .tag { background: var(--leaf-900); color: var(--cream-100); }

.participate-section {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(181, 22, 100, 0.22), transparent 26rem),
    radial-gradient(circle at 82% 30%, rgba(167, 206, 58, 0.18), transparent 24rem),
    linear-gradient(135deg, var(--leaf-900), var(--brown-900));
}
.participate-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}
.participate-copy p:not(.eyebrow) { color: rgba(255, 250, 240, 0.84); }
.memory-form {
  display: grid;
  gap: 12px;
  padding: clamp(22px, 4vw, 38px);
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 240, 0.96);
  color: var(--brown-900);
  box-shadow: var(--shadow-strong);
}
.memory-form label {
  font-weight: 1000;
  color: var(--leaf-900);
}
.memory-form input,
.memory-form select,
.memory-form textarea {
  width: 100%;
  border: 2px solid rgba(78, 39, 13, 0.14);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--brown-900);
  background: var(--cream-100);
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.memory-form textarea { resize: vertical; }
.memory-form input:focus,
.memory-form select:focus,
.memory-form textarea:focus {
  border-color: var(--leaf-700);
  box-shadow: 0 0 0 4px rgba(167, 206, 58, 0.22);
}
.memory-form .button {
  width: fit-content;
  border: 0;
  cursor: pointer;
}
.form-feedback {
  min-height: 1.6em;
  margin: 4px 0 0;
  color: var(--magenta-700);
  font-weight: 900;
}

@media (max-width: 1180px) and (min-width: 981px) {
  .main-nav a { padding-inline: 9px; font-size: 0.86rem; }
}

@media (max-width: 980px) {
  .stories-head,
  .participate-grid { grid-template-columns: 1fr; }
  .stories-head { display: grid; align-items: start; }
  .carousel-controls { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .story-carousel { grid-auto-columns: minmax(280px, 86vw); }
  .story-slide { min-height: auto; }
  .memory-form .button { width: 100%; }
}


/* Ajustes V4 solicitados */
:root {
  --font-body: "Cocon", "Cooper Black", "Arial Rounded MT Bold", system-ui, sans-serif;
}
body, button, input, select, textarea {
  font-family: var(--font-title);
}
body {
  font-size: 1.03rem;
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.ribbon-single {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 12px;
  text-align: center;
  max-width: 930px;
}
.ribbon-single .eyebrow { margin-left: auto; margin-right: auto; }
.ribbon-single h2 { margin: 0 auto; max-width: 880px; }
.ribbon-single p:last-child { max-width: 820px; margin: 0 auto; }

.map-copy select {
  width: 100%;
  border: 2px solid rgba(78, 39, 13, 0.14);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--brown-900);
  background: var(--cream-100);
  outline: 0;
}
.map-legend {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(6, 61, 55, 0.08);
}
.map-legend span { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; }
.legend-dot {
  width: 14px; height: 14px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(255,250,240,0.7);
}
.legend-dot.territory { background: var(--magenta-700); }
.legend-dot.water { background: #1c77c3; }
.legend-dot.protection { background: var(--leaf-500); }
.leaflet-container { font-family: var(--font-title); }
.area-label {
  border: 0 !important;
  background: rgba(255,250,240,0.92) !important;
  color: var(--brown-900) !important;
  border-radius: 999px !important;
  padding: 2px 8px !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.16);
  font-weight: 900;
}

.territory-photo-placeholder {
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: 24px;
  border: 2px dashed rgba(78, 39, 13, 0.26);
  background: var(--cream-200);
}
.territory-photo-placeholder img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.territory-photo-placeholder figcaption {
  padding: 10px 14px;
  color: var(--leaf-900);
  font-weight: 900;
  background: rgba(255,250,240,0.74);
}

.video-frame.video-thumb {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(6,61,55,.92), rgba(78,39,13,.92));
}
.video-frame.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .88;
  transform: scale(1.01);
}
.video-frame.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(47,22,8,0.06), rgba(47,22,8,0.38));
  pointer-events: none;
}
.video-frame .play-button {
  position: relative;
  z-index: 3;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--brown-900);
  background: var(--leaf-300);
  cursor: pointer;
  box-shadow: 0 18px 46px rgba(0,0,0,.34);
}
.video-frame .play-button:hover { transform: translateY(-2px) scale(1.03); }
.play-icon {
  display: block;
  transform: translateX(3px);
  font-size: 2.2rem;
  line-height: 1;
}
.video-frame iframe { z-index: 4; background: #000; }

.gallery-grid figure { min-height: 360px; }
.gallery-grid img { min-height: 360px; image-rendering: auto; }
.gallery-grid figure:nth-child(3) img,
.gallery-grid figure:nth-child(6) img { object-position: center center; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.memory-form input:required:invalid,
.memory-form select:required:invalid { border-color: rgba(142,8,77,.35); }
.memory-form .button { min-width: 160px; }

.footer-wrap { display: grid; gap: 34px; }
.footer-top,
.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: stretch;
}
.footer-brand-card,
.footer-support-card,
.footer-team,
.footer-contact,
.footer-cta {
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius-lg);
  background: rgba(255,250,240,.08);
  border: 1px solid rgba(255,250,240,.16);
  box-shadow: 0 20px 70px rgba(0,0,0,.18);
}
.footer-support-card img { max-height: 220px; object-fit: contain; margin-bottom: 14px; }
.footer-support-card ul { columns: 2; gap: 28px; padding-left: 18px; margin-bottom: 0; }
.footer-team .section-heading { margin-bottom: 22px; }
.footer-team h3 { color: var(--cream-100); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.team-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255,250,240,.1);
  border: 1px solid rgba(255,250,240,.14);
}
.team-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.team-grid figcaption { padding: 14px; }
.team-grid strong { display: block; color: var(--cream-100); font-size: 1.2rem; }
.team-grid span { color: rgba(255,250,240,.75); }
.footer-contact { background: rgba(255,250,240,.11); }
.footer-cta { display: grid; align-content: center; justify-items: start; }
.footer-cta p:not(.eyebrow) { font-size: 1.5rem; margin: 0 0 18px; color: var(--leaf-300); }
.footer-brand-card .credits-logo { max-width: 250px; }

@media (max-width: 980px) {
  .footer-top,
  .footer-bottom,
  .team-grid,
  .form-grid { grid-template-columns: 1fr; }
  .footer-support-card ul { columns: 1; }
  .map-section { gap: 18px; }
  .gallery-grid figure,
  .gallery-grid img { min-height: 300px; }
  .video-frame .play-button { width: 74px; height: 74px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; line-height: 1.62; }
  .wrapper { width: min(100% - 26px, 1160px); }
  .section-heading { margin-bottom: 28px; }
  .chapter-card, .story-card, .memory-panel, .closing-text { padding: 20px; }
  .ribbon-single h2 { font-size: clamp(2rem, 12vw, 3.4rem); }
  .map-section { padding: 16px; }
  .map-copy { padding: 0; }
  .team-grid img { max-height: 360px; }
  .footer-brand-card, .footer-support-card, .footer-team, .footer-contact, .footer-cta { padding: 20px; border-radius: 24px; }
  .gallery-grid figure,
  .gallery-grid img { min-height: 260px; }
}


/* Ajustes solicitados — versão refinada */
.map-timeline-card {
  margin: 18px 0 16px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid rgba(78, 39, 13, 0.12);
}
.map-timeline-card label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
  color: var(--leaf-900);
}
.map-timeline-card input[type="range"] { width: 100%; margin: 14px 0 8px; accent-color: var(--magenta-700); }
.timeline-years {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  color: rgba(47, 22, 8, .72);
  font-size: .82rem;
  text-align: center;
}
.timeline-note.small { font-size: .9rem; opacity: .86; }
.map-data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.map-data-grid article {
  border-radius: 18px;
  padding: 12px;
  background: rgba(6, 61, 55, .08);
  border: 1px solid rgba(6, 61, 55, .12);
}
.map-data-grid strong { display: block; color: var(--magenta-700); font-size: 1.05rem; line-height: 1.1; }
.map-data-grid span { display: block; margin-top: 4px; font-size: .84rem; color: var(--brown-800); line-height: 1.25; }
.legend-dot.development { background: #d4271e; }
.map-source-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.map-source-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--leaf-900);
  color: var(--cream-100);
  font-weight: 900;
}
.leaflet-interactive.development-layer { filter: drop-shadow(0 8px 16px rgba(47,22,8,.16)); }
.future-videos .two-col-videos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 100%;
}
.future-videos .video-card { min-height: 100%; }
.future-videos .video-frame { aspect-ratio: 16 / 9; min-height: 360px; }

/* Rodapé em 3 colunas + correções de vídeo — versão refinada 2 */

/* Thumbnails e botão de play corrigidos */
.video-frame {
  overflow: hidden;
  isolation: isolate;
}
.video-frame.video-thumb {
  display: block;
  min-height: 250px;
}
.video-frame.video-thumb::before {
  inset: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(6, 61, 55, 0.10), rgba(47, 22, 8, 0.44));
  z-index: 1;
  pointer-events: none;
}
.video-frame.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  z-index: 0;
  background: linear-gradient(145deg, rgba(6,61,55,.92), rgba(78,39,13,.92));
}
.video-frame.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(167, 206, 58, .22), transparent 34%),
    linear-gradient(180deg, transparent 35%, rgba(47,22,8,.26));
  z-index: 1;
  pointer-events: none;
}
.video-frame .play-button,
.video-frame button.play-button {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(70px, 7.2vw, 96px);
  height: clamp(70px, 7.2vw, 96px);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 250, 240, .86);
  border-radius: 999px;
  color: var(--brown-900);
  background: rgba(167, 206, 58, .94);
  box-shadow: 0 16px 48px rgba(0,0,0,.36);
  line-height: 1;
}
.video-frame .play-button:hover,
.video-frame button.play-button:hover {
  transform: translate(-50%, -50%) scale(1.06);
}
.video-frame .play-icon {
  display: block;
  margin-left: .16em;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
}
.video-frame iframe {
  z-index: 4;
  background: var(--brown-900);
}
.future-videos .two-col-videos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 100%;
}
.future-videos .video-card { min-height: 100%; }
.future-videos .video-frame { aspect-ratio: 16 / 9; min-height: 360px; }

/* Rodapé com 3 colunas */
.credits-3col {
  padding-block: clamp(46px, 6vw, 80px);
}
.footer-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) minmax(0, 1.12fr);
  gap: clamp(18px, 2.4vw, 28px);
  align-items: stretch;
}
.footer-col {
  min-width: 0;
  padding: clamp(20px, 2.5vw, 30px);
  border-radius: 28px;
  background: rgba(255, 250, 240, .075);
  border: 1px solid rgba(255, 250, 240, .14);
  box-shadow: 0 20px 70px rgba(0,0,0,.18);
}
.footer-col .eyebrow { margin-bottom: 16px; }
.footer-col h2 {
  margin: 16px 0 12px;
  color: var(--cream-100);
  font-size: clamp(1.65rem, 3.1vw, 2.75rem);
}
.footer-col p,
.footer-col li {
  color: rgba(255, 250, 240, .82);
  line-height: 1.52;
}
.footer-col p { margin: 0 0 10px; }
.footer-col strong { color: var(--leaf-300); }
.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo-row img { object-fit: contain; }
.footer-logo-bauhinia { width: 138px; max-height: 84px; }
.footer-logo-territorio { width: 94px; max-height: 126px; }
.footer-partners ul {
  display: grid;
  gap: 6px;
  padding-left: 20px;
  margin: 0 0 20px;
}
.footer-team-mini {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,250,240,.14);
}
.footer-team-mini span {
  width: 100%;
  color: var(--orange-400);
  font-family: var(--font-title);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .85rem;
}
.footer-team-mini figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
}
.footer-team-mini img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255,250,240,.72);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.footer-team-mini figcaption {
  color: rgba(255,250,240,.82);
  font-size: .78rem;
  line-height: 1;
}
.footer-contact a,
.footer-social a {
  color: var(--leaf-300);
  font-weight: 900;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.footer-email-main a {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(167,206,58,.14);
  border: 1px solid rgba(167,206,58,.28);
}
.footer-contact-list {
  display: grid;
  gap: 4px;
  margin: 14px 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,250,240,.14);
  font-size: .92rem;
}
.footer-contact-list p { margin: 0; }
.footer-social {
  margin-top: 14px !important;
  color: rgba(255,250,240,.72) !important;
}

@media (max-width: 980px) {
  .future-videos .two-col-videos { grid-template-columns: 1fr; }
  .future-videos .video-frame { min-height: 280px; }
  .map-data-grid { grid-template-columns: 1fr; }
  .timeline-years { font-size: .72rem; }
  .footer-columns { grid-template-columns: 1fr; }
  .footer-col { padding: 22px; }
  .footer-logo-row { justify-content: center; }
  .footer-brand { text-align: center; }
}
@media (max-width: 640px) {
  .future-videos .video-frame { min-height: 220px; }
  .video-frame.video-thumb { min-height: 210px; }
  .video-grid { grid-template-columns: 1fr; }
  .footer-logo-bauhinia { width: 118px; }
  .footer-logo-territorio { width: 78px; }
  .footer-team-mini img { width: 44px; height: 44px; }
  .footer-contact-list { font-size: .86rem; }
  .footer-col { border-radius: 22px; }
}

/* Correção final das thumbs dos vídeos
   - remove o uso de <img> para evitar o texto alternativo quebrado quando o Drive bloqueia a miniatura;
   - usa a thumbnail como background-image;
   - mantém fallback visual limpo caso o Drive não entregue a imagem;
   - centraliza o botão de play em todos os tamanhos. */
.video-frame.video-thumb {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  background-image:
    linear-gradient(145deg, rgba(6, 61, 55, .35), rgba(78, 39, 13, .40)),
    var(--video-thumb),
    radial-gradient(circle at 50% 50%, rgba(167,206,58,.22), transparent 58%),
    linear-gradient(145deg, rgba(6,61,55,.96), rgba(78,39,13,.96)) !important;
  background-size: cover, cover, cover, cover !important;
  background-position: center, center, center, center !important;
  background-repeat: no-repeat !important;
}
.video-frame.video-thumb img {
  display: none !important;
  visibility: hidden !important;
}
.video-frame.video-thumb::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(167, 206, 58, .18), transparent 38%),
    linear-gradient(180deg, rgba(6, 61, 55, .02), rgba(47, 22, 8, .34)) !important;
  pointer-events: none !important;
}
.video-frame.video-thumb::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(47,22,8,.12)) !important;
  pointer-events: none !important;
}
.video-frame .play-button,
.video-frame button.play-button {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 5 !important;
  transform: translate(-50%, -50%) !important;
  width: clamp(72px, 7vw, 96px) !important;
  height: clamp(72px, 7vw, 96px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 3px solid rgba(255, 250, 240, .9) !important;
  border-radius: 999px !important;
  background: rgba(167, 206, 58, .96) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.34) !important;
  line-height: 1 !important;
}
.video-frame .play-button:hover,
.video-frame button.play-button:hover {
  transform: translate(-50%, -50%) scale(1.06) !important;
}
.video-frame .play-icon {
  display: block !important;
  margin-left: .18em !important;
  font-size: clamp(2rem, 3vw, 2.8rem) !important;
  line-height: 1 !important;
}
.video-frame iframe {
  position: absolute !important;
  inset: 0 !important;
  z-index: 10 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  background: #000 !important;
}
@media (max-width: 640px) {
  .video-frame .play-button,
  .video-frame button.play-button {
    width: 72px !important;
    height: 72px !important;
  }
}

/* Ajustes finais — thumbs locais e botões dos mapas participativos */
.video-frame.video-thumb {
  background-image:
    linear-gradient(145deg, rgba(6, 61, 55, .26), rgba(78, 39, 13, .34)),
    var(--video-thumb),
    radial-gradient(circle at 50% 50%, rgba(167,206,58,.20), transparent 55%),
    linear-gradient(145deg, rgba(6,61,55,.96), rgba(78,39,13,.96)) !important;
  background-size: cover, cover, cover, cover !important;
  background-position: center center !important;
}
.video-frame .play-button,
.video-frame button.play-button {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}
.video-frame .play-button:hover,
.video-frame button.play-button:hover {
  transform: translate(-50%, -50%) scale(1.06) !important;
}
.participatory-map-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: clamp(18px, 4vw, 64px);
  align-items: center;
  margin: clamp(18px, 3vw, 34px) 0 clamp(30px, 5vw, 56px);
  padding-inline: clamp(8px, 2vw, 24px);
}
.participatory-map-actions .button {
  justify-self: center;
  width: min(100%, 360px);
  text-align: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 999px;
  box-shadow: 0 18px 46px rgba(47, 22, 8, .18);
}
@media (max-width: 720px) {
  .participatory-map-actions {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .participatory-map-actions .button {
    width: 100%;
  }
}


/* Ajustes solicitados — legenda mais leve, links discretos e thumbs locais carregadas na abertura */
.map-data-grid {
  gap: 8px !important;
  margin: 12px 0 !important;
}
.map-data-grid article {
  padding: 8px 9px !important;
  border-radius: 14px !important;
  background: rgba(6, 61, 55, .055) !important;
  border-color: rgba(6, 61, 55, .09) !important;
  box-shadow: none !important;
}
.map-data-grid strong {
  font-size: .86rem !important;
  line-height: 1.08 !important;
}
.map-data-grid span {
  margin-top: 3px !important;
  font-size: .70rem !important;
  line-height: 1.18 !important;
}
.map-source-links {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  margin-top: 10px !important;
}
.map-source-links a {
  display: inline !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--leaf-900) !important;
  box-shadow: none !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  font-size: .9rem !important;
  font-weight: 800 !important;
}
.video-frame.video-thumb {
  isolation: isolate !important;
}
.video-frame.video-thumb .video-thumb-img {
  display: block !important;
  visibility: visible !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: .92 !important;
  transform: scale(1.01) !important;
}
.video-frame.video-thumb::before {
  z-index: 1 !important;
}
.video-frame.video-thumb::after {
  z-index: 2 !important;
}
.video-frame .play-button,
.video-frame button.play-button {
  z-index: 5 !important;
}
@media (max-width: 640px) {
  .map-data-grid {
    gap: 7px !important;
  }
  .map-data-grid article {
    padding: 7px 8px !important;
  }
  .map-data-grid strong {
    font-size: .82rem !important;
  }
  .map-data-grid span {
    font-size: .68rem !important;
  }
}


/* Ajustes do rodapé — apoio/parceiros, contato simplificado e copyright */
.footer-support-logos {
  display: flex;
  justify-content: flex-start;
  margin: 4px 0 18px;
}
.footer-support-logos img {
  width: min(100%, 220px);
  max-height: 180px;
  object-fit: contain;
  object-position: left center;
}
.footer-section-divider,
.footer-contact-divider {
  height: 1px;
  width: 100%;
  background: rgba(255, 250, 240, .16);
  margin: 18px 0;
}
.footer-subtitle {
  margin-top: 0;
}
.footer-contact-logo {
  display: block;
  width: min(100%, 150px);
  max-height: 210px;
  object-fit: contain;
  margin-top: 12px;
}
.footer-contact .footer-email-main {
  margin-bottom: 0;
}
.footer-copyright {
  margin-top: clamp(18px, 3vw, 32px);
  padding-top: 18px;
  border-top: 1px solid rgba(255, 250, 240, .14);
  text-align: center;
}
.footer-copyright p {
  margin: 0;
  color: rgba(255, 250, 240, .72);
  font-size: .92rem;
  line-height: 1.45;
}
@media (max-width: 980px) {
  .footer-support-logos,
  .footer-contact-logo {
    margin-left: auto;
    margin-right: auto;
  }
}


/* Ajustes finais solicitados — menu mobile e galeria carrossel */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.site-header {
  width: min(calc(100% - 24px), 1240px);
  max-width: 100%;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.gallery-section {
  overflow: hidden;
}

.gallery-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-block: 4px 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.gallery-track {
  --gallery-gap: clamp(14px, 2.4vw, 28px);
  --gallery-card-width: min(calc((100vw - 88px) / 3), 368px);
  display: flex;
  align-items: stretch;
  gap: var(--gallery-gap);
  width: max-content;
  animation: gallery-marquee 38s linear infinite;
  will-change: transform;
}

.gallery-carousel:hover .gallery-track,
.gallery-carousel:focus-within .gallery-track {
  animation-play-state: paused;
}

.gallery-track figure {
  flex: 0 0 var(--gallery-card-width);
  min-width: var(--gallery-card-width);
  position: relative;
  overflow: hidden;
  min-height: clamp(300px, 32vw, 420px);
  border-radius: 30px;
  border: 1px solid rgba(255, 250, 240, .16);
  background: rgba(255, 250, 240, .08);
  box-shadow: 0 20px 58px rgba(0, 0, 0, .26);
}

.gallery-track img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  transition: transform .45s ease;
}

.gallery-track figure:hover img {
  transform: scale(1.055);
}

.gallery-track figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(47, 22, 8, .72);
  color: var(--cream);
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.gallery-track figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, rgba(47, 22, 8, .55));
  pointer-events: none;
}

@keyframes gallery-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - (var(--gallery-gap) / 2))); }
}

@media (max-width: 980px) {
  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 16px;
    border-radius: 0 0 22px 22px;
    top: 0;
    width: 100%;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
    padding: 0;
    font-size: clamp(.78rem, 3.2vw, .98rem);
    line-height: 1.16;
    letter-spacing: .01em;
  }

  .brand span {
    display: block;
    max-width: 22ch;
    white-space: normal;
  }

  .menu-toggle {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 16px;
  }

  .menu-toggle strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .menu-toggle span {
    width: 22px;
    left: auto;
  }

  .main-nav {
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    border-radius: 22px;
  }

  body.menu-open {
    overflow: hidden;
  }

  .hero {
    padding-top: clamp(110px, 18vh, 150px);
  }

  .gallery-track {
    --gallery-card-width: calc((100vw - 58px) / 2);
    animation-duration: 32s;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 66px;
  }

  .brand span {
    max-width: 20ch;
  }

  .main-nav a {
    min-height: 46px;
    display: flex;
    align-items: center;
  }

  .hero,
  .section {
    scroll-margin-top: 86px;
  }

  .hero-copy,
  .hero-logo,
  .chapter-card,
  .story-card,
  .memory-panel,
  .map-section,
  .participate-grid,
  .closing-text,
  .voice-card,
  .footer-col {
    max-width: 100%;
    min-width: 0;
  }

  img,
  video,
  iframe {
    max-width: 100%;
  }

  .gallery-carousel {
    overflow: hidden;
    width: calc(100% + 26px);
    margin-left: -13px;
    padding-left: 13px;
  }

  .gallery-track {
    --gallery-gap: 14px;
    --gallery-card-width: calc(100vw - 52px);
    animation-duration: 28s;
  }

  .gallery-track figure {
    min-height: 270px;
    border-radius: 24px;
  }

  .gallery-track figcaption {
    left: 12px;
    right: 12px;
    bottom: 12px;
    font-size: .92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-track {
    animation: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    width: 100%;
  }

  .gallery-track figure {
    scroll-snap-align: start;
  }
}

/* Correções finais — header full width, menu limpo e galeria com setas */
body .site-header {
  width: 100%;
  max-width: none;
  left: 0;
  right: 0;
  transform: none;
  border-radius: 0;
}

body .brand {
  min-width: 0;
}

body .brand span {
  white-space: nowrap;
}

body .main-nav {
  flex-shrink: 0;
}

.gallery-section {
  overflow: hidden;
}

.gallery-section .wrapper {
  position: relative;
}

.gallery-carousel {
  position: relative;
  width: 100%;
  overflow: visible;
  padding: 0 50px;
  -webkit-mask-image: none;
  mask-image: none;
}

.gallery-viewport {
  width: 100%;
  overflow: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.gallery-viewport::-webkit-scrollbar {
  display: none;
}

.gallery-track {
  --gallery-gap: clamp(14px, 1.6vw, 20px);
  display: flex;
  align-items: stretch;
  gap: var(--gallery-gap);
  width: auto;
  animation: none !important;
  will-change: auto;
}

.gallery-track figure {
  flex: 0 0 calc((100% - (var(--gallery-gap) * 2)) / 3);
  min-width: calc((100% - (var(--gallery-gap) * 2)) / 3);
  margin: 0;
  position: relative;
  overflow: hidden;
  min-height: clamp(330px, 32vw, 420px);
  border-radius: 24px;
  border: 1px solid rgba(255, 250, 240, .16);
  background: rgba(255, 250, 240, .08);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
}

.gallery-track img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  transition: transform .45s ease;
}

.gallery-track figure:hover img {
  transform: scale(1.035);
}

.gallery-track figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(47, 22, 8, .78);
  color: var(--cream-100);
  font-weight: 900;
  line-height: 1.25;
  backdrop-filter: blur(12px);
}

.gallery-track figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, rgba(47, 22, 8, .55));
  pointer-events: none;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 250, 240, .35);
  border-radius: 999px;
  background: rgba(47, 22, 8, .82);
  color: var(--cream-100);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
  transform: translateY(-50%);
  transition: background .25s ease, transform .25s ease;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  background: rgba(83, 122, 65, .95);
  transform: translateY(-50%) scale(1.04);
  outline: none;
}

.gallery-arrow-prev { left: 0; }
.gallery-arrow-next { right: 0; }

@media (min-width: 981px) {
  body .site-header {
    padding-inline: clamp(18px, 4vw, 56px);
  }

  body .main-nav {
    gap: 6px;
    flex-wrap: nowrap;
  }
}

@media (max-width: 980px) {
  body .site-header {
    width: 100%;
    max-width: none;
    left: 0;
    right: 0;
    transform: none;
    min-height: 64px;
    padding: 10px 14px;
    border-radius: 0;
  }

  body .brand {
    flex: 1 1 auto;
    max-width: calc(100% - 62px);
    font-size: clamp(.64rem, 2.75vw, .94rem);
    line-height: 1;
    letter-spacing: 0;
  }

  body .brand span {
    display: block;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }

  body .menu-toggle {
    flex: 0 0 48px;
  }

  body .main-nav {
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    width: auto;
  }

  .gallery-carousel {
    padding-inline: 44px;
  }

  .gallery-track {
    --gallery-gap: 16px;
  }

  .gallery-track figure {
    flex-basis: calc((100% - var(--gallery-gap)) / 2);
    min-width: calc((100% - var(--gallery-gap)) / 2);
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  body .site-header {
    min-height: 60px;
    gap: 8px;
    padding-inline: 12px 10px;
  }

  body .brand {
    max-width: calc(100% - 58px);
    font-size: clamp(.58rem, 2.7vw, .74rem);
  }

  body .menu-toggle {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .gallery-carousel {
    width: 100%;
    margin-left: 0;
    padding-inline: 34px;
  }

  .gallery-track {
    --gallery-gap: 12px;
  }

  .gallery-track figure {
    flex-basis: 100%;
    min-width: 100%;
    min-height: 285px;
    border-radius: 22px;
  }

  .gallery-track figcaption {
    left: 12px;
    right: 12px;
    bottom: 12px;
    font-size: .9rem;
  }

  .gallery-arrow {
    width: 30px;
    height: 30px;
    font-size: 1.55rem;
  }
}

@media (max-width: 360px) {
  body .brand {
    font-size: .55rem;
  }
}

/* Ajuste de proporção dos cards da galeria */
.gallery-track figure {
  height: clamp(330px, 32vw, 420px);
  min-height: 0;
}

.gallery-track img {
  height: 100%;
  min-height: 0;
}

.gallery-track figure::after {
  z-index: 1;
}

@media (max-width: 980px) {
  .gallery-track figure {
    height: 320px;
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .gallery-track figure {
    height: 285px;
    min-height: 0;
  }
}

/* Correção definitiva da galeria: sem barra de rolagem visível e com navegação por setas */
.gallery-section,
.gallery-section .wrapper {
  overflow: visible !important;
}

.gallery-carousel {
  position: relative !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.gallery-viewport {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  scroll-behavior: auto !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.gallery-viewport::-webkit-scrollbar,
.gallery-track::-webkit-scrollbar,
.gallery-section *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.gallery-track {
  --gallery-gap: clamp(14px, 1.4vw, 18px);
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: var(--gallery-gap) !important;
  width: 100% !important;
  max-width: none !important;
  overflow: visible !important;
  overflow-x: visible !important;
  scroll-snap-type: none !important;
  animation: none !important;
  transform: translate3d(0, 0, 0);
  transition: transform .45s ease;
  will-change: transform;
}

.gallery-carousel:hover .gallery-track,
.gallery-carousel:focus-within .gallery-track {
  animation: none !important;
}

.gallery-track figure {
  flex: 0 0 calc((100% - (var(--gallery-gap) * 2)) / 3) !important;
  min-width: calc((100% - (var(--gallery-gap) * 2)) / 3) !important;
  width: calc((100% - (var(--gallery-gap) * 2)) / 3) !important;
  margin: 0 !important;
  scroll-snap-align: none !important;
}

.gallery-arrow {
  top: 50% !important;
  z-index: 20 !important;
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  font-size: 1.8rem !important;
  line-height: 1 !important;
}

.gallery-arrow-prev { left: -44px !important; }
.gallery-arrow-next { right: -44px !important; }

@media (max-width: 980px) {
  .gallery-track {
    --gallery-gap: 14px;
  }

  .gallery-track figure {
    flex-basis: calc((100% - var(--gallery-gap)) / 2) !important;
    min-width: calc((100% - var(--gallery-gap)) / 2) !important;
    width: calc((100% - var(--gallery-gap)) / 2) !important;
  }

  .gallery-arrow-prev { left: -16px !important; }
  .gallery-arrow-next { right: -16px !important; }
}

@media (max-width: 640px) {
  .gallery-track {
    --gallery-gap: 12px;
  }

  .gallery-track figure {
    flex-basis: 100% !important;
    min-width: 100% !important;
    width: 100% !important;
  }

  .gallery-arrow {
    width: 30px !important;
    height: 30px !important;
    font-size: 1.55rem !important;
  }

  .gallery-arrow-prev { left: 8px !important; }
  .gallery-arrow-next { right: 8px !important; }
}

/* Player local dos vídeos hospedados no próprio site */
.video-frame video {
  position: absolute !important;
  inset: 0 !important;
  z-index: 10 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  background: #000 !important;
  object-fit: contain !important;
}

.video-error {
  position: absolute;
  inset: auto 16px 16px 16px;
  z-index: 3;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(73, 37, 17, 0.86);
  color: #fff7e9;
  font-size: 0.92rem;
  line-height: 1.25;
}

/* Campo anti-spam invisível do formulário */
.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
