/* ═══════════════════════════════════════════════════════════════
   base.css — Estilos globais, nav, footer, chatbot, LGPD banner
   Carregado por todos os templates via base.html
   ═══════════════════════════════════════════════════════════════ */

/* ── RESET & GLOBAL ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Barlow', sans-serif; background: #f4f4f5; margin: 0; }
.cond { font-family: 'Barlow Condensed', sans-serif; }

/* Font Awesome override (evitar conflito com CDN) */
.fas, .far, .fal, .fad {
  font-family: "Font Awesome 6 Free" !important;
  font-style: normal !important;
  font-weight: 900 !important;
}
.fab {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* ── NAV ─────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--brand);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.site-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  height: 60px; padding: 0 1.5rem;
  overflow: hidden;
}

/* Logo */
.nav-logo {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; margin-right: 2.5rem; flex-shrink: 1; min-width: 0;
}
.nav-logo-icon {
  width: 32px; height: 32px; background: var(--accent); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: white; flex-shrink: 0;
}
.nav-logo-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; color: white; line-height: 1;
}
.nav-logo-sub {
  font-size: .6rem; color: rgba(255,255,255,.35); text-transform: uppercase;
  letter-spacing: .12em; margin-top: .1rem;
}
.nav-logo-img {
  height: 40px !important; width: auto !important;
  max-width: 120px; max-height: 44px; object-fit: contain; border-radius: 4px; flex-shrink: 1;
}

/* Links */
.nav-links { display: flex; align-items: stretch; gap: 0; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: .4rem; padding: 0 1rem;
  font-family: 'Barlow Condensed', sans-serif; font-size: .8rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  color: rgba(255,255,255,.45); transition: color .15s; position: relative;
  white-space: nowrap;
}
.nav-link:hover { color: rgba(255,255,255,.85); }
.nav-link.active { color: white; }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 0; left: 1rem; right: 1rem;
  height: 2px; background: var(--accent);
}
.nav-link i { font-size: .7rem; opacity: .7; }

/* Right side */
.nav-right { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.nav-btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem 1rem;
  font-family: 'Barlow Condensed', sans-serif; font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  transition: all .15s; white-space: nowrap;
}
.nav-btn-ghost {
  color: rgba(255,255,255,.5); background: transparent;
  border: 1px solid rgba(255,255,255,.12); border-radius: 3px;
}
.nav-btn-ghost:hover { color: white; border-color: rgba(255,255,255,.3); }
.nav-btn-solid {
  color: white; background: var(--accent);
  border: 1px solid var(--accent); border-radius: 3px;
}
.nav-btn-solid:hover {
  background: color-mix(in srgb, var(--accent) 80%, black);
  border-color: color-mix(in srgb, var(--accent) 80%, black);
}
.nav-btn-account {
  color: rgba(255,255,255,.7); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); border-radius: 3px;
}
.nav-btn-account:hover { color: white; background: rgba(255,255,255,.12); }

/* Hamburger mobile */
.nav-hamburger {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  color: rgba(255,255,255,.6); background: none; border: none;
  cursor: pointer; margin-left: .5rem; font-size: 1rem;
}
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; flex-shrink: 0; }
  .nav-logo { margin-right: auto; max-width: calc(100vw - 120px); }
  .nav-logo-img { max-width: 100px; height: 32px !important; }
  .nav-logo-name { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-right { gap: .25rem; }
  .nav-btn span { display: none; }
  .nav-btn { padding: .45rem .65rem; }
}

/* Mobile menu */
.nav-mobile {
  display: none; background: color-mix(in srgb, var(--brand) 85%, black);
  border-top: 1px solid rgba(255,255,255,.07);
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block; padding: .9rem 1.5rem;
  font-family: 'Barlow Condensed', sans-serif; font-size: .9rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  color: rgba(255,255,255,.55); border-bottom: 1px solid rgba(255,255,255,.05);
  transition: color .15s;
}
.nav-mobile a:hover { color: white; }

/* ── MAIN ────────────────────────────────────────────────────── */
.site-main { min-height: 60vh; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer { background: var(--brand); color: white; margin-top: 0; }
.footer-top {
  max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem 3rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
}
@media (max-width: 768px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }

.footer-brand-name {
  font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; color: white; margin-bottom: .5rem;
}
.footer-brand-desc {
  font-size: .85rem; color: rgba(255,255,255,.35); line-height: 1.7; max-width: 240px;
}
.footer-socials { display: flex; gap: .6rem; margin-top: 1.25rem; }
.footer-social {
  width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.12);
  border-radius: 3px; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.35); font-size: .85rem; text-decoration: none; transition: all .15s;
}
.footer-social:hover { border-color: rgba(255,255,255,.4); color: white; }
.footer-social.wa:hover { border-color: #22c55e; color: #22c55e; }

.footer-col-title {
  font-family: 'Barlow Condensed', sans-serif; font-size: .7rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.25); margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: .6rem; }
.footer-col ul li a {
  font-size: .88rem; color: rgba(255,255,255,.45); text-decoration: none; transition: color .15s;
}
.footer-col ul li a:hover { color: white; }
.footer-col p { font-size: .88rem; color: rgba(255,255,255,.45); line-height: 1.7; margin: 0 0 .4rem; }
.footer-col p i { width: 1rem; margin-right: .3rem; opacity: .5; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 1.25rem 1.5rem; max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem;
}
.footer-copy { font-size: .75rem; color: rgba(255,255,255,.2); }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a {
  font-size: .75rem; color: rgba(255,255,255,.2); text-decoration: none; transition: color .15s;
}
.footer-bottom-links a:hover { color: rgba(255,255,255,.5); }

/* ── CHATBOT FAB ─────────────────────────────────────────────── */
#chatbot-fab {
  position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 200;
  width: 52px; height: 52px; background: #16a34a; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.2rem; cursor: pointer; border: none;
  box-shadow: 0 4px 20px rgba(22,163,74,.4); transition: all .2s;
}
#chatbot-fab:hover { background: #15803d; transform: scale(1.08); }
#chatbot-fab .badge {
  position: absolute; top: -2px; right: -2px;
  width: 10px; height: 10px; background: var(--accent); border-radius: 50%;
  border: 2px solid var(--brand);
}

/* Chatbot widget */
#chatbot-widget {
  position: fixed; bottom: 5.5rem; right: 1.75rem; z-index: 199;
  width: 340px; background: white; border-radius: 12px;
  box-shadow: 0 16px 50px rgba(0,0,0,.18);
  display: none; flex-direction: column; overflow: hidden;
  border: 1px solid #e4e4e7;
}
#chatbot-widget.open { display: flex; }
.cw-header {
  background: var(--brand); padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: .75rem;
}
.cw-header-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; flex-shrink: 0; }
.cw-header-title {
  font-family: 'Barlow Condensed', sans-serif; font-size: .95rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: white;
}
.cw-header-sub { font-size: .7rem; color: rgba(255,255,255,.4); }
.cw-close {
  margin-left: auto; background: none; border: none;
  color: rgba(255,255,255,.4); cursor: pointer; font-size: .9rem;
  padding: .2rem; transition: color .15s;
}
.cw-close:hover { color: white; }
#chat-messages { height: 240px; overflow-y: auto; padding: 1rem; background: #f8f8f9; }
.cw-msg-user { display: flex; justify-content: flex-end; margin-bottom: .6rem; }
.cw-msg-user span {
  background: var(--brand); color: white; padding: .5rem .85rem;
  border-radius: 12px 12px 2px 12px; font-size: .83rem; max-width: 75%;
}
.cw-msg-bot { display: flex; justify-content: flex-start; margin-bottom: .6rem; }
.cw-msg-bot span {
  background: white; color: var(--brand); padding: .5rem .85rem;
  border-radius: 12px 12px 12px 2px; font-size: .83rem; max-width: 75%;
  border: 1px solid #e4e4e7;
}
.cw-input-row { display: flex; border-top: 1px solid #e4e4e7; }
.cw-input-row input {
  flex: 1; padding: .75rem 1rem; border: none; outline: none;
  font-family: 'Barlow', sans-serif; font-size: .85rem; background: white;
}
.cw-input-row button {
  padding: .75rem 1rem; background: var(--brand); color: white;
  border: none; cursor: pointer; font-size: .85rem; transition: background .15s;
}
.cw-input-row button:hover { background: var(--accent); }

/* ── LGPD BANNER ─────────────────────────────────────────────── */
#lgpd-banner {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  z-index: 9999; width: calc(100% - 2rem); max-width: 760px;
  background: var(--brand); color: white;
  border-radius: 12px; padding: 1.1rem 1.4rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  font-family: 'Barlow', sans-serif; font-size: .83rem;
  animation: lgpd-in .3s ease;
}
@keyframes lgpd-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#lgpd-banner p {
  flex: 1; min-width: 200px; color: rgba(255,255,255,.75); line-height: 1.55; margin: 0;
}
#lgpd-banner p a { color: white; text-decoration: underline; text-underline-offset: 2px; }
#lgpd-banner p strong { color: white; font-weight: 600; }
.lgpd-actions { display: flex; gap: .6rem; flex-shrink: 0; }
.lgpd-btn {
  padding: .55rem 1.2rem; border-radius: 6px; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; font-size: .82rem;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border: none; transition: all .15s; white-space: nowrap;
}
.lgpd-btn-accept  { background: var(--accent); color: white; }
.lgpd-btn-accept:hover { opacity: .88; }
.lgpd-btn-decline { background: transparent; color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.2); }
.lgpd-btn-decline:hover { color: white; border-color: rgba(255,255,255,.4); }
@media (max-width: 480px) {
  #lgpd-banner { flex-direction: column; gap: .85rem; }
  .lgpd-actions { width: 100%; }
  .lgpd-btn { flex: 1; text-align: center; }
}

/* ── NAV: Transição suave ────────────────────────────────────── */
.site-nav {
  transition: background .45s cubic-bezier(.25,1,.5,1),
              border-color .45s cubic-bezier(.25,1,.5,1),
              backdrop-filter .45s cubic-bezier(.25,1,.5,1);
}

/* Estado transparente (topo da página com hero) */
.site-nav.nav-top {
  background: transparent;
  border-bottom-color: transparent;
}

/* Links legíveis com text-shadow para qualquer fundo */
.site-nav.nav-top .nav-link {
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}
.site-nav.nav-top .nav-link:hover  { color: white; }
.site-nav.nav-top .nav-link.active { color: white; }
.site-nav.nav-top .nav-link.active::after { background: var(--accent); }

/* Logo */
.site-nav.nav-top .nav-logo-name {
  color: white;
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}
.site-nav.nav-top .nav-logo-sub { color: rgba(255,255,255,.5); }

/* Botão fantasma — borda branca translúcida, texto branco */
.site-nav.nav-top .nav-btn-ghost {
  color: rgba(255,255,255,.9);
  border-color: rgba(255,255,255,.3);
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,.06);
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.site-nav.nav-top .nav-btn-ghost:hover {
  color: white;
  border-color: rgba(255,255,255,.65);
  background: rgba(255,255,255,.12);
}

/* Botão sólido (Cadastrar) — mantém a cor accent nativa */
.site-nav.nav-top .nav-btn-solid { /* herda padrão */ }

/* Hamburger mobile */
.site-nav.nav-top .nav-hamburger {
  color: white;
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}

/* ── KEYFRAMES GLOBAIS ───────────────────────────────────────── */
/* Disponíveis para todas as páginas via data-animate-hero       */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Animação imediata para conteúdo dentro de heroes              */
[data-hero-anim]   { animation: fadeSlideUp .8s ease both; }
[data-hero-anim="left"]  { animation: fadeSlideLeft .8s ease both; }
[data-hero-anim="fade"]  { animation: fadeIn .8s ease both; }
/* Stagger via delay */
[data-hero-anim].delay-1 { animation-delay: .1s; }
[data-hero-anim].delay-2 { animation-delay: .2s; }
[data-hero-anim].delay-3 { animation-delay: .3s; }
[data-hero-anim].delay-4 { animation-delay: .4s; }
[data-hero-anim].delay-5 { animation-delay: .5s; }

/* ── SCROLL REVEAL ───────────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s cubic-bezier(.25,1,.5,1),
              transform .75s cubic-bezier(.25,1,.5,1);
}
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* Variante: entrada da esquerda */
[data-animate="fade-left"] {
  transform: translateX(-28px);
}
[data-animate="fade-left"].is-visible {
  transform: none;
}

/* Delay automático para filhos em cascata */
[data-animate].delay-1 { transition-delay: .1s; }
[data-animate].delay-2 { transition-delay: .2s; }
[data-animate].delay-3 { transition-delay: .3s; }

/* ── HERO: sobe para ficar sob a nav sticky ──────────────────── */
/* Páginas sem .hp podem usar [data-hero] direto em .site-main   */
/* O index usa .hp { margin-top: -60px } no próprio index.css    */
.site-main > [data-hero]:first-child {
  margin-top: -60px;
  padding-top: 60px;
}