:root {
  --primary: #004aad; /* Azul institucional */
  --secondary: #00c2cb; /* Cyan suave para acentos */
  --dark: #333;
  --light: #f4f7f6;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  color: var(--dark);
  scroll-behavior: smooth;
}

/* Navbar */
/* Contenedor de la navegación */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* Lista de enlaces */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 30px; /* Espacio entre links */
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #004aad; /* Color azul institucional al pasar el mouse */
}

/* Estilo específico para el botón de Agendar Cita */
.btn-contacto {
  background-color: #004aad;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit; /* Para que herede la fuente del body */
}

.btn-contacto:hover {
  background-color: #00c2cb; /* Cambio al cyan de acento */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 194, 203, 0.3);
}

/* Ajuste para móviles (básico) */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* En un demo real podrías usar un menú hamburguesa, 
                          pero para mostrar mañana, con que se vea bien en desktop basta */
  }
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}
.logo span {
  color: var(--secondary);
}

/* Estilos para el Hero */
.hero {
  position: relative;
  height: 90vh; /* Casi toda la pantalla para impacto visual */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: url("clinica-hero.jpg") center/cover no-repeat;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Degradado azul profesional para dar seriedad y legibilidad */
  background: linear-gradient(
    135deg,
    rgba(0, 74, 173, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-tag {
  display: inline-block;
  background: rgba(0, 194, 203, 0.2);
  color: #00c2cb; /* Cyan de acento */
  padding: 5px 15px;
  border-radius: 50px;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive automático */
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 35px;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Botones */
.btn-main {
  background-color: #00c2cb;
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.btn-main:hover {
  background-color: #00a8af;
  transform: scale(1.05);
}

.btn-outline {
  border: 2px solid white;
  color: white;
  padding: 13px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.btn-outline:hover {
  background: white;
  color: #004aad;
}

/* Estilos para Especialidades */
.especialidades {
  padding: 80px 5%;
  background-color: #f8fafc; /* Gris muy claro para resaltar las tarjetas blancas */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.subtitle {
  color: #00c2cb;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.section-header h2 {
  font-size: 2.5rem;
  color: #004aad;
  margin-top: 10px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.especialidad-card {
  background: #ffffff;
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #eef2f6;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

/* Efecto al pasar el mouse */
.especialidad-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 74, 173, 0.1);
  border-color: #00c2cb;
}

.card-icon {
  font-size: 3rem; /* Tamaño grande para el icono */
  color: #004aad; /* Usamos el azul institucional */
  margin-bottom: 25px;
  display: inline-block;
  background-color: #f0f4f8; /* Un fondo muy suave circular opcional */
  width: 80px;
  height: 80px;
  line-height: 80px; /* Centra el icono verticalmente */
  border-radius: 50%; /* Lo hace circular */
  transition: all 0.3s ease;
}

/* Efecto hover profesional: cambia el color de fondo y el icono */
.especialidad-card:hover .card-icon {
  background-color: #004aad;
  color: #ffffff;
  transform: rotateY(360deg); /* Un giro suave para llamar la atención */
}

.especialidad-card h3 {
  color: #004aad;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.especialidad-card p {
  color: #666;
  line-height: 1.6;
  font-size: 1rem;
}

/* Estilos para Diferenciadores */
.diferenciadores {
  padding: 100px 5%;
  background: #ffffff;
}

.diff-wrapper {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap; /* Para que sea responsivo */
}

.diff-image {
  flex: 1;
  min-width: 350px;
}

.diff-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 20px 20px 0px #00c2cb; /* Detalle estético con el color de acento */
}

.diff-content {
  flex: 1;
  min-width: 350px;
}

.diff-content h2 {
  font-size: 2.3rem;
  color: #004aad;
  margin: 15px 0 40px 0;
}

.diff-item {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.diff-icon {
  width: 40px;
  height: 40px;
  background: #00c2cb;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-weight: bold;
}

.diff-text h3 {
  color: #333;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.diff-text p {
  color: #666;
  line-height: 1.5;
}

/* Ajuste móvil */
@media (max-width: 768px) {
  .diff-image {
    order: 2;
  }
  .diff-content {
    order: 1;
  }
}

/* Estilos para Testimonios */
.testimonios {
  padding: 80px 5%;
  background-color: #f0f4f8; /* Un tono sutilmente diferente para separar */
}

.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.testimonio-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.stars {
  color: #ffb400; /* Color dorado para las estrellas */
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.quote {
  font-style: italic;
  color: #444;
  line-height: 1.6;
  margin-bottom: 20px;
}

.paciente-info strong {
  display: block;
  color: #004aad;
  font-size: 1.1rem;
}

.paciente-info span {
  color: #888;
  font-size: 0.85rem;
}

.google-badge {
  text-align: center;
  margin-top: 50px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.rating-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-bottom: 10px;
}

.rating-item {
  display: flex;
  flex-direction: column;
}

.platform {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.score {
  font-size: 1.4rem;
  font-weight: bold;
  color: #004aad; /* Tu azul institucional */
}

.rating-divider {
  width: 1px;
  height: 40px;
  background-color: #eee;
}

.rating-text {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* Botones y WhatsApp */
.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 5px;
}

/* Estilos para el CTA */
.cta-section {
  padding: 60px 5%;
  background-color: #f8fafc;
}

.cta-box {
  background: linear-gradient(135deg, #004aad 0%, #00c2cb 100%);
  padding: 50px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  gap: 40px; /* Aumentamos el espacio entre texto y botón */
  flex-wrap: nowrap; /* Evita que el botón baje en desktop */
  box-shadow: 0 15px 35px rgba(0, 74, 173, 0.2);
}

.cta-text h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.cta-text p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.btn-cta {
  background-color: white;
  color: #004aad;
  padding: 18px 35px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  display: inline-block;
  transition: 0.3s;

  /* Evita que el texto salte a una nueva línea */
  white-space: nowrap;

  /* Asegura que el botón no se deforme en pantallas pequeñas */
  min-width: max-content;
}

.btn-cta:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  background-color: #f0f0f0;
}

/* WhatsApp Flotante */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #004aad; /* Tu azul institucional */
  width: 60px;
  height: 60px;
  border-radius: 50%;

  /* Centrado absoluto con Flexbox */
  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: 0.3s;
  text-decoration: none; /* Quita subrayados si es un link */
}

/* Forzamos que el icono dentro no tenga dimensiones raras */
.whatsapp-btn i,
.whatsapp-btn svg,
.whatsapp-btn span {
  display: block;
  line-height: 0; /* Elimina espacio extra debajo del texto/icono */
  margin: 0;
  padding: 0;
  text-align: center;
}

.whatsapp-btn:hover {
  background-color: #00c2cb;
}

/* Responsivo para el CTA */
@media (max-width: 768px) {
  .cta-box {
    flex-direction: column;
    text-align: center;
    padding: 40px 25px;
  }
}

/* Estilos para el Footer */
.footer {
  background-color: #002b66; /* Un azul más oscuro que el institucional */
  color: white;
  padding: 70px 5% 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 40px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.footer-logo span {
  color: #00c2cb;
}

.footer-about p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.8;
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #00c2cb;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: 0.3s;
}

.footer-links a:hover {
  opacity: 1;
  padding-left: 5px;
  color: #00c2cb;
}

.footer-contact p {
  margin-bottom: 12px;
  font-size: 0.95rem;
  opacity: 0.8;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 0.85rem;
  opacity: 0.6;

  padding-bottom: 0 !important;
}

.footer-bottom-credit {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;

  padding-top: -120px !important;
}

.footer-bottom-credit a {
  color: white;
}

.social-links {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.social-links a {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  font-size: 0.8rem;
  transition: 0.3s;
}

.social-links a:hover {
  background: #00c2cb;
}

/* ==========================================
   AJUSTES RESPONSIVOS INTEGRADOS
   ========================================== */

@media (max-width: 768px) {
  /* Navbar: En lugar de ocultar, centramos el contenido para el demo */
  .navbar {
    flex-direction: column;
    gap: 15px;
    padding: 15px 2%;
  }

  .nav-links {
    display: flex; /* Lo volvemos a mostrar */
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links li a {
    font-size: 0.9rem;
  }

  /* Hero: Ajustamos alturas y textos */
  .hero {
    height: auto;
    padding: 100px 20px;
  }

  .hero h1 {
    font-size: 2rem; /* clamp ya ayuda, pero aseguramos aquí */
  }

  .hero-actions {
    display: flex;
    flex-direction: column; /* Apila uno sobre otro */
    gap: 15px;
    width: 100%;
    max-width: 300px; /* Evita que los botones sean infinitamente anchos */
    margin: 0 auto; /* Centra el bloque de botones */
  }

  /* Estilo común para ambos botones en móvil */
  .btn-main,
  .btn-outline {
    width: 100%; /* Ambos del mismo tamaño */
    display: block;
    padding: 15px 20px;
    text-align: center;
    box-sizing: border-box; /* Asegura que el padding no rompa el ancho */
  }

  /* Ajuste de márgenes para el párrafo del hero en móvil */
  .hero p {
    font-size: 1.1rem;
    margin-bottom: 25px;
  }

  /* Especialidades: Ajustamos el grid */
  .grid-container {
    grid-template-columns: 1fr; /* Una sola columna en móvil */
    gap: 20px;
  }

  /* Diferenciadores: Imagen y contenido */
  .diff-wrapper {
    gap: 30px;
  }

  .diff-image {
    min-width: 100%;
    order: 2; /* Imagen abajo en móvil */
  }

  .diff-image img {
    box-shadow: 10px 10px 0px var(--secondary); /* Sombra más pequeña */
  }

  .diff-content {
    min-width: 100%;
    order: 1; /* Texto arriba en móvil */
    text-align: center;
  }

  .diff-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Testimonios y Google Badge */
  .google-badge {
    width: 90%;
    transform: translateX(-50%);
    padding: 15px;
  }

  .rating-container {
    gap: 15px;
  }

  /* CTA Section: Botón y Texto */
  .cta-box {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
    gap: 25px;
  }

  .btn-cta {
    width: 100%; /* Botón ancho completo en móvil */
    white-space: normal; /* Permitir que rompa línea si el cel es muy pequeño */
    text-align: center;
  }

  .cta-button {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* Footer: Columnas */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  /* WhatsApp: Un poco más pequeño para no estorbar */
  .whatsapp-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
}

/* Ajuste para pantallas muy pequeñas (iPhone SE, etc) */
@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-main,
  .btn-outline {
    width: 100%;
    text-align: center;
  }
}
