/* =============================================================================
 * ECORECICLA — Vehicles Page Stylesheet
 * =============================================================================
 * PROYECTO: Landing Page de Industrias Ambientales 3R SAC
 *            (Empresa de reciclaje y gestión de residuos sólidos)
 * TIPO: CSS3 puro, SIN frameworks
 * ARCHIVO ESPECÍFICO: Estilos del catálogo de vehículos
 * -----------------------------------------------------------------------------
 * CONTENIDO (ÍNDICE DE SECCIONES):
 * -----------------------------------------------------------------------------
 * 1. VEHICLES HERO
 *    - Header de la página con imagen de fondo
 *    - Título grande y texto descriptivo
 *    - Overlay oscuro para legibilidad
 *    - Padding superior para no tapar el header fijo
 *    - Transición suave al cambiar fondo dinámicamente
 *
 * 2. VEHICLES CATALOG
 *    - Grid de tarjetas de vehículos
 *    - Auto-fill responsive (minmax 300px)
 *    - Gap de 32px entre tarjetas
 *
 * 3. VEHICLE CARD
 *    - Tarjeta individual de cada vehículo
 *    - Imagen placeholder con icono emoji o imagen real
 *    - Efecto hover: elevación y sombra
 *    - Imagen con zoom suave al hover
 *    - Contenido: título centrado + botón CTA
 *    - Botón estilo pill redondeado
 *
 * 4. VEHICLE CARD SPECS (Tabla de especificaciones)
 *    - Tabla con bordes sutiles
 *    - 2 columnas: propiedad | valor
 *    - Header en negrita oscuro
 *    - Sin borde en última fila
 *
 * 5. VEHICLE MODAL
 *    - Modal fijo centrado en pantalla
 *    - Overlay oscuro semitransparente (0.8 opacity)
 *    - Diálogo con scroll si contenido es largo
 *    - Botón cerrar (X) esquina superior derecha
 *    - Estados: .is-open para mostrar/ocultar
 *    - Animación de entrada desde abajo
 *    - Contenido: imagen, título, specs, CTA
 * -----------------------------------------------------------------------------
 * DEPENDENCIAS:
 * -----------------------------------------------------------------------------
 * - Hereda variables de: styles.css
 * - --green, --green-dark, --white, --gray-100/200/500/800
 * - --dark, --radius-lg, --shadow-sm/md, --transition
 * -----------------------------------------------------------------------------
 * ELEMENTOS REQUERIDOS EN HTML:
 * -----------------------------------------------------------------------------
 * .vehicles-hero
 * .vehicles-catalog__container
 * .vehicle-card (generado por vehicles.js)
 * #vehicle-modal (generado por vehicles.js)
 * ============================================================================= */

.vehicles-hero {
  padding: clamp(100px, 15vw, 140px) 20px clamp(50px, 8vw, 80px);
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/vehicles-hero-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  transition: background 0.5s ease-in-out;
}
.vehicles-hero__title {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-bottom: 16px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.vehicles-hero__text {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  max-width: 600px;
  margin: 0 auto;
  opacity: 1;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  padding: 0 8px;
}

.vehicles-catalog {
  padding: 60px 16px;
  background-color: var(--gray-100);
}
.vehicles-catalog__container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

@media (min-width: 576px) {
  .vehicles-catalog {
    padding: 80px 20px;
  }
  .vehicles-catalog__container {
    gap: 32px;
  }
}
.vehicle-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
}
.vehicle-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.vehicle-card__image-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  cursor: pointer;
}
.vehicle-card__image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--gray-500);
  transition: transform 0.5s ease;
}
.vehicle-card:hover .vehicle-card__image-placeholder {
  transform: scale(1.1);
}
.vehicle-card__content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.vehicle-card__title {
  font-size: 1.25rem;
  color: var(--dark);
  margin-bottom: 20px;
  text-align: center;
}
.vehicle-card__cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 16px;
  background: var(--gray-200);
  color: var(--dark);
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  margin-top: auto;
}
.vehicle-card__cta:hover {
  background: var(--green);
  color: var(--white);
}
.vehicle-card__specs {
  font-size: 0.9rem;
  color: var(--gray-800);
  margin-bottom: 20px;
  width: 100%;
  border-collapse: collapse;
}
.vehicle-card__specs th, .vehicle-card__specs td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
}
.vehicle-card__specs tr:last-child th,
.vehicle-card__specs tr:last-child td {
  border-bottom: none;
}
.vehicle-card__specs th {
  font-weight: 600;
  color: var(--dark);
  width: 45%;
}

.vehicle-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.vehicle-modal.is-open { opacity: 1; pointer-events: auto; }
.vehicle-modal__dialog {
  background: var(--white); width: 90%; max-width: 600px;
  border-radius: var(--radius-lg); padding: 32px; position: relative;
  transform: translateY(20px); transition: transform 0.3s ease;
  max-height: 90vh; overflow-y: auto; text-align: left;
}
.vehicle-modal.is-open .vehicle-modal__dialog { transform: translateY(0); }
.vehicle-modal__close {
  position: absolute; top: 16px; right: 16px; font-size: 1.2rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; box-shadow: var(--shadow-sm);
  transition: background 0.2s, transform 0.2s;
}
.vehicle-modal__close:hover { background: var(--gray-200); transform: scale(1.1); }
.vehicle-modal__img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 20px; }
.vehicle-modal__title { font-size: 1.5rem; color: var(--dark); margin-bottom: 16px; font-weight: 700; }
.vehicle-modal__cta {
  display: block; width: 100%; text-align: center; margin-top: 24px; text-decoration: none;
  background: var(--green); color: var(--white); padding: 12px;
  border-radius: 50px; font-weight: 600; transition: background 0.3s;
}
.vehicle-modal__cta:hover { background: var(--green-dark); }

/* Custom Contact Background for Vehicles Page */
.contact {
  background: url('../img/fondo-vehiculos-02.jpg') center/cover no-repeat;
}
