/* General */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #000000; /* Fondo negro */
  color: #FFFFFF; /* Texto blanco */
  opacity: 0; /* Inicialmente invisible para la animación */
  animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Enlaces generales */
a {
  text-decoration: none;
  color: inherit;
}

/* Header con menú mejorado y efecto RTA */
header {
  background-color: #FF4500; /* Rojo del logo */
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s, padding 0.3s;
  overflow: visible; /* Para contener el efecto RTA */
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.navbar h1 {
  margin: 0;
  font-size: 2rem;
}

.nav-links {
  display: flex;
}

.nav-links a {
  color: #FFD700; /* Amarillo */
  text-decoration: none;
  margin: 0 1rem;
  font-weight: bold;
  transition: color 0.3s, transform 0.3s;
}

.nav-links a:hover {
  color: #FFA500; /* Naranja */
  transform: translateY(-3px);
}

/* Icono de menú (hamburguesa) */
.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-icon span {
  width: 25px;
  height: 3px;
  background-color: #FFD700;
  margin: 4px;
  transition: all 0.3s;
}

.menu-icon.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-icon.active span:nth-child(2) {
  opacity: 0;
}

.menu-icon.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Efecto RTA ajustado */
.rta-effect {
  width: 100%;
  height: 50px; /* Altura aumentada */
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: #FF4500; /* Fondo negro */
}

.rta-effect .bar {
  flex: 1;
  margin: 0 1px;
  background-color: #FFD700;
  animation: bounce 1s infinite ease-in-out;
}

/* Demoras de animación variadas para cada barra */
.rta-effect .bar:nth-child(1)  { animation-delay: -0.1s; }
.rta-effect .bar:nth-child(2)  { animation-delay: -0.4s; }
.rta-effect .bar:nth-child(3)  { animation-delay: -0.2s; }
.rta-effect .bar:nth-child(4)  { animation-delay: -0.6s; }
.rta-effect .bar:nth-child(5)  { animation-delay: -0.3s; }
.rta-effect .bar:nth-child(6)  { animation-delay: -0.5s; }
.rta-effect .bar:nth-child(7)  { animation-delay: -0.7s; }
.rta-effect .bar:nth-child(8)  { animation-delay: -0.2s; }
.rta-effect .bar:nth-child(9)  { animation-delay: -0.8s; }
.rta-effect .bar:nth-child(10) { animation-delay: -0.4s; }
.rta-effect .bar:nth-child(11) { animation-delay: -0.9s; }
.rta-effect .bar:nth-child(12) { animation-delay: -0.1s; }
.rta-effect .bar:nth-child(13) { animation-delay: -0.5s; }
.rta-effect .bar:nth-child(14) { animation-delay: -0.3s; }
.rta-effect .bar:nth-child(15) { animation-delay: -0.6s; }
.rta-effect .bar:nth-child(16) { animation-delay: -0.7s; }
.rta-effect .bar:nth-child(17) { animation-delay: -0.2s; }
.rta-effect .bar:nth-child(18) { animation-delay: -0.8s; }
.rta-effect .bar:nth-child(19) { animation-delay: -0.5s; }
.rta-effect .bar:nth-child(20) { animation-delay: -0.9s; }

@keyframes bounce {
  0%, 100% {
    height: 10px;
  }
  50% {
    height: 50px; /* Altura aumentada */
  }
}

/* Efecto al hacer scroll */
header.scrolled {
  background-color: rgba(0, 0, 0, 0.8);
}
.rta-effect.scrolled {
  background-color: rgba(0, 0, 0, 0);
  width: 0%;

}

/* Footer */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Esto permite que si la pantalla es muy pequeña, se rompa a la siguiente línea */
  background-color: #000000;
  color: #FFFFFF;
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid #FFD700;
  margin-top: 2rem;
}

footer h3 {
  margin-bottom: 1rem;
  flex-basis: 100%; /* De esta forma el título ocupa todo el ancho antes de los links */
}

footer a {
  color: #FFD700;
  text-decoration: none;
  margin: 0 1rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center; /* Para centrar verticalmente el ícono con el texto */
}

footer img {
  vertical-align: middle;
  margin-right: 0.5rem;
}


/* Secciones principales */
main {
  padding: 0; /* Eliminamos el padding para evitar espacios no deseados */
}
h2 {
  text-align: center;
}
h3 {
  text-align: center;
}

/* Hero Section con fondo "servicios.webp" */
.hero {
  background-image: url('assets/images/servicios.webp'); /* Imagen de fondo actualizada */
  background-size: cover;
  background-position: center;
  position: relative;
  color: #FFFFFF;
  padding: 6rem 2rem;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta-btn {
  background-color: #FFD700;
  color: #000000;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

.cta-btn:hover {
  background-color: #FFA500;
  transform: scale(1.05);
}

/* Grillas y servicios existentes */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.servicio {
  background: #1A1A1A; /* Gris oscuro */
  border: 1px solid #FFD700; /* Amarillo */
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.servicio:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5); /* Sombra amarilla */
}

.servicio h2 {
  font-size: 1.5rem;
  color: #FFD700; /* Amarillo */
}

.servicio p {
  margin: 0.5rem 0;
}

/* Botones */
button {
  background-color: #FF4500; /* Rojo */
  color: #FFFFFF;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

button:hover {
  background-color: #FFA500; /* Naranja */
  transform: scale(1.05);
}

/* Formularios */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #1A1A1A; /* Gris oscuro */
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #FFD700; /* Amarillo */
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2); /* Sombra suave */
  max-width: 80%;
  width: auto;
  margin: 2rem auto;
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #FFD700; /* Amarillo */
}

form input,
form textarea,
form select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #FFD700; /* Amarillo */
  border-radius: 8px;
  font-size: 1rem;
  background-color: #000000; /* Fondo negro */
  color: #FFFFFF; /* Texto blanco */
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

form input:focus,
form textarea:focus,
form select:focus {
  border-color: #FFA500; /* Naranja */
  box-shadow: 0 0 8px rgba(255, 165, 0, 0.5); /* Resaltar foco */
}

form button {
  margin-top: 1rem;
  background-color: #FF4500; /* Rojo */
  color: #FFFFFF;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  width: 100%;
}

form button:hover {
  background-color: #FFA500; /* Naranja */
  transform: scale(1.05);
}

/* Snackbar */
.snackbar {
  visibility: hidden;
  opacity: 0;
  min-width: 300px;
  background-color: #FF4500; /* Fondo rojo */
  color: #FFFFFF; /* Texto blanco */
  text-align: center;
  border-radius: 8px;
  padding: 1rem;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  font-size: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Sombra */
  transition: visibility 0.3s, opacity 0.3s ease-in-out, transform 0.3s;
}

.snackbar.show {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Contenedor de equipos */
#equiposContainer {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.equipos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
  margin-bottom: 1.5rem;
}

.equipo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #1A1A1A;
  border: 1px solid #FFD700;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.equipo-item label {
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 0.5rem;
}

.equipo-item input {
  width: 80px;
  text-align: center;
  padding: 0.5rem;
  border: 1px solid #FFD700;
  border-radius: 4px;
  background-color: #000;
  color: #FFF;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Fondo semi-transparente */
  backdrop-filter: blur(5px); /* Efecto de desenfoque */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden; /* Inicialmente oculto */
  opacity: 0;
  transition: visibility 0.3s, opacity 0.3s ease-in-out;
}

.modal.show {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  background-color: #1A1A1A; /* Fondo del modal */
  color: #FFFFFF;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content button {
  margin: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.modal-content #confirmarReserva {
  background-color: #FF4500; /* Rojo */
  color: #FFFFFF;
}

.modal-content #confirmarReserva:hover {
  background-color: #FF6347; /* Rojo más claro */
}

.modal-content #cancelarReserva {
  background-color: #444444; /* Gris oscuro */
  color: #FFFFFF;
}

.modal-content #cancelarReserva:hover {
  background-color: #666666; /* Gris más claro */
}

/* Transiciones de página */
body.fade-out {
  animation: fadeOut 0.8s ease-in-out forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

/* Responsivo */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%; /* Justo debajo del header */
    left: 0; /* Alineado al lado izquierdo */
    width: 100%;
    flex-direction: column;
    background-color: #ff4400e0;
    overflow: hidden; /* Necesario para que funcione max-height */
    max-height: 0; /* Altura inicial cero */
    transition: max-height 0.3s ease-in-out; /* Transición en max-height */
    z-index: 99;
  }

  .nav-links.active {
    max-height: 500px; /* Valor suficiente para contener el menú */
  }

  .nav-links a {
    margin: 1rem 0; /* Espaciado vertical entre enlaces */
    text-align: center; /* Centra el texto */
    padding: 1rem; /* Espaciado interno */
  }

  .menu-icon {
    display: flex; /* Muestra el ícono en pantallas pequeñas */
  }

  .navbar h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 4rem 1rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .cta-btn {
    width: 100%;
    padding: 0.75rem;
  }

  .servicio {
    padding: 1rem;
  }

  form {
    padding: 1.5rem;
    margin: 1rem auto;
  }

  form input,
  form textarea,
  form select {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  form button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .equipos-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}
/* Ajustes para pantallas más pequeñas */
@media (max-width: 420px) {
  /* Intentamos mantenerlos en una misma línea reduciendo tamaños y márgenes */
  footer {
    flex-direction: row; /* Al ser más angosto, intentamos en una fila */
  }

  footer a {
    margin: 0 0.5rem;
    font-size: 1.1rem;
  }

  footer img {
    width: 34px; /* Iconos más pequeños */
    margin-right: 0.3rem;
  }
}