/* ===== Variables y reset ===== */
:root {
  --bg: #0a0e1a;
  --bg-alt: #0f1424;
  --surface: #141b2e;
  --surface-2: #1b2438;
  --text: #e6eaf2;
  --muted: #9aa6be;
  --primary: #6366f1;
  --primary-2: #06b6d4;
  --accent: #22d3ee;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --container: 1140px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --grad: linear-gradient(135deg, var(--primary), var(--primary-2));
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(99, 102, 241, 0.5); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--primary); }

/* ===== Header ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  padding: 18px 0;
}
.header.scrolled {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
  padding: 12px 0;
}
.nav { display: flex; align-items: center; justify-content: space-between; }

.logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.5px; }
.logo-bracket { color: var(--accent); font-family: "JetBrains Mono", monospace; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.95rem; color: var(--muted); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: 999px;
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--primary); }
.nav-links a[aria-current] { color: var(--text); }

/* Menú desplegable "Servicios" */
.nav-item.has-dropdown { position: relative; }
.nav-drop-toggle {
  background: none; border: 0; cursor: pointer; font: inherit;
  color: var(--muted); font-weight: 500; font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 6px; padding: 0;
  transition: color 0.2s;
}
.nav-drop-toggle:hover, .nav-drop-toggle.is-active { color: var(--text); }
.caret { font-size: 0.7em; transition: transform 0.25s ease; }
/* Puente invisible para no perder el hover al bajar al menú */
.has-dropdown::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 16px; }
.dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px; min-width: 240px; display: grid; gap: 2px;
  box-shadow: var(--shadow); z-index: 120;
  opacity: 0; visibility: hidden; transition: opacity 0.2s ease, transform 0.2s ease;
}
.dropdown a { padding: 10px 14px; border-radius: 8px; font-size: 0.92rem; color: var(--muted); white-space: nowrap; }
.dropdown a:hover { background: var(--surface-2); color: var(--text); }
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.has-dropdown:hover .caret, .has-dropdown.open .caret { transform: rotate(180deg); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
  position: relative;
  z-index: 101; /* por encima del panel del menú (99) para que la X sea visible */
}
/* Bloquea el scroll del fondo mientras el menú móvil está abierto */
body.nav-open { overflow: hidden; }
/* El backdrop-filter del header crea un "containing block" que atraparía el menú fijo
   (solo se vería la 1ª opción tras hacer scroll). Lo desactivamos con el menú abierto. */
body.nav-open .header { backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px circle at 15% 20%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(500px circle at 85% 30%, rgba(6, 182, 212, 0.15), transparent 55%);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.badge {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 22px;
}
/* Relleno de texto en degradado — reutilizado en logo, hero, stats y cita */
.grad, .logo-accent, .stat strong, .quote-mark {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}
.stat span { color: var(--muted); font-size: 0.85rem; }

/* ===== Code window ===== */
.code-window {
  background: #0d1322;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.4s ease;
}
.code-window:hover { transform: perspective(1000px) rotateY(0) rotateX(0); }
.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #11182b;
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.code-file { margin-left: 8px; color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 0.8rem; }
.code-body {
  padding: 22px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #c8d3ec;
  overflow-x: auto;
}
.c-key { color: #c792ea; }
.c-var { color: #82aaff; }
.c-prop { color: #f78c6c; }
.c-str { color: #c3e88d; }
.c-fn { color: #82aaff; }
.c-comment { color: #5c6a86; font-style: italic; }

/* ===== Secciones ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ===== Grids ===== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-portfolio { grid-template-columns: repeat(2, 1fr); }

/* ===== Cards servicios ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: var(--shadow); }
.card-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 1.4rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  margin-bottom: 20px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.96rem; }
a.card { display: block; }
.card-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: transform 0.2s ease;
}
a.card:hover .card-more { transform: translateX(4px); }

/* ===== Nosotros ===== */
.nosotros-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.nosotros-text h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; letter-spacing: -1px; margin: 12px 0 18px; }
.nosotros-text p { color: var(--muted); margin-bottom: 16px; }
.check-list { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 32px; color: var(--text); }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--grad);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}
.nosotros-quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  position: relative;
}
.nosotros-quote blockquote {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.5px;
}
.quote-mark {
  display: block;
  font-size: 4rem;
  line-height: 0.6;
  margin-bottom: 10px;
}
.nosotros-quote cite { display: block; margin-top: 18px; font-size: 0.95rem; font-style: normal; color: var(--muted); font-weight: 500; }

/* ===== Portafolio ===== */
.project {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
/* Línea de acento superior con el color del proyecto */
.project::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  opacity: 0.9;
  z-index: 3;
}
.project:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px color-mix(in srgb, var(--g1) 22%, rgba(0, 0, 0, 0.5));
  border-color: color-mix(in srgb, var(--g1) 45%, transparent);
}

.project-img {
  position: relative;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  background:
    radial-gradient(120% 100% at 50% -10%, color-mix(in srgb, var(--g1) 85%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--g1) 60%, var(--surface)), color-mix(in srgb, var(--g2) 45%, var(--surface)));
  overflow: hidden;
  isolation: isolate;
}
/* Patrón de puntos decorativo */
.project-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.35;
  mask-image: radial-gradient(80% 80% at 50% 40%, #000, transparent);
  z-index: -1;
}
/* Brillo diagonal que cruza al hacer hover */
.project-img::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  transition: left 0.7s ease;
  z-index: 1;
}
.project:hover .project-img::after { left: 130%; }

/* Icono dentro de badge de cristal */
.project-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  font-size: 1.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.project:hover .project-icon {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.project-label {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.project-body { padding: 24px 24px 26px; }
.project-body h3 { font-size: 1.15rem; line-height: 1.35; margin-bottom: 10px; }
.project-body p { color: var(--muted); font-size: 0.93rem; margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tags span {
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  background: var(--surface-2);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.project-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--g1);
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--g1) 35%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--g1) 10%, var(--surface-2));
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.pl-icon { flex-shrink: 0; }
.pl-text { flex: 1; }
.pl-arrow { flex-shrink: 0; transition: transform 0.2s ease; }
.project:hover .pl-arrow { transform: translateX(4px); }
.project-link:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--g1) 40%, transparent);
}

/* ===== Opiniones / Testimonios ===== */
.review {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.review:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: var(--shadow); }
.stars { color: #f5b50a; font-size: 1.05rem; letter-spacing: 2px; }
.review-text { color: var(--text); font-size: 1rem; font-style: italic; flex: 1; }
.review-author { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--g1), var(--g2));
}
.review-author strong { display: block; font-size: 0.98rem; }
.review-author span { color: var(--muted); font-size: 0.85rem; }

/* ===== CTA ===== */
.cta { padding: 90px 0; }
.cta-inner {
  position: relative;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 64px 40px;
  overflow: hidden;
}
/* Brillo suave de fondo, sin saturar */
.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px circle at 20% 0%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(420px circle at 90% 100%, rgba(6, 182, 212, 0.14), transparent 60%);
  z-index: 0;
}
.cta-inner > * { position: relative; z-index: 1; }
.cta-inner h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -1px; }
.cta-inner p { color: var(--muted); font-size: 1.1rem; margin: 12px 0 28px; }

/* ===== Contacto ===== */
.contact-grid { margin-bottom: 40px; }
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.contact-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.contact-icon { font-size: 2rem; margin-bottom: 14px; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.contact-card p { color: var(--muted); }
/* Botón de WhatsApp */
.whatsapp-cta { display: flex; justify-content: center; margin: 8px 0 40px; }
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 12px 34px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-whatsapp:hover { transform: translateY(-3px); box-shadow: 0 16px 44px rgba(37, 211, 102, 0.55); }
.btn-whatsapp .wa-icon { flex-shrink: 0; }

/* ===== Footer ===== */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 40px; }
.footer-brand .logo { font-size: 1.35rem; }
.footer-slogan { color: var(--muted); font-weight: 500; margin-top: 12px; max-width: 260px; }
.footer-col h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text); margin-bottom: 16px; }
.footer-col a, .footer-col span { display: block; color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.footer-copy { color: var(--muted); font-size: 0.88rem; text-align: center; }

/* ===== Volver arriba ===== */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 90;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ===== Animaciones de aparición ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Páginas internas (servicios, etc.) ===== */
.page-hero { position: relative; padding: 150px 0 60px; overflow: hidden; }
.page-hero-inner { position: relative; z-index: 1; max-width: 780px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current] { color: var(--text); }
.breadcrumb .sep { opacity: 0.5; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; letter-spacing: -1.5px; line-height: 1.12; margin-bottom: 18px; }
.page-hero h1 .grad { letter-spacing: inherit; }
.page-lead { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin-bottom: 28px; }
.page-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Bloques de texto largo */
.prose { max-width: 760px; margin: 0 auto; }
.prose > p { color: var(--muted); font-size: 1.05rem; margin-bottom: 18px; }
.prose > p strong { color: var(--text); font-weight: 600; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.8px; margin-bottom: 16px; }

/* Pasos del proceso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.step:hover { transform: translateY(-6px); border-color: var(--primary); }
.step-num {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.94rem; }

/* FAQ (acordeón nativo, sin JS) */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { color: var(--accent); }
.faq-item > p { padding: 0 24px 22px; color: var(--muted); font-size: 0.98rem; }

/* ===== Contacto (página) ===== */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; }
.form-row { display: grid; gap: 8px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .btn-primary { width: 100%; margin-top: 4px; }
.form-note { color: var(--muted); font-size: 0.82rem; margin-top: 12px; text-align: center; }
/* Campo trampa anti-spam: fuera de pantalla */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Avisos de estado */
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; font-size: 0.95rem; border: 1px solid transparent; }
.alert-ok { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.alert-error { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }

/* Datos de contacto (aside) */
.contact-aside { display: grid; gap: 14px; }
.contact-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.contact-mini:hover { border-color: var(--primary); transform: translateY(-3px); }
.contact-mini-icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-mini strong { display: block; font-size: 0.85rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.contact-aside .btn-whatsapp { margin-top: 6px; justify-content: center; }

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .hero-inner, .nosotros-grid { grid-template-columns: 1fr; }
  .code-window { transform: none; order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    padding: 100px 32px 32px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
    z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.05rem; padding: 8px 0; }
  .nav-cta { margin-top: 8px; }
  /* Desplegable en móvil: estático y plegable al tocar */
  .nav-item.has-dropdown { width: 100%; }
  .has-dropdown::after { content: none; }
  .nav-drop-toggle { width: 100%; justify-content: space-between; font-size: 1.05rem; padding: 8px 0; color: var(--muted); }
  .dropdown {
    position: static; transform: none; box-shadow: none; border: 0;
    background: transparent; padding: 0 0 6px 12px; min-width: 0; z-index: auto;
    display: none; opacity: 1; visibility: visible;
  }
  .has-dropdown.open .dropdown { display: grid; }
  /* Anula el desplazamiento horizontal heredado del escritorio (si no, el submenú se deforma) */
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown,
  .has-dropdown.open .dropdown { transform: none; }
  .dropdown a { padding: 8px 0; }
  .grid-3, .grid-portfolio { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 130px 0 70px; }
  .page-hero { padding: 120px 0 50px; }
  .hero-stats { gap: 28px; }
  .section { padding: 70px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
}
