/* ==========================================================================
   Accessibility Styles for EU Compliance (WCAG 2.1 AA)
   ========================================================================== */

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 4px;
    font-weight: bold;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
    outline: 3px solid #00d4ff;
    outline-offset: 2px;
}

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

/* Focus Indicators */
*:focus {
    outline: 3px solid #00d4ff;
    outline-offset: 2px;
}

/* High contrast focus for buttons and links */
.btn:focus,
.nav-link:focus,
.social-link:focus,
a:focus {
    outline: 3px solid #00d4ff;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.3);
}

/* Ensure interactive elements are large enough (44px minimum) */
.btn,
.nav-link,
.nav-toggle,
.scroll-indicator,
.gallery-btn,
.social-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Improve color contrast for text */
.hero-subtitle,
.section-subtitle,
.feature-description,
.mode-content p,
.detail-item p {
    color: #e0e0e0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Ensure sufficient contrast for links */
a {
    color: #00d4ff;
    text-decoration: underline;
}

a:hover,
a:focus {
    color: #33e0ff;
    text-decoration: underline;
}

/* Navigation improvements */
.nav-toggle {
    background: transparent;
    border: 2px solid #00d4ff;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle:focus {
    background: rgba(0, 212, 255, 0.1);
}

.nav-toggle[aria-expanded="true"] {
    background: rgba(0, 212, 255, 0.2);
}

/* Improve button accessibility */
button {
    cursor: pointer;
    border: none;
    background: transparent;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading indicator accessibility */
.preloader[aria-hidden="true"] {
    display: none;
}

/* Video accessibility */
video {
    outline: none;
}

video:focus {
    outline: 3px solid #00d4ff;
    outline-offset: 2px;
}

/* Form elements (if any are added later) */
input,
textarea,
select {
    border: 2px solid #333;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px;
    border-radius: 4px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #00d4ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
}

/* Error states */
.error {
    color: #ff6b6b;
    border-color: #ff6b6b !important;
}

.error:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

/* Success states */
.success {
    color: #51cf66;
    border-color: #51cf66 !important;
}

/* 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;
    }
    
    .hero-video {
        animation: none !important;
    }
    
    .floating-element,
    .logo-particles,
    .hero-particles {
        animation: none !important;
        transform: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-subtitle,
    .section-subtitle,
    .feature-description {
        color: #ffffff;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
    }
    
    .btn {
        border: 2px solid #ffffff;
    }
    
    .nav-link {
        border-bottom: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        border-bottom-color: #00d4ff;
    }
}

/* Dark mode support (default is dark, but ensuring consistency) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #000;
        color: #fff;
    }
}

/* Light mode support for users who prefer it */
@media (prefers-color-scheme: light) {
    .hero-subtitle,
    .section-subtitle,
    .feature-description {
        color: #333;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    }
}

/* Keyboard navigation improvements */
.nav-menu a:focus,
.hero-cta a:focus,
.hero-cta button:focus {
    position: relative;
    z-index: 10;
}

/* Ensure text is readable over backgrounds - removed black box styling */

/* Mobile accessibility improvements */
@media (max-width: 768px) {
    .skip-link:focus {
        top: 10px;
        left: 10px;
        right: 10px;
        text-align: center;
    }
    
    .btn,
    .nav-link {
        min-height: 48px;
        min-width: 48px;
        font-size: 16px;
    }
    
    .nav-toggle {
        min-height: 48px;
        min-width: 48px;
    }
}

/* Print styles for accessibility */
@media print {
    .skip-link,
    .nav-toggle,
    .hero-video,
    .hero-particles-container,
    .morphing-bg,
    .floating-elements {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: blue !important;
        text-decoration: underline !important;
    }
    
    .hero-title,
    .section-title {
        color: black !important;
        text-shadow: none !important;
    }
}

/* Focus trap for modals */
.modal-open {
    overflow: hidden;
}

.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Ensure proper heading hierarchy */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Language direction support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-cta {
    flex-direction: row-reverse;
}
