/* CONTENEDOR DEL CARRUSEL CON FONDO */
#headerCarrusel {
  height: 500px; /* 🔥 Alto en PC */
  background: 
    linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)), /* más claro */
    url('../assets/img/fondo_pantalla.jpg') center center fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0;
  margin: 0 0 20px 0; /* 🔹 margen inferior para separar del navbar */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Carrusel ocupa el contenedor */
#carruselNuevo,
#carruselNuevo .carousel-inner,
#carruselNuevo .carousel-item {
  height: 100%;
  width: 100%;
}

/* Imágenes internas SIN recorte */
#carruselNuevo .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain !important; /* Imagen completa */
  object-position: center;
  background: transparent;
}

/* 📱 Responsive para celular */
@media (max-width: 768px) {
  #headerCarrusel {
    height: 200px;  /* 🔥 más compacto en tablet/móvil */
    margin-bottom: 15px; /* 🔹 menos espacio en pantallas medianas */
  }
}

@media (max-width: 480px) {
  #headerCarrusel {
    height: 170px;  /* 🔥 aún más pequeño para pantallas muy chicas */
    margin-bottom: 10px; /* 🔹 mínimo espacio en pantallas muy pequeñas */
  }
}

/* ==========================================
   RESPONSIVE — MÓVIL
========================================== */
@media (max-width: 768px) {

  header.masthead {
    height: 28vh;      /* 🔥 más pequeño en móviles */
    min-height: 200px;
  }

  .carousel-item img {
    object-fit: cover;
    height: 100%;
  }
}

/* SECCIÓN POR QUÉ ELEGIRNOS */
.seccion-porque {
  background-color: #fff;
}

.bloque-servicio {
  text-align: center;
  padding: 20px;
}

.icono-servicio {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: #ffc107;
  color: #fff;
  font-size: 42px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.icono-servicio:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
/* QUITAR EFECTO DE DESLIZAMIENTO DEL CARRUSEL */
#carruselNuevo .carousel-item {
  transition: none !important;
}

#carruselNuevo .carousel-inner {
  transition: none !important;
}

#carruselNuevo.carousel.slide .carousel-item {
  transform: none !important;
}
/* PORTFOLIO CAROUSEL (principal) */
#portfolioCarousel .product-card {
  transition: transform 0.25s ease;
}
#portfolioCarousel .product-card:hover {
  transform: translateY(-2px);
}

#portfolioCarousel .image-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#portfolioCarousel .image-fit {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

#portfolioCarousel .card-body {
  padding: 0.75rem;
}
#portfolioCarousel .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
}

#portfolioCarousel a {
  cursor: pointer;
}

/* PRODUCTOS CARRUSEL SCROLL - aislado y responsivo */
#productosCarruselScroll.productos-scroll-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: none;
  gap: 1rem;
  padding-bottom: 1rem;
  margin: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#productosCarruselScroll.productos-scroll-carousel::-webkit-scrollbar {
  display: none;
}

/* ===============================
   📱 CELULAR → 2 CARDS DESDE EL INICIO
=============================== */
#productosCarruselScroll .product-card {
  flex: 0 0 calc(50% - 0.5rem);
  scroll-snap-align: none;
  border-radius: 10px;
  transition: transform 0.25s ease;
  height: auto;
}

#productosCarruselScroll .product-card:hover {
  transform: translateY(-2px);
}

/* ===============================
   📱 TABLET → 3 CARDS
=============================== */
@media (min-width: 576px) {
  #productosCarruselScroll .product-card {
    flex: 0 0 calc(33.333% - 0.66rem);
  }
}

/* ===============================
   🖥️ DESKTOP → 4 CARDS
=============================== */
@media (min-width: 768px) {
  #productosCarruselScroll .product-card {
    flex: 0 0 calc(25% - 0.75rem);
  }
}

/* ===============================
   IMÁGENES
=============================== */
#productosCarruselScroll .image-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#productosCarruselScroll .image-fit {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

#productosCarruselScroll .card-body {
  padding: 0.75rem;
}

#productosCarruselScroll .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
}

#productosCarruselScroll a {
  cursor: pointer;
}

/* Seguridad anti scroll lateral */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}
/* FLECHAS CARRUSEL */
.carrusel-wrapper {
  position: relative;
}

/* Flechas modernas */
.carrusel-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: #333;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
}

.carrusel-flecha:hover {
  background: #28a745;
  color: white;
  transform: translateY(-50%) scale(1.08);
}

.carrusel-flecha.izquierda { left: -15px; }
.carrusel-flecha.derecha { right: -15px; }

