/* WalQo — encabezado, menú, franja de promo y pie compartidos por todas las páginas del sitio.
   Se carga después de walqo.css o site.css; el menú lo maneja site.js (#nav, #nav-toggle, #nav-panel).
   Si la hoja de la página define --page-wrap, el encabezado y el pie toman ese ancho para alinearse con el contenido. */

:root {
  --header-h: 68px;
  --shell-wrap: min(1200px, calc(100% - 48px));
  --shell-night: #101b2b;
  --shell-night-deep: #0b1422;
  --shell-blue: #2563eb;
  --shell-blue-hover: #1d4ed8;
  --shell-blue-press: #1e40af;
  --shell-blue-tint: #e8effd;
  --shell-blue-on-dark: #8fb1ff;
  --shell-on-dark: #e9eef6;
  --shell-on-dark-muted: #a7b3c6;
  --shell-line-dark: rgba(255, 255, 255, 0.1);
  --shell-ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

html { scroll-padding-top: calc(var(--header-h) + var(--promo-h, 0px) + 12px); }
main[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--shell-night);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: calc(var(--promo-h, 0px) + 12px); }

/* Franja de promo (la arma site.js según la fecha) */
.promo-strip {
  position: fixed;
  z-index: 60;
  inset: 0 0 auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  min-width: 0;
  padding: 8px 52px 8px 16px;
  background: var(--shell-blue);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
}
.promo-strip p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.promo-strip b { font-weight: 700; }
.promo-strip__cta {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 6px;
  background: #fff;
  color: var(--shell-blue-press) !important;
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  white-space: nowrap;
}
.promo-strip__cta:hover { background: var(--shell-blue-tint); }
.promo-strip__close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.promo-strip__close:hover { background: rgba(255, 255, 255, 0.16); }
.promo-strip :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.has-promo body { padding-top: var(--promo-h, 0px); }

/* Encabezado */
.site-header {
  position: sticky;
  top: var(--promo-h, 0px);
  z-index: 50;
  background: rgba(16, 27, 43, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  color: var(--shell-on-dark);
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--shell-line-dark); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6); }
.site-header :focus-visible { outline: 2px solid var(--shell-blue-on-dark); outline-offset: 3px; border-radius: 4px; }
.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  width: var(--page-wrap, var(--shell-wrap));
  min-width: 0;
  min-height: var(--header-h);
  margin-inline: auto;
}
.site-header .brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 6px 0;
  border-radius: 6px;
  text-decoration: none;
}
.site-header .brand img { display: block; width: 112px; height: auto; }
.nav-panel { display: flex; align-items: center; gap: 24px; min-width: 0; }
.nav-links { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 2px; min-width: 0; margin: 0; }
.nav-links > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--shell-on-dark-muted);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--shell-blue-on-dark), #c4b5fd);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s var(--shell-ease);
}
.nav-links > a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-links > a.is-active, .nav-links > a[aria-current] { color: #fff; }
.nav-links > a.is-active::after, .nav-links > a[aria-current]::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.nav-web, .nav-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: var(--shell-on-dark);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.nav-web svg, .nav-wa svg { width: 16px; height: 16px; flex: none; color: var(--shell-blue-on-dark); }
.nav-web:hover, .nav-wa:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.05); }
.nav-wa { display: none; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--shell-blue);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 22px -8px rgba(37, 99, 235, 0.6);
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.nav-cta:hover { background: var(--shell-blue-hover); color: #fff; box-shadow: 0 12px 26px -10px rgba(37, 99, 235, 0.7); }
.nav-cta:active { background: var(--shell-blue-press); transform: translateY(1px); }
.js .nav-cta.is-loading { opacity: 0.55; pointer-events: none; cursor: progress; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.nav-toggle:hover { border-color: rgba(255, 255, 255, 0.45); }
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle .icon-close { display: none; }
.site-header.is-open .nav-toggle { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); }
.site-header.is-open .nav-toggle .icon-open { display: none; }
.site-header.is-open .nav-toggle .icon-close { display: block; }

/* Menú en celulares y tablets */
@media (max-width: 1024px) {
  :root { --header-h: 62px; }
  .header-inner { display: flex; gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .site-header.is-open { background: var(--shell-night); }
  .nav-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 6px 24px 24px;
    background: var(--shell-night);
    border-top: 1px solid var(--shell-line-dark);
    border-bottom: 1px solid var(--shell-line-dark);
    box-shadow: 0 30px 50px -24px rgba(0, 0, 0, 0.7);
    max-height: calc(100vh - var(--header-h) - var(--promo-h, 0px));
    max-height: calc(100dvh - var(--header-h) - var(--promo-h, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.22s var(--shell-ease), visibility 0s linear 0.22s;
  }
  .site-header.is-open .nav-panel { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-links { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
  .nav-links > a {
    justify-content: space-between;
    min-height: 54px;
    padding: 0 4px;
    border-bottom: 1px solid var(--shell-line-dark);
    border-radius: 0;
    color: var(--shell-on-dark);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
  }
  .nav-links > a::after {
    left: auto;
    right: 6px;
    top: 50%;
    bottom: auto;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-radius: 50%;
    transform: scale(0);
  }
  .nav-links > a.is-active::after, .nav-links > a[aria-current]::after { transform: scale(1); }
  .nav-links > a:hover { background: transparent; color: #fff; }
  .nav-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .nav-actions > a { min-height: 50px; white-space: normal; }
  .nav-cta { grid-column: 1 / -1; grid-row: 1; }
  .nav-wa { display: inline-flex; }
  html.nav-open { overflow: hidden; }
  html.nav-open body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(5, 10, 20, 0.55);
    animation: shell-fade-in 0.2s ease both;
  }
}
@keyframes shell-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Pie */
.site-footer {
  background: var(--shell-night-deep);
  color: var(--shell-on-dark-muted);
  padding: 64px 0 32px;
  border-top: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}
.site-footer :focus-visible { outline: 2px solid var(--shell-blue-on-dark); outline-offset: 3px; border-radius: 4px; }
.footer-inner { width: var(--page-wrap, var(--shell-wrap)); margin-inline: auto; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.footer-brand > a { display: inline-block; border-radius: 6px; }
.footer-brand img { display: block; width: 128px; height: auto; }
.footer-brand p { margin: 16px 0 0; max-width: 26rem; }
.footer-wa {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 24px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.footer-wa:hover { color: #fff; border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.05); }
.footer-col h2 {
  margin: 0 0 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}
.footer-col ul { list-style: none; display: grid; gap: 9px; margin: 0; padding: 0; }
.footer-col a { color: var(--shell-on-dark-muted); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col a[aria-current] { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--shell-line-dark);
  font-size: 0.84rem;
}
.footer-bottom p { margin: 0; }

@media (max-width: 1120px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --shell-wrap: calc(100% - 32px); }
  .nav-panel { padding-inline: 16px; }
  .nav-actions { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo-strip { font-size: 0.82rem; padding: 7px 46px 7px 12px; }
}
@media (max-width: 380px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .site-header .brand img { width: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header, .nav-panel, .nav-links > a, .nav-links > a::after, .nav-cta, .nav-web, .nav-wa, .nav-toggle { transition: none; }
  html.nav-open body::after { animation: none; }
}
@media print {
  .site-header, .promo-strip, .skip-link { display: none !important; }
  .site-footer { background: #fff; color: #000; }
}
