/* =========================================================================
   ELSA Gas — hoja de estilos principal
   Mobile-first. Los colores de marca están en las variables de :root.
   ========================================================================= */

:root {
  /* Marca (tomados del logotipo) */
  --brand:        #003a8c;
  --brand-dark:   #002a66;
  --brand-darker: #001d47;
  --brand-mid:    #0a60c0;
  --brand-soft:   #e7eefc;
  --brand-soft-2: #f2f6fd;

  /* Acento de acción = verde WhatsApp */
  --cta:        #1fb254;
  --cta-dark:   #178f43;

  /* Neutros */
  --tinta:      #16202e;
  --tinta-2:    #47536a;
  --linea:      #dde3ec;
  --fondo:      #ffffff;
  --fondo-alt:  #f5f7fb;
  --blanco:     #ffffff;

  --radio:      14px;
  --radio-sm:   10px;
  --sombra:     0 10px 30px rgba(0, 29, 71, .10);
  --sombra-sm:  0 4px 14px rgba(0, 29, 71, .08);
  --ancho:      1140px;
  --tipo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ----------------------------------------------------------------- Reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--tipo);
  color: var(--tinta);
  background: var(--fondo);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--brand-dark); }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--brand-mid); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
iframe { border: 0; display: block; width: 100%; }

/* ------------------------------------------------------------- Utilidades */
.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }
.visually-hidden,
.salto-contenido {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.salto-contenido:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto;
  clip: auto; margin: 0; padding: 10px 16px; z-index: 1000;
  background: var(--brand-dark); color: #fff; border-radius: 8px;
}
.icono { display: inline-block; vertical-align: -.18em; flex: none; }

:focus-visible {
  outline: 3px solid var(--brand-mid);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- Botones */
.btn {
  --b: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.25em;
  font: inherit; font-weight: 700;
  color: #fff; background: var(--b);
  border: 2px solid var(--b); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sombra-sm); }
.btn:active { transform: translateY(0); }
.btn--primario { --b: var(--brand); }
.btn--cta      { --b: var(--cta); border-color: var(--cta); }
.btn--cta:hover { background: var(--cta-dark); }
.btn--fantasma {
  color: var(--brand-dark); background: transparent; border-color: var(--brand);
}
.btn--fantasma:hover { background: var(--brand-soft); }
.btn--claro {
  color: var(--brand-dark); background: #fff; border-color: #fff;
}
.btn--contorno-claro {
  color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .7);
}
.btn--contorno-claro:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.btn--lg { padding: .9em 1.6em; font-size: 1.02rem; }
.btn--bloque { width: 100%; }

.enlace-flecha {
  display: inline-flex; align-items: center; gap: .35em;
  font-weight: 700; text-decoration: none; color: var(--brand-mid);
}
.enlace-flecha:hover { text-decoration: underline; }

/* ------------------------------------------------------- Barra info (top) */
.barra-info {
  background: var(--brand-darker);
  color: #cdd9f2;
  font-size: .84rem;
}
.barra-info__inner {
  display: flex; align-items: center; gap: .6rem;
  min-height: 38px; flex-wrap: wrap;
}
.barra-info__item {
  display: inline-flex; align-items: center; gap: .4em;
  color: #dbe4f7; text-decoration: none;
}
.barra-info__item:hover { color: #fff; }
.barra-info__sep { color: #5f74a6; }
.barra-info__sep--horario, .barra-info__item--horario { display: none; }

/* ---------------------------------------------------------------- Cabecera */
.cabecera {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--linea);
}
/* Nota: no usar transform/filter/backdrop-filter en .cabecera:
   crearían un bloque contenedor y el menú lateral (position: fixed)
   dejaría de medirse contra el viewport. */
.cabecera__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.cabecera__logo { display: block; flex: none; }
.cabecera__logo img { width: auto; height: 46px; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: var(--brand-soft); color: var(--brand-dark);
  border: 0; border-radius: 10px; cursor: pointer;
}
.nav-toggle__cerrar { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__abrir { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__cerrar { display: inline-flex; }

.nav {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(320px, 84vw);
  background: #fff;
  padding: 90px 24px 32px;
  box-shadow: -20px 0 50px rgba(0, 29, 71, .18);
  display: flex; flex-direction: column; gap: .35rem;
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: scale(.98);
  transform-origin: top right;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nav.abierto { opacity: 1; visibility: visible; transform: scale(1); }
.nav__lista { display: flex; flex-direction: column; }
.nav__enlace {
  display: block; padding: .8rem .6rem;
  font-weight: 600; color: var(--brand-dark); text-decoration: none;
  border-radius: 8px;
}
.nav__enlace:hover { background: var(--brand-soft-2); }
.nav__enlace[aria-current="page"] {
  color: var(--brand-mid);
  box-shadow: inset 3px 0 0 var(--brand-mid);
}
.nav__cta { margin-top: .8rem; }

/* Fondo oscuro al abrir el menú en móvil */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(0, 20, 51, .45);
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.nav-backdrop.visible { opacity: 1; visibility: visible; }

/* ------------------------------------------------------------------- Hero */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(10, 96, 192, .35), transparent 60%),
    linear-gradient(160deg, var(--brand-dark), var(--brand-darker));
  color: #eaf1ff;
}
.hero__inner {
  display: grid; gap: 1.5rem;
  padding: 44px 20px 52px;
  align-items: center;
}
.hero__kicker {
  display: inline-flex; align-items: center; gap: .45em;
  margin: 0 0 .9rem;
  font-size: .9rem; font-weight: 600;
  color: #bcd2ff;
  background: rgba(255, 255, 255, .08);
  padding: .35em .8em; border-radius: 999px;
}
.hero__titulo { color: #fff; margin-bottom: .4em; }
.hero__bajada { font-size: 1.08rem; color: #d6e2fb; max-width: 46ch; }
.hero__bajada strong { color: #fff; }
.hero__acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.4rem 0 1.2rem; }
.hero__chips {
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem;
  font-size: .92rem; color: #c6d6f7;
}
.hero__chips li { display: inline-flex; align-items: center; gap: .4em; }
.hero__chips .icono { color: var(--cta); }
.hero__marca { display: none; color: rgba(255, 255, 255, .14); }

/* --------------------------------------------------------------- Secciones */
.seccion { padding: clamp(40px, 7vw, 72px) 0; }
.seccion--alt { background: var(--fondo-alt); }
.seccion__head { text-align: center; max-width: 62ch; margin: 0 auto clamp(24px, 4vw, 40px); }
.seccion__intro { color: var(--tinta-2); font-size: 1.05rem; margin: 0; }
.seccion__cta { text-align: center; margin-top: 2rem; }

/* ------------------------------------------------------------- Segmentos */
.segmentos { background: #fff; }
.segmentos__grid {
  display: grid; gap: 1rem;
  padding: clamp(28px, 5vw, 44px) 20px;
  margin-top: -28px;
}
.segmento {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.4rem; box-shadow: var(--sombra-sm);
}
.segmento .icono { color: var(--brand-mid); margin-bottom: .5rem; }
.segmento h2 { font-size: 1.15rem; margin-bottom: .3rem; }
.segmento p { color: var(--tinta-2); font-size: .96rem; }

/* --------------------------------------------------------------- Tarjetas */
.tarjetas { display: grid; gap: 1rem; }
.tarjeta {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.4rem; box-shadow: var(--sombra-sm);
  display: flex; flex-direction: column;
}
.tarjeta--plana { box-shadow: none; background: #fff; }
.tarjeta__icono {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: .8rem;
  color: var(--brand); background: var(--brand-soft);
  border-radius: 12px;
}
.tarjeta__titulo { font-size: 1.1rem; margin-bottom: .35rem; }
.tarjeta__texto { color: var(--tinta-2); font-size: .96rem; margin-bottom: 1rem; }
.tarjeta--servicio .enlace-flecha { margin-top: auto; }

/* --------------------------------------------------------- Franja CTA */
.franja-cta {
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
  color: #fff;
}
.franja-cta__inner {
  display: grid; gap: 1.3rem;
  padding: clamp(32px, 6vw, 52px) 20px;
  text-align: center;
}
.franja-cta h2 { color: #fff; margin-bottom: .3rem; }
.franja-cta p { color: #d6e2fb; margin: 0; }
.franja-cta__acciones { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* --------------------------------------------------------------- Ubicación */
.ubicacion { display: grid; gap: 1.6rem; }
.ubicacion__direccion {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: 1.02rem; margin-bottom: 1rem;
}
.ubicacion__direccion .icono { color: var(--brand-mid); margin-top: .15em; }
.ubicacion__horario { margin: 0 0 1.2rem; border-top: 1px solid var(--linea); }
.ubicacion__horario li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .5rem 0; border-bottom: 1px solid var(--linea);
  font-size: .96rem;
}
.ubicacion__horario li span:first-child { color: var(--tinta-2); }
.ubicacion__horario li span:last-child { font-weight: 600; }
.ubicacion__mapa iframe { height: 320px; border-radius: var(--radio); box-shadow: var(--sombra-sm); }

/* ------------------------------------------------------ Cabeceras de página */
.pagina-hero {
  background: linear-gradient(160deg, var(--brand-dark), var(--brand-darker));
  color: #e7efff;
  padding: clamp(36px, 6vw, 60px) 0;
}
.pagina-hero h1 { color: #fff; }
.pagina-hero__intro { color: #d3e0fb; font-size: 1.06rem; max-width: 62ch; margin: 0; }
.miga { font-size: .88rem; color: #9db6e6; margin: 0 0 .8rem; }
.miga a { color: #c6d6f7; text-decoration: none; }
.miga a:hover { text-decoration: underline; }

/* --------------------------------------------------- Misión / Visión */
.dos-columnas { display: grid; gap: 1.2rem; }
.bloque-mv {
  background: #fff; border: 1px solid var(--linea); border-left: 5px solid var(--brand);
  border-radius: var(--radio); padding: 1.6rem;
}
.bloque-mv__icono {
  display: inline-flex; width: 46px; height: 46px; margin-bottom: .6rem;
  align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); border-radius: 12px;
}
.bloque-mv p { margin: 0; color: var(--tinta-2); }

/* ------------------------------------------------------ Panel seguridad */
.panel-seguridad {
  display: grid; gap: 1rem;
  background: var(--brand-soft-2); border: 1px solid var(--brand-soft);
  border-radius: var(--radio); padding: 1.6rem;
}
.panel-seguridad__icono { color: var(--brand); }
.panel-seguridad p { margin: 0; color: var(--tinta-2); }

/* --------------------------------------------------------------- Pasos */
.pasos { max-width: 780px; }
.pasos__lista { display: grid; gap: 1rem; margin-top: 1.4rem; }
.pasos__lista li { display: flex; gap: 1rem; align-items: flex-start; }
.pasos__lista p { margin: 0; color: var(--tinta-2); }
.pasos__num {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-weight: 800;
}

/* --------------------------------------------------------------- Cobertura */
.cobertura { display: grid; gap: 1.6rem; }
.lista-check { display: grid; gap: .55rem; margin: 1rem 0 1.2rem; }
.lista-check li { display: flex; align-items: center; gap: .55em; font-weight: 600; }
.lista-check .icono { color: var(--cta); }
.cobertura__nota {
  display: flex; gap: .5em; align-items: flex-start;
  background: var(--brand-soft-2); border-radius: var(--radio-sm);
  padding: .9rem 1rem; color: var(--tinta-2); font-size: .95rem;
}
.cobertura__nota .icono { color: var(--brand-mid); margin-top: .15em; }
.cobertura__acciones { display: flex; flex-wrap: wrap; gap: .7rem; }
.cobertura__mapa iframe { height: 340px; border-radius: var(--radio); box-shadow: var(--sombra-sm); }

.horario-grid { display: grid; gap: .6rem; max-width: 620px; margin: 0 auto; }
.horario-grid li {
  display: flex; justify-content: space-between; gap: 1rem;
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio-sm);
  padding: .8rem 1.1rem;
}
.horario-grid__dia { color: var(--tinta-2); }
.horario-grid__horas { font-weight: 700; }

/* --------------------------------------------------------------- Contacto */
.contacto-cards { display: grid; gap: 1rem; }
.contacto-card {
  display: flex; flex-direction: column; gap: .25rem;
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.4rem; text-decoration: none; color: var(--tinta);
  box-shadow: var(--sombra-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}
.contacto-card:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
.contacto-card > .icono { color: var(--brand); margin-bottom: .4rem; }
.contacto-card--wa > .icono { color: var(--cta); }
.contacto-card__label { font-size: .85rem; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .04em; }
.contacto-card__valor { font-size: 1.25rem; font-weight: 800; color: var(--brand-dark); }
.contacto-card__valor--sec { font-size: 1.05rem; }
.contacto-card__accion {
  display: inline-flex; align-items: center; gap: .35em;
  margin-top: .5rem; font-weight: 700; color: var(--brand-mid); font-size: .95rem;
}

.contacto-grid { display: grid; gap: 2rem; }
.contacto-form-col__intro { color: var(--tinta-2); }

.form-wa { display: grid; gap: 1rem; }
.campo { display: grid; gap: .35rem; }
.campo label { font-weight: 600; font-size: .92rem; }
.campo input, .campo select, .campo textarea {
  font: inherit; color: var(--tinta);
  padding: .7em .85em;
  border: 1.5px solid var(--linea); border-radius: var(--radio-sm);
  background: #fff; width: 100%;
}
.campo textarea { resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(10, 96, 192, .18);
}
.form-wa__error { color: #b3261e; font-weight: 600; font-size: .92rem; margin: 0; }

.aviso, .contacto-info-col__mapa { margin-top: 1rem; }
.aviso {
  background: #fff6e6; border: 1px solid #ffe1a8; border-radius: var(--radio-sm);
  padding: .9rem 1rem; font-size: .95rem;
}
.contacto-info-col .ubicacion__direccion { margin-top: .4rem; }
.contacto-info-col__mapa iframe { height: 260px; border-radius: var(--radio); box-shadow: var(--sombra-sm); }

/* ------------------------------------------------------------------- 404 */
.error404 { text-align: center; }
.error404__codigo { font-size: 4rem; font-weight: 900; color: var(--brand-mid); margin: 0; line-height: 1; }
.error404__acciones { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.4rem; }

/* --------------------------------------------------------------- Pie */
.pie { background: var(--brand-darker); color: #b9c8e6; font-size: .95rem; }
.pie__grid {
  display: grid; gap: 2rem;
  padding: clamp(36px, 6vw, 56px) 20px;
}
.pie__logo-chip {
  display: inline-flex; background: #fff; border-radius: 12px;
  padding: .5rem .7rem; margin-bottom: .9rem;
}
.pie__logo-chip img { height: 40px; width: auto; }
.pie__desc { color: #a9bbdd; max-width: 40ch; }
.pie__redes { display: flex; gap: .5rem; margin-top: .4rem; }
.pie__redes a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: #fff;
}
.pie__redes a:hover { background: var(--brand-mid); }
.pie__titulo { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: #fff; margin-bottom: .8rem; }
.pie__lista { display: grid; gap: .5rem; }
.pie__lista a {
  color: #b9c8e6; text-decoration: none;
  display: inline-flex; align-items: center; gap: .45em;
}
.pie__lista a:hover { color: #fff; }
.pie__dia { color: #8ea4cd; }
.pie__direccion { color: #a9bbdd; margin-bottom: .8rem; }
.pie__legal { border-top: 1px solid rgba(255, 255, 255, .1); }
.pie__legal-inner {
  padding: 1.2rem 20px; font-size: .84rem; color: #8ea4cd;
  display: grid; gap: .3rem;
}
.pie__legal a { color: #c6d6f7; }

/* ------------------------------------------------------- WhatsApp flotante */
.wa-flotante {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--cta); color: #fff;
  padding: .8em 1.1em; border-radius: 999px;
  font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
}
.wa-flotante:hover { background: var(--cta-dark); }
.wa-flotante__texto { display: none; }

/* ============================================================ Responsive */
@media (min-width: 560px) {
  .segmentos__grid { grid-template-columns: repeat(3, 1fr); }
  .tarjetas--3, .tarjetas { grid-template-columns: repeat(2, 1fr); }
  .contacto-cards { grid-template-columns: repeat(3, 1fr); }
  .franja-cta__inner { text-align: left; grid-template-columns: 1fr auto; align-items: center; }
  .franja-cta__acciones { justify-content: flex-end; }
  .dos-columnas { grid-template-columns: 1fr 1fr; }
  .panel-seguridad { grid-template-columns: auto 1fr; align-items: start; }
  .wa-flotante__texto { display: inline; }
  .error404__acciones { }
}

@media (min-width: 900px) {
  .barra-info__sep--horario, .barra-info__item--horario { display: inline-flex; }

  .nav-toggle { display: none; }
  .nav {
    position: static; width: auto; box-shadow: none;
    padding: 0; flex-direction: row; align-items: center; gap: .3rem;
    background: transparent; overflow: visible;
    opacity: 1; visibility: visible; transform: none;
  }
  .nav__lista { flex-direction: row; }
  .nav__enlace { padding: .55rem .8rem; }
  .nav__enlace[aria-current="page"] {
    box-shadow: none; border-bottom: 3px solid var(--brand-mid); border-radius: 0;
  }
  .nav__cta { margin: 0 0 0 .8rem; }
  .nav-backdrop { display: none; }

  .hero__inner { grid-template-columns: 1.15fr .85fr; padding: 72px 20px 84px; }
  .hero__marca { display: flex; justify-content: center; }

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

  .ubicacion { grid-template-columns: 1fr 1.1fr; align-items: center; }
  .cobertura { grid-template-columns: 1fr 1.15fr; align-items: start; }
  .contacto-grid { grid-template-columns: 1.1fr .9fr; align-items: start; }

  .pie__grid { grid-template-columns: 1.6fr 1fr 1.2fr 1.2fr; }
  .pie__legal-inner { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 1040px) {
  .tarjetas--4 { grid-template-columns: repeat(4, 1fr); }
}

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