/* ============================================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================================ */

/* Enhanced Focus Styles */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Skip Links - Hidden by default, visible on focus */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: #000;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 0 0 8px 0;
    transition: top 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.skip-link:focus {
    top: 0;
    opacity: 1;
    pointer-events: auto;
}

/* 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;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #fff;
    }
    
    .feature-card,
    .review-card {
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    a:focus {
        outline: 3px solid #fff;
    }
}

/* 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;
    }
    
    .hero,
    .package-card-tiktok,
    .feature-card {
        animation: none !important;
    }
}

/* Dark Mode Support (Future) */
@media (prefers-color-scheme: light) {
    /* Light mode styles will be added here */
}

/* Keyboard Navigation Indicators */
.keyboard-user *:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Touch Target Size (Minimum 44x44px) */
button,
a,
input[type="button"],
input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
}

/* Color Contrast Helpers */
.text-contrast-high {
    color: #ffffff;
    background: #000000;
}

.text-contrast-medium {
    color: var(--text-white);
    background: var(--bg-dark);
}

/* Focus Trap for Modals */
.modal-open {
    overflow: hidden;
}

.modal-open .modal-backdrop {
    position: fixed;
    inset: 0;
}

/* ARIA Live Regions */
[aria-live="polite"],
[aria-live="assertive"] {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Disabled State Clarity */
button:disabled,
input:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Link Underlines for Clarity - Only for text links */
a:not(.btn-primary):not(.btn-secondary):not(.nav-link):not(.logo):not(.sidebar-link):not(.btn-package-tiktok):not(.floating-wa) {
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s;
}

a:not(.btn-primary):not(.btn-secondary):not(.nav-link):not(.logo):not(.sidebar-link):not(.btn-package-tiktok):not(.floating-wa):hover,
a:not(.btn-primary):not(.btn-secondary):not(.nav-link):not(.logo):not(.sidebar-link):not(.btn-package-tiktok):not(.floating-wa):focus {
    text-decoration-color: currentColor;
}

/* Print Accessibility */
@media print {
    .skip-link,
    .sr-only {
        position: static;
        width: auto;
        height: auto;
        clip: auto;
    }
}
