* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: white;
  color: #111;
  line-height: 1.6;
}

/* BOTÓN PRINCIPAL */
.btn-principal {
  display: inline-block;
  background-color: #0072ce;
  color: white;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: bold;
  margin-top: 15px;
  text-decoration: none;
  transition: background 0.3s ease;
}
.btn-principal:hover {
  background-color: #005fa3;
}

/* PORTADA CON DEGRADADO ANIMADO */
@keyframes bgMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* PORTADA CON IMAGEN DE FONDO */
.portada {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
              url("edificios 2.png") center/cover no-repeat;
  color: white;
  padding: 80px 20px;
  position: relative;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fadeIn 1s ease-in-out;
}

.logo-izquierda {
  position: absolute;
  top: 50%;
  left: 0px;
  transform: translateY(-50%);
  height: 400px;
  z-index: 10;
}

.contenido-portada {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-left: 180px;
}

.portada h1,
.portada p,
.portada .btn-principal {
  margin-left: -90px;
}

.portada h1 {
  font-size: 2.5rem;
  text-transform: uppercase;
}

.portada p {
  font-size: 1.2rem;
  letter-spacing: 1px;
  font-weight: 300;
  margin-top: 10px;
}

/* Animación fadeIn */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* FILOSOFÍA */
.filosofia {
  background-color: #f0f8ff;
  padding: 60px 20px;
  text-align: center;
}

.filosofia h2 {
  font-size: 1.8rem;
  margin-bottom: 40px;
  color: #003366;
}

.tarjetas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.tarjeta {
  background-color: #ffffff;
  border: 2px solid #005fa3;
  color: #003366;
  padding: 25px 20px;
  border-radius: 8px;
  font-weight: bold;
  width: 250px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s, background-color 0.3s;
}
.tarjeta i {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #0072ce;
}
.tarjeta:hover {
  transform: translateY(-5px);
  background-color: #e6f2ff;
}

/* MISIÓN Y VISIÓN */
.mision-vision {
  background: linear-gradient(rgba(0, 51, 102, 0.95), rgba(0, 51, 102, 0.95)),
              url("hospital.jpg") center/cover no-repeat;
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.container-mv {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.caja {
  background-color: rgba(0, 64, 128, 0.9);
  padding: 30px;
  border-radius: 10px;
  max-width: 400px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.caja h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.caja p {
  font-size: 1rem;
  line-height: 1.6;
  color: #e0e0e0;
}
.icono-mv {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #00bfff;
}

/* HISTORIA */
.historia {
  background-color: white;
  color: #222;
  padding: 60px 20px;
  text-align: center;
}

.contenido-historia {
  max-width: 800px;
  margin: auto;
}
.contenido-historia h2 {
  font-size: 2rem;
  color: #003366;
  margin-bottom: 20px;
}
.contenido-historia p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* CRECIMIENTO */
.crecimiento {
  background-color: #f0f8ff;
  padding: 60px 20px;
  text-align: center;
}
.crecimiento h2 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #003366;
}
.barra-contenedor {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 800px;
  margin: auto;
}
.barra {
  background: linear-gradient(90deg, #0072ce, #00bfff);
  color: white;
  font-weight: bold;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
  min-width: 150px;
  transition: width 1s ease;
}
.barra.final {
  background: linear-gradient(90deg, #005fa3, #0072ce);
}

/* COLABORADORES */
.colaboradores {
  background-color: white;
  padding: 60px 20px;
  text-align: center;
}
.colaboradores h2 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #003366;
}
.logos-colaboradores {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.logos-colaboradores img {
  height: 60px;
  filter: grayscale(100%);
  transition: filter 0.3s;
}
.logos-colaboradores img:hover {
  filter: grayscale(0%);
}

/* CONTACTO */
.contacto {
  background-color: #003366;
  color: white;
  text-align: center;
  padding: 60px 20px;
}
.contacto h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}
.contacto p {
  font-size: 1.1rem;
  margin: 10px 0;
}
.contacto i {
  color: #00bfff;
  margin-right: 8px;
}

/* FOOTER */
.footer {
  background-color: #002244;
  color: #fff;
  text-align: center;
  padding: 30px 15px;
  font-size: 0.95rem;
}
.footer-links {
  margin-bottom: 10px;
}
.footer-links a {
  color: white;
  text-decoration: none;
  margin: 0 5px;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-social a {
  color: white;
  margin: 0 5px;
  font-size: 1.2rem;
}
.footer-social a:hover {
  color: #00bfff;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 90px;
  right: 20px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.whatsapp-float:hover {
  background-color: #1ebe5b;
}

/* Botón "Ir arriba" */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: #0072ce;
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, background 0.3s;
  z-index: 100;
}
.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}
.scroll-top:hover {
  background: #005fa3;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .logo-izquierda {
    position: static;
    transform: none;
    margin-bottom: 20px;
    height: 100px;
  }
  .contenido-portada {
    padding-left: 0;
  }
  .portada h1,
  .portada p,
  .portada .btn-principal {
    margin-left: 0;
  }
  .container-mv {
    flex-direction: column;
    gap: 20px;
  }
  .tarjetas {
    flex-direction: column;
    align-items: center;
  }
  .barra-contenedor {
    flex-direction: column;
    align-items: center;
  }
  .logos-colaboradores img {
    height: 50px;
  }
}

/* Animación latido */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.whatsapp-float {
  animation: pulse 1.5s infinite;
}