/* ===================== INÍCIO: Variáveis e resets ===================== */
:root {
  --menu-bg: #FEFAF6;
  --menu-text: #24543D;
  --submenu-text: #6b5d42;

  --brand-teal: #0a6b7e;
  --brand-green: #8cc63e;
  --brand-deep: #0b2d20;
  --brand-deep-2: #071f18;
  --brand-gold: #e6b85c;

  --ink: #0f1419;
  --paper: #ffffff;
  --bg: #f5f7f6;

  --radius: 16px;
  --sombra: 0 8px 24px rgba(0, 0, 0, .12);
  --sombra-menu: 0 18px 38px rgba(8, 31, 24, .18);

  /* Atualizadas pelo JS da home, mas com fallback seguro */
  --altura-header: 76px;
  --altura-footer: 88px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  padding-bottom: 0 !important;
}

body:not(.home-page):not(.peabiru-home-page):not(.mapa-page) {
  background: #f6f1e7 !important;
}

body:not(.home-page):not(.peabiru-home-page):not(.mapa-page) main,
body:not(.home-page):not(.peabiru-home-page):not(.mapa-page) .page,
body:not(.home-page):not(.peabiru-home-page):not(.mapa-page) .conteudo,
body:not(.home-page):not(.peabiru-home-page):not(.mapa-page) .conteudo-page,
body:not(.home-page):not(.peabiru-home-page):not(.mapa-page) .historia-page,
body:not(.home-page):not(.peabiru-home-page):not(.mapa-page) .aplicativos-page {
  background: #f6f1e7 !important;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* ===================== FIM: Variáveis e resets ===================== */


/* ===================== INÍCIO: Layout da home sem buracos ===================== */
body.home-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--brand-deep-2);
}

.home-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0b1a14;
}

.home-page .hero {
  flex: 1 1 auto;
  min-height: 0;
}

/* Desktop/tablet com altura suficiente: encaixa header + hero + footer na viewport */
@media (min-width: 768px) and (min-height: 620px) {
  body.home-page {
    height: 100svh;
    overflow: hidden;
  }

  .home-main,
  .home-page .hero,
  .home-page .carrossel {
    min-height: 0;
  }

  .home-page .carrossel {
    height: 100%;
  }
}

/* Telas baixas ou celulares: permite scroll natural, sem cortar menu/conteúdo */
@media (max-width: 767px), (max-height: 619px) {
  body.home-page {
    min-height: 100svh;
    height: auto;
    overflow-y: auto;
  }

  .home-page .carrossel {
    min-height: max(430px, calc(100svh - var(--altura-header)));
  }
}
/* ===================== FIM: Layout da home sem buracos ===================== */


/* ===================== INÍCIO: Pré-carregador ===================== */
.precarregamento {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
  z-index: 100000;
  opacity: 1;
  transition: opacity .35s ease;
}

.precarregamento.fechar {
  opacity: 0;
  pointer-events: none;
}

.precarregamento-conteudo {
  text-align: center;
}

.precarregamento-conteudo img {
  width: 120px;
  height: auto;
  margin-inline: auto;
}

.precarregamento-conteudo p {
  margin-top: 12px;
  color: #fff;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
/* ===================== FIM: Pré-carregador ===================== */


/* ===================== INÍCIO: Header / Navbar compatível ===================== */
.site-header,
.peabiru-site-header,
.peabiru-header {
  position: sticky;
  top: 0;
  inset-inline: 0;
  z-index: 5000;
  flex: 0 0 auto;
  background: rgba(254, 250, 246, .98);
  border-bottom: 1px solid rgba(36, 84, 61, .14);
  box-shadow: 0 5px 18px rgba(8, 31, 24, .07);
  backdrop-filter: blur(12px);
}

.site-header::before,
.peabiru-site-header::before,
.peabiru-header::before {
  display: none !important;
}

.header-inner,
.peabiru-header-shell {
  width: min(1280px, 94%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 32px);
  min-height: 72px;
  padding: 8px 0;
}

.brand,
.peabiru-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #143a2a;
  font-weight: 900;
}

.brand img,
.peabiru-brand img,
.peabiru-brand-logo,
.peabiru-header-logo,
.peabiru-logo {
  width: auto !important;
  height: clamp(48px, 5vw, 64px) !important;
  max-height: 64px !important;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255, 255, 255, .65);
  box-shadow: 0 6px 18px rgba(8, 31, 24, .10);
}

.brand small,
.brand-subtitle,
.peabiru-brand-subtitle,
.peabiru-brand-kicker,
.peabiru-header-subtitle {
  display: none !important;
}

.brand-title,
.peabiru-brand-title,
.peabiru-brand-name {
  display: block;
  font-size: clamp(1.05rem, 1.7vw, 1.55rem);
  font-weight: 900;
  line-height: 1.05;
  color: #143a2a;
  letter-spacing: -.02em;
}

.nav-toggle,
.peabiru-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(36, 84, 61, .16);
  border-radius: 999px;
  background: #fff;
  color: var(--menu-text);
  cursor: pointer;
}

.nav-toggle-bar,
.peabiru-nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--menu-text);
  border-radius: 999px;
}

.site-nav,
.peabiru-nav {
  display: none;
}

.site-nav.open,
.peabiru-nav.open,
.site-nav.is-open,
.peabiru-nav.is-open {
  display: block;
}

.nav-list,
.peabiru-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li,
.peabiru-nav-list > li {
  border-top: 1px solid rgba(36, 84, 61, .10);
}

.nav-list a,
.nav-list .sub-toggle,
.peabiru-nav-link,
.peabiru-nav-list a,
.peabiru-sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--menu-text);
  font-weight: 800;
  font-size: .86rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
}

.peabiru-nav-link i,
.peabiru-sub-menu i,
.nav-list i,
.sub-menu i {
  display: inline-flex;
  width: 16px;
  justify-content: center;
  color: #276143;
}

.has-sub .sub-menu,
.peabiru-sub-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 8px;
}

.has-sub.open .sub-menu,
.peabiru-nav-item-dropdown.is-open .peabiru-sub-menu,
.peabiru-nav-item-dropdown.open .peabiru-sub-menu {
  display: block;
}

.sub-menu a,
.peabiru-sub-menu a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--submenu-text);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.sub-menu a:hover,
.peabiru-sub-menu a:hover {
  background: rgba(36, 84, 61, .08);
  color: var(--menu-text);
}

@media (max-width: 959px) {
  .site-nav,
  .peabiru-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 3%;
    right: 3%;
    z-index: 5100;
    padding: 10px;
    border: 1px solid rgba(36, 84, 61, .14);
    border-radius: 18px;
    background: rgba(254, 250, 246, .98);
    box-shadow: var(--sombra-menu);
  }

  .site-nav.open,
  .peabiru-nav.open,
  .site-nav.is-open,
  .peabiru-nav.is-open {
    display: block;
  }

  .nav-list a,
  .nav-list .sub-toggle,
  .peabiru-nav-link,
  .peabiru-sub-toggle {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (min-width: 960px) {
  .site-nav,
  .peabiru-nav {
    display: block;
    position: static;
  }

  .nav-toggle,
  .peabiru-nav-toggle {
    display: none;
  }

  .nav-list,
  .peabiru-nav-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    border-top: 0;
  }

  .nav-list > li,
  .peabiru-nav-list > li {
    position: relative;
    border: 0;
  }

  .nav-list a:hover,
  .nav-list .sub-toggle:hover,
  .nav-list .is-active,
  .peabiru-nav-link:hover,
  .peabiru-nav-link.is-active,
  .peabiru-sub-toggle:hover,
  .peabiru-sub-toggle.is-active {
    background: rgba(36, 84, 61, .10);
  }

  .has-sub .sub-menu,
  .peabiru-sub-menu {
    display: block;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 280px;
    border: 1px solid rgba(36, 84, 61, .14);
    border-radius: 18px;
    background: rgba(254, 250, 246, .98);
    box-shadow: var(--sombra-menu);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
  }

  /* Ponte invisível para o submenu não fechar ao mover o mouse */
  .has-sub::after,
  .peabiru-nav-item-dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 16px;
  }

  .has-sub:hover > .sub-menu,
  .has-sub:focus-within > .sub-menu,
  .peabiru-nav-item-dropdown:hover > .peabiru-sub-menu,
  .peabiru-nav-item-dropdown:focus-within > .peabiru-sub-menu,
  .peabiru-nav-item-dropdown.is-open > .peabiru-sub-menu,
  .peabiru-nav-item-dropdown.open > .peabiru-sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
}
/* ===================== FIM: Header / Navbar compatível ===================== */


/* ===================== INÍCIO: Hero / Carrossel ===================== */
.hero {
  position: relative;
  overflow: hidden;
  background: #0b1a14;
}

.carrossel {
  position: relative;
  min-height: calc(100svh - var(--altura-header) - var(--altura-footer));
  isolation: isolate;
  background: #0b1a14;
}

@keyframes kenburns {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease-in-out;
  background: center/cover no-repeat #0b1a14;
  will-change: opacity;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: inherit;
  transform-origin: center center;
  will-change: transform;
  transform: translateZ(0);
}

.slide.is-active {
  opacity: 1;
  z-index: 1;
}

.slide.is-active::before {
  animation: kenburns 8s ease-in-out forwards;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 18, 13, .72) 0%, rgba(5, 18, 13, .45) 46%, rgba(5, 18, 13, .20) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .40) 0%, rgba(0, 0, 0, .22) 45%, rgba(0, 0, 0, .42) 100%);
  pointer-events: none;
}

.slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: start;
  text-align: left;
  color: #fff;
  animation: fadeUp .7s ease both;
  padding-block: clamp(36px, 8vh, 90px);
}

.hero-title {
  font-size: clamp(2rem, 5.8vw, 4.2rem);
  font-weight: 800;
  margin: 0 0 8px;
  line-height: .98;
  letter-spacing: -.03em;
  max-width: 850px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .28);
}

.hero-sub {
  font-size: clamp(1rem, 2.1vw, 1.35rem);
  opacity: .94;
  margin: 0 0 22px;
  max-width: 760px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand-green);
  color: #0f2d12;
  box-shadow: var(--sombra);
}

.btn-primary:hover {
  filter: brightness(.95);
}

.btn-ghost {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-color: rgba(255, 255, 255, .70);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .16);
}

.controle {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .36);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(6px);
}

.controle:hover {
  background: rgba(0, 0, 0, .50);
}

.controle.anterior {
  left: 12px;
}

.controle.proximo {
  right: 12px;
}

.indicadores {
  position: absolute;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  display: flex;
  gap: 8px;
  z-index: 6;
}

.indicadores button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
}

.indicadores button[aria-selected="true"] {
  width: 22px;
  border-radius: 999px;
  background: #fff;
}
/* ===================== FIM: Hero / Carrossel ===================== */


/* ===================== INÍCIO: Página Aplicativos / Conteúdo interno ===================== */
.page-title {
  font-size: clamp(22px, 3.5vw, 32px);
  margin: 8px 0 6px;
  color: var(--menu-text);
  font-weight: 800;
  letter-spacing: .01em;
}

.page-sub {
  margin: 0 0 16px;
  color: #3d4a55;
}

.page {
  padding-bottom: 32px;
}

.cards-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 680px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--paper);
  border: 1px solid #e7ecec;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--sombra);
}

.card--app {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card--app .card-hero {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #e8ece6 center/cover no-repeat;
  box-shadow: var(--sombra);
}

.card--app .card-title {
  margin: 0;
  font-size: 18px;
  color: #1d2a1b;
}

.card--app .card-desc {
  margin: 0;
  font-size: 14px;
  color: #3d4a55;
}

.card--app .card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}
/* ===================== FIM: Página Aplicativos / Conteúdo interno ===================== */


/* ===================== INÍCIO: Footer compacto com paisagem ===================== */
.site-footer,
.peabiru-footer {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 50;
  flex: 0 0 auto;
  min-height: 112px;
  color: rgba(255, 255, 255, .90);
  border: 0 !important;
  box-shadow: none !important;
  background:
    linear-gradient(90deg, rgba(7, 31, 24, .94), rgba(13, 50, 36, .74), rgba(7, 31, 24, .94)),
    url("/peabirusys/assets/img/hero2.jpg") center 48% / cover no-repeat,
    url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1800&q=70") center 48% / cover no-repeat,
    #071f18;
  overflow: hidden;
}

.peabiru-footer-hero {
  display: none !important;
}

.footer-inner,
.peabiru-footer-shell {
  width: min(1280px, 94%);
  margin-inline: auto;
  min-height: 112px;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
  flex-wrap: wrap;
  border: 0 !important;
  box-shadow: none !important;
}

.peabiru-footer-main,
.peabiru-footer-brand,
.peabiru-footer-brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.peabiru-footer-logo {
  width: auto !important;
  height: 44px !important;
  max-height: 44px !important;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .20);
}

.peabiru-footer-brand span,
.peabiru-footer-brand-mini span {
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
}

.peabiru-footer-links,
.peabiru-footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  font-size: .82rem;
  font-weight: 800;
}

.peabiru-footer-links a,
.peabiru-footer-nav a,
.site-footer a {
  color: rgba(255, 255, 255, .84);
}

.peabiru-footer-links a:hover,
.peabiru-footer-nav a:hover,
.site-footer a:hover {
  color: #fff;
}

.peabiru-footer-bottom,
.peabiru-footer-copy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 16px;
  flex-wrap: wrap;
  width: auto;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: .78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .78);
}

.peabiru-footer-bottom p,
.peabiru-footer-copy p,
.peabiru-footer-copy span,
.footer-inner p {
  margin: 0;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

@media (max-width: 760px) {
  .site-footer,
  .peabiru-footer {
    min-height: 126px;
  }

  .footer-inner,
  .peabiru-footer-shell {
    min-height: 126px;
    justify-content: center;
    text-align: center;
  }

  .peabiru-footer-main,
  .peabiru-footer-brand,
  .peabiru-footer-brand-mini {
    justify-content: center;
    width: 100%;
  }

  .peabiru-footer-bottom,
  .peabiru-footer-copy {
    justify-content: center;
    text-align: center;
  }
}
/* ===================== FIM: Footer compacto com paisagem ===================== */
