/*
 * Proyecto: semillaselpotrero.com
 * Archivo: almacenes.css
 * Autor: Javier Dávila
 * Fecha creación: 20.10.2025
 * ------------------------------
 * Versión: 0.0.2
 */

html {
  scroll-behavior: smooth;
}

/* ==============================
  Sección hero almacenes
================================= */
.almacenes-hero {
  position: relative;
  height: 80vh;
  /* puedes ajustar: 80% de la altura visible */
  min-height: 500px;
  background-image: url("../img/almacenes/fondo-almacenes-semillas-el-potrero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
}

/* capa semitransparente opcional si el fondo es muy brillante */
.almacenes-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 1;
}

/* contenido dentro de la sección */
.almacenes-hero .container {
  position: relative;
  z-index: 2;
  /* se ubica encima de la superposición */
}

/* texto a la izquierda */
.hero-text h1 {
  font-family: var(--fuente-base);
  font-weight: var(--fuente-regular);
  color: var(--color-brand);
  font-size: var(--text-xxxxl);
  line-height: 1.3;
}

.hero-text h1 span {
  font-weight: var(--fuente-heavy);
}

/* imagen del mapa */
.hero-map {
  max-width: 85%;
  height: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .almacenes-hero {
    height: auto;
    padding: 3rem 0;
  }

  .hero-text h1 {
    text-align: center;
    font-size: var(--text-xxxl);
  }

  .hero-map {
    margin-top: 2rem;
  }
}

/* ==============================
  PINS sobre el mapa
================================= */
/* Contenedor del mapa */
.map-wrapper {
  position: relative;
  display: block;
  max-width: 550px;
  width: 100%;
  margin: 0 auto;
  /* limita el ancho del mapa */
  text-align: center;
}

/* Imagen base */
.hero-map {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Pines */
.map-pin {
  position: absolute;
  width: 120px;
  height: auto;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.25));
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Coordenadas relativas */
.pin-piura {
  top: 30%;
  left: 1%;
}

.pin-jaen {
  top: 24%;
  left: 33%;
}

.pin-chiclayo {
  top: 58%;
  left: 12%;
}

.pin-tarapoto {
  top: 58%;
  left: 55%;
}

/* Animación hover */
.map-pin:hover {
  transform: translate(-50%, -100%) scale(1.08);
}

/* ==============================
  Texto de los pines
================================= */
.pin-label {
  position: absolute;
  transform: translateX(-50%); /* centra horizontalmente bajo el pin */
  color: #fff;
  font-size: var(--text-base);
  font-weight: var(--fuente-bold);
  white-space: nowrap;
}

/* Coordenadas para cada etiqueta (ligeramente más abajo que el pin) */
.label-piura {
  top: 25%;
  left: 1%;
}
.label-jaen {
  top: 19%;
  left: 33%;
}
.label-chiclayo {
  top: 53%;
  left: 12%;
}
.label-tarapoto {
  top: 53%;
  left: 55%;
}

/* ==============================
  Ajustes responsive del mapa
================================= */

/* Tablets (menor a 992px): reduce el tamaño de los pines */
@media (max-width: 992px) {
  .map-pin {
    width: 90px;
  }

  /* Reposiciona los puntos para el mapa mediano */
  .pin-piura {
    top: 30%;
    left: 0%;
  }

  .pin-jaen {
    top: 25%;
    left: 32%;
  }

  .pin-chiclayo {
    top: 60%;
    left: 14%;
  }

  .pin-tarapoto {
    top: 60%;
    left: 55%;
  }

  .pin-label {
    font-size: var(--text-sm);
  }

  /* Coordenadas para cada etiqueta (ligeramente más abajo que el pin) */
  .label-piura {
    top: 24%;
    left: 0%;
  }
  .label-jaen {
    top: 19%;
    left: 32%;
  }
  .label-chiclayo {
    top: 54%;
    left: 14%;
  }
  .label-tarapoto {
    top: 54%;
    left: 55%;
  }
}

/* Móviles (menor a 768px): centra el mapa y ajusta posiciones */
@media (max-width: 768px) {
  .map-wrapper {
    max-width: 350px;
  }

  .map-pin {
    width: 60px;
  }

  /* Reposiciona los puntos para el mapa más pequeño */
  .pin-piura {
    top: 30%;
    left: 3%;
  }

  .pin-jaen {
    top: 24%;
    left: 30%;
  }

  .pin-chiclayo {
    top: 53%;
    left: 15%;
  }

  .pin-tarapoto {
    top: 55%;
    left: 53%;
  }

  .pin-label {
    font-size: var(--text-xs);
  }

  /* Coordenadas para cada etiqueta (ligeramente más abajo que el pin) */
  .label-piura {
    top: 25%;
    left: 3%;
  }
  .label-jaen {
    top: 19%;
    left: 30%;
  }
  .label-chiclayo {
    top: 48%;
    left: 15%;
  }
  .label-tarapoto {
    top: 50%;
    left: 53%;
  }
}

/* ==============================
   Sección lista de almacenes
================================= */
.almacenes-lista {
  padding: 2rem 0;
}

/* Tarjeta general */
.almacen-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  padding: 10px;
}

.almacen-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

/* Imagen izquierda */
.almacen-img {
  position: relative;
}

.almacen-img img {
  width: 100%;
  height: 220px; /* Imagen más pequeña */
  object-fit: cover;
  display: block;
  border-right: 1px solid #ddd;
  border-radius: 5%;
}

/* Título sobre la imagen */
.almacen-titulo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-brand);
  color: #fff;
  font-size: var(--text-lg);
  font-weight: var(--fuente-heavy);
  margin: 0;
  padding: 0.5rem 1rem;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  text-align: center;
}

/* Contenido derecho */
.almacen-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Texto más grande */
.almacen-content p {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: var(--text-md); /* Aumenta tamaño */
  color: var(--color-fuente-principal);
  margin-bottom: 1.2rem;
  line-height: 1.6;
  text-align: left;
}

/* Iconos */
.almacen-content img {
  width: 22px; /* Iconos un poco más grandes */
  height: auto;
  flex-shrink: 0;
}

.almacen-content p strong {
  font-weight: var(--fuente-bold);
  color: var(--color-brand);
}

/* Responsive */
@media (max-width: 768px) {
  .almacen-card .row {
    flex-direction: column;
  }

  .almacen-img img {
    height: 200px;
  }

  .almacen-titulo-overlay {
    font-size: var(--text-base);
    text-align: center;
    width: 100%;
    border-top-right-radius: 0;
  }

  .almacen-content {
    text-align: center;
    padding-top: 1rem;
  }

  .almacen-content p {
    font-size: var(--text-base);
  }

  .almacen-content .btn-vermas {
    align-self: center;
  }
}
