/* ==========================================================================
   TECNAVIN, S.L. — hoja de estilo
   Reconstrucción 2026. Paleta original del sitio: granate #800000.
   Sin dependencias externas: no carga fuentes ni CSS de terceros.
   ========================================================================== */

:root {
  --granate: #800000;
  --granate-claro: #a31919;
  --granate-oscuro: #5c0000;
  --rojo-activo: #d51919;
  --tinta: #1c1c1e;
  --tinta-suave: #4a4a4f;
  --gris: #6e6e73;
  --linea: #e3e3e6;
  --fondo: #ffffff;
  --fondo-alt: #f6f6f7;
  --negro-cabecera: #121214;
  --radio: 4px;
  --ancho: 1180px;
  --sombra: 0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
  --fuente: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 17px;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--granate); text-decoration: none; }
a:hover { color: var(--granate-claro); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 24px; }
.centro { text-align: center; }
.oculto-visual {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 100;
  background: var(--negro-cabecera);
  border-bottom: 3px solid var(--granate);
}
.cabecera .contenedor {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 84px;
}
.logo { display: flex; align-items: center; gap: 12px; color: #fff; }
.logo:hover { text-decoration: none; }
.logo-img {
  height: 58px; width: auto;
  background: #fff; padding: 5px 9px;
  border-radius: var(--radio);
}
.logo-texto { font-size: 1.3rem; font-weight: 800; letter-spacing: .14em; color: #fff; }
.logo-texto span { color: var(--granate-claro); }

.menu-btn {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 10px; color: #fff; font-size: 1.5rem; line-height: 1;
}

.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 10px 14px; color: #e9e9ec;
  font-size: .95rem; font-weight: 600; border-radius: var(--radio);
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.1); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--rojo-activo); }

/* ---------- Hero / carrusel ---------- */
.hero { position: relative; background: #0d0d0f; overflow: hidden; }
.hero-pista { display: flex; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.hero-dia { position: relative; min-width: 100%; }
.hero-dia img, .hero-dia .marco {
  width: 100%; height: clamp(320px, 56vh, 560px); object-fit: cover;
}
.hero-dia .pie {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 72px 24px 32px;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
  color: #fff; text-align: center;
}
.hero-dia .pie h2 { margin: 0; font-size: clamp(1.4rem, 3.4vw, 2.3rem); text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.hero-flecha {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.45); color: #fff; border: 0; cursor: pointer;
  width: 46px; height: 68px; font-size: 1.6rem; line-height: 1;
}
.hero-flecha:hover { background: var(--granate); }
.hero-flecha.izq { left: 0; }
.hero-flecha.der { right: 0; }
.hero-puntos {
  position: absolute; bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px; z-index: 2;
}
.hero-puntos button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255,255,255,.5); cursor: pointer;
}
.hero-puntos button[aria-selected="true"] { background: var(--granate-claro); width: 26px; border-radius: 5px; }

/* ---------- Secciones ---------- */
.seccion { padding: 76px 0; }
section[id], [id^="section-"] { scroll-margin-top: 100px; }
.seccion.alt { background: var(--fondo-alt); }
.seccion-titulo { max-width: 740px; margin: 0 auto 48px; text-align: center; }
.seccion-titulo h2 { position: relative; padding-bottom: 18px; }
.seccion-titulo h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 56px; height: 3px; background: var(--granate);
}
.seccion-titulo p { color: var(--gris); margin: 0; }

.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.texto-justificado p { text-align: justify; }

/* ---------- Galería miniaturas ---------- */
.galeria { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.galeria img, .galeria .marco { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radio); }

/* ---------- Cita de calidad ---------- */
.cita {
  background: var(--granate); color: #fff; padding: 64px 0;
}
.cita .contenedor { max-width: 880px; }
.cita p { text-align: justify; font-size: 1.1rem; margin-bottom: 1.4em; }
.cita .firma { font-size: .95rem; opacity: .9; }
.cita a { color: #fff; text-decoration: underline; font-weight: 600; }

/* ---------- Rejilla de portfolio ---------- */
.filtros { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filtros button {
  background: #fff; border: 1px solid var(--linea); color: var(--tinta-suave);
  padding: 9px 20px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .92rem; font-weight: 600;
}
.filtros button:hover { border-color: var(--granate); color: var(--granate); }
.filtros button[aria-pressed="true"] { background: var(--granate); border-color: var(--granate); color: #fff; }

.rejilla { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tarjeta {
  display: block; background: #fff; border: 1px solid var(--linea);
  border-radius: var(--radio); overflow: hidden; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tarjeta:hover { transform: translateY(-4px); box-shadow: var(--sombra); border-color: #d2d2d6; text-decoration: none; }
.tarjeta .img { position: relative; background: var(--fondo-alt); }
.tarjeta .img img, .tarjeta .img .marco { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.tarjeta .etiqueta {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,.72); color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 3px;
}
.tarjeta .cuerpo { padding: 18px 20px; }
.tarjeta h3 { font-size: 1.02rem; margin: 0 0 6px; color: var(--tinta); }
.tarjeta .mas { font-size: .85rem; font-weight: 700; color: var(--granate); }

/* ---------- Página de detalle ---------- */
.detalle { display: grid; grid-template-columns: 270px 1fr; gap: 48px; align-items: start; }
.lateral { position: sticky; top: 108px; }
.lateral h4 {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gris); margin-bottom: 12px;
}
.lateral ul { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--linea); }
.lateral li { border-bottom: 1px solid var(--linea); }
.lateral a {
  display: block; padding: 11px 14px; font-size: .92rem;
  color: var(--tinta-suave); border-left: 3px solid transparent;
}
.lateral a:hover { background: var(--fondo-alt); color: var(--granate); text-decoration: none; }
.lateral a[aria-current="page"] {
  background: var(--fondo-alt); color: var(--granate);
  border-left-color: var(--granate); font-weight: 700;
}

.migas { font-size: .85rem; color: var(--gris); margin-bottom: 20px; }
.migas a { color: var(--gris); }
.migas a:hover { color: var(--granate); }

.entradilla {
  font-size: 1.12rem; color: var(--tinta-suave); text-align: justify;
  padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--linea);
}

.mosaico { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mosaico figure { margin: 0; }
.mosaico img, .mosaico .marco {
  aspect-ratio: 4/3; object-fit: cover; width: 100%;
  border-radius: var(--radio); background: var(--fondo-alt);
}
.mosaico figcaption { font-size: .82rem; color: var(--gris); padding: 8px 2px 0; }

/* ---------- Marco de imagen ausente ---------- */
.marco {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #f0f0f1, #f0f0f1 10px, #e8e8ea 10px, #e8e8ea 20px);
  border: 1px dashed #c8c8cc; color: #9a9aa0;
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  text-align: center; padding: 10px;
}

/* ---------- Contacto ---------- */
.contacto { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; }
.datos { list-style: none; margin: 0 0 28px; padding: 0; }
.datos li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.datos .icono {
  flex: 0 0 38px; height: 38px; border-radius: 50%;
  background: var(--granate); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.datos .et { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.datos .va { font-weight: 600; }
.datos a { color: var(--tinta); }

.campo { margin-bottom: 18px; }
.campo label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.campo input, .campo textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: .95rem;
  border: 1px solid #cfcfd4; border-radius: var(--radio); background: #fff;
}
.campo input:focus, .campo textarea:focus {
  outline: 2px solid var(--granate); outline-offset: 1px; border-color: var(--granate);
}
.lopd { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--tinta-suave); }
.lopd input { width: auto; margin-top: 4px; flex: 0 0 auto; }
a.boton, .boton {
  display: inline-block; background: var(--granate); color: #fff;
  border: 0; padding: 13px 30px; border-radius: var(--radio);
  font: inherit; font-size: .95rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
}
a.boton:hover, .boton:hover { background: var(--granate-oscuro); color: #fff; text-decoration: none; }
.lateral a.boton { border-left: 0; padding: 13px 30px; color: #fff; }
.lateral a.boton:hover { background: var(--granate-oscuro); color: #fff; }
.aviso {
  background: #fff8e6; border: 1px solid #e8d9a8; border-left: 4px solid #c99a1e;
  padding: 14px 16px; border-radius: var(--radio); font-size: .88rem; margin-bottom: 22px;
}

.mapa { line-height: 0; }
.mapa iframe { width: 100%; height: 420px; border: 0; }

/* ---------- Certificaciones ---------- */
.certs { display: flex; justify-content: center; gap: 44px; flex-wrap: wrap; }
.certs figure { margin: 0; text-align: center; max-width: 170px; }
.certs img, .certs .marco { max-width: 140px; margin: 0 auto 10px; }
.certs figcaption { font-size: .8rem; color: var(--gris); }
.certs strong { display: block; color: var(--tinta); font-size: .92rem; }

/* ---------- Pie ---------- */
.pie { background: var(--negro-cabecera); color: #b9b9c0; padding: 56px 0 26px; font-size: .9rem; }
.pie-rejilla { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.pie h4 {
  color: #fff; font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 14px;
}
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin-bottom: 8px; }
.pie a { color: #b9b9c0; }
.pie a:hover { color: #fff; }
.pie .copy {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .82rem; color: #8a8a93;
}

.arriba {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--granate); color: #fff; font-size: 1.1rem; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.arriba.visible { opacity: 1; pointer-events: auto; }
.arriba:hover { background: var(--granate-oscuro); }

/* ---------- Visor ---------- */
.visor {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center; padding: 40px 20px;
}
.visor.abierto { display: flex; }
.visor img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.visor figcaption { color: #fff; text-align: center; padding-top: 14px; font-size: .9rem; }
.visor .cerrar {
  position: absolute; top: 16px; right: 20px; background: none; border: 0;
  color: #fff; font-size: 2rem; cursor: pointer; line-height: 1;
}
.visor .nav-v {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.14); border: 0; color: #fff;
  width: 48px; height: 72px; font-size: 1.6rem; cursor: pointer;
}
.visor .nav-v:hover { background: var(--granate); }
.visor .nav-v.izq { left: 12px; }
.visor .nav-v.der { right: 12px; }
.mosaico button.lupa { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .dos-columnas, .contacto { grid-template-columns: 1fr; gap: 32px; }
  .rejilla { grid-template-columns: repeat(2, 1fr); }
  .detalle { grid-template-columns: 1fr; }
  .lateral { position: static; }
  .pie-rejilla { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.55rem; }
  .seccion { padding: 52px 0; }
  .contenedor { padding: 0 16px; }
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--negro-cabecera); border-bottom: 3px solid var(--granate);
    display: none;
  }
  .nav.abierto { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .nav a { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; }
  .rejilla { grid-template-columns: 1fr; }
  .pie-rejilla { grid-template-columns: 1fr; gap: 28px; }
  .logo-texto { font-size: 1.1rem; }
  .logo-img { height: 46px; }
  .cabecera .contenedor { min-height: 70px; }
  section[id], [id^="section-"] { scroll-margin-top: 80px; }
}

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

@media print {
  .cabecera, .nav, .arriba, .hero-flecha, .hero-puntos, .mapa, .filtros { display: none; }
  body { font-size: 11pt; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Galería: imagen única destacada ---------- */
.destacada { margin: 0 0 24px; }
.destacada img, .destacada .marco {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: var(--radio); background: var(--fondo-alt);
}
.destacada figcaption { font-size: .88rem; color: var(--gris); padding-top: 10px; }

/* ---------- Nota sobre fotos no conservadas ---------- */
.nota-fotos {
  margin-top: 26px; padding: 13px 15px;
  background: var(--fondo-alt); border-left: 3px solid var(--linea);
  border-radius: var(--radio); font-size: .85rem; color: var(--gris);
}
.nota-fotos code {
  background: #fff; border: 1px solid var(--linea);
  padding: 1px 5px; border-radius: 3px; font-size: .95em;
}
