/* ============================================================
   TORMECAN — Estilos específicos de Quiénes Somos (quienes-somos.html)
   ============================================================ */

/* Hero */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/quienes-somos/perno-enganche.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(1.05);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(17, 17, 17, 0.7) 30%, transparent 100%);
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 36px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  background: #EB1B23;
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  width: 2px;
  /* llega hasta el marcador del hito siguiente: gap mobile (32px) - 12px de marcador */
  height: calc(100% + 20px);
  background: #374151;
}
@media (min-width: 768px) {
  /* gap desktop (75.31px, ver md:gap-[75.31px] en el HTML) - 12px de marcador */
  .timeline-item::after { height: calc(100% + 63.31px); }
}
.timeline-item:last-child::after { display: none; }

/* Valor card hover */
.valor-card {
  border-left: 3px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.valor-card:hover {
  border-left-color: #EB1B23;
  background: #f9f9f9;
}

/* Banda fotográfica full-bleed */
.photo-band {
  position: absolute;
  inset: 0;
  background-size: cover;
  /* Fija (sin parallax) y encuadrada abajo, donde está la máquina soldando */
  background-position: center bottom;
}

/* Texto sobre la banda fotográfica: sombra negra en vez de capa oscura */
.band-text,
.band-text span {
  text-shadow: 0 0 3px rgba(0,0,0,0.95), 0 2px 6px rgba(0,0,0,0.9), 0 4px 18px rgba(0,0,0,0.8);
}

/* Galería */
.gal-tile {
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #1E1E1E;
}
.gal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
}
.gal-tile:hover .gal-img {
  transform: scale(1.07);
  filter: brightness(0.7);
}
.gal-tile::after {
  content: '+';
  position: absolute;
  bottom: 12px;
  right: 16px;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.gal-tile:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6vh 4vw;
}
.lb.open { display: flex; }
.lb img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7);
}
.lb-close {
  position: absolute;
  top: 18px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.lb-close:hover { opacity: 1; }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(216, 55, 49, 0.9);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 52px;
  height: 52px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lb-nav:hover { background: #EB1B23; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #999;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.2em;
  font-size: 13px;
}
@media (max-width: 640px) {
  .lb-nav { width: 42px; height: 42px; }
}

/* Sombra del texto del hero: mismo tratamiento que en La Fábrica y Productos */
.hero-bg ~ .relative h1,
.hero-bg ~ .relative span {
  text-shadow:
    0 0 3px rgba(0, 0, 0, 0.95),
    0 2px 6px rgba(0, 0, 0, 0.9),
    0 4px 20px rgba(0, 0, 0, 0.85),
    0 8px 40px rgba(0, 0, 0, 0.7);
}

/* Nav mientras la barra es transparente; al hacer scroll toma fondo sólido */
#navbar:not(.scrolled) .md\:flex a:not(.bg-rojo),
#navbar:not(.scrolled) > div > button {
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.95),
    0 1px 3px rgba(0, 0, 0, 1),
    0 2px 8px rgba(0, 0, 0, 0.95),
    0 4px 18px rgba(0, 0, 0, 0.85);
}
#navbar:not(.scrolled) > div > a img {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9)) drop-shadow(0 4px 16px rgba(0, 0, 0, 0.7));
}
#navbar:not(.scrolled) a.bg-rojo {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

/* En pantallas chicas el bloque de texto no entraba en la altura del hero */
@media (max-width: 640px) {
  .hero-bg ~ .relative { padding-bottom: 1.5rem; }
  .hero-bg ~ .relative .hero-desc { font-size: 1rem; }
}
