/* Reset, tipografía, estructura global y componentes de la plantilla base. */
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url("../fonts/montserrat-500.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-700.woff2") format("woff2"); }
/* Fuente de respaldo con las métricas de Montserrat: evita que el texto "salte" al cargar la fuente real. */
@font-face { font-family: "Montserrat Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 113%; ascent-override: 85%; descent-override: 22%; line-gap-override: 0%; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--fuente); font-weight: 500; line-height: 1.6; color: var(--text); background: var(--white); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
ul { padding: 0; list-style: none; }
button { font: inherit; }
main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; border-radius: 4px; }

.contenedor { width: 100%; max-width: var(--ancho-contenedor); margin-inline: auto; padding-inline: var(--espacio-3); }
.seccion { padding-block: var(--espacio-6); }
.solo-escritorio { display: none !important; }
.solo-movil { display: inline; }

.saltar { position: absolute; left: var(--espacio-3); top: -100px; z-index: 100; padding: var(--espacio-2) var(--espacio-3); background: var(--navy); color: var(--white); border-radius: var(--radio-chico); text-decoration: none; font-weight: 700; }
.saltar:focus { top: var(--espacio-2); }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: var(--espacio-2); min-height: 44px; padding: 0.8rem 1.5rem; border: 2px solid transparent; border-radius: 999px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform var(--transicion), box-shadow var(--transicion), background var(--transicion); }
.boton:hover { transform: translateY(-2px); }
.boton--chico { padding: 0.5rem 1rem; font-size: var(--texto-s); }
.boton--grande { padding: 1.05rem 2rem; font-size: var(--texto-l); }
.boton--whatsapp { background: var(--whatsapp); color: #052b12; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35); }
.boton--whatsapp:hover { background: var(--whatsapp-dark); color: var(--white); }
.boton--primario { background: var(--blue); color: var(--white); }
.boton--primario:hover { background: var(--blue-dark); }
.boton--borde { background: transparent; color: var(--navy); border-color: var(--border); }
.boton--borde:hover { border-color: var(--blue); color: var(--blue); }

/* Barra de contacto */
.barra-contacto { background: var(--navy); color: var(--white); font-size: var(--texto-s); }
.barra-contacto__fila { display: flex; align-items: center; justify-content: center; gap: var(--espacio-3); min-height: 36px; }
.barra-contacto__lema { display: none; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.7rem; }
.barra-contacto a { display: inline-flex; align-items: center; gap: 6px; color: var(--white); text-decoration: none; }
.barra-contacto a:hover { text-decoration: underline; }

/* Encabezado y navegación */
.encabezado { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--border); }
.navegacion { display: flex; align-items: center; justify-content: space-between; gap: var(--espacio-3); min-height: var(--alto-encabezado); position: relative; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marca img:first-child { height: 38px; width: auto; }
.marca__letras { display: none; height: 20px; width: auto; }
.navegacion__lista { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--sombra); padding: var(--espacio-2) var(--espacio-3) var(--espacio-3); }
.navegacion__lista.abierto { display: flex; }
.navegacion__enlace { display: block; padding: 0.8rem 1rem; border-radius: 999px; color: var(--navy); font-weight: 600; text-decoration: none; }
.navegacion__enlace:hover, .navegacion__enlace[aria-current="page"] { background: var(--blue-pale); color: var(--blue); }
.navegacion__acciones { display: flex; align-items: center; gap: var(--espacio-2); }
.navegacion__boton { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: var(--white); color: var(--navy); cursor: pointer; }

/* Pie */
.pie { background: var(--navy); color: rgba(255, 255, 255, 0.82); font-size: 0.92rem; }
.pie a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.pie a:hover { color: var(--white); text-decoration: underline; }
.pie__rejilla { display: grid; gap: var(--espacio-5); padding-block: var(--espacio-6) var(--espacio-5); }
.pie__logo { width: 220px; height: auto; margin-bottom: var(--espacio-3); }
.pie__lema { text-transform: uppercase; font-weight: 700; letter-spacing: 0.18em; font-size: 0.75rem; color: var(--blue-light); margin-bottom: var(--espacio-2); }
.pie__titulo { font-size: 1rem; color: var(--white); margin-bottom: var(--espacio-3); }
.pie__lista { margin-bottom: var(--espacio-4); }
.pie__lista li { margin-bottom: 0.55rem; }
.pie__lista a { display: inline-flex; align-items: center; gap: 8px; }
.pie .icono { color: var(--blue-bright); }
.pie__base-fila { display: flex; flex-direction: column; align-items: center; gap: var(--espacio-2); }
.pie__legales { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--espacio-2) var(--espacio-4); }
.pie__base { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-block: var(--espacio-3); font-size: var(--texto-s); text-align: center; }

/* Botón flotante de WhatsApp */
.whatsapp-flotante { position: fixed; right: var(--espacio-3); bottom: var(--espacio-3); z-index: 60; display: inline-flex; align-items: center; gap: var(--espacio-2); min-width: 56px; min-height: 56px; padding: 0 1rem; justify-content: center; border-radius: 999px; background: var(--whatsapp); color: #052b12; font-weight: 700; text-decoration: none; box-shadow: 0 10px 28px rgba(37, 211, 102, 0.5); transition: transform var(--transicion); }
.whatsapp-flotante:hover { transform: translateY(-3px); background: var(--whatsapp-dark); color: var(--white); }
.whatsapp-flotante__texto { display: none; }

@media (min-width: 768px) {
  .solo-escritorio { display: inline-flex !important; }
  .solo-movil { display: none; }
  .barra-contacto__fila { justify-content: space-between; }
  .barra-contacto__lema { display: inline; }
  .marca__letras { display: block; }
  .pie__rejilla { grid-template-columns: 1.4fr 1fr 1fr; }
  .pie__base-fila { flex-direction: row; justify-content: space-between; }
  .whatsapp-flotante__texto { display: inline; }
}

/* El menú en fila necesita ancho: con cuatro enlaces, en tablet se queda el menú desplegable. */
@media (min-width: 64rem) {
  .navegacion__boton { display: none; }
  .navegacion__lista { display: flex; position: static; flex-direction: row; gap: var(--espacio-1); padding: 0; border: 0; box-shadow: none; background: none; }
}
.navegacion__enlace, .navegacion__acciones .boton { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Texto sólo para lectores de pantalla */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
