/* ==========================================================
   Metalúrgica Chascomús — estilos
   Colores y tipografía se cambian acá, en :root.
   ========================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fuentes/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  /* Colores tomados del logo */
  --carbon: #3d3c41;
  --carbon-oscuro: #2d2c31;
  --rojo: #c92724;
  --rojo-oscuro: #a51f1c;
  --acero: #e8e9eb;
  --blanco: #ffffff;
  --texto: #1f1f23;
  --texto-suave: #55565c;
  --linea: #c9cbcf;

  /* Curvas de las esquinas: chico para detalles, medio para fotos y tarjetas, grande para bloques */
  --radio-chico: 10px;
  --radio: 16px;
  --radio-grande: 28px;

  --fuente: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Sans neutra del sistema para textos de apoyo (no descarga archivos) */
  --fuente-sistema: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ancho: 72rem;
  --margen: 1rem;
  --foco: var(--rojo);
}

@media (min-width: 48em) {
  :root { --margen: 2rem; }
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--texto);
  background: var(--acero);
  -webkit-text-size-adjust: 100%;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; max-width: 62ch; }

a { color: inherit; }

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

.oscuro {
  --foco: var(--blanco);
  background: var(--carbon);
  color: var(--blanco);
}

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: var(--margen);
}

.saltar {
  position: absolute;
  left: var(--margen);
  top: -3rem;
  z-index: 20;
  padding: 0.5rem 1rem;
  background: var(--blanco);
  color: var(--texto);
  border-radius: var(--radio-chico);
}
.saltar:focus { top: 0.5rem; }

/* ---------- Botones ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-stretch: 110%;
  line-height: 1.2;
  text-decoration: none;
}

.boton-wa { background: var(--rojo); color: var(--blanco); }
.boton-wa:hover { background: var(--rojo-oscuro); }

.boton-borde { border-color: currentColor; }
.boton-borde:hover { background: rgba(255, 255, 255, 0.08); }

.boton svg { flex: none; width: 1.25rem; height: 1.25rem; }

/* ---------- Encabezado ---------- */

.encabezado {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.encabezado .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.encabezado-logo img { width: auto; height: 2.25rem; }

.menu {
  display: none;
  gap: 1.75rem;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.menu a { text-decoration: none; font-weight: 500; }
.menu a:hover { opacity: 0.75; }
.menu a[aria-current] { opacity: 1; }

/* La línea la mueve js/menu.js siguiendo el scroll, de forma continua */
nav { position: relative; }
.menu-marca {
  display: none; /* en celular el menú no se muestra, y la línea tampoco */
  position: absolute;
  left: 0;
  bottom: -0.55rem;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--rojo);
  opacity: 0;
  pointer-events: none;
}
.menu-marca.lista {
  opacity: 1;
  transition: opacity 0.2s;
}
/* Al tocar un enlace del menú, la línea viaja directo hasta él */
.menu-marca.viajando {
  transition: translate 0.7s cubic-bezier(0.65, 0, 0.35, 1), width 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}
@media (prefers-reduced-motion: reduce) {
  .menu-marca.viajando { transition: none; }
}

.encabezado .boton { min-height: 2.5rem; padding: 0.5rem 1.1rem; font-size: 0.95rem; }

/* ---------- Menú en celular ----------
   Botón ☰ que despliega las secciones debajo del encabezado. Solo con JS
   (la clase .con-menu la agrega js/menu.js); sin JS, en celular no hay menú. */
.menu-boton { display: none; }

@media (max-width: 51.99em) {
  .encabezado .contenedor { gap: 0.5rem; }
  .encabezado-logo { margin-right: auto; }
  .encabezado nav { position: static; }

  .con-menu .menu-boton {
    display: grid;
    place-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--blanco);
    cursor: pointer;
  }
  .menu-boton span {
    display: block;
    width: 1.25rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: translate 0.25s, rotate 0.25s, opacity 0.2s;
  }
  /* Las tres rayas se convierten en una X al abrir */
  .menu-abierto .menu-boton span:nth-child(1) { translate: 0 7px; rotate: 45deg; }
  .menu-abierto .menu-boton span:nth-child(2) { opacity: 0; }
  .menu-abierto .menu-boton span:nth-child(3) { translate: 0 -7px; rotate: -45deg; }

  .con-menu .menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.5rem var(--margen) 1.25rem;
    background: var(--carbon);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    visibility: hidden;
    opacity: 0;
    translate: 0 -0.5rem;
    transition: opacity 0.2s, translate 0.2s, visibility 0s 0.2s;
  }
  .con-menu.menu-abierto .menu {
    visibility: visible;
    opacity: 1;
    translate: 0 0;
    transition: opacity 0.2s, translate 0.2s;
  }
  .con-menu .menu li + li { border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .con-menu .menu a {
    display: block;
    padding: 1rem 0 1rem 0.9rem;
    border-left: 3px solid transparent;
    font-size: 1.15rem;
    font-weight: 600;
  }
  .con-menu .menu a[aria-current] { border-left-color: var(--rojo); }
}
@media (max-width: 51.99em) and (prefers-reduced-motion: reduce) {
  .menu-boton span, .con-menu .menu, .con-menu.menu-abierto .menu { transition: none; }
}

/* Botón del encabezado: rojo translúcido con borde, más discreto que los botones principales */
.boton-encabezado {
  background: rgba(201, 39, 36, 0.22);
  border: 1.5px solid rgba(201, 39, 36, 0.7);
  color: var(--blanco);
}
.boton-encabezado:hover { background: rgba(201, 39, 36, 0.45); border-color: var(--rojo); }

@media (min-width: 52em) {
  .menu { display: flex; }
  .menu-marca { display: block; }
  .encabezado-logo img { height: 2.75rem; }
}

/* ---------- Inicio ---------- */

.inicio { padding-block: 2.5rem 3rem; }

.inicio .contenedor {
  display: grid;
  gap: 2rem;
}

.inicio h1 {
  position: relative;
  width: fit-content;
  font-size: clamp(2.4rem, 9vw, 4.75rem);
  line-height: 1;
}

/* Cordón de soldadura: al cargar la página se traza una línea bajo el título,
   con una chispa en la punta. Sale caliente (naranja) y se enfría al rojo de la marca.
   Pasa una sola vez; con animaciones desactivadas se ve la línea quieta. */
.cordon {
  position: absolute;
  left: 0;
  bottom: -0.2em;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--rojo);
  transform-origin: left center;
}
.chispa { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .cordon {
    animation:
      cordon-trazar 0.9s cubic-bezier(0.55, 0, 0.25, 1) 0.4s both,
      cordon-enfriar 1.6s ease-out 0.4s both;
  }
  .chispa {
    display: block;
    position: absolute;
    bottom: calc(-0.2em + 2.5px); /* centrada sobre el cordón */
    left: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    translate: -50% 50%;
    pointer-events: none;
    background: radial-gradient(circle, #ffffff 0 18%, #ffe29a 35%, rgba(255, 140, 50, 0.55) 55%, rgba(255, 90, 30, 0) 72%);
    box-shadow: 0 0 14px 4px rgba(255, 170, 70, 0.55);
    animation:
      chispa-avanzar 0.9s cubic-bezier(0.55, 0, 0.25, 1) 0.4s both,
      chispa-titilar 0.09s steps(2) 0.4s 10,
      chispa-apagar 0.3s ease-out 1.3s both;
  }
}

@keyframes cordon-trazar { from { scale: 0 1; } }
@keyframes cordon-enfriar {
  from { background: #ffb347; box-shadow: 0 0 12px rgba(255, 150, 60, 0.7); }
  to { background: var(--rojo); box-shadow: 0 0 0 rgba(255, 150, 60, 0); }
}
@keyframes chispa-avanzar { from { left: 0; } to { left: 100%; } }
@keyframes chispa-apagar { to { opacity: 0; scale: 0.4; } }
@keyframes chispa-titilar { 50% { scale: 0.7; } }

/* Lema: segundo nivel, entre el título y la bajada. Misma familia que el título,
   ancho normal y peso medio, en blanco: se lee claro sin competir con el título. */
.inicio-texto .inicio-lema {
  margin-top: 1.6rem;
  font-size: clamp(1.35rem, 3.6vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--blanco);
}

/* Bajada: la descripción, en sans neutra y gris claro, para que el título mande */
.inicio-texto .inicio-bajada {
  max-width: 42rem;
  margin-top: 1rem;
  font-family: var(--fuente-sistema);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  color: #d4d4d4;
}
@media (min-width: 60em) {
  .inicio-texto .inicio-bajada { font-size: 1.25rem; }
}

.inicio-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.datos {
  display: grid;
  gap: 1rem;
  margin: 2.25rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  list-style: none;
}
.datos li { font-weight: 600; font-stretch: 110%; line-height: 1.3; }
.datos li::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 4px;
  margin-bottom: 0.6rem;
  border-radius: 999px;
  background: var(--rojo);
}

@media (min-width: 36em) {
  .datos { grid-template-columns: repeat(3, 1fr); }
}

.inicio-foto img {
  width: 100%;
  border-radius: var(--radio-grande);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (min-width: 60em) {
  .inicio { padding-block: 4rem; }
  .inicio .contenedor {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
  }
  .inicio-foto img { aspect-ratio: 4 / 5; }
}

/* ---------- Secciones ---------- */

.seccion { padding-block: 4rem; }

@media (min-width: 48em) {
  .seccion { padding-block: 6rem; }
}

.seccion-titulo {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

.seccion-intro {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--texto-suave);
}

/* ---------- Quiénes somos ---------- */

.nosotros { background: var(--blanco); }

.compromisos {
  display: grid;
  gap: 2rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}
.compromisos li {
  padding: 1.5rem;
  border-radius: var(--radio);
  background: var(--acero);
}
.compromisos h3 { font-size: 1.3rem; font-stretch: 115%; }
.compromisos p { margin-top: 0.5rem; color: var(--texto-suave); }

@media (min-width: 48em) {
  .compromisos { grid-template-columns: repeat(3, 1fr); }
}

.pasos-titulo {
  margin-top: 4.5rem;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.pasos {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}
.pasos li {
  counter-increment: paso;
  align-content: start;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 1rem;
}
.pasos li::before {
  content: counter(paso);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--rojo);
  color: var(--blanco);
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.25rem;
}
.pasos h4 { margin: 0; font-size: 1.1rem; font-stretch: 110%; font-weight: 700; }
.pasos p { color: var(--texto-suave); }

@media (min-width: 60em) {
  .pasos { grid-template-columns: repeat(4, 1fr); }
  .pasos li { grid-template-columns: 1fr; gap: 0.75rem; }
  .pasos li::before { grid-row: auto; }
}

/* Línea que une los pasos. js/pasos.js la ubica entre el primer y el último círculo
   y la va completando al bajar; cada número se enciende cuando la línea llega a él.
   Sin JS no se agrega .animado y los pasos se ven como siempre (todos en rojo). */
.pasos-marco { position: relative; }
.pasos-linea {
  display: none;
  position: absolute;
  z-index: 0;
  background: var(--linea);
  border-radius: 999px;
  pointer-events: none;
}
.pasos-progreso {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--rojo);
  transform-origin: left center;
  scale: var(--avance, 0) 1;
}
.pasos-marco.vertical .pasos-progreso { transform-origin: center top; scale: 1 var(--avance, 0); }
.pasos-marco.animado .pasos-linea { display: block; }

.pasos li::before { position: relative; z-index: 1; }
.pasos-marco.animado .pasos li::before {
  background: var(--blanco);
  color: var(--texto-suave);
  box-shadow: inset 0 0 0 2px var(--linea);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, scale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pasos-marco.animado .pasos li.encendido::before {
  background: var(--rojo);
  color: var(--blanco);
  box-shadow: inset 0 0 0 2px var(--rojo), 0 0 0 6px rgba(201, 39, 36, 0.15);
  scale: 1.08;
}
@media (prefers-reduced-motion: reduce) {
  .pasos-marco.animado .pasos li::before { transition: none; }
}

/* ---------- Trabajos ---------- */

.indice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.indice a {
  display: inline-block;
  padding: 0.45rem 1rem;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--blanco);
  text-decoration: none;
  font-weight: 600;
}
.indice a:hover { border-color: var(--carbon); }

.rubro {
  display: grid;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--linea);
}

.rubro h3 {
  font-size: clamp(2.2rem, 8vw, 3.25rem);
  color: var(--carbon);
}

.rubro-texto p { margin-top: 0.75rem; color: var(--texto-suave); }

.rubro-pedir {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--rojo-oscuro);
  text-underline-offset: 0.25em;
}
.rubro-pedir:hover { color: var(--texto); }

@media (min-width: 60em) {
  .rubro {
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
  }
  .rubro-texto { position: sticky; top: 6rem; }
}

/* Galería: filas del mismo alto; cada foto ocupa el ancho que pide su proporción.
   --r es ancho ÷ alto de la foto (4:3 = 1.333, 4:5 = 0.8). */
.galeria {
  --base: 7.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.galeria a {
  flex: var(--r) 1 calc(var(--r) * var(--base));
  display: block;
  overflow: hidden;
  border-radius: var(--radio);
  background: var(--carbon);
}
/* Hueco al final: evita que la última fila se estire y las fotos sueltas queden gigantes */
.galeria::after { content: ""; flex: 2 1 0; }
.galeria img {
  width: 100%;
  aspect-ratio: var(--r);
  object-fit: cover;
}
.galeria a:hover img { opacity: 0.9; }

@media (min-width: 48em) {
  .galeria { --base: 12rem; gap: 0.75rem; }
}

/* ---------- Contacto ---------- */

.contacto .contenedor {
  display: grid;
  gap: 3rem;
}

.contacto .seccion-intro { color: #e3e3e6; }

.contacto .boton { margin-top: 2rem; font-size: 1.1rem; }

.ficha {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 1.75rem;
  border-radius: var(--radio-grande);
  background: var(--carbon-oscuro);
}
.ficha div:first-child { border-top: 0; padding-top: 0; }
.ficha div { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 1rem; }
.ficha dt { font-weight: 700; font-stretch: 110%; }
.ficha dd { margin: 0.25rem 0 0; color: #e3e3e6; }
.ficha a { text-underline-offset: 0.25em; }

@media (min-width: 60em) {
  .contacto .contenedor { grid-template-columns: 1.2fr 1fr; gap: 4rem; }
}

/* ---------- Pie ---------- */

.pie {
  padding-block: 2rem;
  background: var(--carbon-oscuro);
  color: #c7c7cc;
  font-size: 0.95rem;
}
.pie .contenedor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.pie img { height: 2.25rem; width: auto; }

/* ---------- Cotas sobre fotos ----------
   Líneas de medida como en un plano. Uso: <a class="con-cotas"> con la foto,
   un <svg class="cotas"> con las líneas y un .cota-texto por medida. */

.galeria .con-cotas {
  position: relative;
  flex-basis: 100%;
}

.cotas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.55));
}
.cotas line {
  stroke: var(--blanco);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.cotas .cota { stroke-width: 1.75; }
.cotas .tope { stroke-width: 2.5; }
.cotas .auxiliar { stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.85; }

.cota-texto {
  position: absolute;
  translate: -50% -50%;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--rojo);
  color: var(--blanco);
  font-size: clamp(0.7rem, 1.6vw, 0.875rem);
  font-weight: 700;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}

/* Al aparecer en pantalla, las cotas se trazan una vez. Solo en navegadores que lo soportan;
   el resto las muestra quietas. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Todas las piezas se animan según la posición de la foto, no la propia */
    .con-cotas { view-timeline: --foto-cotas; }
    .cotas .cota {
      transform-box: fill-box;
      transform-origin: center;
      animation: cota-trazar linear both;
      animation-timeline: --foto-cotas;
      animation-range: entry 30% cover 40%;
    }
    .cotas .tope, .cotas .auxiliar, .cota-texto {
      animation: cota-aparecer linear both;
      animation-timeline: --foto-cotas;
      animation-range: cover 30% cover 45%;
    }
  }
}
/* La línea crece desde el centro hacia los dos topes */
@keyframes cota-trazar { from { scale: 0; } }
@keyframes cota-aparecer { from { opacity: 0; } }
/* Medida vertical: el texto se gira y acompaña la línea, como en un plano */
.cota-texto.cota-vertical { rotate: -90deg; }
/* Variante para fotos con fondo claro: líneas oscuras con halo claro */
.cotas-oscuras .cotas { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.9)); }
.cotas-oscuras .cotas line { stroke: var(--carbon-oscuro); }

/* ---------- Visor de fotos (js/visor.js) ---------- */

.visor-abierto { overflow: hidden; }

.visor {
  --foco: var(--blanco);
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--carbon-oscuro);
  color: var(--blanco);
}
.visor::backdrop { background: rgba(0, 0, 0, 0.5); }

.visor-escena {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.9rem;
  height: 100%;
  padding: 4rem var(--margen) 1.5rem;
}

.visor-marco {
  position: relative;
  line-height: 0;
}
.visor-foto {
  max-width: min(100%, 75rem);
  max-height: calc(100dvh - 9rem);
  width: auto;
  height: auto;
  border-radius: var(--radio);
}
.visor-marco .cotas, .visor-marco .cotas *, .visor-marco .cota-texto { animation: none; }

.visor-pie {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  margin: 0;
  font-size: 0.95rem;
}
.visor-rubro { font-weight: 700; font-stretch: 112%; }
.visor-contador { color: #c7c7cc; font-variant-numeric: tabular-nums; }

.visor-boton {
  position: fixed;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--blanco);
  cursor: pointer;
}
.visor-boton:hover { background: rgba(255, 255, 255, 0.26); }
.visor-boton svg { width: 1.4rem; height: 1.4rem; }

.visor-cerrar { top: 0.75rem; right: 0.75rem; }
.visor-anterior, .visor-siguiente { top: 50%; translate: 0 -50%; }
.visor-anterior { left: 0.75rem; }
.visor-siguiente { right: 0.75rem; }

@media (max-width: 47.99em) {
  /* En el celular las flechas van abajo para no tapar la foto; también se puede deslizar */
  .visor-anterior, .visor-siguiente { top: auto; bottom: 1rem; translate: none; }
  .visor-anterior { left: calc(50% - 3.5rem); }
  .visor-siguiente { right: calc(50% - 3.5rem); }
  .visor-escena { padding-bottom: 5rem; }
}

/* ---------- Íconos de los datos de contacto ---------- */

.ficha div {
  position: relative;
  padding-left: 3.5rem;
  min-height: 2.5rem;
}
.ficha div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--rojo) center / 1.25rem no-repeat;
}
.ficha div:first-child::before { top: 0; }
.ficha dd { overflow-wrap: anywhere; }

.ficha .f-direccion::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21Z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
.ficha .f-horarios::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.ficha .f-whatsapp::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2Zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2Zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8-.2-.1-.4-.1-.6.1l-.8 1c-.1.2-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.8-1.3.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.7 11.8 11.8 0 0 0 4.5 4c1.7.7 2.3.8 3.2.6a2.7 2.7 0 0 0 1.8-1.3 2.2 2.2 0 0 0 .1-1.2c0-.1-.2-.2-.4-.3Z'/%3E%3C/svg%3E"); }
.ficha .f-email::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
.ficha .f-zona::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2Z'/%3E%3Cpath d='M9 4v14M15 6v14'/%3E%3C/svg%3E"); }

/* ---------- Botón flotante de WhatsApp ---------- */

.wa-flotante {
  --foco: var(--texto);
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 15;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #25d366; /* verde de WhatsApp */
  color: var(--blanco);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.wa-flotante:hover { background: #1ebe5b; }
.wa-flotante svg { width: 1.9rem; height: 1.9rem; }

@media (min-width: 48em) {
  .wa-flotante { right: 1.5rem; bottom: 1.5rem; width: 4rem; height: 4rem; }
  .wa-flotante svg { width: 2.2rem; height: 2.2rem; }
}

/* ---------- Abierto ahora / Cerrado (js/horario.js) ---------- */

.estado-atencion {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--blanco);
}
.estado-atencion:empty { display: none; }
.estado-atencion::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #9a9aa0;
}
.estado-atencion.abierto::before {
  background: #34d17a;
  box-shadow: 0 0 0 4px rgba(52, 209, 122, 0.2);
}
.ficha .estado-atencion { display: flex; margin-bottom: 0.35rem; }
.ficha .estado-atencion:empty { display: none; }
.estado-contacto { margin-top: 1rem; font-size: 0.95rem; }
