/* =========================================================
   EJEMPLO: TALLER PISTÓN
   Estilo industrial: grafito, amarillo de seguridad y
   títulos anchos y pesados, como un letrero de taller.
   ========================================================= */

/* ----- TIPOGRAFÍAS ----- */
@font-face {
  font-family: "Archivo";
  src: url("../../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%; /* esta letra puede ser angosta o ancha */
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../../fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

/* ----- VARIABLES ----- */
:root {
  --color-grafito: #1B1E22;   /* fondo oscuro */
  --color-grafito-2: #2A2E34; /* bloques sobre fondo oscuro */
  --color-amarillo: #FFC400;  /* amarillo de seguridad */
  --color-blanco: #FFFFFF;
  --color-gris: #ECEDEF;      /* fondo de secciones claras */
  --color-texto: #1B1E22;
  --color-suave: #50565E;     /* texto secundario */
  --color-linea: #D3D6DA;

  /* Franja de ejemplo (colores de la página principal) */
  --color-franja: #0E1A2B;
  --color-franja-acento: #FFB938;

  --fuente-titulos: "Archivo", "Arial Black", sans-serif;
  --fuente-texto: "Figtree", "Segoe UI", Arial, sans-serif;

  --margen: 1.25rem;
  --ancho-max: 1100px;
}

/* ----- BASE ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-blanco);
  color: var(--color-texto);
  font-family: var(--fuente-texto);
  font-size: 1.0625rem;
  line-height: 1.55;
  padding-bottom: 64px; /* espacio para la barra de urgencias */
}

h1,
h2,
h3 {
  font-family: var(--fuente-titulos);
  font-stretch: 125%; /* letras anchas */
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.3rem, 10vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 6.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  font-stretch: 110%;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-amarillo);
  outline-offset: 3px;
}

.saltar {
  position: absolute;
  left: 1rem;
  top: -100px;
  padding: 0.5rem 1rem;
  background: var(--color-amarillo);
  color: var(--color-grafito);
  z-index: 10;
}
.saltar:focus {
  top: 3.5rem;
}

.icono {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ----- FRANJA DE EJEMPLO ----- */
.franja-ejemplo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem var(--margen);
  background: var(--color-franja);
  color: #EAF0F7;
  font-size: 0.875rem;
  text-align: center;
}
.franja-ejemplo a {
  color: var(--color-franja-acento);
  font-weight: 700;
  padding: 0.35rem 0;
}

/* ----- BOTONES ----- */
.botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0.8rem 1.5rem;
  background: var(--color-amarillo);
  color: var(--color-grafito);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 2px;
}
.boton:hover {
  background: #FFD54D;
}

.boton-chico {
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

/* ----- ENCABEZADO ----- */
.encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--margen);
  background: var(--color-grafito);
  color: var(--color-blanco);
}

.logo {
  font-family: var(--fuente-titulos);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* ----- PORTADA ----- */
.portada {
  background: var(--color-grafito);
  color: var(--color-blanco);
  padding: 2.5rem var(--margen) 3rem;
}

.portada-texto {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: var(--ancho-max);
  margin: 0 auto;
}
.portada-texto > p {
  max-width: 32em;
  color: #C5CAD1;
  font-size: 1.125rem;
}
.portada-texto .portada-horario {
  font-size: 0.95rem;
  color: #C5CAD1;
  padding-left: 0.75rem;
  border-left: 3px solid var(--color-amarillo);
}

/* Franja de seguridad amarilla y negra */
.franja-seguridad {
  height: 18px;
  background: repeating-linear-gradient(
    -45deg,
    var(--color-amarillo) 0 16px,
    var(--color-grafito) 16px 32px
  );
}

/* ----- SECCIONES ----- */
.seccion {
  padding: 3rem var(--margen);
}
.seccion > * {
  max-width: var(--ancho-max);
  margin-left: auto;
  margin-right: auto;
}

.seccion-gris {
  background: var(--color-gris);
}

.seccion-bajada {
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
  color: var(--color-suave);
  font-size: 1.1rem;
}

/* Lista de servicios con ícono amarillo */
.servicios {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
}
.servicios li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-linea);
}
.servicios .icono {
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--color-grafito);
  color: var(--color-amarillo);
  border-radius: 2px;
}
.servicios p {
  margin-top: 0.2rem;
  color: var(--color-suave);
}

/* Pasos numerados */
.pasos {
  list-style: none;
  counter-reset: paso;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.pasos li {
  counter-increment: paso;
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 1rem;
}
.pasos li::before {
  content: counter(paso);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  background: var(--color-amarillo);
  font-family: var(--fuente-titulos);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 1.3rem;
}
.pasos p {
  color: var(--color-suave);
}

/* Comunas como etiquetas */
.comunas {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.comunas li {
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--color-grafito);
  font-weight: 700;
}

/* Horario y mapa */
.ubicacion {
  display: grid;
  gap: 1.5rem;
}
.horario {
  margin: 0 0 1.25rem;
}
.horario div {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-linea);
}
.horario dt {
  font-weight: 700;
}
.horario dd {
  margin: 0;
}
.direccion {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}
.mapa {
  aspect-ratio: 4 / 3;
  background: var(--color-linea);
  border: 3px solid var(--color-grafito);
}
.mapa iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ----- PIE ----- */
.pie {
  padding: 1.5rem var(--margen);
  background: var(--color-grafito);
  color: #C5CAD1;
  font-size: 0.9rem;
  text-align: center;
}
.pie a {
  display: inline-block;
  padding: 0.6rem 0;
}

/* ----- BARRA DE URGENCIAS (fija abajo en celular) ----- */
.barra-urgencia {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  background: var(--color-amarillo);
  color: var(--color-grafito);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  border-top: 3px solid var(--color-grafito);
}

/* ----- PANTALLAS GRANDES ----- */
@media (min-width: 800px) {
  :root {
    --margen: 2rem;
  }
  body {
    padding-bottom: 0;
  }
  /* En computador no hace falta la barra fija: el botón de urgencias está arriba */
  .barra-urgencia {
    display: none;
  }
  .portada {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
  .servicios {
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }
  .pasos {
    grid-template-columns: repeat(4, 1fr);
  }
  .ubicacion {
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
  }
}
