/* ==========================================================================
   DERVIA TECH — Main Stylesheet
   Corporate Concept 3 — Modern Tech Identity
   ========================================================================== */

:root {
  /* Brand Palette */
  --primary: #3b5bf5;
  --primary-hover: #2b49df;
  --primary-light: #eef2ff;
  --primary-border: rgba(59, 91, 245, 0.22);
  --primary-glow: rgba(59, 91, 245, 0.35);

  /* Neutrals & Dark Theme */
  --navy-darkest: #070d19;
  --navy-dark: #0b1426;
  --navy-surface: #121e36;
  --navy-border: rgba(255, 255, 255, 0.12);

  /* Light Theme & Text */
  --ink-900: #0f172a;
  --ink-700: #1e293b;
  --ink-600: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --white: #ffffff;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 16px 36px -6px rgba(21, 35, 67, 0.1), 0 4px 12px -2px rgba(21, 35, 67, 0.06);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* Base Reset & Core Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink-700);
  background-color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  padding: 10px 16px;
  background: var(--ink-900);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 999;
}

.skip:focus {
  left: 16px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
}

.brand img {
  width: 220px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-600);
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 1.25rem;
  color: var(--ink-900);
  cursor: pointer;
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--primary);
  padding: 13px 24px;
  border-radius: 10px;
  min-height: 48px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 91, 245, 0.2);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(59, 91, 245, 0.32);
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.88rem;
  min-height: 40px;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--white);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  background: linear-gradient(135deg, #070d19 0%, #0d182e 50%, #15274d 100%);
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 91, 245, 0.2) 0%, rgba(59, 91, 245, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  align-items: center;
  gap: 56px;
  padding-top: 104px;
  padding-bottom: 104px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 16px 0;
}

.hero .eyebrow {
  color: #9bb2ff;
  background: rgba(59, 91, 245, 0.15);
  border: 1px solid rgba(155, 178, 255, 0.25);
  padding: 4px 12px;
  border-radius: 30px;
}

.hero h1 {
  font-size: clamp(2.35rem, 4.4vw, 3.85rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 0 0 24px 0;
  max-width: 780px;
  text-wrap: balance;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #cbd5e1;
  max-width: 620px;
  margin: 0 0 32px 0;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-note {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 24px 0 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-note::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #38bdf8;
}

/* Hero Panel (Right Card) */
.hero-panel {
  background: linear-gradient(165deg, rgba(21, 35, 68, 0.65) 0%, rgba(9, 17, 34, 0.85) 100%);
  border: 1px solid rgba(130, 160, 240, 0.22);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(4, 9, 21, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-emblem {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 6px;
}

.hero-emblem img {
  width: 195px;
  height: 195px;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(59, 91, 245, 0.32));
  transition: transform 0.3s ease;
}

.hero-panel:hover .hero-emblem img {
  transform: scale(1.02);
}

.hero-areas {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-area-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-area-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(155, 178, 255, 0.35);
  transform: translateX(4px);
}

.hero-area-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  flex-shrink: 0;
}

/* ==========================================================================
   Sections Layout & Titles
   ========================================================================== */

.section {
  padding: 96px 0;
}

.section-alt {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ink-900);
  max-width: 760px;
  margin: 0 0 18px 0;
  text-wrap: balance;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink-900);
  margin: 16px 0 10px 0;
}

.section-lead {
  color: var(--muted);
  max-width: 740px;
  margin: 0 0 44px 0;
  font-size: 1.08rem;
  line-height: 1.68;
}

.grid {
  display: grid;
  gap: 24px;
}

.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Cards */
.card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Card Icons */
.card-icon {
  display: inline-flex;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  margin-bottom: 6px;
  flex-shrink: 0;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Section: Nuestro Software (Products)
   ========================================================================== */

.card-product {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
}

.card-product:hover {
  border-color: rgba(59, 91, 245, 0.35);
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 30px;
  padding: 5px 13px;
  line-height: 1.2;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-piloto {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status-piloto .status-dot {
  background-color: #2563eb;
  box-shadow: 0 0 6px #60a5fa;
}

.status-revision {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.status-revision .status-dot {
  background-color: #64748b;
}

/* ==========================================================================
   Section: Servicios Tecnológicos
   ========================================================================== */

.service-card {
  height: 100%;
}

.service-card h3 {
  font-size: 1.12rem;
  margin-top: 14px;
}

/* ==========================================================================
   Section: Enfoque Empresarial (Nosotros)
   ========================================================================== */

.about {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 68px;
  align-items: center;
}

.about p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.step-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 20px 22px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.step-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 1rem;
  border: 1px solid var(--primary-border);
  flex-shrink: 0;
}

.step-label {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink-900);
}

/* ==========================================================================
   Section: Contacto
   ========================================================================== */

.contact {
  background: linear-gradient(180deg, #f0f4ff 0%, #e6edff 100%);
  border-top: 1px solid #dce5fa;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
  gap: 52px;
}

.contact p:not(.eyebrow) {
  color: var(--ink-600);
  font-size: 1.05rem;
  line-height: 1.65;
}

.contact-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0;
}

.contact-highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-700);
}

.highlight-bullet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.contact-direct-links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(59, 91, 245, 0.15);
}

.direct-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 10px 0;
}

.direct-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-outline-dark {
  background: transparent;
  border-color: #cbd5e1;
  color: var(--ink-700);
}

.btn-outline-dark:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--ink-900);
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line-strong);
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-status-banner {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 22px;
}

.form-status-banner p {
  margin: 6px 0 0 0;
  font-size: 0.88rem;
  color: var(--ink-600);
  line-height: 1.5;
}

.status-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #92400e;
  background: #fef3c7;
  padding: 3px 10px;
  border-radius: 20px;
}

.status-dot-warning {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #d97706;
}

.form-feedback {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 20px;
}

.form-feedback.is-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.form-feedback.is-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.form-feedback.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-700);
}

.required {
  color: #dc2626;
}

.optional {
  font-weight: 400;
  color: var(--muted-light);
  font-size: 0.82rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink-900);
  background-color: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 91, 245, 0.2);
  outline: none;
}

.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid {
  border-color: #ef4444;
  background-color: #fffafb;
}

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

.field-error {
  font-size: 0.8rem;
  color: #dc2626;
  font-weight: 500;
  min-height: 18px;
}

.form-consent-group {
  margin-top: 4px;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-consent input[type="checkbox"] {
  margin-top: 4px;
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-consent label {
  font-size: 0.84rem;
  color: var(--ink-600);
  line-height: 1.5;
  cursor: pointer;
}

.form-consent label a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.form-consent label a:hover {
  color: var(--primary-dark);
}

.form-consent-group + .form-consent-group {
  margin-top: 8px;
}

.hp-field {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: -9999 !important;
}

.btn-submit {
  position: relative;
  font-size: 1rem;
  padding: 14px 24px;
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-submit.is-loading .btn-text {
  opacity: 0.8;
}

.btn-submit.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 8px 0 0 0;
  text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--navy-darkest);
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 56px 0 36px 0;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand img {
  width: 200px;
  height: auto;
  display: block;
  margin-bottom: 8px;
}

.footer-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.footer-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.92rem;
  color: #94a3b8;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  margin: 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* 1024px - 1199px: Desktops / Large Tablets */
@media (max-width: 1024px) {
  .hero-grid {
    gap: 40px;
    padding-top: 80px;
    padding-bottom: 80px;
  }
  .cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .about {
    gap: 40px;
  }
}

/* 768px - 900px: Tablets */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 72px;
    padding-bottom: 72px;
    gap: 44px;
  }
  .hero-panel {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }
  .nav-links {
    gap: 18px;
  }
  .nav-cta {
    display: none;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* Mobile & Small Tablets (< 768px) */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 76px;
  }
  .nav {
    min-height: 72px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .brand img {
    width: 180px;
  }
  .menu-toggle {
    display: block;
    margin-left: auto;
  }
  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    gap: 4px;
    margin-bottom: 12px;
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
  }
  .nav-links a:hover {
    background: var(--bg-subtle);
  }
  .nav-links a::after {
    display: none;
  }
  .hero-grid {
    padding-top: 56px;
    padding-bottom: 60px;
  }
  .hero h1 {
    font-size: 2.3rem;
  }
  .section {
    padding: 68px 0;
  }
  .cols-2, .cols-4 {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .contact-card {
    padding: 28px 20px;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .footer-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Small Mobile (375px) */
@media (max-width: 480px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }
  .brand img {
    width: 155px;
  }
  .hero h1 {
    font-size: 1.85rem;
    line-height: 1.18;
    word-break: break-word;
  }
  .lead {
    font-size: 1.02rem;
  }
  .btn {
    width: 100%;
  }
  .actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }
  .hero-panel {
    padding: 24px 16px;
  }
  .hero-emblem img {
    width: 150px;
    height: 150px;
  }
  .card {
    padding: 24px 18px;
  }
  .contact-card {
    padding: 22px 14px;
  }
}

/* ==========================================================================
   Página Legal: Política de Tratamiento de Datos Personales
   ========================================================================== */
.legal-page {
  padding-bottom: 80px;
}

.legal-hero {
  background: linear-gradient(180deg, rgba(14, 23, 42, 0.04) 0%, rgba(248, 250, 252, 0) 100%);
  padding: 48px 0 36px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.legal-hero-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.status-dot-active {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
}

.legal-version-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-700);
  background: var(--line);
  padding: 3px 10px;
  border-radius: 20px;
}

.legal-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  margin: 0 0 16px 0;
}

.legal-subtitle {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-700);
  max-width: 900px;
  margin: 0;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 96px;
}

.legal-toc-card {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.legal-toc-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-900);
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-toc-list a {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-700);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.legal-toc-list a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.legal-toc-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.legal-article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.legal-section {
  margin-bottom: 44px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  margin: 0 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(59, 91, 245, 0.15);
}

.legal-section p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-700);
  margin: 0 0 16px 0;
}

.legal-bullets {
  margin: 0 0 20px 20px;
  padding: 0;
  color: var(--ink-700);
  line-height: 1.7;
  font-size: 0.96rem;
}

.legal-bullets li {
  margin-bottom: 10px;
}

.legal-info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 18px 0;
}

.legal-data-table {
  width: 100%;
  border-collapse: collapse;
}

.legal-data-table th,
.legal-data-table td {
  padding: 10px 12px;
  font-size: 0.92rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
}

.legal-data-table tr:last-child th,
.legal-data-table tr:last-child td {
  border-bottom: none;
}

.legal-data-table th {
  width: 220px;
  font-weight: 700;
  color: var(--ink-900);
}

.legal-data-table td {
  color: var(--ink-700);
}

.legal-definitions dt {
  font-weight: 700;
  color: var(--ink-900);
  font-size: 1rem;
  margin-top: 16px;
}

.legal-definitions dd {
  margin-left: 0;
  margin-top: 4px;
  color: var(--ink-700);
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.legal-subcard {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 18px;
}

.legal-subcard h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 8px 0;
}

.legal-subcard p {
  font-size: 0.88rem;
  color: var(--ink-600);
  margin: 0;
  line-height: 1.55;
}

.legal-purpose-block {
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.legal-purpose-block.is-primary {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.legal-purpose-block.is-primary h3 {
  color: #1e3a8a;
  margin: 0 0 12px 0;
  font-size: 1.12rem;
}

.legal-purpose-block.is-secondary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.legal-purpose-block.is-secondary h3 {
  color: var(--ink-900);
  margin: 0 0 12px 0;
  font-size: 1.12rem;
}

.legal-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #92400e;
  line-height: 1.5;
  margin-top: 14px;
}

.legal-table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.legal-table th {
  background: #f1f5f9;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--ink-900);
  border-bottom: 2px solid #cbd5e1;
}

.legal-table td {
  padding: 12px 16px;
  color: var(--ink-700);
  border-bottom: 1px solid #e2e8f0;
  line-height: 1.5;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-disclaimer {
  font-size: 0.88rem !important;
  color: var(--muted) !important;
  font-style: italic;
  margin-top: 8px !important;
}

.legal-channels-card {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  border-top: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.legal-channels-card p {
  margin: 6px 0 !important;
  font-size: 0.92rem !important;
}

.legal-timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.legal-timeline-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px;
}

.legal-timeline-box h3 {
  font-size: 1.05rem;
  color: var(--ink-900);
  margin: 0 0 10px 0;
}

.legal-timeline-box ul {
  padding-left: 18px;
  margin: 10px 0 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-700);
}

.legal-timeline-box li {
  margin-bottom: 8px;
}

.legal-retention-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.legal-retention-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 18px;
}

.legal-retention-card h3 {
  font-size: 0.98rem;
  color: var(--ink-900);
  margin: 0 0 8px 0;
}

.legal-retention-card p {
  font-size: 0.88rem;
  color: var(--ink-600);
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .legal-toc {
    position: static;
  }
  .legal-article {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .legal-title {
    font-size: 1.85rem;
  }
  .legal-hero {
    padding: 32px 0 24px 0;
    margin-bottom: 32px;
  }
  .legal-card-grid,
  .legal-retention-grid,
  .legal-timeline-grid {
    grid-template-columns: 1fr;
  }
  .legal-article {
    padding: 24px 16px;
  }
  .legal-data-table th {
    width: auto;
    display: block;
    padding-bottom: 4px;
  }
  .legal-data-table td {
    display: block;
    padding-top: 0;
    padding-bottom: 12px;
  }
}
