:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --primary: #16a34a;
  --primary-light: #22c55e;
  --primary-dark: #15803d;
  --primary-soft: rgba(22, 163, 74, 0.1);
  --accent: #064e3b;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-full: 9999px;
  --header-h: 72px;
  --max-w: 1140px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

.container {
  width: min(var(--max-w), calc(100% - 2rem));
  margin: 0 auto;
}

/* ── Loader de abertura ── */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  width: 160px;
  height: auto;
}

.loader-bar {
  width: 120px;
  height: 3px;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.loader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: inherit;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-link img {
  width: 130px;
  height: auto;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  transition: background 0.2s, color 0.2s;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.5rem 1.1rem !important;
  background: var(--primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--primary-dark) !important;
  color: #fff !important;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 0.25rem;
}

.nav-mobile.is-open { display: flex; }

.nav-mobile a {
  color: var(--text);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.nav-mobile a:hover { background: var(--primary-soft); }

/* ── Botões ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.btn-ghost {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.btn-ghost:hover {
  background: rgba(22, 163, 74, 0.18);
  color: var(--primary-dark);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Tipografia ── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--primary-soft);
  border: 1px solid rgba(22, 163, 74, 0.25);
  margin-bottom: 1rem;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header .lead { margin-inline: auto; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ── Imagens placeholder ── */
.media-slot {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  border: 2px dashed rgba(22, 163, 74, 0.3);
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-muted) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
}

.media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
}

.media-slot--portrait { aspect-ratio: 9 / 16; max-width: 280px; }
.media-slot--square { aspect-ratio: 1; }

/* ── Vídeo YouTube ── */
.video-embed {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-muted);
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
}

.video-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.video-placeholder__soon {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

/* ── Footer ── */
.site-footer {
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  color: rgba(255, 255, 255, 0.78);
  padding: 2.5rem 0 1.75rem;
  margin-top: 2rem;
}

.footer-brand {
  margin-bottom: 1.5rem;
}

.footer-brand img {
  width: auto;
  height: 56px;
  max-width: 220px;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.65);
  max-width: 36ch;
}

.footer-sectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.footer-sector {
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-sector--wide {
  grid-column: 1 / -1;
}

.footer-sector h4 {
  margin: 0 0 0.7rem;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-sector-links {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.footer-sector-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  transition: color 0.2s;
}

.footer-sector-links a:hover {
  color: var(--primary-light);
}

.footer-sector-links__wa {
  color: #86efac !important;
  font-weight: 600;
}

.footer-sector-links__wa:hover {
  color: #bbf7d0 !important;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.5;
}

.footer-bottom__copy {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.footer-bottom__company {
  max-width: 30ch;
}

/* ── Chatbot flutuante ── */
.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
}

.chat-toggle {
  width: 64px;
  height: 64px;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: transform 0.2s ease;
}

.chat-toggle:hover {
  transform: scale(1.04);
}

.chat-toggle-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  background: none;
  border: none;
  box-shadow: none;
  filter: none;
}

.chat-panel {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(100vw - 2rem));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 480px;
}

.chat-panel.is-open { display: flex; }

.chat-header {
  background: var(--primary);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #fff;
}

.chat-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.8;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
  max-height: 300px;
}

.chat-msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.chat-msg--bot {
  background: var(--bg-muted);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg--user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.75rem;
}

.chat-quick button {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--text-soft);
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.chat-quick button:hover {
  background: var(--primary-soft);
  border-color: rgba(22, 163, 74, 0.3);
  color: var(--primary-dark);
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.chat-input-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

.chat-input-row input:focus {
  border-color: var(--primary);
}

.chat-input-row button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Formulário ── */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 0.3rem;
  display: none;
}

.form-group.is-invalid .form-error { display: block; }
.form-group.is-invalid input,
.form-group.is-invalid select,
.form-group.is-invalid textarea {
  border-color: #dc2626;
}

.form-success {
  text-align: center;
  padding: 2rem;
}

.form-success svg {
  width: 64px;
  height: 64px;
  color: var(--primary);
  margin: 0 auto 1rem;
}

/* ── Páginas educacionais ── */
.edu-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.edu-nav {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  max-height: calc(100dvh - var(--header-h) - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 163, 74, 0.35) transparent;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.edu-nav::-webkit-scrollbar {
  width: 6px;
}

.edu-nav::-webkit-scrollbar-thumb {
  background: rgba(22, 163, 74, 0.35);
  border-radius: var(--radius-full);
}

.edu-nav::-webkit-scrollbar-track {
  background: transparent;
}

.edu-nav h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.edu-nav a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.edu-nav a:hover,
.edu-nav a.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.edu-nav-group {
  margin-bottom: 0.15rem;
}

.edu-nav-parent {
  font-weight: 600;
}

.edu-nav-children {
  padding-left: 0.65rem;
  margin-bottom: 0.35rem;
  border-left: 2px solid var(--border);
}

.edu-nav-children a {
  font-size: 0.85rem;
  padding: 0.4rem 0.65rem;
}

.edu-section {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.edu-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.edu-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.edu-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-step-content { flex: 1; }
.edu-step-content p { color: var(--muted); margin: 0 0 1rem; }
.edu-step-content h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.edu-subsection {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.edu-subsection:first-of-type {
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: none;
}

.edu-subsection > h3 {
  margin-bottom: 0.75rem;
}

.edu-tip {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.badge-free {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: var(--radius-full);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.page-hero {
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 3rem;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.page-hero--compact {
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 2rem;
}

/* ── Responsivo ── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-sectors { grid-template-columns: 1fr; }
  .edu-layout { grid-template-columns: 1fr; }
  .edu-nav {
    position: static;
    max-height: min(420px, 55dvh);
  }
}

@media (max-width: 720px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: flex; }
  .section { padding: 3.5rem 0; }
  .chat-widget { bottom: 1rem; right: 1rem; }
}
