/* ==========================================
    FUENTES Y CONFIGURACIÓN GLOBAL
   ========================================== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

body {
  font-family: "Montserrat", "Plus Jakarta Sans", sans-serif;
  background-color: #f8fafc;
}

/* ==========================================
    BACKGROUNDS Y HERO
   ========================================== */
.shared-hero-bg-wrapper {
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
    url("/assets/img/img-precencial-don-guillermo.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  
  /* Mejoras para evitar pixelado */
  image-rendering: -webkit-optimize-contrast; /* Safari */
  image-rendering: -moz-crisp-edges; /* Firefox */
  image-rendering: crisp-edges; /* Estándar */
  image-rendering: optimizeQuality; /* Alternativa */
  
  /* Suavizado adicional */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  
  /* Mejor renderizado */
  will-change: transform;
}

/* Mobile: menos altura */
@media (max-width: 768px) {
  .shared-hero-bg-wrapper {
    background-attachment: scroll;
    background-size: cover;
    background-position: center 30%;
    min-height: 70vh;
    
    /* Optimización específica para móviles */
    image-rendering: auto; /* Mejor en móviles */
    -webkit-transform: none;
    transform: none;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .shared-hero-bg-wrapper {
    background-attachment: scroll;
    background-size: cover;
    background-position: center center;
    min-height: 85vh;
  }
}

/* Desktop */
@media (min-width: 1025px) {
  .shared-hero-bg-wrapper {
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    min-height: 100vh;
  }
}

/* Soporte adicional para pantallas de alta resolución */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .shared-hero-bg-wrapper {
    /* Si tienes una versión de mayor resolución de la imagen */
    background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
      url("/assets/img/img-precencial-don-guillermo.jpg"), /* Imagen de alta resolución */
      url("/assets/img/img-precencial-don-guillermo.jpg"); /* Fallback */
  }
}

.hero-gradient {
  background: linear-gradient(135deg, #fffae6 0%, #ffffff 100%);
}

.gradient-bg {
  background: linear-gradient(135deg, #021e42 0%, #65b7e9 100%);
}

/* ==========================================
   KEYFRAMES Y ANIMACIONES
   ========================================== */
/* Flotación suave */
@keyframes floating {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Aparecer con fade-in */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glow en texto de marca */
@keyframes textGlow {
  0% {
    text-shadow: 0 0 5px rgba(101, 183, 233, 0.5);
  }
  100% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(101, 183, 233, 0.4);
  }
}

/* Pulse animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Preloader pulse */
@keyframes preloader-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* ==========================================
   CLASES DE ANIMACIÓN
   ========================================== */
.floating,
.floating-badge {
  animation: floating 6s ease-in-out infinite;
}

.animate-fadeIn,
.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Delays para animaciones escalonadas */
.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.4s;
}
.delay-3 {
  animation-delay: 0.6s;
}

/* ==========================================
   TIPOGRAFÍA Y TEXTOS
   ========================================== */
.gradient-text {
  background: linear-gradient(90deg, #021e42 0%, #65b7e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-text-section {
  background: linear-gradient(90deg, #021e42 0%, #65b7e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text,
.brand-text-1 {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(2, 30, 66, 0.1);
}

.brand-text:hover,
.brand-text-1:hover {
  animation: textGlow 1.5s ease-in-out infinite alternate;
}

/* ==========================================
   BOTONES CTA
   ========================================== */
.cta-button,
.btn-con-nosotros {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #021e42 0%, #65b7e9 100%);
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(2, 30, 66, 0.25);
  letter-spacing: 0.5px;
}

.cta-button:before,
.btn-con-nosotros:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.6s ease;
}

.cta-button:hover {
  box-shadow: 0 8px 25px rgba(2, 30, 66, 0.4);
}

.cta-button:hover:before,
.btn-con-nosotros:hover:before {
  left: 100%;
}

/* ==========================================
    NAVEGACIÓN Y MENÚ
   ========================================== */
/* Enlaces con efecto underline */
.nav-link {
  position: relative;
  padding-bottom: 4px;
  transition: all 0.3s ease;
}

.nav-link:after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, #021e42, #65b7e9);
  border-radius: 2px;
  transition: width 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-link:hover {
  transform: translateY(-3px);
  font-weight: 600;
}

.nav-link:hover:after {
  width: 100%;
}

/* Menú móvil */
.mobile-menu {
  transform: translateY(-120%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.menu-item {
  transition: all 0.3s ease;
}

.menu-item:hover {
  background-color: rgba(2, 30, 66, 0.05);
  transform: translateX(4px);
  color: #021e42;
  font-weight: 600;
}

.menu-item:hover .icon-hover {
  transform: scale(1.2);
  color: #65b7e9;
}

.hamburger {
  transition: all 0.3s ease;
}

.hamburger.active {
  transform: rotate(90deg);
}

/* Header al hacer scroll */
.header-scroll {
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   LOGO Y BRANDING
   ========================================== */
.logo-container {
  transition: all 0.3s ease;
}

/* ==========================================
   PRELOADER
   ========================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 1s ease;
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preloader-logo {
  width: 140px;
  height: auto;
  animation: preloader-pulse 1.5s ease-in-out infinite;
}

/* ==========================================
   TARJETAS Y EFECTOS HOVER
   ========================================== */
.card-hover {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  position: relative;
}

.card-hover:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
  background: linear-gradient(135deg, #c1dbfd 0%, #c1dbfd 100%);
  transition: opacity 1.5s ease-in-out;
}

.card-hover:hover::before {
  opacity: 1;
}

.card-hover-org {
  position: relative;
  transition: background-color 0.3s ease;
}

.card-hover-org::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
  background: linear-gradient(135deg, #021e42 0%, #65b7e9 100%);
  transition: opacity 1s ease-in-out;
}

.card-hover-org:hover::before {
  opacity: 1;
}

.highlight-card {
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.testimonial-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

/* Tarjetas especializadas */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px 0 rgba(31, 38, 135, 0.12);
}

.info-card {
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.info-card:hover {
  transform: translateY(-5px);
  border-left-color: #3d79a6;
  box-shadow: 0 15px 15px 3px rgba(79, 70, 229, 0.1);
}

.skill-card {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.1);
  border-left-color: #3d79a6;
}

.hover-scale {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 20px -5px rgba(79, 70, 229, 0.2);
}

/* ==========================================
   ÍCONOS Y BADGES
   ========================================== */
.feature-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #021e42 0%, #65b7e9 100%);
  color: white;
  font-size: 20px;
  box-shadow: 0 8px 12px -3px rgba(2, 30, 66, 0.25);
}

.contact-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: #155dfc;
  font-size: 24px;
}

.icon-hover {
  transition: all 0.3s ease;
}

/* ==========================================
   IMÁGENES Y DECORATIVOS
   ========================================== */
.consultorio-image {
  border-radius: 16px;
  box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.2);
  border: 6px solid white;
}

/* ==========================================
   SEPARADORES Y DIVISORES
   ========================================== */
.section-divider {
  height: 2px;
  background: linear-gradient(90deg, rgba(79, 70, 229, 0) 0%, rgba(17, 7, 201, 0.3) 50%, rgba(79, 70, 229, 0) 100%);
}

/* ==========================================
   EFECTOS GLASS Y GRADIENTES
   ========================================== */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================
   FORMAS Y ELEMENTOS DECORATIVOS
   ========================================== */
.wave-shape {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-shape svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 150px;
}

.wave-shape .shape-fill {
  fill: #ffffff;
}

/* ==========================================
   INPUTS Y FORMULARIOS
   ========================================== */
.input-focus:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* ==========================================
   UTILIDADES VARIAS
   ========================================== */
/* Listas con estilo */
.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}
