/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f5f7fb;
  color: #333;
  line-height: 1.6;
}

/* Logo título */
.logo-title h1 {
  font-size: 1.2rem;
  margin: 0;
}

/* ---------------- HEADER ---------------- */
.hero {
  position: relative;
  background-image: url('../img/Fondo.png');
  background-size: cover;
  background-position: center center;
  height: 100vh;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* --- NAVBAR GENERAL --- */
.navbar {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  padding: 10px 20px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* --- LINKS --- */
.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  font-weight: bold;
}

/* --- BOTÓN AGENDA TU CITA --- */
.btn-cita {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

/* --- HAMBURGUESA --- */
.hamburger {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* Solo mostrar botón 'Agenda tu cita' en escritorio */
.desktop-cita {
  display: inline-block;
}

.nav-cita-responsive {
  display: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #1e3a8a;
    padding: 20px;
    position: absolute;
    top: 70px;
    left: 0;
    z-index: 10;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin-bottom: 15px;
  }

  .desktop-cita {
    display: none;
  }

  .nav-cita-responsive {
    display: block;
  }
}


.hero-content h2 {
  font-size: 3rem;
  margin: 0;
}

.hero-content p {
  font-size: 1.5rem;
  margin-top: 10px;
}

.typing-effect {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  font-size: clamp(1rem, 5vw, 2rem);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 16px;
  margin-top: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.05); /* Transparente con leve blanco */
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInOut 6s ease-in-out infinite;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Animación suave de entrada y salida */
@keyframes fadeInOut {
  0%, 100% {
    opacity: 0;
    transform: scale(0.98);
  }
  10%, 90% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes typing {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.logo-title {
  display: flex;
  align-items: center;
}

.logo {
  width: 50px;
  height: auto;
  margin-right: 10px;
}

/* ---------------- SECCIONES ---------------- */
.seccion {
  padding: 60px 20px;
  background-color: #f0f4f8;
  margin-bottom: 20px;
  border-radius: 10px;
  text-align: center;
}

.seccion h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #1e3a8a;
}

/* ---------------- SOBRE NOSOTROS ---------------- */
.contenedor-sobre {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo-sobre img {
  max-width: 100%;
  width: 500px;
  height: auto;
}

.texto-sobre {
  flex: 1;
  padding-left: 20px;
  max-width: 600px;
}

.titulo-centrado {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #1e3a8a;
}

.texto-sobre p {
  font-size: 1.2rem;
  color: #333;
  line-height: 1.6;
  text-align: justify;
}

/* ---------------- DOCTORES ---------------- */
.galeria-doctores {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.doctor {
  text-align: center;
}

.doctor img {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
}

.doctor h3 {
  font-size: 1.5rem;
  color: #333;
}

.doctor p {
  font-size: 1rem;
  color: #666;
}

/* ---------------- GALERÍA ---------------- */
.galeria-fotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.galeria-fotos img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.galeria-fotos img:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

/* Lightbox */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.lightbox-modal.active {
  display: flex;
}

#lightbox-img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}

/* ---------------- UBICACIÓN ---------------- */
.ubicacion-seccion {
  text-align: center;
  padding: 60px 20px;
  background-color: #f9fafb;
}

.mapa-contenedor {
  margin: 20px auto;
  width: 100%;
  max-width: 800px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease-in-out;
}

.mapa-contenedor:hover {
  transform: scale(1.02);
}

.btn-mapa {
  display: inline-block;
  margin-top: 20px;
  background-color: #1e3a8a;
  color: white;
  padding: 10px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-mapa:hover {
  background-color: #3b4cca;
}

/* ---------------- CONTACTO ---------------- */
.contacto-whatsapp {
  background-color: #e0f7ef;
  text-align: center;
}

.subtitulo-contacto {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
}

.card-whatsapp {
  background-color: white;
  max-width: 400px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.card-whatsapp:hover {
  transform: translateY(-5px);
}

.card-whatsapp img {
  width: 80px;
  margin-bottom: 10px;
}

.card-whatsapp h3 {
  color: #1e3a8a;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.card-whatsapp p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 20px;
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.btn-whatsapp:hover {
  background-color: #1ebe5d;
}

.btn-llamada {
  background-color: #1e3a8a;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  display: inline-block;
  margin-top: 15px;
  transition: background-color 0.3s ease;
}

.btn-llamada:hover {
  background-color: #2c57d2;
}

/* ---------------- FOOTER ---------------- */
footer {
  background-color: #1e3a8a;
  color: #fff;
  padding: 20px;
  text-align: center;
}

footer .footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

footer .footer-links a {
  color: #fff;
  text-decoration: none;
}

footer p {
  margin-top: 10px;
  font-size: 1rem;
}

/* ---------------- BOTÓN IR ARRIBA ---------------- */
#btn-top {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 999;
  display: none;
  width: 55px;
  height: 55px;
  background: linear-gradient(145deg, #1e3a8a, #2c57d2);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

#btn-top:hover {
  background: linear-gradient(145deg, #3b4cca, #2563eb);
  transform: scale(1.1);
}

/* ---------------- WHATSAPP FLOAT ---------------- */
.floating-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: white;
  padding: 15px;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  font-size: 24px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.floating-whatsapp:hover {
  background-color: #128c7e;
}

/* ---------------- MEDIA QUERIES ---------------- */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
  }

  .btn-cita {
    margin-top: 10px;
    width: 100%;
    text-align: center;
  }

  .contenedor-sobre {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .texto-sobre {
    padding-left: 0;
    padding-top: 20px;
  }

  .galeria-doctores {
    flex-direction: column;
    gap: 20px;
  }

  .doctor img {
    width: 250px;
    height: 250px;
  }

  .galeria-fotos {
    grid-template-columns: 1fr;
  }

  .formulario {
    padding: 10px;
  }

  footer .footer-links {
    flex-direction: column;
    align-items: center;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-content h2 {
    font-size: 1.5rem;
  }

  .typing-effect {
    font-size: 1rem;
  }

  .logo-title h1 {
    font-size: 1rem;
    text-align: center;
  }

  .btn-cita {
    font-size: 0.9rem;
  }
}
