/* --- Fuentes globales --- */
body {
  margin: 0;
  font-family: 'Baloo 2', cursive;
  background: #fefefe;
  color: #333;
  scroll-behavior: smooth;
}

/* --- Splash screen --- */
.splash {
  position: fixed;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.8s;
}

.splash.ocultar {
  opacity: 0;
  visibility: hidden;
}

.logo-giratorio {
  width: 150px;
  animation: girar 2s linear infinite;
}

@keyframes girar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* HEADER */
header {
  background: linear-gradient(90deg, #00c9ff, #92fe9d); /* Color vivo y alegre */
  padding: 2px 50px;
  border-bottom: 3px solid #00a0cc;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contenedor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Logo */
.logo img {
  width: 200px;
}

/* Redes sociales */
.redes-sociales {
  display: flex;
  gap: 15px;
  margin: 0 auto;
}

.redes-sociales img {
  width: 28px;
  height: 28px;
  transition: transform 0.3s;
  filter: drop-shadow(0px 0px 2px white);
}

.redes-sociales img:hover {
  transform: scale(1.5);
}

/* Menú de navegación */
.menu-principal ul {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-principal ul li {
  position: relative;
}

.menu-principal ul li a,
.menu-principal .dropbtn {
  font-family: 'Baloo 2', sans-serif;
  padding: 10px 20px;
  border: 2px solid #00a8cc;
  border-radius: 8px;
  background-color: #fff;
  color: #007ea7;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  transition: all 0.3s ease-in-out;
  display: inline-block;
}

.menu-principal ul li a:hover,
.menu-principal .dropbtn:hover,
.menu-principal ul li a.activo {
  background-color: #00a8cc;
  color: #fff;
  border-color: #007ea7;
}

.menu-principal ul li a {
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  color: white;
  padding: 10px 16px;
  border-radius: 30px;
  background: linear-gradient(145deg, #ff7eb3, #ff758c);
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.menu-principal ul li a:hover,
.menu-principal ul li a.activo {
  background: linear-gradient(145deg, #ffa585, #f3ffbd);
  color: #007ea7;
}


/* Menú responsive */
.menu-btn {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    display: none;
  }

  nav ul.mostrar {
    display: flex;
  }

  .menu-btn {
    display: block;
  }

  .logo {
    order: 1;
    width: 100%;
    text-align: center;
  }
}

/* --- Slider principal --- */
.slider {
  position: relative;
  overflow: hidden;
  height: 400px;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: 1s;
  display: flex;
  align-items: center;
}

.slide.activo {
  opacity: 1;
  z-index: 1;
}

.slide-contenido {
  margin-left: 50px;
  background: rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 12px;
  animation: aparecer 1s ease-in-out;
}

.titulo-slider {
  font-size: 32px;
  color: #ff4081;
}

.texto-slider {
  font-size: 18px;
  margin: 10px 0;
  background: #fff4f4;
  padding: 5px 10px;
  border-radius: 5px;
}

.btn-slider {
  background: #ff69b4;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}

.btn-slide {
  position: absolute;
  top: 50%;
  font-size: 24px;
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 10px;
  transform: translateY(-50%);
}

.prev {
  left: 10px;
}
.next {
  right: 10px;
}

.slider-dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
}
.dot {
  display: inline-block;
  height: 12px;
  width: 12px;
  background: #ccc;
  margin: 0 3px;
  border-radius: 50%;
  cursor: pointer;
}
.dot.activo {
  background: #ff69b4;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Especialidades --- */
#especialidades {
  padding: 50px 20px;
  background: #e6f9ff;
}

.titulo-seccion {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
  color: #0099cc;
}

.especialidades-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.especialidad {
  text-align: center;
  background: #fff;
  border-radius: 15px;
  padding: 15px;
  cursor: pointer;
  transition: transform 0.3s;
}

.especialidad:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.especialidad img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

/* Detalle Especialidades */
.detalle-especialidad {
  display: flex;
  flex-wrap: wrap;
  padding: 50px 20px;
  align-items: center;
  background: #f0fbff;
  border-top: 2px solid #ddd;
}

.detalle-img {
  flex: 1;
  text-align: center;
}

.detalle-img img {
  width: 100%;
  max-width: 400px;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.detalle-info {
  flex: 1;
  padding: 20px;
}

.detalle-info h2 {
  font-size: 28px;
  color: #0099cc;
  margin-bottom: 10px;
}

.detalle-info p {
  font-size: 16px;
  margin-bottom: 8px;
}


/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}
.lightbox.activo {
  display: flex;
}
.lightbox-img {
  max-width: 90%;
  max-height: 80%;
}
.cerrar {
  position: absolute;
  top: 15px;
  right: 30px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
}

/* --- Nosotros --- */
.nosotros {
  display: flex;
  flex-wrap: wrap;
  padding: 40px 20px;
  align-items: center;
  background: #fffdf5;
}

.nosotros-texto {
  flex: 1;
  padding: 20px;
}

.nosotros-texto h2 {
  font-size: 28px;
  color: #444;
}

.nosotros-slider {
  flex: 1;
  display: flex;
  overflow-x: auto;
  gap: 10px;
}

.nos-img {
  width: 250px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

/* --- Llamado a acción --- */
.reserva-cita {
  background: linear-gradient(to right, #ffb3d1, #ffd9ec);
  text-align: center;
  padding: 40px 20px;
}

.reserva-cita h2 {
  font-size: 26px;
  color: #d1006c;
}

/* --- Footer --- */
footer {
  background: #222;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  padding: 30px 20px;
  gap: 20px;
}

.footer-col {
  flex: 1 1 300px;
}

footer h3 {
  margin-bottom: 10px;
  color: #ffc0cb;
}

footer p {
  margin: 5px 0;
}

.copyright {
  width: 100%;
  text-align: center;
  padding-top: 15px;
  font-size: 14px;
  color: #aaa;
}

/* ---Botón ventas flotante---- */
.pedido-producto {
    position: fixed;
    bottom: 320px;
    right: 27px;
    z-index: 1000;
    text-align: center;
}

.pedido-producto img {
  width: 80px;
  animation: flotar 2s infinite;
}


/* --- Botón WhatsApp --- */
.btn-whatsapp {
    position: fixed;
    bottom: 0px;
    right: 60px;
    z-index: 1000;
}

.btn-whatsapp img {
  width: 80px;
  animation: flotar 2s infinite;
}

/* --- Doctor flotante --- */
.doctor-float {
  position: fixed;
  bottom: 90px;
  right: 15px;
  text-align: center;
  z-index: 1000;
}

.doctor-float img {
  width: 200px;
  animation: flotar 2s ease-in-out infinite;
}

.doctor-float span {
  display: block;
  background: #ffb3b3;
  color: #000;
  padding: 5px 10px;
  border-radius: 10px;
  margin-top: 5px;
  font-weight: bold;
}

.pedido-producto span {
  display: block;
  background: #ffb3b3;
  color: #000;
  padding: 5px 10px;
  border-radius: 10px;
  margin-top: 5px;
  font-weight: bold;
}

@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Flechita regresar arriba */
.btn-volver-arriba {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background-color: #00c9a7;
  color: white;
  font-size: 20px;
  padding: 12px 16px;
  border-radius: 50%;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  z-index: 1000;
  transition: all 0.3s ease;
  display: none;
}

.btn-volver-arriba:hover {
  background-color: #009b85;
}

/* Dropdown refinado */
.menu-principal .dropbtn {
  background-color: #ffffff;
  color: #333;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 20px;
  border: 1px solid #00a8cc;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.05);
}

.menu-principal .dropbtn:hover {
  background-color: #00a8cc;
  color: white;
  border-color: #007ea7;
}

.menu-principal .dropdown-content {
  display: none;
  position: absolute;
  top: 45px;
  left: 0;
  background-color: transparent;
  min-width: 200px;
  z-index: 1000;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.menu-principal .dropdown-content li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-principal .dropdown-content a {
  display: block;
  padding: 8px 12px;
  font-size: 15px;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
}

.menu-principal .dropdown-content a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffe600;
}

.menu-principal .dropdown:hover .dropdown-content {
  display: block;
}
