/* =====================================================================
   Menu (header) e rodapé (footer) no visual novo da Automa (pt-br).

   Extraído de assets/css/site.css e ESCOPADO para não afetar o miolo
   das páginas antigas (Bootstrap/UIkit). As regras compartilhadas
   (.btn, .wrap e os resets de elemento) só valem dentro de
   .site-header e .site-footer, então os botões/títulos do conteúdo
   das páginas de produto continuam iguais.
   ===================================================================== */

:root {
  --primary-pure:        #1142ff;
  --primary-light:       #3f67ff;
  --primary-medium:      #465998;
  --primary-dark:        #1a3180;
  --primary-ultra-light: #cfd9ff;
  --secondary-pure:      #8fd232;
  --background-light:    #ffffff;
  --gray-50:  #fbfcff;
  --gray-100: #f4f5fc;
  --gray-200: #e8e9f0;
  --gray-300: #d9d9e0;

  --gray-500: #9a9db0;
  --gray-700: #55565c;
  --gray-800: #434449;
  --gray-900: #26272c;
  --gray-950: #00010a;

  --family-heading: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --family-body:    'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --weight-regular:  400;
  --weight-semibold: 600;
  --weight-bold:     700;

  --size-14: 0.875rem;
  --size-16: 1rem;
  --size-18: 1.125rem;
  --size-22: 1.375rem;
  --size-30: 2rem;
  --size-40: 2.5rem;
  --size-48: 3rem;
  --size-56: 3.5rem;

  --lh-heading: 1.2;
  --lh-body:    1.4;

  --wrap-max: 1360px;
  --wrap-pad: 24px;

  --bp-desktop:   1024px;
  --bp-tablet:     768px;
  --bp-mobile:     600px;
  --bp-mobile-sm:  430px;

  --header-height: 80px;
}

/* ---- resets de elemento, ESCOPADOS ao header/footer ---- */
.site-header, .site-footer {
  box-sizing: border-box;
  font-family: var(--family-body);
  font-size: var(--size-16);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
}
.site-header *, .site-header *::before, .site-header *::after,
.site-footer *, .site-footer *::before, .site-footer *::after { box-sizing: border-box; }

.site-header h1, .site-header h2, .site-header h3, .site-header h4,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4 {
  font-family: var(--family-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-heading);
  margin: 0;
}
.site-header p, .site-footer p { margin: 0; }
.site-header strong, .site-footer strong { font-weight: var(--weight-semibold); }
.site-header a, .site-footer a { color: inherit; }
.site-header img, .site-header svg,
.site-footer img, .site-footer svg { max-width: 100%; }
.site-header img, .site-footer img { height: auto; }

.site-header :focus-visible, .site-footer :focus-visible {
  outline: 3px solid var(--secondary-pure);
  outline-offset: 3px;
}

/* ---- .wrap, ESCOPADO ---- */
.site-header .wrap, .site-footer .wrap {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

/* ---- skip-link (fica fora do header no DOM, classe única) ---- */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 8px; top: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--gray-950);
  color: var(--gray-50);
  border-radius: 4px;
}

/* ---- botões, ESCOPADOS (evita colidir com .btn do Bootstrap) ---- */
.site-header .btn, .site-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 20px;

  border: none;
  border-radius: 60px;
  background: var(--secondary-pure);
  color: var(--gray-50);
  font-family: var(--family-body);
  font-size: var(--size-18);
  line-height: var(--lh-body);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: filter .18s ease;
}
.site-header .btn:hover, .site-footer .btn:hover { filter: brightness(.94); }

.site-header .btn--verde,  .site-footer .btn--verde  { background: var(--secondary-pure); color: var(--gray-50); }
.site-header .btn--azul,   .site-footer .btn--azul   { background: var(--primary-pure);   color: var(--gray-50); }
.site-header .btn--branco, .site-footer .btn--branco { background: var(--background-light); color: var(--primary-pure); }

.site-header .btn__seta, .site-footer .btn__seta {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--background-light);
  color: var(--primary-pure);
  font-size: 1rem; line-height: 1;
}
.site-header .btn--verde .btn__seta,  .site-footer .btn--verde .btn__seta  { color: var(--secondary-pure); }
.site-header .btn--branco .btn__seta, .site-footer .btn--branco .btn__seta {
  background: var(--primary-pure);
  color: var(--background-light);
}

.site-header .btn--sm, .site-footer .btn--sm { padding: 4px 4px 4px 16px; font-size: var(--size-14); }
.site-header .btn--sm .btn__seta, .site-footer .btn--sm .btn__seta { width: 28px; height: 28px; font-size: .8rem; }

.site-footer .btn--pill-clara {
  background: var(--gray-50);
  color: var(--primary-dark);
  font-size: var(--size-14);
  padding: 4px 4px 4px 16px;
}
.site-footer .btn--pill-clara .btn__seta {
  width: 26px; height: 26px;
  font-size: .75rem;
  background: var(--primary-pure);
  color: var(--gray-50);
}

/* =========================  HEADER  ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--background-light);
  border-bottom: 1px solid var(--gray-200);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-height);
}
.site-header__logo { display: flex; flex: 0 0 auto; }
.site-header__logo img { width: 150px; margin-top: 10px; }

.site-nav__list,
.lang-switch ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__list { gap: 20px; }

.site-nav__list .site-nav__link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  font-size: var(--size-14);
  text-decoration: none;
  color: var(--gray-800);
}
.site-nav__list .site-nav__link:hover,
.site-nav__list a[aria-current="page"] { color: var(--primary-pure); }

.lang-switch ul { gap: 12px; }
.lang-switch a {
  padding: 6px 0;
  font-size: var(--size-14);
  text-decoration: none;
  color: var(--gray-700);
}
.lang-switch a[aria-current="true"] { color: var(--primary-pure); font-weight: var(--weight-semibold); }

.nav-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  flex: 0 0 40px;
  margin-inline-start: auto;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--primary-dark);
  cursor: pointer;
}
.nav-toggle__barra {
  position: absolute;
  left: 7px;
  width: 25px; height: 3px;
  border-radius: 10px;
  background: var(--gray-50);
  transition: transform .2s ease, opacity .2s ease, top .2s ease;
}
.nav-toggle__barra:nth-child(1) { top: 13px; }
.nav-toggle__barra:nth-child(2) { top: 24px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__barra:nth-child(1) { top: 18.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__barra:nth-child(2) { top: 18.5px; transform: rotate(-45deg); }

.site-nav-painel {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-inline-start: auto;
}
.site-header__acoes { display: flex; align-items: center; gap: 16px; }

button.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.site-nav__servicos-toggle { color: var(--gray-800); }

.site-nav__chevron {
  position: relative;
  width: 9px; height: 9px;
  flex: 0 0 9px;
  transition: transform .18s ease;
}
.site-nav__chevron::before,
.site-nav__chevron::after {
  content: '';
  position: absolute;
  background: currentColor;
}
.site-nav__chevron::before { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }
.site-nav__chevron::after  { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.site-nav__servicos-toggle[aria-expanded="true"] .site-nav__chevron { transform: rotate(45deg); }

.lang-globe {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-800);
  cursor: pointer;
}
.lang-globe:hover { background: var(--primary-ultra-light); color: var(--primary-dark); }
.lang-globe--mobile { display: none; }

#lang-lista {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  margin: 0; padding: 15px;
  list-style: none;
  background: var(--background-light);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,1,10,.08);
}
#lang-lista.is-open { display: block; }

#lang-lista a,
#lang-lista-mobile a {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.lang-switch__bandeira {
  flex: 0 0 20px;
  width: 20px; height: 20px;
  border-radius: 50%;
}
#lang-lista a[aria-current="true"] .lang-switch__nome,
#lang-lista-mobile a[aria-current="true"] .lang-switch__nome {
  color: var(--primary-pure);
  font-weight: var(--weight-semibold);
}
.lang-switch { position: relative; }
.lang-switch--mobile { display: none; }
#lang-lista-mobile {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  margin: 0;
  padding: 15px;
  min-width: 150px;
  list-style: none;
  background: var(--background-light);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,1,10,.12);
}
#lang-lista-mobile.is-open { display: block; }
#lang-lista-mobile a {
  display: block;
  padding: 6px 0;
  text-decoration: none;
  color: var(--gray-800);
  font-size: var(--size-14);
}
#lang-lista-mobile a[aria-current="true"] { color: var(--primary-pure); font-weight: var(--weight-semibold); }

/* ---- megamenu de serviços ---- */
.servicos-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--background-light);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 12px 24px rgba(0,1,10,.10);
  transition: max-height .25s ease;
}
.servicos-menu.is-open { display: block; max-height: 90vh; overflow-y: auto; }
.servicos-menu__inner { padding-block: 40px; }
.servicos-menu__voltar {
  display: none;
  align-items: center;
  gap: 4px;
  margin: 0 0 24px;
  padding: 0;
  border: none;
  background: none;
  font-size: var(--size-14);
  color: var(--gray-700);
  cursor: pointer;
}
.servicos-menu__intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.servicos-menu__titulo { margin: 0 0 8px; font-size: 1.5rem; }
.servicos-menu__desc { margin: 0; max-width: 480px; color: var(--gray-700); font-size: var(--size-14); }
.servicos-menu__divisor { border: none; border-top: 1px solid var(--gray-200); margin: 0 0 32px; }
.servicos-menu__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.servicos-menu__coluna { display: flex; flex-direction: column; gap: 20px; }
.servicos-menu__categoria {
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 20px 24px;
}
.servicos-menu__categoria-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gray-900);
  font-weight: var(--weight-semibold);
  margin-bottom: 12px;
}
.servicos-menu__categoria-link:hover { color: var(--primary-pure); }
.servicos-menu__num { color: var(--primary-pure); font-weight: var(--weight-semibold); }
.servicos-menu__label { flex: 1; }
.servicos-menu__seta { color: var(--primary-pure); }
.servicos-menu__itens { margin: 0; padding: 0; list-style: none; }
.servicos-menu__itens li {
  padding-block: 4px;
  font-size: var(--size-14);
  color: var(--gray-700);
}
.servicos-menu__item-link {
  color: inherit;
  text-decoration: none;
}
.servicos-menu__item-link:hover,
.servicos-menu__item-link:focus-visible {
  color: var(--primary-pure);
}

/* ---- header responsivo ---- */
@media (min-width: 1025px) {
  .site-nav__servicos-toggle { position: relative; }
  .site-nav__servicos-toggle::before {
    content: '';
    position: absolute;
    inset: 0 -14px;
    z-index: -1;
    border-radius: 20px;
    background: transparent;
    transition: background .18s ease;
  }
  .site-nav__servicos-toggle[aria-expanded="true"] { color: var(--primary-dark); }
  .site-nav__servicos-toggle[aria-expanded="true"]::before { background: var(--gray-100); }
}

@media (max-width: 1024px) {
  :root { --size-56: 3rem; --size-48: 2.25rem; --size-40: 2rem; }

  .nav-toggle { display: flex; order: 2; }

  .site-nav-painel {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-inline-start: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--background-light);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 8px 16px rgba(0,1,10,.08);
    transition: max-height .25s ease;
  }
  .site-nav-painel.is-open {
    max-height: calc(100vh - var(--header-height));
    max-height: calc(100dvh - var(--header-height));
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    overflow-y: auto;
  }

  .site-nav__list,
  .site-header__acoes { flex-shrink: 0; }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 52px 0 0;
  }
  .site-nav__list .site-nav__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    height: auto;
    padding: 21px 32px;
    text-align: left;
    font-size: 1.25rem;
  }

  .site-header__acoes {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 23px 32px 40px;
    border-top: none;
  }
  .site-header__acoes .btn--sm {
    padding: 4px 4px 4px 20px;
    font-size: 1.25rem;
  }
  .site-header__acoes .btn--sm .btn__seta {
    width: 38px; height: 38px;
    font-size: 1rem;
  }
  .lang-switch ul { justify-content: center; }
  .site-header__acoes .lang-globe { display: none; }

  .lang-switch--mobile {
    display: block;
    position: relative;
    margin-inline-start: auto;
    order: 1;
  }
  .lang-globe--mobile { display: grid; }

  .servicos-menu {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0; bottom: 0;
    max-height: none;
    z-index: 60;
    border-bottom: none;
  }
  .servicos-menu__inner { padding: 16px var(--wrap-pad) 20px; }
  .servicos-menu__voltar { display: inline-flex; }
  .servicos-menu__intro { flex-direction: column; align-items: flex-start; gap: 16px; }
  .servicos-menu__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
  :root { --size-56: 2.5rem; --size-48: 1.875rem; --size-40: 1.625rem; --wrap-pad: 20px; --header-height: 72px; }
  .site-header__logo img { width: 158px; }
  .servicos-menu__grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 430px) {
  :root { --size-48: 1.5rem; --size-40: 1.375rem; --wrap-pad: 16px; --header-height: 90px; }
  .site-header__inner { gap: 12px; }
}

/* =========================  FOOTER  ========================= */
.site-footer {
  padding: 56px 0 32px;
  background: var(--primary-dark);
  color: var(--background-light);
}
.site-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-footer__logo { display: block; line-height: 0; }
.site-footer__social {
  display: flex; gap: 12px;
  margin: 0; padding: 0; list-style: none;
}
.site-footer__social a {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--primary-pure);
  transition: background .18s ease;
}
.site-footer__social a:hover { background: var(--background-light); }
.site-footer__social svg { width: 18px; height: 18px; fill: currentColor; }

.site-footer__divisor {
  margin: 32px 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,.18);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.4fr 1fr;
  gap: 32px;
}
.site-footer__titulo {
  font-family: var(--family-body);
  font-weight: var(--weight-semibold);
  font-size: var(--size-16);
  margin-bottom: 16px;
}
.site-footer__tagline {
  font-size: var(--size-14);
  color: var(--gray-200);
  max-width: 280px;
  margin-bottom: 20px;
}
.site-footer__selos { display: block; height: auto; border-radius: 8px; }

.site-footer__lista {
  display: flex; flex-direction: column; gap: 12px;
  margin: 0; padding: 0; list-style: none;
}
.site-footer__lista a {
  font-size: var(--size-14);
  color: var(--gray-100);
  text-decoration: none;
}
.site-footer__lista a:hover { color: #fff; }

.site-footer__servicos {
  display: flex;
  gap: 32px;
}
.site-footer__botoes {
  display: flex; flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.site-footer__email-rotulo {
  font-size: var(--size-14);
  color: var(--gray-200);
  margin-bottom: 4px;
}
.site-footer__email {
  font-size: var(--size-14);
  color: var(--background-light);
  text-decoration: underline;
}
.site-footer__base {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.18);
  font-size: var(--size-14);
  color: var(--gray-200);
}
.site-footer__base nav ul {
  display: flex; gap: 24px;
  margin: 0; padding: 0; list-style: none;
}
.site-footer__base nav a {
  color: var(--gray-200);
  text-decoration: none;
}
.site-footer__base nav a:hover { color: #fff; }

@media (max-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
}
@media (max-width: 768px) {
  .site-footer { padding: 40px 0 24px; }
  .site-footer__top { flex-wrap: wrap; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__servicos { flex-direction: column; gap: 12px; }
  .site-footer__base { flex-direction: column; align-items: flex-start; }
}
