/* ==========================================
   WCAG 2.2 ACCESSIBILITY ENHANCEMENTS
   Focus visible, keyboard navigation, touch targets
   ========================================== */

/* === KEYBOARD NAVIGATION FOCUS === */
*:focus-visible {
  outline: 2px solid var(--premium-gold, #C8A24F);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Enhanced focus for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--premium-gold, #C8A24F);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(200, 162, 79, 0.15);
}

/* === TOUCH TARGETS (MIN 48x48px) === */
@media (max-width: 768px) {
  button,
  .btn,
  a.btn,
  input[type="submit"],
  input[type="button"] {
    min-height: 48px;
    min-width: 48px;
    padding: 12px 20px;
  }
  
  /* Form inputs touch-friendly */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    min-height: 48px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  /* Nav menu items */
  nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* === HIGH CONTRAST TEXT === */
/* Ensure 4.5:1 contrast ratio for body text */
body {
  color: rgba(255, 255, 255, 0.95); /* Enhanced from 0.85 */
}

.text-secondary,
.hero-description,
.card-description {
  color: rgba(255, 255, 255, 0.85); /* Enhanced from 0.75 */
}

.text-muted {
  color: rgba(255, 255, 255, 0.75); /* Enhanced from 0.6 */
}

/* Links with sufficient contrast */
a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--premium-gold, #C8A24F);
}

/* === FORM ACCESSIBILITY === */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

/* Required field indicator */
.required,
label .required {
  color: var(--premium-gold, #C8A24F);
  font-weight: 600;
}

/* Error states */
input:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(220, 38, 38, 0.5);
}

input:invalid:focus,
select:invalid:focus,
textarea:invalid:focus {
  outline-color: rgba(220, 38, 38, 0.8);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

/* Success states */
input:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: rgba(34, 197, 94, 0.3);
}

/* === SKIP TO CONTENT LINK === */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--premium-gold, #C8A24F);
  color: var(--deep-black, #000);
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.3s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === SCREEN READER ONLY === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* === PRINT STYLES === */
@media print {
  /* Ensure contrast for printed documents */
  body {
    background: white;
    color: black;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  /* Hide non-essential elements */
  nav,
  .btn,
  .mobile-menu-toggle,
  .whatsapp-float,
  footer .social-links {
    display: none !important;
  }
}
