/* =========================================================
   LAYOUT COMPARTILHADO — base, fundo, header, rodapé
   Usado por includes/header.php e includes/footer.php
   ========================================================= */
/* Reset global (especificidade 0). Páginas que dependem dos margins padrão do
   navegador usam body_class 'no-reset' e ficam de fora. */
:where(body:not(.no-reset)) *,
:where(body:not(.no-reset)) *::before,
:where(body:not(.no-reset)) *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Header/rodapé sempre isolados, com ou sem o reset acima */
.site-header, .site-header *, .site-footer, .site-footer *, .footer-wave, .footer-wave *, .wpp-float { box-sizing: border-box; }
.site-header, .site-footer, .wpp-float { font-family: 'DM Sans', sans-serif; line-height: normal; }
.site-footer p { margin: 0; }

:root {
  /* exclusivas do header/rodapé: as páginas não sobrescrevem estes nomes */
  --cx-teal: #00C2A8;
  --cx-focus: #5CD9C7;
  --orange: #FF5C1A;
  --teal: #00C2A8;
  --gold: #FFB800;
  --dark: #0A0E1A;
  --darker: #060910;
  --card-bg: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --focus: #5CD9C7;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--darker);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@keyframes fadeDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- FUNDO ---------- */
.bg-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 15% 8%, rgba(0,194,168,0.22) 0%, transparent 62%),
              radial-gradient(ellipse 55% 50% at 88% 18%, rgba(255,184,0,0.10) 0%, transparent 60%),
              radial-gradient(ellipse 65% 55% at 85% 85%, rgba(255,92,26,0.16) 0%, transparent 60%),
              radial-gradient(ellipse 50% 45% at 10% 88%, rgba(0,194,168,0.14) 0%, transparent 65%);
}
.bg-layer::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='1.5' cy='1.5' r='1.1' fill='%23fff' fill-opacity='.09'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 25%, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse 85% 70% at 50% 25%, #000 0%, transparent 78%);
}
.content { position: relative; z-index: 1; padding-bottom: 56px; }

/* ---------- HEADER ---------- */
.site-header {
  position: relative; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 32px; max-width: 1060px; margin: 0 auto;
  animation: fadeDown 0.6s ease both;
}
.site-header img { height: 36px; width: auto; display: block; }

.header-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.nav-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 9px 20px; border-radius: 100px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.nav-link:hover, .nav-link.active {
  background: rgba(0,194,168,0.12);
  border-color: rgba(0,194,168,0.35);
  color: var(--cx-teal);
}
.nav-link:hover { transform: translateY(-1px); }
.nav-link svg { flex-shrink: 0; }

/* Menu hambúrguer (celular) */
.menu-toggle { display: none; }
@media (max-width: 700px) {
  .site-header { justify-content: space-between; padding: 16px 20px; gap: 12px; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); color: #fff;
  }
  .menu-toggle line { transform-box: fill-box; transform-origin: center; transition: transform 0.25s, opacity 0.2s; }
  .menu-toggle[aria-expanded="true"] .b1 { transform: translateY(5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .b2 { opacity: 0; }
  .menu-toggle[aria-expanded="true"] .b3 { transform: translateY(-5px) rotate(-45deg); }
  .header-links {
    display: none; position: absolute; top: calc(100% + 4px); left: 20px; right: 20px;
    flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 6px;
    padding: 12px; border-radius: 18px;
    background: #0A0E1A; border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 20px 50px rgba(0,0,0,0.55);
  }
  .header-links.open { display: flex; }
  .header-links .nav-link { justify-content: flex-start; padding: 14px 16px; font-size: 14px; border-radius: 12px; white-space: normal; }
}

/* ---------- RODAPÉ ---------- */
.footer-wave { max-width: 1060px; margin: 0 auto; padding: 0 24px; opacity: 0.55; }
.footer-wave svg { display: block; width: 100%; height: auto; }

.site-footer {
  text-align: center; padding: 40px 24px 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  max-width: 1060px; margin: 0 auto;
}
.site-footer p { font-size: 13px; color: rgba(255,255,255,0.25); line-height: 1.8; }
.site-footer .footer-name { color: rgba(255,255,255,0.5); }
.site-footer a { color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--cx-teal); }
.site-footer .copy { font-size: 11px; color: rgba(255,255,255,0.12); margin-top: 12px; }

/* ---------- WHATSAPP FLUTUANTE ---------- */
.wpp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4); transition: transform 0.2s;
}
.wpp-float:hover { transform: scale(1.06); }

/* ---------- BOTÃO "MAIS" + MENU GRANDE DE SERVIÇOS ---------- */
.nav-more { cursor: pointer; font-family: inherit; }
.nav-more .chev { transition: transform 0.2s; }
.nav-more[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-more[aria-expanded="true"] { background: rgba(0,194,168,0.12); border-color: rgba(0,194,168,0.35); color: var(--cx-teal); }

.mega {
  position: absolute; top: calc(100% + 6px); left: 32px; right: 32px; z-index: 50;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 24px;
  padding: 24px; border-radius: 22px;
  background: #0A0E1A; border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 28px 70px rgba(0,0,0,0.6);
}
.mega[hidden] { display: none; }
.mega-group h3 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); padding: 0 12px; margin-bottom: 8px;
}
.mega-link {
  display: block; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: #fff;
  transition: background 0.2s;
}
.mega-link strong { display: block; font-size: 14px; font-weight: 600; }
.mega-link span { display: block; font-size: 12.5px; line-height: 1.45; color: rgba(255,255,255,0.55); margin-top: 2px; }
.mega-link:hover, .mega-link.active { background: rgba(0,194,168,0.12); }
.mega-link.active strong { color: var(--cx-teal); }
.mega-foot {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  margin-top: 8px; padding: 16px 12px 0; border-top: 1px solid rgba(255,255,255,0.08);
}
.mega-foot a { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.2s; }
.mega-foot a:hover { color: var(--cx-teal); }

@media (max-width: 700px) {
  .header-links .nav-more { justify-content: space-between; }
  .mega {
    position: static; display: flex; flex-direction: column; gap: 14px;
    padding: 12px 4px 4px; border: 0; border-radius: 0; background: transparent; box-shadow: none;
    max-height: 60vh; overflow-y: auto;
  }
  .mega[hidden] { display: none; }
}
