/* ============================================================================
 * styles.css — Landing Page (Denison Parreira) + Widget de Chat
 * Design alinhado ao site ORIGINAL (denisonparreira.com.br):
 *   - Paleta: azul-marinho #05172F + verde de ação #008012 / acento #40BB00
 *   - Tipografia: Montserrat (títulos/botões) + Open Sans (corpo) — SEM serifa
 * Cores extraídas do CSS do Elementor do site original.
 * Mobile-first.
 * ========================================================================== */

/* ---------------------------- Tokens / reset ---------------------------- */
:root {
  --navy: #05172F;          /* azul-marinho (header, faixas escuras, footer) */
  --navy-2: #0d2740;        /* variação p/ cards escuros/hover */
  --green: #008012;         /* verde de AÇÃO (CTAs, botões) */
  --green-hover: #006a0f;   /* hover do CTA */
  --green-accent: #40BB00;  /* verde de acento (ícones, destaque) */
  --bg-light: #ffffff;      /* fundo de seções claras */
  --card-gray: #f3f4f6;     /* fundo dos cards de serviço */
  --card-border: #e3e6ea;   /* borda sutil de cards */
  --text: #414141;          /* corpo em fundo claro */
  --heading: #05172F;       /* títulos em fundo claro */
  --muted: #667079;         /* texto secundário */
  --line: #e3e6ea;
  --wa: #25d366;            /* verde WhatsApp (botão flutuante) */
  --radius: 12px;
  --shadow: 0 10px 30px rgba(5, 23, 47, 0.10);
  --heading-font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --body-font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body-font);
  color: var(--text);
  background: var(--bg-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.chat-locked { overflow: hidden; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--heading-font); line-height: 1.2; color: var(--heading); font-weight: 700; }

a { color: var(--green); }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.accent { color: var(--green-accent); }

/* ------------------------------- Botões -------------------------------- */
/* CTA verde do original: #008012, borda branca 3px, radius 12, Montserrat 600.
   A borda branca "some" em fundos claros e aparece nas faixas escuras — mesmo
   comportamento do site original. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1rem;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 13px 28px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); box-shadow: 0 8px 22px rgba(0, 128, 18, 0.30); }

.btn-lg { padding: 16px 34px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ------------------------------- Header -------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
/* Logo em branco sobre o header azul-marinho */
.logo img { height: 40px; width: auto; filter: brightness(0) invert(1); }
.header-cta { padding: 10px 20px; font-size: 0.92rem; border-width: 2px; white-space: nowrap; flex-shrink: 0; }

/* -------------------------------- Hero --------------------------------- */
/* Imagem full-width (carteira de trabalho) + overlay escuro + texto branco */
.hero {
  position: relative;
  background:
    linear-gradient(rgba(5, 23, 47, 0.72), rgba(5, 23, 47, 0.80)),
    /* TROCAR pela imagem definitiva do hero se necessário: */
    url("/assets/img/hero-capa.png");
  background-size: cover;
  background-position: center 30%;
  color: #fff;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 56px 0 64px;
}
.hero-text h1 {
  color: #fff;
  font-size: 2.15rem;
  font-weight: 800;
  margin-bottom: 18px;
}
/* No original o H1 é todo branco. (Trocar para var(--green-accent) se quiser
   o "Direito Trabalhista" em verde.) */
.hero-text h1 .accent { color: #fff; }
.hero-sub { color: #dbe2ea; font-size: 1.08rem; max-width: 560px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.badge {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
}

/* Card do hero (onde havia o formulário) — azul-marinho sólido */
.hero-card {
  background: rgba(5, 23, 47, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #eaf1f2;
  border-radius: 12px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.hero-card h2 { color: #fff; font-size: 1.24rem; margin-bottom: 10px; font-weight: 700; }
.hero-card-sub { color: #c6d3d6; font-size: 0.98rem; margin-bottom: 20px; }
.hero-card .btn { margin-top: 4px; }

/* ------------------------------ Seções --------------------------------- */
section.services, section.about { padding: 66px 0; background: var(--bg-light); }
.section-head { text-align: center; max-width: 780px; margin: 0 auto 40px; }
.section-head h2 { font-size: 1.85rem; margin-bottom: 16px; font-weight: 700; }
.section-intro { color: var(--muted); font-size: 1.03rem; }
.section-cta { text-align: center; margin-top: 44px; }

/* ------------------------------ Cards ---------------------------------- */
/* Cinza muito claro, cantos suaves, sem sombra pesada, texto centralizado */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.card {
  background: var(--card-gray);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 30px 24px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
/* Ícone line-art monocromático (contorno), sem quadradinho colorido */
.card-icon {
  width: 56px; height: 56px; margin: 0 auto 18px;
  color: var(--navy);
}
.card-icon svg { width: 100%; height: 100%; display: block; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; font-weight: 700; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ------------------- Faixa azul: pilares + números --------------------- */
/* Faixa com leve gradiente navy → azul (como no original) */
.dark-band {
  background: linear-gradient(180deg, #05172F 0%, #05172F 45%, #0a2b52 100%);
  color: #fff; padding: 66px 0;
}
.dark-band .section-head h2 { color: #fff; }
.dark-band .section-head { margin-bottom: 44px; }
/* Pequeno traço verde sob o título da faixa */
.dark-band .section-head h2::after {
  content: ""; display: block; width: 64px; height: 3px;
  background: var(--green-accent); border-radius: 2px; margin: 16px auto 0;
}

.pillars-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.pillar { text-align: center; padding: 0 6px; position: relative; }
.pillar-icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  color: var(--green-accent);
}
.pillar-icon svg { width: 100%; height: 100%; }
.pillar h3 { color: #fff; font-size: 1.16rem; margin-bottom: 8px; font-weight: 700; }
.pillar p { color: #b9c6d3; font-size: 0.95rem; }

/* Números dentro da faixa azul, como blocos escuros com ícone */
.numbers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 760px;
  margin: 46px auto 0;
}
.number-block {
  background: linear-gradient(120deg, #0d3563 0%, #0a2b50 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 26px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.number-icon {
  width: 46px; height: 46px; flex-shrink: 0; color: var(--green-accent);
}
.number-icon svg { width: 100%; height: 100%; }
.number-block strong {
  display: block; font-family: var(--heading-font); font-size: 1.7rem; color: #fff; font-weight: 800;
  line-height: 1.1;
}
.number-block span { color: #b9c6d3; font-size: 0.95rem; }

/* ------------------------------- Sobre --------------------------------- */
.about-inner { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: center; }
.about-photo { position: relative; }
.about-photo img {
  border-radius: 14px;
  width: 100%; max-width: 440px; margin: 0 auto;
  box-shadow: var(--shadow);
}
/* Placa "Doutor Parreira" sobreposta (como no original) */
.about-plate {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: 10px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--heading-font); font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); white-space: nowrap;
}
.about-plate img { height: 24px; filter: brightness(0) invert(1); }
.about-text h2 { font-size: 1.9rem; font-weight: 800; }
.about-oab {
  display: inline-block; background: rgba(0, 128, 18, 0.12); color: var(--green);
  font-weight: 700; font-size: 0.85rem; padding: 5px 12px; border-radius: 8px; margin: 8px 0 16px;
}
.about-text p { color: var(--muted); margin-bottom: 14px; }
.about-text .btn { margin-top: 10px; }

/* ------------------------------ Footer --------------------------------- */
.site-footer { background: var(--navy); color: #b9c6d3; padding: 44px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.footer-inner { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.footer-brand img { height: 44px; filter: brightness(0) invert(1); opacity: 0.95; }
.footer-info p { font-size: 0.88rem; margin-bottom: 4px; }
.footer-info a { color: var(--green-accent); text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }

/* ------------------------- Botão flutuante WA -------------------------- */
.whatsapp-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  animation: fab-pulse 2.4s infinite;
}
.whatsapp-fab:hover { transform: scale(1.06); }
@keyframes fab-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================================================
 * WIDGET DE CHAT (estilo Leadster) — harmonizado com a paleta navy + verde
 * ========================================================================== */
.chat-root { display: none; }
.chat-root.chat-open { display: block; }

.chat-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(5, 23, 47, 0.55);
  animation: fade-in 0.2s ease;
}

.chat-panel {
  position: fixed; z-index: 999;
  right: 16px; bottom: 16px;
  width: min(400px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 32px));
  background: #f3f4f6;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: chat-up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes chat-up { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Header do chat */
.chat-header {
  background: var(--navy);
  color: #fff;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  background: var(--navy-2); border: 2px solid var(--green-accent); flex-shrink: 0;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-header-text { display: flex; flex-direction: column; line-height: 1.25; }
.chat-header-text strong { font-family: var(--heading-font); font-size: 0.98rem; color: #fff; font-weight: 600; }
.chat-status { font-size: 0.78rem; color: #a7e9bd; display: flex; align-items: center; gap: 6px; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); display: inline-block; }
.chat-close {
  background: transparent; border: none; color: #cdd9db; font-size: 1.7rem;
  line-height: 1; cursor: pointer; padding: 0 4px;
}
.chat-close:hover { color: #fff; }

/* Área de mensagens */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 18px 14px;
  display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, rgba(5, 23, 47, 0.03), transparent 120px);
}
.chat-row { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.chat-row-bot { justify-content: flex-start; }
.chat-row-user { justify-content: flex-end; }

.chat-bubble-avatar {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--navy-2);
}
.chat-bubble-avatar img { width: 100%; height: 100%; object-fit: cover; }

.chat-bubble {
  padding: 11px 14px; border-radius: 16px; font-size: 0.95rem; max-width: 78%;
  word-wrap: break-word; line-height: 1.45;
}
.chat-bubble-bot {
  background: #fff; color: var(--text);
  border: 1px solid var(--line); border-bottom-left-radius: 5px;
}
.chat-bubble-bot a { color: var(--green); }
.chat-bubble-user {
  background: var(--navy); color: #fff; border-bottom-right-radius: 5px;
}

/* "Digitando…" */
.chat-typing { display: inline-flex; gap: 4px; align-items: center; padding: 14px 16px; }
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #9fb0b5;
  animation: typing 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Card de redirecionamento */
.chat-redirect { text-align: center; min-width: 220px; }
.chat-redirect-title { font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.chat-redirect-count { font-family: var(--heading-font); font-size: 1.8rem; color: var(--green); margin-bottom: 8px; font-weight: 800; }
.chat-redirect-cancel { font-size: 0.85rem; color: var(--muted); text-decoration: underline; }

/* Rodapé de resposta */
.chat-footer { flex-shrink: 0; padding: 12px 14px; background: #f3f4f6; border-top: 1px solid var(--line); }
.chat-input-area { width: 100%; }

.chat-input-form { display: flex; align-items: center; gap: 8px; }
.chat-input {
  flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 12px 16px; font-size: 0.95rem; font-family: var(--body-font); color: var(--text);
  outline: none;
}
.chat-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 128, 18, 0.12); }
.chat-send {
  width: 44px; height: 44px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--green); color: #fff; font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chat-send:hover { background: var(--green-hover); }

/* Botões de escolha (verde, como as CTAs do site) */
.chat-buttons { display: flex; flex-direction: column; gap: 8px; }
.chat-choice {
  width: 100%; text-align: center; border: 2px solid var(--green);
  background: var(--green); color: #fff; font-weight: 600; font-size: 0.95rem;
  padding: 12px 16px; border-radius: var(--radius); cursor: pointer; font-family: var(--heading-font);
  transition: background 0.15s ease;
}
.chat-choice:hover { background: var(--green-hover); border-color: var(--green-hover); }
.chat-choice-whatsapp { background: var(--wa); border-color: var(--wa); }
.chat-choice-whatsapp:hover { background: #1eb257; border-color: #1eb257; }

.chat-microcopy { font-size: 0.74rem; color: var(--muted); text-align: center; margin-top: 8px; }
.chat-microcopy a { color: var(--green); }

/* ============================================================================
 * RESPONSIVO — Mobile (< 720px)
 * ========================================================================== */
@media (max-width: 719px) {
  /* (1) Hero: TODOS os elementos centralizados no mobile */
  .hero-inner { padding: 44px 0 52px; }
  .hero-text { text-align: center; }
  .hero-text h1 { font-size: 2rem; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-badges { justify-content: center; }
}

/* (2)+(3) Cabeçalho no celular: botão compacto (sem quebrar em 2 linhas) e
   sem estourar a margem direita — mantém o mesmo respiro nos dois lados. */
@media (max-width: 600px) {
  .header-inner { height: 60px; }
  .logo img { height: 30px; }
  .header-cta { padding: 8px 14px; font-size: 0.8rem; gap: 5px; }
  .header-cta svg { width: 13px; height: 13px; }
}

/* ============================================================================
 * RESPONSIVO — Desktop / Tablet
 * ========================================================================== */
@media (min-width: 720px) {
  .hero-inner { grid-template-columns: 1.2fr 0.8fr; gap: 48px; padding: 84px 0 96px; }
  .hero-text h1 { font-size: 3rem; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .pillars-grid { grid-template-columns: repeat(4, 1fr); gap: 30px; }
  /* Divisores verticais finos entre pilares (como no original) */
  .pillar:not(:last-child)::after {
    content: ""; position: absolute; right: -15px; top: 8%;
    height: 84%; width: 1px; background: rgba(255, 255, 255, 0.14);
  }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .about-inner { grid-template-columns: 0.9fr 1.1fr; gap: 50px; }
  .section-head h2 { font-size: 2.15rem; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-text h1 { font-size: 3.2rem; }
}

/* Chat em telas estreitas: ocupa quase toda a tela */
@media (max-width: 480px) {
  .chat-panel {
    right: 0; bottom: 0; left: 0;
    width: 100vw; height: 100vh; height: 100dvh;
    border-radius: 0;
  }
}

/* Acessibilidade: reduzir movimento */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}
