/* Accessibility Improvements */

/* Skip Navigation Link */
.skip-nav {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
}

.skip-nav:focus {
  top: 0;
}

/* Focus Indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid #0056b3;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid currentColor;
  }
  
  .service-card,
  .testimonial-card {
    border: 2px solid #333;
  }
}

/* Screen Reader Only Text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced Motion Support */
@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;
  }
  
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* Improved Form Labels */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Required Field Indicators */
.required::after {
  content: " *";
  color: #c41230;
  font-weight: bold;
}

/* Error Messages */
.error-message {
  color: #c41230;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Success Messages */
.success-message {
  color: #28a745;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Keyboard Navigation Indicators */
.nav-link:focus {
  background-color: rgba(0, 86, 179, 0.1);
  text-decoration: underline;
}

/* Better Button States */
button:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Improved Link Underlines */
main a:not(.btn):not(.nav-link) {
  text-decoration: underline;
  text-decoration-skip-ink: auto;
}

/* Better Color Contrast for Placeholders */
::placeholder {
  color: #6c757d;
  opacity: 1;
}

/* Improved Focus for Cards */
.service-card:focus-within,
.testimonial-card:focus-within {
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.5);
}

/* ARIA Live Region Styles */
[aria-live="polite"],
[aria-live="assertive"] {
  position: relative;
}

/* Improved Icon Buttons */
button[aria-label] svg,
a[aria-label] svg {
  pointer-events: none;
}

/* Better Touch Targets */
@media (pointer: coarse) {
  a,
  button,
  input,
  select,
  textarea {
    min-height: 44px;
    min-width: 44px;
  }
}