:root {
  color-scheme: light;
  --blue-50: #e7f8ff;
  --blue-100: #b9edff;
  --cyan: #00abea;
  --navy: #003072;
  --ink: #002748;
  --yellow: #ffcc00;
  --paper: #f7fbfd;
  --surface: #ffffff;
  --line: rgba(0, 39, 72, 0.13);
  --text: #0b253d;
  --muted: #5d7183;
  --success: #16a36f;
  --danger: #bf2b45;
  --shadow: 0 18px 60px rgba(0, 39, 72, 0.13);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #061521;
  --surface: #0d2232;
  --line: rgba(185, 237, 255, 0.16);
  --text: #ecf8ff;
  --muted: #9db8c9;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 50;
  transform: translateY(-140%);
  background: var(--yellow);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--navy));
  color: white;
  box-shadow: 0 10px 28px rgba(0, 171, 234, 0.28);
}
.nav-links { display: none; gap: 18px; color: var(--muted); font-weight: 700; }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn, .btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}
.icon-btn { width: 44px; padding: 0; }
.btn { padding: 0 14px; }
.btn.primary { background: var(--yellow); color: var(--ink); border-color: transparent; }
.btn.dark { background: var(--ink); color: white; border-color: transparent; }
.btn.cyan { background: var(--cyan); color: white; border-color: transparent; }

.hero {
  min-height: calc(100svh - 68px);
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: white;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 39, 72, .94), rgba(0, 48, 114, .68) 46%, rgba(0, 48, 114, .16)),
    linear-gradient(0deg, rgba(0, 39, 72, .75), transparent 38%);
  z-index: 1;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 48px 0 32px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--yellow);
}
h1, h2, h3 { line-height: 1.04; letter-spacing: 0; margin: 0; }
h1 { font-size: clamp(2.35rem, 13vw, 4.9rem); max-width: 850px; }
.lead { font-size: clamp(1rem, 4.5vw, 1.25rem); max-width: 680px; color: rgba(255,255,255,.86); margin: 18px 0 22px; }
.hero-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 760px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(16px);
  border-radius: 8px;
  padding: 10px;
}
.hero-search input {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: white;
  color: var(--ink);
}
.quick-tags { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 4px; scrollbar-width: none; }
.tag-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.24);
  color: white;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .86rem;
}

section { padding: 48px 0; }
.section-head { display: grid; gap: 10px; margin-bottom: 22px; }
.section-head p { color: var(--muted); margin: 0; max-width: 720px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; max-width: 760px; }
.kpi {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255,255,255,.1);
}
.kpi strong { display: block; font-size: 1.4rem; color: var(--yellow); }
.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: 1fr; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0,39,72,.06);
}
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); }
.hub-card { min-height: 190px; display: grid; align-content: space-between; }
.hub-card .meta { color: var(--cyan); font-weight: 900; font-size: .86rem; }
.article-card { display: grid; gap: 12px; }
.article-meta { color: var(--muted); font-size: .86rem; display: flex; flex-wrap: wrap; gap: 8px; }
.article-card a { font-weight: 900; font-size: 1.16rem; }
.badge { display: inline-flex; width: fit-content; border-radius: 999px; padding: 5px 9px; background: var(--blue-50); color: var(--navy); font-weight: 900; font-size: .75rem; }
[data-theme="dark"] .badge { background: rgba(0,171,234,.15); color: var(--blue-100); }

.answer-box {
  background: var(--ink);
  color: white;
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 14px;
}
.answer-box p { color: rgba(255,255,255,.82); margin: 0; }
.split { display: grid; gap: 18px; }
.toc { position: sticky; top: 86px; align-self: start; }
.toc a { display: block; padding: 9px 0; color: var(--muted); font-weight: 800; border-bottom: 1px solid var(--line); }
.article-view { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 84%, var(--muted)); }
.prose h2 { margin-top: 34px; font-size: 1.7rem; }
.prose ul { padding-left: 20px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.faq summary { cursor: pointer; font-weight: 900; }

.conversion-band {
  background: linear-gradient(135deg, var(--navy), var(--ink));
  color: white;
}
.conversion-band .shell { display: grid; gap: 18px; }
.conversion-band p { color: rgba(255,255,255,.82); margin: 0; }
.lead-form { display: grid; gap: 10px; }
.lead-form input, .lead-form select, .lead-form textarea {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255,255,255,.1);
  color: white;
}
.lead-form input::placeholder, .lead-form textarea::placeholder { color: rgba(255,255,255,.68); }
.lead-form textarea { min-height: 96px; padding-top: 12px; }

.footer {
  padding: 34px 0 88px;
  background: var(--ink);
  color: white;
}
.footer-grid { display: grid; gap: 18px; }
.footer a, .footer p { color: rgba(255,255,255,.72); }
.whatsapp {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 45;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #1fbe67;
  color: white;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.admin-body { background: #eef5f8; }
.admin-layout { display: grid; min-height: 100svh; }
.admin-sidebar {
  background: var(--ink);
  color: white;
  padding: 18px;
}
.admin-main { padding: 18px; }
.admin-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.admin-tabs button[aria-selected="true"] { background: var(--cyan); color: white; }
.editor-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-weight: 800; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  color: var(--text);
}
.blocks { display: grid; gap: 10px; }
.block-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 8px; overflow: hidden; }
.data-table th, .data-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { color: var(--muted); font-size: .82rem; text-transform: uppercase; }

@media (min-width: 680px) {
  .hero-search { grid-template-columns: 1fr auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .lead-form { grid-template-columns: repeat(2, 1fr); }
  .lead-form textarea, .lead-form .full { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}

@media (min-width: 980px) {
  .nav-links { display: flex; }
  .hero-content { padding: 70px 0 46px; }
  section { padding: 70px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 260px 1fr; }
  .conversion-band .shell { grid-template-columns: 1fr 440px; align-items: center; }
  .admin-layout { grid-template-columns: 250px 1fr; }
  .editor-grid { grid-template-columns: 1.4fr .8fr; align-items: start; }
}

@media (prefers-reduced-motion: no-preference) {
  .card, .btn, .icon-btn, .tag-chip { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
  .card:hover, .btn:hover, .icon-btn:hover, .tag-chip:hover { transform: translateY(-2px); }
}
