/* ============ SECCIÓN SERVICIOS PRINCIPAL ============ */
.services-hero {
  padding: 70px 40px 60px;
}

.services-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 60px;
  align-items: flex-start;
  justify-content: space-between;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.services-copy {
  max-width: 620px;
}

.services-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  color: #f2c200;
  margin-bottom: 6px;
}

.services-title {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.services-text {
  font-size: 0.98rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 14px;
}

.services-list {
  margin: 12px 0 14px;
  padding-left: 18px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.services-list li {
  margin-bottom: 6px;
}

/* CTA sin brillo en la cabecera de Servicios */
.services-cta {
  background: var(--color-primary) !important; /* color plano */
  box-shadow: none !important;               /* sin resplandor */
}

.services-cta:hover {
  background: var(--color-primary-dark) !important; /* cambio sutil */
  box-shadow: none !important;
}

/* Columna derecha con dos imágenes */
.services-images-col {
  flex: 0 0 38%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  animation: fadeInScale 0.8s ease-out 0.3s forwards;
}

.services-image-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(242, 194, 0, 0.5);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.services-image-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.services-image-card:hover img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

/* ============ INSTALACIONES Y FLOTA ============ */
.gallery-section {
  position: relative;
  color: #f9fafb;
  padding: 70px 40px 80px;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9)), 
                    url("img/fondo2.webp");
  background-size: cover;
  background-position: center;
}

.gallery-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.gallery-copy {
  max-width: 640px;
}

.gallery-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.gallery-text {
  font-size: 0.96rem;
  opacity: 0.9;
}

/* Grid de miniaturas */
.gallery-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  justify-items: center;
}

.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.gallery-item::after {
  content: "➕ Ampliar";
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 8px;
  font-size: 0.78rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 26px;
  font-size: 2rem;
  color: #ffffff;
  text-decoration: none;
  line-height: 1;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(242, 194, 0, 0.85);
}

/* Flechas anterior / siguiente */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
  color: #ffffff;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(242, 194, 0, 0.85);
  color: #000;
  transform: translateY(-50%) scale(1.05);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .services-hero {
    padding: 50px 20px 40px;
  }

  .services-inner {
    flex-direction: column;
    gap: 30px;
  }

  .services-images-col {
    max-width: 100%;
    width: 100%;
  }

  .gallery-section {
    padding: 50px 20px 60px;
  }

  .gallery-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .services-title {
    font-size: 2rem;
  }

  .gallery-title {
    font-size: 2rem;
  }

  .gallery-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
    margin-bottom: 28px;
  }

  .gallery-copy {
    max-width: 100%;
  }

  .gallery-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }

  .gallery-grid {
    display: flex;
    gap: 14px;
    padding: 10px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;           /* scroll lateral dentro del contenedor */
    overflow-y: hidden;         /* evita barras verticales accidentales */
    width: 100%;
    max-width: 100%;            /* no desborda el viewport */
  }

  .gallery-item {
    flex: 0 0 240px;
    min-width: 240px;
    scroll-snap-align: start;
  }
}


