/* ============================================================
   TORMECAN — Estilos específicos de Contacto (contacto.html)
   ============================================================ */

/* Botón "Escribinos": letra más gruesa cuando no está en hover */
.btn-distribuidor {
  -webkit-text-stroke: 0.5px #EB1B23;
}
.btn-distribuidor:hover {
  -webkit-text-stroke: 0;
}

/* Hero */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/contacto/contacto.jpg');
  background-size: cover;
  background-position: center;
}
/* Oscurecido suave solo del lado izquierdo, para legibilidad del texto */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(17, 17, 17, 0.5) 20%, transparent 65%);
}

/* Sombra en los links del menú (solo en Contacto, donde el hero es claro) */
#navbar .nav-link-shadow {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 2px 10px rgba(0, 0, 0, 0.7);
}
#navbar.scrolled .nav-link-shadow {
  text-shadow: none;
}

/* Info card hover */
.contact-card {
  border-top: 2px solid transparent;
  transition: border-color 0.3s, transform 0.3s;
}
.contact-card:hover {
  border-top-color: #EB1B23;
  transform: translateY(-4px);
}

/* Línea decorativa */
.divider-line {
  width: 1px;
  background: linear-gradient(to bottom, transparent, #e5e5e5, transparent);
}

/* Mapa de distribuidores */
#map-distribuidores {
  position: relative;
  z-index: 1;
}
.tormecan-marker {
  background: transparent;
  border: 0;
}
.tormecan-marker .pin {
  width: 26px;
  height: 26px;
  background: #EB1B23;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  position: relative;
}
.tormecan-marker .pin::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.leaflet-popup-content-wrapper { border-radius: 0; }
.leaflet-popup-content {
  font-family: 'Barlow', sans-serif;
  margin: 14px 18px;
  font-size: 13px;
  color: #333;
  line-height: 1.5;
}
.leaflet-popup-content strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #111;
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}
.leaflet-popup-tip { background: #fff; }

/* Mapa de la red de distribuidores.
   Sin fondo ni borde: la imagen final es un PNG con transparencia y tiene que
   apoyarse directamente sobre el negro de la sección. */
.mapa-red {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mapa-red img {
  width: 100%;
  height: auto;
  max-height: 820px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.55));
}
@media (max-width: 767px) {
  .mapa-red img { max-height: 520px; }
}

/* Llamada a distribuidores, dentro de la sección oscura */
.caja-distribuidor {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-left: 3px solid #EB1B23;
  padding: 1.75rem;
}
/* El botón centrado; el texto de arriba sigue alineado a la izquierda */
.caja-distribuidor .btn-distribuidor {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* 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; }
}
