/* Accessibility Improvements for Rechnung.best */

/* Improved Font Sizes and Readability */
body {
    font-size: 16px; /* Base font size increased from default */
    line-height: 1.6; /* Better line spacing for readability */
}

/* Better contrast for text on colored backgrounds */
.hero .subtitle {
    color: rgba(255, 255, 255, 0.98); /* Increased opacity for better contrast */
    font-size: 1.5rem; /* Increased from 1.4rem */
}

.app-features .subtitle {
    font-size: 1.3rem; /* Increased from 1.2rem */
    color: #4a5568; /* Darker gray for better contrast */
}

.mobile-features .subtitle {
    font-size: 1.3rem; /* Increased from 1.2rem */
    opacity: 0.9; /* Better contrast */
}

/* Improved button accessibility */
.btn {
    min-height: 48px; /* Meet touch target size requirements */
    font-size: 1.1rem; /* Larger font for better readability */
    font-weight: 600;
    border: 2px solid transparent; /* Better focus indication */
}

.btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.btn-primary:focus {
    outline-color: #fff;
}

/* Improved navigation accessibility */
.nav-links a {
    font-size: 1rem; /* Increased from default */
    min-height: 44px; /* Touch target size */
    display: flex;
    align-items: center;
}

.nav-links a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Feature cards improvements */
.feature-card h3 {
    font-size: 1.5rem; /* Increased from 1.4rem */
    color: #1a202c; /* Better contrast */
}

.feature-card p {
    font-size: 1.1rem; /* Increased from 1rem */
    color: #4a5568; /* Better contrast than original #6e6e73 */
    line-height: 1.7; /* Better line spacing */
}

.mobile-card h3 {
    font-size: 1.4rem; /* Increased from 1.3rem */
}

.mobile-card p {
    font-size: 1.1rem; /* Increased from default */
    line-height: 1.6;
}

/* Footer improvements */
.footer-links a {
    font-size: 1rem; /* Increased from default */
    color: #cbd5e0; /* Better contrast than #a0a0a0 */
    min-height: 44px; /* Touch target size */
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Form accessibility improvements */
input, select, textarea {
    font-size: 1rem; /* Ensure readable font size */
    min-height: 48px; /* Touch target size */
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

label {
    font-size: 1rem; /* Increased font size */
    font-weight: 600;
    color: #2d3748; /* Better contrast */
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    font-size: 1rem;
}

.skip-link:focus {
    top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero {
        background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
    }
    
    .feature-card {
        border: 2px solid #2d3748;
    }
    
    .btn-secondary {
        border: 2px solid #2d3748;
        color: #1a202c;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .feature-card:hover,
    .mobile-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .app-features {
        background: rgba(26, 32, 44, 0.95);
        color: #e2e8f0;
    }
    
    .feature-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .feature-card h3 {
        color: #f7fafc;
    }
    
    .feature-card p {
        color: #cbd5e0;
    }
}

/* Large text support */
@media (min-width: 1200px) {
    .hero h1 {
        font-size: 4.2rem; /* Increased for better readability on large screens */
    }
    
    .hero .subtitle {
        font-size: 1.6rem;
    }
    
    .feature-card p {
        font-size: 1.2rem;
    }
}

/* Mobile accessibility improvements */
@media (max-width: 768px) {
    body {
        font-size: 18px; /* Larger base font for mobile */
    }
    
    .hero h1 {
        font-size: 3rem; /* Ensure good size on mobile */
    }
    
    .hero .subtitle {
        font-size: 1.4rem;
    }
    
    .btn {
        min-height: 52px; /* Larger touch targets on mobile */
        font-size: 1.2rem;
    }
    
    .nav-links a,
    .footer-links a {
        min-height: 48px;
        font-size: 1.1rem;
    }
}

/* Focus indicators for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Ensure sufficient color contrast for all text */
.app-badge {
    color: rgba(255, 255, 255, 0.95); /* Better contrast */
}

.cta p {
    color: rgba(255, 255, 255, 0.98); /* Better contrast */
}

/* Screen reader only content */
.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;
}

/* Improved emoji accessibility */
[role="img"] {
    speak: never;
}

/* Better modal accessibility */
.legal-modal {
    display: none;
}

.legal-modal.show {
    display: flex;
}

.legal-modal-content {
    max-height: 85vh;
    overflow-y: auto;
}

.legal-modal-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    background: #f3f4f6;
}

/* Ensure interactive elements are large enough */
.plan-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Better error and success message visibility */
.error {
    border-left: 4px solid #e53e3e;
    font-weight: 500;
}

.success {
    border-left: 4px solid #38a169;
    font-weight: 500;
}