/* ==============================================
   MEJORAS UI/UX - HEADER Y NAVEGACIÓN
   ============================================== */

/* Header mejorado con glassmorphism sutil */
.header {
  background: rgba(45, 106, 79, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

/* Header con scroll (más compacto y opaco) */
.header.scrolled {
  padding: 0.5rem 0;
  background: rgba(45, 106, 79, 0.98);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

/* Mejorar selector de idioma */
.language-switch-container {
  position: relative;
}

.language-switch {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.language-switch:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.language-switch:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* Nav links mejorados */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #d4af37;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
  left: 0;
}

.nav-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Logo más destacado */
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  font-size: var(--font-size-lg);
}

/* ==============================================
   STICKY CTA BUTTON (MOBILE)
   ============================================== */
.sticky-cta-mobile {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(45, 106, 79, 0.98) 0%, rgba(45, 106, 79, 0.95) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  z-index: 997;
  border-top: 2px solid rgba(212, 175, 55, 0.3);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sticky-cta-button {
  width: 100%;
  background: linear-gradient(135deg, #2e7d62 0%, #2a5e48 100%);
  color: white;
  padding: 14px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(46, 125, 98, 0.4);
  transition: all 0.3s ease;
  border: none;
}

.sticky-cta-button:active {
  transform: scale(0.97);
}

/* Mostrar solo en mobile cuando se hace scroll */
@media (max-width: 768px) {
  .sticky-cta-mobile.show {
    display: block;
  }
}

/* ==============================================
   MEJORAS DE ACCESIBILIDAD
   ============================================== */

/* Skip to main content (para usuarios de screen readers) */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: #2e7d62;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: 1001;
  transition: top 0.3s;
}

.skip-to-main:focus {
  top: 0;
  outline: 3px solid #d4af37;
  outline-offset: 2px;
}

/* Mejorar contraste en modo de alto contraste */
@media (prefers-contrast: high) {
  .header {
    background: #2D6A4F;
    border-bottom: 3px solid #ffffff;
  }
  
  .nav-link {
    font-weight: 600;
  }
  
  .btn-primary,
  .btn-secondary {
    border-width: 3px;
  }
}

/* Reducir movimiento para usuarios sensibles */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .whatsapp-float {
    animation: none !important;
  }
}

/* ==============================================
   MEJORAS RESPONSIVE
   ============================================== */

@media (max-width: 768px) {
  /* Ajustar WhatsApp button para no chocar con sticky CTA */
  .sticky-cta-mobile.show ~ .whatsapp-float {
    bottom: 6.5rem;
  }
  
  /* Header más compacto en mobile */
  .header {
    padding: 0.75rem 0;
  }
  
  .nav-logo {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .sticky-cta-button {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
}
