/* SEO-Optimized CSS for Langs.Education */

/* Performance: Critical CSS for above-the-fold content */
body {
    font-display: swap; /* Prevent invisible text during font loading */
}

/* Accessibility & SEO: Focus states */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Skip to main content link for accessibility & SEO */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: #000;
    color: white;
    text-decoration: none;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
}

/* Breadcrumb styling for better UX & SEO */
.breadcrumb {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 0.5rem;
    color: #6c757d;
}

/* Translation results with better visibility */
.translation-results {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem 1rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Example section styling */
.examples-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

/* Optimize images for SEO & Performance */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: #f0f0f0;
}

/* Structured data visual hints (optional, for editors) */
[itemscope] {
    position: relative;
}

/* Language selector optimization */
.dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Mobile-first responsive improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

/* Print styles for SEO & user experience */
@media print {
    .no-print, nav, footer, aside, .btn, button, .dropdown {
        display: none !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Core Web Vitals optimization: Reduce layout shift */
.card {
    min-height: 100px; /* Prevent layout shift */
}

/* Accessibility: 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-width: 0;
}

/* Loading states for better UX */
.overlay {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    z-index: 9999;
    font-size: 1.1rem;
}

/* Modern Search Form Styles */
.modern-search-form {
    position: relative;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-title {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.search-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
}

.modern-input-group {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    overflow: visible;
    transition: all 0.3s ease;
    background: white;
    max-width: 800px;
    margin: 0 auto;
}



.input-group-text {
    border: 2px solid #e2e8f0;
    background: white;
}

/* Animated placeholder */
.form-control::placeholder {
    color: #cbd5e0;
    transition: all 0.3s ease;
}

.form-control:focus::placeholder {
    color: #a0aec0;
    transform: translateX(10px);
}

/* Flag icons in dropdown */
.dropdown-item .flag-icon {
    margin-right: 8px;
}

/* Dropdown menu fix for visibility */
.dropdown-menu.menu-translate-word {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 200px;
    background: white;
    border: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
}

.dropdown-menu.menu-translate-word.show {
    display: block !important;
}

.input-group-append {
    position: relative;
}

/* Responsive adjustments for search */
@media (max-width: 768px) {
    .search-title {
        font-size: 1.75rem;
    }
    
    .search-subtitle {
        font-size: 0.95rem;
    }
    
    .input-group-lg .form-control {
        font-size: 1rem;
    }
}
