/* ============================
   GLOBAL
============================ */

* {
  transition: none; /* Evita que afecte a position: fixed */
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

img {
  border-radius: 12px;
}

h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #003366;
  margin-bottom: 20px;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #003366;
  margin-bottom: 10px;
}

p {
  margin-bottom: 12px;
}

section {
  padding: 60px 20px;
}

/* ============================
   NAV
============================ */

nav ul {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background-color: #003366;
  padding: 20px 30px;
  list-style: none;
  gap: 20px;
  margin: 0;
}

nav ul li a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  font-weight: bold;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

/* ============================
   HERO
============================ */

.hero {
  background-image: url('img/portada.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 80vh;
  position: relative;
}

.overlay {
  background-color: rgba(0, 0, 0, 0.5);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay h1 {
  color: white;
  font-size: 5em;
  text-align: center;
  padding: 0 100px;
}

/* ============================
   SECCIONES FLEX
============================ */

.servicios-flex,
.preguntas-flex,
.testimonios-flex,
.contacto-flex {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  background-color: white;
}

.servicios-flex img,
.preguntas-flex img,
.testimonios-flex img,
.contacto-flex img {
  max-width: 30%;
  object-fit: cover;
}

.texto {
  width: 55%;
  text-align: left;
}

.servicio,
.pregunta,
.testimonio {
  margin-bottom: 30px;
  font-size: 1rem;
}

/* ============================
   CONTACTO
============================ */

.contacto {
  background-color: #ffffff;
  padding: 35px;
  border-radius: 12px;
  max-width: 420px;
  width: 100%;
  border: 1px solid #e5e5e5;
}

.social-buttons {
  display: flex;
  gap: 18px;
  margin: 20px 0;
}

.btn-social-media {
  width: 48px;
  height: 48px;
  background: #2d92d0;
  color: white;
  border-radius: 50%;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-social-media:hover {
  background: #1b577c;
  transform: translateY(-3px);
}

/* ============================
   BOTÓN WHATSAPP FLOTANTE
============================ */

.btn-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 99999;
  transition: transform 0.2s ease;
}

.btn-whatsapp:hover {
  transform: scale(1.1);
}

/* ============================
   FOOTER
============================ */

footer {
  background: #003366;
  color: white;
  padding: 30px 20px;
  text-align: center;
  font-size: 0.9rem;
}

/* ============================
   RESPONSIVE
============================ */

@media (max-width: 1024px) {
  .hero { height: 600px; }
  .overlay h1 { font-size: 1.8em; }
}

@media (max-width: 768px) {
  nav ul { flex-wrap: wrap; gap: 10px; }
  nav ul li a { margin: 5px 10px; font-size: 1rem; }

  .hero { height: 450px; }
  .overlay h1 { font-size: 1.5em; padding: 0 15px; }

  .servicios-flex,
  .preguntas-flex,
  .testimonios-flex,
  .contacto-flex {
    flex-direction: column;
    text-align: center;
  }

  .texto,
  .servicios-flex img,
  .preguntas-flex img,
  .testimonios-flex img,
  .contacto-flex img {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero { height: 300px; }
  .overlay h1 { font-size: 1.2em; }

  nav ul li a {
    margin: 3px 8px;
    font-size: 0.9em;
  }

  /* Ajuste DEFINITIVO del botón de WhatsApp en móvil */
  .btn-whatsapp {
    right: calc(16px + env(safe-area-inset-right));
    bottom: calc(28px + env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
    font-size: 26px;
  }
}

/* ============================
   HEADER TRANSPARENTE + STICKY
============================ */

.header-transparent {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  background: transparent;
  padding: 10px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header-transparent.scrolled {
  background: #003366;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-transparent nav ul {
  padding: 15px 30px;
}
