/* ===== RESETEO ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #ffffff;
  color: #333;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== BOTÓN MODO OSCURO ===== */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #565757;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  width: 45px;
  height: 45px;
  cursor: pointer;
  z-index: 1100;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
  background: #333;
}

/* ===== NAVBAR ===== */
nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background-color: #565757;
  padding: 10px 20px;
}

.logo {
  height: 90px;
  width: auto;
}

.menu {
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
}

/* ===== SLIDER ===== */
.slider {
  width: 100%;
  height: 450px;
  overflow: hidden;
}

.slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(85%);
}

/* ===== WHATSAPP LOGO ===== */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0;
}

.wpp-logo {
  max-width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.wpp-logo:hover {
  transform: scale(1.08);
}

/* ===== BOTÓN WHATSAPP FLOTANTE ===== */
.wpp-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #25D366; /* color verde WhatsApp de fondo */
  overflow: hidden; /* recorta perfectamente en círculo */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.wpp-btn img {
  width: 90%;     /* un poco más grande que antes */
  height: 90%;
  object-fit: contain; /* se asegura que el ícono no se deforme */
  display: block;
}

.wpp-btn:hover {
  transform: scale(1.12);
}

/* ===== SECCIÓN INSTALACIONES ===== */
.clientes-felices {
  padding: 50px 20px;
  text-align: center;
  background-color: #f8f8f8;
}

.clientes-felices h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #333;
}

.testimonios {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto;
}

.testimonial {
  flex: 1 1 300px;
  max-width: 330px;
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.testimonial img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.testimonial:hover {
  transform: translateY(-5px);
}

/* ===== MAPA ===== */
iframe {
  width: 100%;
  height: 450px;
  border: none;
  display: block;
}

/* ===== FOOTER ===== */
.footer {
  background-color: #f2f2f2;
  padding: 40px 20px 20px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
  align-items: flex-start;
  gap: 40px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h4 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.footer-section p,
.footer-section a {
  font-size: 14px;
  color: #444;
  text-decoration: none;
}

.footer-section a:hover {
  color: #000;
}

/* ===== MODO OSCURO ===== */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode nav {
  background-color: #222;
}

body.dark-mode .menu {
  color: #f5f5f5;
}

body.dark-mode .clientes-felices {
  background-color: #1e1e1e;
}

body.dark-mode .testimonial {
  background-color: #2a2a2a;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}

body.dark-mode .clientes-felices h2,
body.dark-mode .footer-section h4 {
  color: #f5f5f5;
}

body.dark-mode .footer {
  background-color: #1a1a1a;
}

body.dark-mode .footer-section p,
body.dark-mode .footer-section a {
  color: #ccc;
}

body.dark-mode .footer-section a:hover {
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .slider {
    height: 380px;
  }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .menu {
    font-size: 1.6rem;
  }

  .slider {
    height: 280px;
  }

  .wpp-logo {
    max-width: 160px;
  }

  .testimonios {
    flex-direction: column;
    align-items: center;
  }

  .testimonial {
    width: 90%;
    max-width: 400px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  iframe {
    height: 300px;
  }
}

/* ===== MEJORAS ESPECÍFICAS PARA MÓVILES ===== */
@media (max-width: 480px) {
  /* Header móvil */
  nav {
    padding: 8px 15px;
  }
  
  .logo {
    height: 60px;
  }
  
  .menu {
    font-size: 1.2rem;
  }
  
  /* Slider móvil */
  .slider {
    height: 200px;
  }
  
  /* Botones móvil */
  #theme-toggle {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    top: 15px;
    right: 15px;
  }
  
  .wpp-btn {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
  }
  
  /* WhatsApp principal */
  .wpp-logo {
    max-width: 140px;
  }
  
  .container {
    margin: 25px 0;
  }
  
  /* Instalaciones móvil */
  .clientes-felices {
    padding: 30px 15px;
  }
  
  .clientes-felices h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  
  .testimonios {
    gap: 15px;
  }
  
  .testimonial {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 0 5px;
  }
  
  .testimonial img {
    height: 180px;
  }
  
  /* Mapa móvil */
  iframe {
    height: 250px;
  }
  
  /* Footer móvil */
  .footer {
    padding: 30px 15px 15px;
  }
  
  .footer-section {
    min-width: 100%;
    margin-bottom: 25px;
    text-align: center;
  }
  
  .footer-section:last-child {
    margin-bottom: 0;
  }
}

/* Para tablets pequeñas */
@media (max-width: 768px) and (min-width: 481px) {
  .slider {
    height: 250px;
  }
  
  .testimonial {
    flex: 1 1 45%;
  }
}
