/* ============================================================
   BASE.CSS — Estilos compartidos entre todas las páginas
   Variables, reset, topbar, nav, botones, secciones, footer
   ============================================================ */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Fraunces', 'Georgia', serif;
  --ink: #0A1E35;
  --ink-body: #1F1E1C;
  --muted: #5F5E5A;
  --muted-2: #8A8880;
  --blue: #0C447C;
  --blue-hover: #0A3A6B;
  --blue-soft: rgba(12, 68, 124, 0.08);
  --blue-border: rgba(12, 68, 124, 0.14);
  --coral: #D85A30;
  --wa: #1D9E75;
  --warm: #FAF8F3;
  --warm-border: rgba(12, 68, 124, 0.1);
  --line: rgba(12, 68, 124, 0.1);
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #fff;
  font-family: var(--font-sans);
  color: var(--ink-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }

.page {
  background: #fff;
  min-height: 100vh;
}

/* Contenido de las secciones centrado a 1320px,
   mientras los fondos de cada sección ocupan todo el ancho */
.section > *,
.footer-top,
.footer-bottom {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

/* Animación reutilizable para puntos pulsantes (topbar-dot, pulse) */
@keyframes ping {
  0%   { transform: scale(1); opacity: 0.55; }
  75%, 100% { transform: scale(2.6); opacity: 0; }
}

/* ============ TOP ANNOUNCEMENT BAR ============ */
.topbar {
  background: var(--ink);
  color: #D6E0ED;
  font-size: 12.5px;
  letter-spacing: 0.1px;
  padding: 9px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.topbar-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 450;
}
.topbar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3BD9A4;
  position: relative;
  flex-shrink: 0;
}
.topbar-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.2px solid #3BD9A4;
  opacity: 0.5;
  animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.topbar-msg strong { color: #fff; font-weight: 500; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #A8B8CC;
}
.topbar-right a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}
.topbar-right a:hover { color: #fff; }
.topbar-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.15);
}

/* ============ MAIN NAV ============ */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 0.5px solid var(--line);
}
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  max-width: 1320px;
  margin: 0 auto;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.brand-mark {
  width: 30px;
  height: 30px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.05); }
.brand-mark::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
  border: 2px solid #fff;
}

.navlinks {
  display: flex;
  gap: 4px;
  align-items: center;
}
.navlink {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 450;
  color: #3D3D3A;
  border-radius: 8px;
  transition: color .2s, background .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.navlink:hover { color: var(--ink); background: rgba(12, 68, 124, 0.04); }
.navlink-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  transition: transform .25s;
}
.navlink:hover .navlink-chevron { transform: rotate(180deg); opacity: 0.8; }

.navlink-wrap { position: relative; }
.megamenu {
  position: absolute;
  top: calc(100% + 12px);
  left: -20px;
  width: 540px;
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 20px 48px rgba(12, 68, 124, 0.12), 0 0 0 1px rgba(12, 68, 124, 0.03);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, visibility .2s, transform .2s;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.navlink-wrap:hover .megamenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  transition: background .2s;
  cursor: pointer;
}
.mega-item:hover { background: var(--warm); }
.mega-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--warm);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.mega-item:hover .mega-icon { background: #fff; }
.mega-text { min-width: 0; }
.mega-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.mega-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============ BURGER MENU (solo móvil) ============ */
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background .2s;
}
.nav-burger:hover { background: rgba(12, 68, 124, 0.06); }
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ PANEL MÓVIL (diseño editorial) ============ */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 92vw);
  background: linear-gradient(180deg, #FDFBF6 0%, #F7F3EA 100%);
  z-index: 90;
  box-shadow: -24px 0 60px rgba(12, 68, 124, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(0.33, 1, 0.68, 1);
  overflow: hidden;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu[hidden] { display: flex; }

/* Header */
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 0.5px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
}
.mobile-menu-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.3px;
}
.mobile-menu-brand-mark {
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: #fff;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mobile-menu-brand-mark::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 7px;
  height: 7px;
  background: var(--coral);
  border-radius: 50%;
  border: 2px solid #FDFBF6;
}
.mobile-menu-close {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.mobile-menu-close:hover { background: rgba(12, 68, 124, 0.06); color: var(--ink); }

/* Status dot */
.mobile-menu-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 20px 4px;
  padding: 8px 14px;
  background: rgba(29, 158, 117, 0.08);
  border: 0.5px solid rgba(29, 158, 117, 0.2);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink);
  align-self: flex-start;
}
.mobile-menu-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wa);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.18);
  animation: mm-pulse 2s ease-in-out infinite;
}
@keyframes mm-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(29, 158, 117, 0.04); }
}
.mobile-menu-status strong { font-weight: 500; }

/* Nav scroll area */
.mobile-menu-nav {
  flex: 1;
  padding: 6px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu-nav::-webkit-scrollbar { width: 6px; }
.mobile-menu-nav::-webkit-scrollbar-thumb { background: rgba(12, 68, 124, 0.12); border-radius: 3px; }

.mobile-menu-section {
  display: flex;
  flex-direction: column;
  padding: 10px 0 6px;
  position: relative;
}
.mobile-menu-section + .mobile-menu-section { border-top: 0.5px solid rgba(12, 68, 124, 0.1); margin-top: 6px; padding-top: 14px; }
.mobile-menu-label {
  font-size: 10.5px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 2px 14px 10px;
}

/* Enlaces con icono */
.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 450;
  color: var(--ink);
  transition: background .2s, color .2s, transform .15s;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.mobile-menu-link svg {
  color: var(--blue);
  opacity: 0.72;
  flex-shrink: 0;
  transition: opacity .2s, transform .2s;
}
.mobile-menu-link:hover,
.mobile-menu-link:active {
  background: rgba(12, 68, 124, 0.06);
  color: var(--blue);
}
.mobile-menu-link:hover svg { opacity: 1; transform: translateX(1px); }

/* Servicios — con icono temático + descripción + flecha */
.mobile-menu-services {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu-service {
  display: grid;
  grid-template-columns: 40px 1fr 20px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 0.5px solid rgba(12, 68, 124, 0.08);
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.mobile-menu-service:hover,
.mobile-menu-service:active {
  background: #fff;
  border-color: rgba(12, 68, 124, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(12, 68, 124, 0.08);
}
.mobile-menu-service-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(12, 68, 124, 0.08), rgba(216, 90, 48, 0.05));
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mobile-menu-service:hover .mobile-menu-service-icon { transform: rotate(-4deg) scale(1.05); }
.mobile-menu-service-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.mobile-menu-service-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.mobile-menu-service-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-menu-service-arrow {
  color: var(--muted);
  opacity: 0.5;
  transition: transform .2s, opacity .2s;
  flex-shrink: 0;
}
.mobile-menu-service:hover .mobile-menu-service-arrow {
  opacity: 1;
  color: var(--coral);
  transform: translateX(3px);
}

/* Idiomas móvil */
.mobile-menu-langs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 0 4px;
}
.mobile-menu-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 0.5px solid rgba(12, 68, 124, 0.12);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .2s, background .2s;
}
.mobile-menu-lang:hover { border-color: var(--blue); background: var(--warm); }
.mobile-menu-lang.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 500;
}
.mobile-menu-lang .lang-flag { flex-shrink: 0; }
.mobile-menu-lang-form { display: contents; }

/* Logout form */
.mobile-menu-logout { display: contents; }

/* Footer: CTAs + meta */
.mobile-menu-footer {
  padding: 16px 18px 18px;
  background: rgba(255, 255, 255, 0.9);
  border-top: 0.5px solid var(--line);
  backdrop-filter: saturate(180%) blur(6px);
  -webkit-backdrop-filter: saturate(180%) blur(6px);
}
.mobile-menu-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.mobile-menu-cta-wa,
.mobile-menu-cta-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: transform .15s, box-shadow .2s;
}
.mobile-menu-cta-wa {
  background: var(--wa);
  color: #fff;
  box-shadow: 0 2px 10px rgba(29, 158, 117, 0.3);
}
.mobile-menu-cta-wa:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(29, 158, 117, 0.4); }
.mobile-menu-cta-call {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 10px rgba(12, 68, 124, 0.3);
}
.mobile-menu-cta-call:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(12, 68, 124, 0.45); }
.mobile-menu-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
}
.mobile-menu-footer-meta a {
  color: var(--muted);
  border-bottom: 0.5px dashed rgba(12, 68, 124, 0.2);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.mobile-menu-footer-meta a:hover { color: var(--blue); border-color: var(--blue); }

/* Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 36, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 80;
  opacity: 0;
  transition: opacity .28s;
  pointer-events: none;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-menu-overlay[hidden] { display: block; }

body.menu-open { overflow: hidden; }

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 780px;
  margin: 0 auto;
  z-index: 90;
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(12, 68, 124, 0.18);
  padding: 18px 22px;
  animation: cookie-in .35s cubic-bezier(0.33, 1, 0.68, 1);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.cookie-banner-text strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 4px;
  font-weight: 500;
}
.cookie-banner-text p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.cookie-banner-text a {
  color: var(--blue);
  border-bottom: 0.5px solid rgba(12, 68, 124, 0.3);
}
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cookie-btn {
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  border: 0.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.cookie-btn:hover { border-color: var(--blue); color: var(--blue); }
.cookie-btn-ghost { background: transparent; }
.cookie-btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.cookie-btn-primary:hover { background: var(--blue-hover); color: #fff; }

@keyframes cookie-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal de personalización */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cookie-modal[hidden] { display: none; }
.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 36, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cookie-modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(12, 68, 124, 0.25);
}
.cookie-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 0.5px solid var(--line);
}
.cookie-modal-head h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.cookie-modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.cookie-modal-close:hover { background: var(--warm); color: var(--ink); }
.cookie-modal-body {
  padding: 18px 24px;
  overflow-y: auto;
}
.cookie-modal-intro {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}
.cookie-cat {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 0.5px dashed rgba(12, 68, 124, 0.12);
  cursor: pointer;
}
.cookie-cat:last-child { border-bottom: none; }
.cookie-cat input[type="checkbox"] { margin-top: 3px; accent-color: var(--blue); }
.cookie-cat input:disabled { accent-color: var(--muted); }
.cookie-cat strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  font-size: 14.5px;
  margin-bottom: 3px;
}
.cookie-cat span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.cookie-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 24px 20px;
  border-top: 0.5px solid var(--line);
}

@media (max-width: 700px) {
  .cookie-banner { bottom: 12px; left: 12px; right: 12px; padding: 16px 18px; }
  .cookie-banner-inner { grid-template-columns: 1fr; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .cookie-btn { flex: 1; }
  .cookie-modal-head { padding: 16px 18px 12px; }
  .cookie-modal-body { padding: 14px 18px; }
  .cookie-modal-actions { padding: 14px 18px 18px; flex-direction: column-reverse; }
  .cookie-modal-actions .cookie-btn { width: 100%; }
}

/* Entrada escalonada de secciones */
.mobile-menu.open .mobile-menu-section {
  animation: mm-slide-in .45s cubic-bezier(0.33, 1, 0.68, 1) backwards;
}
.mobile-menu.open .mobile-menu-section:nth-child(1) { animation-delay: .08s; }
.mobile-menu.open .mobile-menu-section:nth-child(2) { animation-delay: .14s; }
.mobile-menu.open .mobile-menu-section:nth-child(3) { animation-delay: .20s; }
.mobile-menu.open .mobile-menu-section:nth-child(4) { animation-delay: .26s; }
@keyframes mm-slide-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu.open .mobile-menu-section { animation: none; }
  .mobile-menu-status-dot { animation: none; }
}

.lang { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #3D3D3A;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.lang-btn:hover { background: rgba(12, 68, 124, 0.04); color: var(--ink); }
.lang-flag {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(12, 68, 124, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, visibility .2s, transform .2s;
  min-width: 160px;
}
.lang:hover .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #3D3D3A;
  transition: background .2s;
  cursor: pointer;
}
.lang-item:hover { background: var(--warm); }
.lang-item.active { color: var(--ink); font-weight: 500; }
.lang-item.active::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  margin-left: auto;
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 8px;
}

.btn-login {
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 8px;
  transition: background .2s;
}
.btn-login:hover { background: rgba(12, 68, 124, 0.04); }

.btn-register {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  transition: background .2s, transform .15s, box-shadow .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 2px 6px rgba(10, 30, 53, 0.2);
}
.btn-register::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .6s;
}
.btn-register:hover {
  background: #0A1626;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 6px 16px rgba(10, 30, 53, 0.35);
}
.btn-register:hover::before { transform: translateX(100%); }
.btn-register svg { transition: transform .25s; }
.btn-register:hover svg { transform: translateX(2px); }

/* ============ BOTONES GENÉRICOS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 2px 10px rgba(12, 68, 124, 0.22);
}
.btn-primary:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 6px 22px rgba(12, 68, 124, 0.35);
}
.btn-wa { background: var(--wa); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--blue);
  border: 0.5px solid rgba(12, 68, 124, 0.25);
}
.btn-ghost:hover { background: rgba(12, 68, 124, 0.04); }

.btn-white {
  background: #fff;
  color: var(--ink);
  padding: 14px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.btn-white:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  padding: 14px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  transition: background .2s;
}
.btn-outline-white:hover { background: rgba(255, 255, 255, 0.08); }

/* ============ SECTIONS (utilidades compartidas) ============ */
.section { padding: 90px 48px; }
.section-warm {
  background: var(--warm);
  border-top: 0.5px solid var(--warm-border);
  border-bottom: 0.5px solid var(--warm-border);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 44px;
  gap: 16px;
}
.kicker {
  font-size: 12px;
  letter-spacing: 2.5px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 500;
}
.h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.18;
  color: var(--ink);
  letter-spacing: -0.8px;
  margin: 0;
}
.see {
  font-size: 13px;
  color: var(--blue);
  border-bottom: 0.5px solid rgba(12, 68, 124, 0.3);
  padding-bottom: 2px;
  transition: border-color .2s;
}
.see:hover { border-color: var(--blue); }

/* ============ FOOTER ============ */
.footer {
  background: var(--ink);
  color: #A8B8CC;
  padding: 72px 48px 32px;
  font-size: 14px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}
.footer-brand-block .footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.4px;
  margin-bottom: 16px;
}
.footer-brand-mark {
  width: 30px;
  height: 30px;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.footer-brand-mark::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
  border: 2px solid var(--ink);
}
.footer-tagline {
  color: #A8B8CC;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 280px;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #D6E0ED;
  transition: color .2s;
}
.footer-contact a:hover { color: #fff; }
.footer-contact svg { color: #A8B8CC; flex-shrink: 0; }

.footer-col-title {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  letter-spacing: 0.2px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-links a {
  font-size: 13.5px;
  color: #A8B8CC;
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}
.footer-links a:hover { color: #fff; }
.footer-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59, 217, 164, 0.15);
  color: #3BD9A4;
  letter-spacing: 0.3px;
  font-weight: 500;
}

.footer-news-desc {
  font-size: 13.5px;
  color: #A8B8CC;
  line-height: 1.55;
  margin-bottom: 16px;
}
.footer-news-form {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 4px;
  transition: border-color .2s;
}
.footer-news-form:focus-within { border-color: rgba(255, 255, 255, 0.3); }
.footer-news-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  padding: 8px 12px;
}
.footer-news-form input::placeholder { color: #6B7A8F; }
.footer-news-form button {
  background: #fff;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  transition: background .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-news-form button:hover { background: #E8EDF4; }
.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.footer-social {
  width: 34px;
  height: 34px;
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #A8B8CC;
  transition: all .2s;
}
.footer-social:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12.5px;
  color: #7A8A9E;
}
.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.15);
}
.footer-bottom a { transition: color .2s; }
.footer-bottom a:hover { color: #fff; }
.footer-certs {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-cert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  color: #A8B8CC;
}
.footer-cert svg { color: #3BD9A4; flex-shrink: 0; }

/* ============ FAQ (lista de preguntas compartida) ============ */
.faq-list {
  display: flex;
  flex-direction: column;
}
.faq-item {
  border-top: 0.5px solid var(--line);
  padding: 24px 0;
  cursor: pointer;
}
.faq-item:last-child { border-bottom: 0.5px solid var(--line); }
.faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0.5px solid rgba(12, 68, 124, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  transition: transform .3s ease, background .2s;
  flex-shrink: 0;
}
.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--blue);
  color: #fff;
}
.faq-item p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
  margin: 14px 0 0;
  max-width: 600px;
}

/* ============ CTA FINAL (compartido por varias páginas) ============ */
.final-cta {
  position: relative;
  padding: 120px 48px;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  text-align: center;
}
.final-cta-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 75%);
  pointer-events: none;
}
.final-cta-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(216, 90, 48, 0.12), transparent 60%);
  pointer-events: none;
  filter: blur(40px);
  animation: cta-breathe 9s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes cta-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 0.75; }
}
.final-cta-grid {
  animation: cta-grid-drift 40s linear infinite;
  will-change: background-position;
}
@keyframes cta-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}
.final-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}
.final-cta-kicker {
  font-size: 12px;
  letter-spacing: 2.5px;
  color: #85B7EB;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 18px;
}
.final-cta-h {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 20px;
  color: #fff;
}
.final-cta-h em {
  font-style: italic;
  color: #F5C4B3;
}
.final-cta-sub {
  font-size: 17px;
  line-height: 1.6;
  color: #A8B8CC;
  margin: 0 auto 36px;
  max-width: 520px;
}
.final-cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ WA FLOAT ============ */
.wa-float {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 58px;
  height: 58px;
  background: var(--wa);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(29, 158, 117, 0.35);
  transition: transform .2s, box-shadow .2s;
  z-index: 20;
  color: #fff;
}
.wa-float:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(29, 158, 117, 0.45);
}

/* ============ RESPONSIVE (base) ============ */
@media (max-width: 1000px) {
  .final-cta-h { font-size: 36px; }
}
@media (max-width: 900px) {
  .topbar { padding: 9px 20px; font-size: 12px; }
  .topbar-right { display: none; }
  .nav { padding: 0 20px; }
  .nav-left { gap: 20px; }
  .navlinks { display: none; }
  .btn-login { display: none; }
  .btn-register { display: none; }
  .nav-burger { display: inline-flex; }
  .section { padding: 60px 20px; }
  .h2 { font-size: 28px; }
  .final-cta { padding: 70px 20px; }
  .final-cta-row { flex-direction: column; align-items: stretch; }
  .final-cta-row .btn-white,
  .final-cta-row .btn-outline-white { justify-content: center; text-align: center; }
  .footer { padding: 52px 20px 28px; }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }
  .footer-brand-block { grid-column: 1 / -1; }
  .footer-news-block { grid-column: 1 / -1; }
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}
@media (max-width: 520px) {
  .nav { padding: 0 14px; height: 60px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 26px; height: 26px; }
  .nav-right { gap: 6px; }
  .lang { display: none; }
  .nav-divider { display: none; }
  .topbar { padding: 8px 14px; font-size: 11.5px; }
  .section { padding: 48px 16px; }
  .h2 { font-size: 24px; letter-spacing: -0.5px; }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 28px;
  }
  .final-cta-h { font-size: 28px; letter-spacing: -0.6px; }
  .final-cta { padding: 56px 18px; }
  .footer { padding: 40px 18px 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .footer-bottom-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }
  .footer-bottom-left > span:first-child {
    font-size: 11.5px;
    line-height: 1.5;
  }
  .footer-bottom-left-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
  }
  .footer-bottom-sep { display: none; }
}

html { scroll-behavior: smooth; }

/* ============ MOTION — respeto a prefers-reduced-motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
