body {
  margin: 0;
  padding: 0;
  background-color: black;
  font-family: 'Poppins', sans-serif;
}

.pantalla-servicios {
  background-image: url("../imagenes/fondometal.jpg");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 60px 20px 40px;
  margin: 0;
  position: relative;
  overflow-x: hidden;
}

.grid-servicios {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 35px 50px;
  max-width: 900px;
  width: 100%;
  justify-items: center;
  align-items: center;
  padding: 20px 0;
  margin-top: 20px;
  z-index: 2;
}

.boton-servicio img {
  width: 100%;
  max-width: 380px;
  height: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 140, 0, 0.2);
}

.boton-servicio img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px #ffc107, 0 0 60px #ff6f00;
  filter: brightness(1.2);
}

/* RAYO VERTICAL ADAPTADO A TODAS LAS PANTALLAS */
.rayo {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: 100vh;
  opacity: 0;
  animation: parpadeo 2.8s ease-in-out infinite;
  z-index: 1;
  filter: drop-shadow(0 0 45px #FFD700) brightness(1.6);
  pointer-events: none;
}

@keyframes parpadeo {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.8); }
  5%   { opacity: 1; transform: translateX(-50%) scale(1.2); }
  10%  { opacity: 0; transform: translateX(-50%) scale(1); }
  15%  { opacity: 1; transform: translateX(-50%) scale(1.1); }
  20%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ───────────── SECCIÓN NUESTRA FLOTA Y EQUIPO ───────────── */
.seccion-extra {
  width: 100%;
  max-width: 1200px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 30, 60, 0.92) 100%);
  padding: 50px 40px;
  margin-top: 50px;
  margin-bottom: 30px;
  text-align: center;
  z-index: 2;
  position: relative;
  border-radius: 15px;
  border: 2px solid #ffc107;
  box-shadow: 0 10px 40px rgba(255, 193, 7, 0.35);
}

.seccion-extra h2 {
  font-size: 2.3rem;
  color: #ffc107;
  font-weight: 700;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(255, 193, 7, 0.6);
}

/* Grid para mostrar las dos imágenes */
.grid-equipo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 35px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
}

.contenedor-imagen {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  transition: all 0.4s ease;
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
  border: 2px solid transparent;
}

.contenedor-imagen:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 193, 7, 0.5);
  border-color: #ffc107;
}

.imagen-extra {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.4s ease;
  display: block;
}

.contenedor-imagen:hover .imagen-extra {
  transform: scale(1.05);
}

/* Etiqueta sobre cada imagen */
.etiqueta-imagen {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #003399, #0066ff);
  color: white;
  padding: 10px 26px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(0, 51, 153, 0.6);
  z-index: 3;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Botón volver */
.volver {
  margin-top: 40px;
  margin-bottom: 30px;
  background-color: #003399;
  color: white;
  padding: 13px 32px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: all 0.3s ease;
  z-index: 3;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(0, 51, 153, 0.4);
}

.volver:hover {
  background-color: #001f66;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 51, 153, 0.6);
}

/* ───────────── RESPONSIVE: SMARTPHONES VERTICAL ───────────── */
@media screen and (max-width: 767px) and (orientation: portrait) {
  .pantalla-servicios {
    padding: 20px 10px 60px;
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
  }

  .grid-servicios {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px 0;
    margin-top: 10px;
  }

  .boton-servicio img {
    max-width: 90vw;
  }

  .rayo {
    width: 100px;
  }

  .seccion-extra {
    padding: 30px 15px;
    margin-top: 30px;
    margin-bottom: 20px;
    border-radius: 10px;
  }

  .seccion-extra h2 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    letter-spacing: 1.5px;
  }

  .grid-equipo {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contenedor-imagen {
    padding: 12px;
  }

  .etiqueta-imagen {
    font-size: 0.8rem;
    padding: 8px 16px;
    top: 20px;
  }

  .volver {
    font-size: 13px;
    padding: 11px 22px;
    margin: 25px auto 20px;
  }
}

/* ───────────── RESPONSIVE: SMARTPHONES HORIZONTAL ───────────── */
@media screen and (max-width: 900px) and (orientation: landscape) {
  .pantalla-servicios {
    padding: 30px 15px 50px;
    background-size: cover;
    background-position: center center;
  }

  .grid-servicios {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px;
    max-width: 700px;
  }

  .boton-servicio img {
    max-width: 300px;
  }

  .seccion-extra {
    padding: 35px 20px;
    margin-top: 35px;
  }

  .seccion-extra h2 {
    font-size: 1.6rem;
  }

  .grid-equipo {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

/* ───────────── RESPONSIVE: TABLETS ───────────── */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .pantalla-servicios {
    padding: 40px 20px 50px;
    background-size: cover;
    background-position: center center;
  }

  .grid-servicios {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 35px;
    margin-top: 15px;
  }

  .boton-servicio img {
    max-width: 320px;
  }

  .rayo {
    width: 160px;
  }

  .seccion-extra {
    padding: 45px 28px;
    margin-top: 45px;
  }

  .seccion-extra h2 {
    font-size: 1.9rem;
    letter-spacing: 2px;
    margin-bottom: 35px;
  }

  .grid-equipo {
    gap: 28px;
    max-width: 900px;
  }

  .etiqueta-imagen {
    font-size: 0.95rem;
    padding: 9px 23px;
  }

  .volver {
    font-size: 14px;
    padding: 12px 28px;
  }
}

/* ───────────── RESPONSIVE: PC GRANDES ───────────── */
@media screen and (min-width: 1024px) {
  .pantalla-servicios {
    padding: 70px 20px 50px;
    background-size: cover;
    background-position: center center;
  }

  .boton-servicio img {
    max-width: 380px;
  }

  .rayo {
    width: 200px;
  }

  .grid-servicios {
    margin-top: 25px;
  }
}
