:root {
  --color-primary: #9683ec;  /* Morado claro */
  --color-secondary: #83b1ec; /* Azul claro */
  --color-accent: #fbf797;    /* Amarillo claro */
  --color-success: #97ecb3;   /* Verde claro */
  --color-text: #333333;
  --color-text-light: #666666;
  --color-background: #e2e8f5; /* Azul más oscuro */
  --color-white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --transition: all 0.3s ease;
}

/* Fondo con trama elegante y más visible */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--color-background);
  background-image:
    /* Modificado: Ahora el degradado comienza en la posición del header y se desvanece hacia abajo */
    linear-gradient(to bottom, var(--color-background) 0%, rgba(226,232,245,0.2) 15%, rgba(226,232,245,0) 30%),
    /* Capas del patrón cuadriculado */
    linear-gradient(rgba(150, 131, 236, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 131, 236, 0.09) 1px, transparent 1px),
    linear-gradient(45deg, rgba(131, 177, 236, 0.07) 25%, transparent 25%, transparent 75%, rgba(131, 177, 236, 0.07) 75%);
  background-size: auto, 30px 30px, 30px 30px, 60px 60px;
  background-position: top, -1px -1px, -1px -1px, 0 0;
  color: var(--color-text);
  line-height: 1.6;
}

/* Contenedor principal */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

/* VERSIÓN DEPURADA DEL HEADER */
header {
  position: relative;
  background: linear-gradient(135deg, #7a67d3 0%, #6088d2 100%);
  color: var(--color-white);
  padding: 30px 0 0 0;
  margin-bottom: 50px;
  z-index: 5;
  overflow: visible;
}
/* Trama decorativa del header */
header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: 
      repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 1px, transparent 16px),
      repeating-linear-gradient(135deg, #fff 0, #fff 1px, transparent 1px, transparent 16px),
      radial-gradient(circle at 30% 30%, #fbf797 1px, transparent 8px),
      radial-gradient(circle at 70% 70%, #97ecb3 1px, transparent 8px);
  background-size: 30px 30px, 30px 30px, 120px 120px, 120px 120px;
  z-index: 1;
  pointer-events: none; /* Evitar interferencia con elementos interactivos */
}

/* Triángulo en la parte inferior - Degradado mejorado para versión escritorio */
/* 2. Eliminar la línea blanca ajustando la posición del triángulo */
.header-triangle {
  position: absolute;
  bottom: -39px; /* Movido 1px arriba para evitar la línea blanca */
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(135deg, #7a67d3 -10%, #6088d2 80%); /* Mismo degradado que el header */
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%);
  z-index: 4;
  overflow: hidden;
}

header::after {
  content: "";
  position: absolute;
  bottom: -1px; /* Crea una pequeña superposición */
  left: 0;
  width: 100%;
  height: 2px; /* Altura suficiente para cubrir cualquier espacio */
  background: linear-gradient(135deg, #7a67d3 0%, #6088d2 100%); /* Mismo degradado que el header */
  z-index: 5; /* Por encima del triángulo pero por debajo del contenido */
}

/* Patrón decorativo para el triángulo */
.header-triangle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: 
      repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 1px, transparent 16px),
      repeating-linear-gradient(135deg, #fff 0, #fff 1px, transparent 1px, transparent 16px),
      radial-gradient(circle at 30% 30%, #fbf797 1px, transparent 8px),
      radial-gradient(circle at 70% 70%, #97ecb3 1px, transparent 8px);
  background-size: 30px 30px, 30px 30px, 120px 120px, 120px 120px;
  z-index: 1;
  pointer-events: none;
}
/* Asegurar que los elementos dentro del header estén por encima de los efectos decorativos */
.profile-photo-container, 
.header-content {
  position: relative;
  z-index: 10; /* Mayor que los pseudoelementos del header */
}

/* Eliminar explícitamente cualquier elemento que pudiera interferir */
.header-wave,
.light-divider,
.divider-line,
.body-transition,
.light-beam,
.light-sweep,
.light-flare,
.moving-particles,
.light-particle,
.light-halo-left,
.light-halo-right,
.light-spark,
.glow-transition {
  display: none !important;
}

/* Mejora visual para la foto del perfil */
.profile-photo {
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.profile-photo::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  z-index: -1;
}

/* Texto mejorado */
.header-content {
  position: relative;
  z-index: 2;
}

.header-content h1 {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
}

.header-content p {
  font-size: 1.5rem; /* Aumentado de 1.2rem a 1.5rem */
  color: #ffffff; /* Blanco puro para mayor contraste */
  font-weight: bold; /* Texto en negrita */
  opacity: 1; /* Opacidad completa para mayor visibilidad */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Sombra mejorada para legibilidad */
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
  
.header-content h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
  
/* Quote Styles */
.quote {
  background-color: var(--color-accent);
  padding: 20px;
  border-radius: var(--radius);
  margin: 30px 0;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  width: 100%;
}
  
.quote p {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-text);
}
  
.quote::before {
  content: '"';
  font-size: 4rem;
  position: absolute;
  top: -20px;
  left: 20px;
  color: rgba(0, 0, 0, 0.1);
}
  
/* Card Styles */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  margin-bottom: 30px;
  transition: var(--transition);
  width: 100%; /* Asegura que todas las tarjetas tengan el mismo ancho */
  box-sizing: border-box; /* Incluye padding en el ancho total */
}
  
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
  
.card h2 {
  color: var(--color-primary);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
  font-size: 1.6rem;
}
  
.card p {
  margin-bottom: 15px;
}
  
.card strong {
  color: var(--color-secondary);
}

/* Estilo unificado para todos los títulos de tarjetas */
.card-header {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  margin: -25px -25px 20px -25px; /* Compensar el padding de la tarjeta */
  border-radius: var(--radius) var(--radius) 0 0; /* Redondear solo las esquinas superiores */
  justify-content: center
}

.card-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: white;
  border-bottom: none;
  padding-bottom: 0;
}

.card-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Asegurar que los títulos existentes no tengan doble estilo */
.card-header + * {
  margin-top: 20px;
}

/* Reemplazar el estilo actual de los h2 en las tarjetas */
.card .card-content h2 {
  color: var(--color-primary);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
  font-size: 1.6rem;
}

/* Ajustar el padding del contenido de la tarjeta */
.card-content {
  padding-top: 20px;
}

/* Mantener la compatibilidad con las tarjetas de horario existentes */
.schedule-card .schedule-header {
  margin: 0; /* Anular el margen negativo para estas tarjetas */
  border-radius: var(--radius) var(--radius) 0 0;
}
  
/* Button Styles */
.button {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  text-decoration: none;
  font-size: 0.9rem;
}
  
.button:hover {
  background: #8470d8;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(150, 131, 236, 0.4);
}
  
.button.secondary {
  background: var(--color-secondary);
}
  
.button.secondary:hover {
  background: #6a9fe0;
  box-shadow: 0 5px 15px rgba(131, 177, 236, 0.4);
}
  
.button.success {
  background: var(--color-success);
  color: var(--color-text);
}
  
.button.success:hover {
  background: #7ad698;
  box-shadow: 0 5px 15px rgba(151, 236, 179, 0.4);
}
  
/* List Styles */
ul, ol {
  padding-left: 20px;
  margin-bottom: 15px;
}
  
ul li, ol li {
  margin-bottom: 10px;
}
  
/* Schedule Section */
.schedule-section {
  background: linear-gradient(to right, rgba(151, 236, 179, 0.2), rgba(131, 177, 236, 0.2));
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
  
/* Services Section */
.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
  width: 100%;
}
  
.service-card {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}
  
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
  
/* Mejoras para las imágenes de los servicios profesionales */
.service-photo {
  width: calc(100% + 40px); /* Asegura que cubra todo el ancho + los márgenes laterales */
  height: 200px; /* Altura fija para todas las imágenes */
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  margin: -20px -20px 15px -20px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  left: 0; /* Asegurar posicionamiento correcto */
  top: 0; /* Asegurar posicionamiento correcto */
}

.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease-in-out;
  filter: brightness(0.95);
  display: block; /* Elimina espacios en blanco debajo de la imagen */
  margin: 0; /* Elimina márgenes predeterminados */
  border: none; /* Elimina bordes predeterminados */
}

/* Efecto hover mejorado */
.service-card:hover .service-photo img {
  transform: scale(1.08); /* Zoom ligeramente mayor */
  filter: brightness(1.05); /* Aumenta brillo al pasar el mouse */
}

/* Overlay para mejorar la legibilidad del título sobre la imagen */
.service-photo::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover .service-photo::after {
  opacity: 1;
}

/* Mejoras para las tarjetas de servicio */
.service-card {
  background-color: rgba(98, 196, 134, 0.15); /* El mismo verde usado en testimonios */
  border-left: 3px solid rgba(98, 196, 134, 0.6); /* Borde lateral para dar elegancia */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s, box-shadow 0.4s, background-color 0.3s;
}

.service-card:hover {
  background-color: rgba(98, 196, 134, 0.18); /* Ligeramente más intenso al hacer hover */
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Mejorar el aspecto del título */
.service-title {
  color: var(--color-primary);
  margin: 5px 0 12px 0;
  font-size: 1.3rem;
  position: relative;
  padding-bottom: 8px;
}

.service-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  border-radius: 3px;
}

/* Modificar el botón para que ocupe todo el ancho y sea visible */
.service-card .button.secondary {
  position: absolute;
  bottom: 15px;
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  opacity: 1; /* Hacer el botón visible siempre */
  visibility: visible; /* Asegurar que sea visible */
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  text-align: center;
  display: block; 
  border: none;
  transform: none; /* Eliminar cualquier transformación que pueda estar ocultándolo */
  padding: 12px 15px;
  font-size: 0.9rem;
}

/* Eliminar cualquier propiedad que pudiera estar causando conflictos */
.service-card:hover .button.secondary {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Asegurar que las imágenes se vean bien en móviles */
@media (max-width: 768px) {
  .service-photo {
    height: 180px; /* Altura ligeramente menor en móviles */
    width: calc(100% + 40px); /* Mantener la cobertura completa */
  }
  
  .services-container {
    gap: 30px; /* Más espacio entre tarjetas en móviles */
  }

  /* Asegurar que el texto del encabezado está centrado en móvil */
  .header-content p {
    font-size: 1.3rem; /* Ligeramente más pequeño en móvil pero aún grande */
    font-weight: bold; /* Mantener negrita */
    color: #ffffff; /* Mantener blanco puro */
    text-align: center; /* Centrar el texto en móvil */
    margin-bottom: 15px; /* Bajar un poco el texto en móvil */
    padding-bottom: 5px; /* Espacio adicional debajo */
  }
}

/* Regla adicional para solucionar cualquier problema con los contenedores */
.services-container .service-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Asegurar que no hay espacios entre elementos */
.service-photo + .service-title {
  margin-top: 0;
}
  
.service-title {
  color: var(--color-primary);
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Estilos específicos para el botón en las tarjetas de servicios */
.service-card p {
  margin-bottom: 60px; /* Espacio para el botón */
  color: #333333;
  z-index: 5;
}

/* Asegurar que el botón esté por encima de otros elementos */
.service-card .button.secondary {
  z-index: 5;
}

/* Simplificar el hover del botón */
.service-card .button.secondary:hover {
  background: #8470d8;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(150, 131, 236, 0.4);
}

/* Steps Section */
.steps-container {
  counter-reset: step-counter;
  margin-top: 20px;
}
  
.step {
  display: flex;
  margin-bottom: 30px;
  position: relative;
  padding-left: 70px;
}
  
.step:before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background-color: var(--color-primary);
  color: var(--color-white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.5rem;
}
  
.step-content {
  flex: 1;
}
  
.step-title {
  color: var(--color-primary);
  margin-bottom: 5px;
  font-size: 1.2rem;
}
  
/* Estilos mejorados para el footer */
footer {
  width: 90%;
  max-width: 1200px;
  margin: 50px auto 0;
  border-radius: var(--radius);
  padding: 30px 25px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: 
      repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 1px, transparent 16px),
      repeating-linear-gradient(135deg, #fff 0, #fff 1px, transparent 1px, transparent 16px);
  background-size: 30px 30px, 30px 30px;
  z-index: 1;
  pointer-events: none;
}

footer p {
  opacity: 0.9;
  margin: 8px 0;
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Mejora para dispositivos móviles */
@media (max-width: 768px) {
  footer {
    width: 90%;
    padding: 25px 20px;
  }
  
  footer p {
    font-size: 0.95rem;
  }
}
  
/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
  
.modal-content {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 90%;
  max-width: 500px;
  padding: 30px;
  position: relative;
}
  
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-light);
}
  
.modal-title {
  color: var(--color-primary);
  margin-bottom: 20px;
}
  
.modal-body {
  margin-bottom: 20px;
}

/* Estilos para las tarjetas de horarios disponibles */
.schedule-cards-container {
  width: 100%;
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.schedule-card {
  flex: 1;
  min-width: 300px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.schedule-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.schedule-header {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center
}

.schedule-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.schedule-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: white;
  border-bottom: none;
  padding-bottom: 0;
}

.schedule-content {
  padding: 20px;
}

.schedule-days {
  margin: 15px 0;
}

.schedule-day {
  margin-bottom: 8px;
  position: relative;
  padding-left: 5px;
}

.schedule-times {
  margin-top: 20px;
}

.time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.time-chip {
  background-color: var(--color-background);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  display: inline-block;
  color: var(--color-text);
}

.schedule-location {
  margin-top: 20px;
  background-color: #f9f9fc;
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid var(--color-primary);
}

.location-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.schedule-location p {
  margin: 0;
  line-height: 1.5;
  color: var(--color-text);
}

/* Modificar la regla de anulación crítica (alrededor de línea 403) */
.schedule-card .schedule-header {
  margin: -25px -25px 20px -25px; /* Modificado: antes era margin: 0 */
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Corrección específica para la alineación de todas las tarjetas */

/* Asegurar que todas las tarjetas y contenedores estén alineados */
.container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Tarjetas estándar - añadidos estilos críticos para alineación */
.card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
  display: block;
}

/* Asegurarse de que las tarjetas de horarios tienen la misma alineación */
.schedule-cards-container {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
}

/* Arreglar problema específico con las tarjetas de servicios */
.services-container {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Asegurar que los contenedores se ajusten correctamente */
.container > * {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

/* Eliminar cualquier propiedad float que pueda estar causando problemas */
.card, .schedule-cards-container, .services-container {
  float: none;
}

/* Para dispositivos móviles */
@media (max-width: 768px) {
  .schedule-cards-container {
    flex-direction: column;
  }
  
  .schedule-card {
    width: 100%;
  }
}

/* Estilo de destaque para secciones */
.highlight-section {
  animation: highlightSection 1.5s ease;
}

@keyframes highlightSection {
  0% {
      box-shadow: 0 0 0 0 rgba(150, 131, 236, 0);
  }
  30% {
      box-shadow: 0 0 20px 5px rgba(150, 131, 236, 0.5);
  }
  100% {
      box-shadow: 0 0 0 0 rgba(150, 131, 236, 0);
  }
}

/* Efecto de clic para el botón */
.button.clicked {
  transform: scale(0.95);
  opacity: 0.8;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mejoras adicionales para dispositivos móviles */
@media (max-width: 576px) {
  header {
    padding-bottom: 20px; /* Reducir el padding en móviles para el triángulo */
    margin-bottom: 40px; /* Ajusta el margen para compensar el triángulo más pequeño */
  }
  
  /* Ajuste para el triángulo en móviles */
  .header-triangle {
    bottom: -30px; /* Altura más pequeña para el triángulo en móvil */
    height: 30px;
    /* Ajustamos el gradiente para que coincida con el header en móvil */
    background: linear-gradient(135deg, #7a67d3 -30%, #6088d2 70%);
  }
  
  .profile-photo {
    width: 90px;
    height: 90px;
  }
  
  .header-content h1 {
    font-size: 1.8rem;
  }
  
  .header-content p {
    font-size: 1.2rem; /* Ajuste para móviles más pequeños */
    text-align: center; /* Centrar el texto en móvil */
    margin-bottom: 15px; /* Bajar un poco el texto en móvil */
    padding-bottom: 5px; /* Espacio adicional debajo */
  }
  
  .card {
    padding: 20px 15px;
  }
}

/* Para pantallas muy pequeñas, ajustamos aún más */
@media (max-width: 375px) {
  .header-triangle {
    bottom: -25px;
    height: 25px;
    /* Ajustamos aún más el gradiente para pantallas muy pequeñas */
    background: linear-gradient(135deg, #7a67d3 -35%, #6088d2 65%);
  }
  
  .header-content p {
    font-size: 1.2rem; /* Mantener este tamaño en pantallas más pequeñas */
    margin-bottom: 20px; /* Aumentar el espacio inferior en pantallas muy pequeñas */
  }
}

/* Asegurar compatibilidad con navegadores más antiguos */
@supports not (clip-path: polygon(0 0, 100% 0, 50% 100%)) {
  header::after {
    /* Fallback para navegadores que no soportan clip-path */
    display: none;
  }
  
  header {
    /* Añadir un borde inferior al header si clip-path no está disponible */
    border-bottom: 3px solid var(--color-accent);
    padding-bottom: 30px;
  }
}

/* Mejorar las animaciones de las tarjetas al hacer scroll */

/* Estilo mejorado para las animaciones de entrada */
.fade-in-element {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Estilos específicos para las tarjetas destacadas (schedule-card) */
.schedule-card.fade-in-element {
  transform: translateY(50px);
  opacity: 0;
  transition-duration: 1.2s; /* Animación más lenta para estas tarjetas */
  transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1); /* Curva de animación más suave */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.schedule-card.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Efectos adicionales para cuando pasa el mouse por encima */
.schedule-card:hover {
  transform: translateY(-8px) !important; /* El !important asegura que este estilo tenga prioridad */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
  transition: transform 0.4s, box-shadow 0.4s !important;
}

/* Efecto de luz sutil en las tarjetas durante la aparición */
.schedule-card.fade-in-element::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  opacity: 0;
  z-index: 2;
  transition: opacity 1.5s ease-out;
  pointer-events: none;
}

.schedule-card.fade-in-visible::before {
  opacity: 1;
  animation: shimmer 2s ease-out forwards;
}

@keyframes shimmer {
  0% {
    opacity: 0.8;
    transform: translateX(-100%) translateY(-100%);
  }
  100% {
    opacity: 0;
    transform: translateX(100%) translateY(100%);
  }
}

/* Ajuste específico para la tarjeta de video */
.video-card.fade-in-visible .video-overlay {
  opacity: 1;
}

/* Mejoras de rendimiento para las animaciones */
.card, .schedule-card, .step, .service-card {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .schedule-card.fade-in-element {
    transform: translateY(30px); /* Menor distancia en móviles */
  }
}

/* Estilos para la animación de las tarjetas schedule-card */
.schedule-card {
  position: relative;
  overflow: hidden !important;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.card-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: 8px;
}

@keyframes shine-effect {
  0% {
    opacity: 0.6;
    transform: translateX(-100%) translateY(-100%);
  }
  100% {
    opacity: 0;
    transform: translateX(100%) translateY(100%);
  }
}

/* Mejoras para títulos en dispositivos móviles */
@media (max-width: 767px) {
  /* Títulos en tarjetas regulares */
  .card h2 {
    font-size: 1.3rem;
    line-height: 1.4;
    word-wrap: break-word;
    hyphens: auto;
  }
  
  /* Títulos en encabezados de tarjetas */
  .card-header h2 {
    font-size: 1.2rem;
    line-height: 1.3;
  }
  
  /* Títulos en schedule cards */
  .schedule-header h2 {
    font-size: 1.2rem;
    line-height: 1.3;
    word-wrap: break-word;
  }
  
  /* Reducir el tamaño de los iconos en el encabezado de tarjetas */
  .card-icon, .schedule-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  /* Ajustar padding para mejorar espacio en móvil */
  .card-header, .schedule-header {
    padding: 15px;
    gap: 10px;
  }
  
  /* Mejorar visibilidad de títulos en tarjetas de servicio */
  .service-title {
    font-size: 1.1rem;
    padding-bottom: 6px;
    margin: 5px 0 10px 0;
  }
  
  /* Para subtítulos H3 */
  .step-title, .card h3 {
    font-size: 1.1rem;
    line-height: 1.3;
  }
  
  /* Para subtítulos H4 y otros encabezados similares */
  .section-title h4, 
  .form-header h3 {
    font-size: 1rem;
    line-height: 1.3;
  }
  
  /* Asegurar que los encabezados de tarjetas tengan un layout flexible */
  .card-header, .schedule-header {
    display: flex;
    flex-wrap: wrap; /* Permitir que se ajuste el contenido si es necesario */
    align-items: center;
  }
  
  /* Dar más espacio al título para que no se amontone con el icono */
  .card-header h2, .schedule-header h2 {
    width: calc(100% - 50px); /* Restar el ancho del icono + un poco de gap */
    flex: 1; /* Permitir que ocupe el espacio disponible */
  }
  
  /* Forzar alineación correcta de los íconos */
  .card-icon, .schedule-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /* Evitar que el icono se encoja */
  }
  
  /* Reducir padding general en las tarjetas para móvil */
  .card {
    padding: 15px;
  }
  
  .card-header {
    margin: -15px -15px 15px -15px; /* Ajustar al nuevo padding */
  }
  
  /* Ajustar contenido de servicios para móvil */
  .services-container .service-card {
    width: 100%;
    margin-bottom: 20px;
  }
  
  /* Mejorar espaciado en service-title */
  .service-title {
    padding: 0 8px;
  }
  
  /* Prevenir superposición de texto en enlaces de servicios */
  .service-card .button.secondary {
    white-space: normal; /* Permitir múltiples líneas si es necesario */
    height: auto; /* Altura automática */
    padding: 10px 12px; /* Reducir padding ligeramente */
  }
  
  /* Mejor espaciado para tarjetas en contenedores */
  .schedule-cards-container {
    gap: 15px;
  }
}

/* Para dispositivos muy pequeños */
@media (max-width: 360px) {
  .card h2, 
  .card-header h2, 
  .schedule-header h2 {
    font-size: 1.1rem;
  }
  
  .card-icon, .schedule-icon {
    width: 28px;
    height: 28px;
    min-width: 28px; /* Asegurar que no se comprima */
  }
}

/* ===== MEJORAS PARA DISPOSITIVOS MÓVILES =====
   Agregar este código al final de tu archivo styles.css */

/* Ajustes globales para títulos */
.card h2, 
.schedule-header h2,
.card-header h2,
.form-header h3,
.section-title h4 {
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Asegurar márgenes consistentes en todas las tarjetas */
.card,
.schedule-card,
.service-card {
  margin-bottom: 25px;
}

/* Ajustes de márgenes para contenedores */
.schedule-cards-container,
.services-container {
  margin-bottom: 30px;
}

/* Ajustes para pantallas grandes */
@media (min-width: 992px) {
  .schedule-cards-container {
    display: flex;
    gap: 25px; 
  }
  
  .schedule-card {
    flex: 1;
    min-width: 0; /* Permite que las tarjetas se contraigan en pantallas medianas */
  }
}

/* Ajustes para tablets */
@media (max-width: 991px) and (min-width: 577px) {
  .schedule-cards-container {
    gap: 20px;
  }
  
  .card-header h2, 
  .schedule-header h2 {
    font-size: 1.3rem;
  }
}

/* Mejoras para la sección de reserva en móviles */
@media (max-width: 768px) {
  /* Arreglar espaciado en las cards de servicios en móvil */
  .services-container {
    gap: 25px;
  }
  
  .service-card {
    margin-bottom: 0; /* El gap ya provee el espacio */
  }
  
  .service-card p {
    margin-bottom: 70px; /* Asegurar espacio para el botón */
  }
}

/* Ajustes específicos para móviles */
@media (max-width: 576px) {
  /* Titulos */
  .card-header h2, 
  .schedule-header h2 {
    font-size: 1.1rem;
    line-height: 1.2;
  }
  
  /* Ícono del encabezado ligeramente más pequeño */
  .card-icon, .schedule-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  /* Ajustar padding del header para móviles */
  .card-header, .schedule-header {
    padding: 15px;
    gap: 10px;
  }
  
  /* Mejorar espacio entre tarjetas */
  .card, .schedule-card {
    margin-bottom: 20px;
  }
  
  /* Espacio consistente entre todas las tarjetas */
  .schedule-cards-container {
    gap: 20px;
  }
  
  /* Asegurar que las tarjetas schedule no se peguen */
  .schedule-cards-container > div {
    margin-bottom: 20px;
  }
}

@keyframes pulseEffect {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Ajuste refinado para distanciamiento vertical en schedule-headers */
.schedule-card .schedule-header {
  padding-top: 40px;     /* Incrementado significativamente para crear mayor separación superior */
  padding-bottom: 30px;  /* Mantenemos este valor para equilibrio visual */
  margin: -25px -25px 20px -25px;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ajuste proporcional para dispositivos móviles basado en la escala relativa */
@media (max-width: 576px) {
  .schedule-card .schedule-header {
    padding-top: 35px;    /* Reducido proporcionalmente pero manteniendo la asimetría */
    padding-bottom: 25px;
    margin: -15px -15px 15px -15px;
  }
}

/* Optimización para micro-interacciones en hover state */
.schedule-card:hover .schedule-header {
  transition: padding 0.3s ease-out; /* Transición suave en interacciones */
}