/* ============================================================
   TORMECAN — Estilos específicos de la página de inicio (index.html)
   ============================================================ */

/* Hero */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: 6rem; /* altura del navbar fijo, evita que el contenido se monte sobre él */
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/inicio/slide01.jpg');
  background-size: cover;
  background-position: center;
}
.hero-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: #EB1B23;
}
/* Legibilidad del texto sobre la foto clara, sin oscurecer la imagen */
.hero-section h1,
.hero-section p,
.hero-section span {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 3px 14px rgba(0, 0, 0, 0.6);
}
.hero-section .resaltado {
  text-shadow: none;
}
/* El párrafo del hero lleva una sombra más marcada para despegarlo de la foto */
.hero-section p {
  font-size: calc(1.125rem + 3px); /* text-lg + 3px */
  text-shadow: 0 0 2px rgba(0, 0, 0, 1), 0 1px 4px rgba(0, 0, 0, 1), 0 2px 10px rgba(0, 0, 0, 1), 0 6px 24px rgba(0, 0, 0, 0.9);
}
@media (max-width: 640px) {
  .hero-section { padding-top: 4.5rem; } /* navbar mobile más bajo */
  .hero-section p { font-size: 1.0625rem; }
}
#navbar a:not(.bg-rojo) {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Producto card (imagen con hover) */
.producto-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.producto-card img { transition: transform 0.5s ease; }
.producto-card:hover img { transform: scale(1.08); }
.producto-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.9) 30%, transparent 100%);
  transition: background 0.3s;
}
.producto-card:hover .overlay {
  background: linear-gradient(to top, rgba(216, 55, 49, 0.9) 0%, rgba(17, 17, 17, 0.7) 100%);
}

/* Diferenciador card */
.diff-card {
  background: #171717;
  border-left: 3px solid transparent;
  transition: border-color 0.3s, background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.diff-card:hover {
  border-left-color: #EB1B23;
  background: #232323;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* Imagen de la card diferenciadora */
.diff-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
}
.diff-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.08) brightness(1.10) saturate(1.06);
  transform: scale(1.02);
  transition: filter 0.5s ease, transform 0.6s ease;
}
.diff-card:hover .diff-card-media img {
  filter: contrast(1.12) brightness(1.16) saturate(1.12);
  transform: scale(1.06);
}
/* Sombra mínima en el borde inferior, solo para empalmar la foto con la card */
.diff-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.20) 0%, rgba(17, 17, 17, 0) 16%);
  transition: background 0.4s ease;
  pointer-events: none;
}
.diff-card:hover .diff-card-media::after {
  background: linear-gradient(to top, rgba(17, 17, 17, 0.12) 0%, rgba(17, 17, 17, 0) 16%);
}
@media (prefers-reduced-motion: reduce) {
  .diff-card,
  .diff-card-media img,
  .diff-card-media::after { transition: none; }
  .diff-card:hover .diff-card-media img { transform: scale(1.02); }
}

/* ── Certificaciones: mosaico de fotos ── */
.cert-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
/* Aire a los lados: pegado al borde del contenedor se veía apretado */
@media (min-width: 768px) {
  .cert-mosaic {
    margin-left: 1.5rem;
    margin-right: 2.5rem;
  }
}
@media (min-width: 1280px) {
  .cert-mosaic {
    margin-left: 2.5rem;
    margin-right: 3.5rem;
  }
}
.cert-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #111;
  aspect-ratio: 4 / 3;
}
.cert-photo--wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 8;
}
.cert-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.08) brightness(1.10) saturate(1.06);
  transform: scale(1.02);
  transition: filter 0.5s ease, transform 0.6s ease;
}
.cert-photo:hover img {
  filter: contrast(1.12) brightness(1.16) saturate(1.12);
  transform: scale(1.06);
}
.cert-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.34) 0%, rgba(17, 17, 17, 0) 30%);
  pointer-events: none;
}
/* Las dos fotos chicas vienen con fondo negro puro: velo gris suave para que no queden tan duras */
.cert-photo:not(.cert-photo--wide)::after {
  background:
    linear-gradient(to top, rgba(17, 17, 17, 0.28) 0%, rgba(17, 17, 17, 0) 30%),
    rgba(150, 150, 150, 0.20);
}
.cert-photo figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  background: #EB1B23;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  line-height: 1;
  padding: 10px 14px;
}


/* Barrido de brillo metálico al hover */
.diff-card-media::before,
.cert-photo::before {
  content: "";
  position: absolute;
  inset: -20% -60%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0.30) 47%,
    rgba(255, 255, 255, 0.10) 54%,
    rgba(255, 255, 255, 0) 62%
  );
  transform: translateX(-85%);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.25s ease;
}
.diff-card:hover .diff-card-media::before,
.cert-photo:hover::before {
  transform: translateX(85%);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .diff-card-media::before,
  .cert-photo::before { display: none; }
}

/* ── Certificaciones: franja de organismos ── */
.cert-strip {
  margin-top: 1.75rem;
  border-top: 3px solid #EB1B23;
  background: #f7f7f7;
  padding: 2rem;
}
.cert-strip__label {
  font-size: 13px;
  letter-spacing: 0.24em;
  color: #9a9a9a;
  margin-bottom: 1.75rem;
  text-align: center;
}
.cert-strip__items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.cert-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.5rem 1.5rem;
  text-align: left;
  transition: opacity 0.3s;
}
/* Nombre del organismo */
.cert-badge > div > div:first-child {
  font-size: 1.1rem;
  line-height: 1.2;
}
/* Bajada */
.cert-badge > div > div:last-child {
  font-size: 0.9rem;
  line-height: 1.35;
  margin-top: 0.35rem;
}
.cert-badge + .cert-badge {
  border-left: 1px solid #e2e2e2;
}
.cert-badge img {
  width: 122px;
  height: 84px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.cert-badge:hover img {
  transform: scale(1.06);
}
@media (max-width: 900px) {
  .cert-strip { padding: 1.5rem 1rem; }
  .cert-strip__items { grid-template-columns: 1fr; gap: 0; }
  .cert-badge { justify-content: flex-start; padding: 1rem 0.5rem; }
  .cert-badge + .cert-badge { border-left: 0; border-top: 1px solid #e2e2e2; }
}
@media (prefers-reduced-motion: reduce) {
  .cert-photo img { transition: none; }
  .cert-photo:hover img { transform: scale(1.02); }
}

/* Scrollbar oscuro en inicio */
::-webkit-scrollbar-track { background: #111; }
