/* =======================
   PALETA Y VARIABLES
========================== */
:root {
  --color-primary: #abd441;
  --color-secondary: #845cac;
  --color-accent: #ab9eb2;
  --color-bg: #ffffff;
  --color-surface: #f8f8f8;
  --color-text: #1a1a1a;
  --color-border: #dddddd;
}

.dark-mode {
  --color-bg: #1c1c1c;
  --color-surface: #2b2b2b;
  --color-text: #f0f0f0;
  --color-border: #444444;
}

/* =======================
   RESET Y BASE
========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', 'Poppins', 'Montserrat', Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: all 0.3s ease;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 6px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-secondary);
  margin: 1em 0 0.5em;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover, a:focus {
  text-decoration: underline;
  color: var(--color-primary);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100;
  background: var(--color-primary);
  color: #000;
  padding: 0.5em 1em;
  border-radius: 4px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
}

/* =======================
   LAYOUT Y SECCIONES
========================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 60px 0;
  background: var(--color-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--color-accent);
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* =======================
   NAVBAR Y FOOTER
========================== */
.navbar {
  background-color: var(--color-secondary);
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer {
  background-color: var(--color-accent);
  color: #fff;
  padding: 2rem;
  text-align: center;
  font-size: 0.95rem;
}

/* =======================
   BOTONES
========================== */
.button, .btn, .btn-primary, .btn-outline, .btn-secondary, .btn-link {
  display: inline-block;
  background-color: var(--color-primary);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: background-color 0.3s, color 0.3s, border 0.3s;
  text-align: center;
  text-decoration: none;
}

.button:hover, .btn:hover, .btn-primary:hover {
  background-color: #98be38;
  color: #000;
}

.btn-primary, .button {
  background-color: var(--color-primary);
  color: #000;
}

.btn-outline {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

.btn-outline:hover {
  background: var(--color-secondary);
  color: #fff;
}

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
}

.btn-secondary:hover {
  background: #6d4797;
  color: #fff;
}

.btn-link {
  background: none;
  color: var(--color-secondary);
  padding: 0;
  border: none;
  font-weight: 500;
}

.btn-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* =======================
   HERO
========================== */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 80px 0;
  overflow: hidden;
}

.hero-bg-video {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100%;
  background: rgba(20,20,40,0.35);
  z-index: 1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content,
.hero-content-blur {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.hero-content-blur {
  background: rgba(30, 30, 50, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(20,20,40,0.10);
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.hero-content p {
  font-size: 1.2rem;
  color: #fff;
}

.hero-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-buttons .button,
.hero-buttons .btn-outline {
  display: inline-block;
  min-width: 160px;
  /* No uses width: 100% aquí */
}

@media (max-width: 600px) {
  .hero-buttons {
    flex-direction: column;
    gap: 0.7rem;
    align-items: stretch;
  }
  .hero-buttons .button,
  .hero-buttons .btn-outline {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

.hero-content-blur {
  max-width: 700px; /* Aumenta si lo necesitas */
}

/* =======================
   HERO UNIFICADO PARA TODAS LAS PÁGINAS PRINCIPALES
========================== */
.hero-optimized,
.hero.services-hero,
.hero.medicos-hero,
.nosotros-hero {
  min-height: 340px;         /* Altura igual para todos */
  padding: 60px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
}

.hero-optimized .container,
.hero.services-hero .container,
.hero.medicos-hero .container,
.nosotros-hero .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  max-width: 1200px;
  min-height: 380px; /* Centra verticalmente el contenido */
}

.hero-optimized-content {
  flex: 1 1 0;
  min-width: 0;
}

.hero-optimized-img {
  flex: 0 0 520px; /* Más ancho */
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-optimized-img img {
  width: 520px;      /* Más grande */
  height: 380px;     /* Más alto */
  object-fit: cover;
  border-radius: 8px; /* Menos border radius */
  box-shadow: 0 4px 24px rgba(20,20,40,0.10);
  background: #f3f3f3;
  display: block;
}

@media (max-width: 900px) {
  .hero-optimized .container,
  .hero.services-hero .container,
  .hero.medicos-hero .container,
  .nosotros-hero .container {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    min-height: unset;
  }
  .hero-optimized-img,
  .hero-optimized-img img {
    width: 100%;
    max-width: 340px;
    height: 220px;
  }
}

@media (max-width: 600px) {
  .hero-optimized,
  .hero.services-hero,
  .hero.medicos-hero,
  .nosotros-hero {
    min-height: 180px;
    padding: 24px 0;
  }
  .hero-optimized-img img {
    max-width: 100%;
    height: 160px;
  }
}

/* =======================
   GRIDS Y CARDS
========================== */
.qualities-grid, .services-grid, .testimonials-grid, .gallery-grid {
  display: grid;
  gap: 2rem;
}

.qualities-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.testimonials-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Más grandes */
  gap: 1.2rem; /* Menos distancia */
}

.card, .service-card, .quality-card, .testimonial-card, .gallery-item {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s;
}

.card:hover, .service-card:hover, .quality-card:hover, .testimonial-card:hover, .gallery-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.service-card .service-img {
  width: 100%;
  height: 200px;           /* Ajusta la altura según tu diseño */
  overflow: hidden;
  border-radius: 10px 10px 0 0; /* Opcional: bordes redondeados arriba */
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card .service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* Esto recorta la imagen y evita que se deforme */
  display: block;
}

.service-card .service-img img {
  border-radius: 8px 8px 0 0;
}

.quality-card {
  text-align: center;
  padding: 2rem 1rem;
}

.quality-icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}

.testimonial-content .rating {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-img img {
  border-radius: 50%;
  border: 2px solid var(--color-accent);
}

.gallery-item {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  text-align: center;
}

.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: #f3f3f3;
  max-height: 380px; /* Más alto */
}

.gallery-caption {
  margin-top: 0.5rem;
  color: var(--color-secondary);
  font-size: 1rem;
}

/* =======================
   ABOUT Y STATS
========================== */
.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.about-info {
  flex: 2;
}

.about-info h2 span {
  color: var(--color-primary);
  font-size: 2.5rem;
}

.about-stats {
  flex: 1;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}

.stat-item {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
  border: 1px solid var(--color-border);
}

.stat-item h3 {
  color: var(--color-primary);
  font-size: 2rem;
  margin: 0 0 0.3em 0;
}

/* =======================
   INSURANCE LOGOS
========================== */
.insurance-logos {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.insurance-logo {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  transition: transform 0.2s;
}

.insurance-logo:hover {
  transform: scale(1.05);
}

@media (max-width: 600px) {
  /* Reduce espacio entre secciones */
  .section {
    padding: 18px 0;
  }

  /* Disminuye tamaño de títulos h2 */
  h2, .section-title {
    font-size: 1.05rem !important;
    margin-bottom: 0.5rem;
  }

  /* Uniforma y centra los logos de seguros */
  .insurance-logos {
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    justify-content: center;
    align-items: center;
  }
  .insurance-logo {
    width: 70px !important;
    height: 40px !important;
    min-width: 70px !important;
    min-height: 40px !important;
    max-width: 70px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    padding: 0.2rem 0.2rem !important;
    margin: 0 !important;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* =======================
   CTA SECTION
========================== */
.cta {
  background: linear-gradient(90deg, #845cac 60%, #abd441 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.cta-content h2 {
  color: #fff;
  font-size: 2rem;
}

.cta-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta .btn, .cta .button, .cta .btn-primary, .cta .btn-outline {
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

.cta .btn-outline {
  border-color: #fff;
  color: #fff;
  background: transparent;
}

.cta .btn-outline:hover {
  background: #fff;
  color: var(--color-secondary);
}

/* =======================
   SLIDER CONTROLS
========================== */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.slider-prev, .slider-next {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-prev:hover, .slider-next:hover {
  background: var(--color-secondary);
}

.slider-pagination {
  display: flex;
  gap: 0.5rem;
}

.slider-pagination-dot {
  width: 10px;
  height: 10px;
  background: var(--color-border);
  border-radius: 50%;
  display: inline-block;
  transition: background 0.2s;
}

.slider-pagination-dot.active {
  background: var(--color-primary);
}

/* =======================
   FORMULARIOS
========================== */
input, textarea, select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-bottom: 1rem;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 2px rgba(132, 92, 172, 0.2);
}

/* =======================
   UTILIDADES
========================== */
.text-center {
  text-align: center;
}

@media (max-width: 900px) {
  .about-content {
    flex-direction: column;
    gap: 2.5rem;
  }
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .about-content {
    flex-direction: column;
    gap: 1.2rem;
    align-items: stretch;
    padding: 0 0.2rem;
  }
  .about-info {
    width: 100%;
    text-align: center;
  }
  .about-info h2 {
    font-size: 1.15rem;
  }
  .about-info h2 span {
    font-size: 1.5rem;
  }
  .about-stats {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    width: 100%;
  }
  .stat-item {
    padding: 0.8rem;
    font-size: 0.98rem;
  }
  .stat-item h3 {
    font-size: 1.2rem;
  }
}

/* =======================
   DARK MODE TOGGLE
========================== */
.toggle-dark-mode {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  z-index: 1000;
}

/* =======================
   SLIDER PERSONALIZADO EQUIPO MÉDICO
========================== */
.custom-slider-container {
  margin: 0 auto 2rem auto;
  max-width: 900px;
  position: relative;
}

.custom-slider {
  overflow: hidden;
  width: 100%;
}

.slider-track {
  display: flex;
  gap: 2rem;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1);
}

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.slider-prev,
.slider-next {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-prev:hover,
.slider-next:hover {
  background: var(--color-secondary);
}

.slider-pagination {
  display: flex;
  gap: 0.5rem;
}

.slider-pagination-dot {
  width: 10px;
  height: 10px;
  background: var(--color-border);
  border-radius: 50%;
  display: inline-block;
  transition: background 0.2s;
}

.slider-pagination-dot.active {
  background: var(--color-primary);
}

/* Ajuste para las tarjetas de médicos dentro del slider */
.doctor-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  min-width: 280px;
  max-width: 320px;
  flex: 0 0 auto;
  text-align: center;
  transition: box-shadow 0.3s;
}

.doctor-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.doctor-img img {
  border-radius: 50%;
  width: 90px;
  height: 90px;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 2px solid var(--color-accent);
}

.doctor-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 0.3rem;
}

.doctor-specialty {
  color: var(--color-primary);
  font-size: 0.98rem;
  margin-bottom: 0.7rem;
}

.doctor-bio {
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}


/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  inset: auto clamp(8px, 3vw, 16px) clamp(8px, 3vw, 16px) auto;
  z-index: 9999;
  background: #25d366;
  color: #fff;
  width: clamp(44px, 12vw, 60px);
  height: clamp(44px, 12vw, 60px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.whatsapp-float:hover {
  background: #1ebe57;
  transform: scale(1.08);
}

@media (max-width: 600px) {
  .whatsapp-float {
    right: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
}

/* Evita subrayado en el botón flotante de WhatsApp y su ícono */
.whatsapp-float,
.whatsapp-float:hover,
.whatsapp-float:focus,
.whatsapp-float i,
.whatsapp-float:hover i,
.whatsapp-float:focus i {
  text-decoration: none !important;
  outline: none;
  box-shadow: none;
}

/* Evita subrayado en todos los enlaces e íconos dentro de enlaces en hover/focus */
a,
a:hover,
a:focus,
a i,
a:hover i,
a:focus i {
  text-decoration: none !important;
  outline: none;
  box-shadow: none;
}

/* Carrusel: cards de médicos con tamaño fijo y consistente */
.custom-slider .doctor-card,
.slider-track .doctor-card,
.slide.doctor-card {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  height: 370px;
  min-height: 370px;
  max-height: 370px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(20,20,40,0.10);
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}

.custom-slider .doctor-img,
.slider-track .doctor-img {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.custom-slider .doctor-img img,
.slider-track .doctor-img img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: 24px;
  margin-bottom: 8px;
}

.custom-slider .doctor-info,
.slider-track .doctor-info {
  flex: 1;
  width: 100%;
  padding: 0 18px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.custom-slider .doctor-name,
.slider-track .doctor-name {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.custom-slider .doctor-specialty,
.slider-track .doctor-specialty {
  font-size: 0.98rem;
  color: #1a7bb7;
  margin-bottom: 0.7rem;
}

.custom-slider .button.btn-outline,
.slider-track .button.btn-outline {
  margin-top: auto;
  margin-bottom: 0;
  width: 100%;
  max-width: 170px;
}

html, body {
  overflow-x: hidden;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .gallery-item {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    text-align: center;
  }
  .gallery-item img {
    width: 100%;
    height: 160px;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 10px;
    max-height: 160px;
    margin: 0 auto;
    display: block;
  }
  .gallery-caption {
    margin-top: 0.3rem;
    font-size: 0.95rem;
  }
}







.badge-highlight {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 20px;
  background-color:var(--color-secondary); /*  */
  color: #ffffff; /* Azul oscuro */
  font-weight: 600;
  font-size: 0.95rem;
  cursor: default;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

.badge-highlight i {
  margin-right: 6px;
}

.badge-link:hover {
  color: white;
}

/* Elimina cambios visuales al hacer clic */
.badge-highlight:focus,
.badge-highlight:active {
  outline: none;
  background-color: #fff260;
  color: #0e1839;
  box-shadow: none;
}