/**
 * Multilingual 404 Page Styles
 * Supports all languages: EN, ES, FR, IT, DE, NL
 */

/* Main 404 Container */
.error-404.not-found {
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Error Illustration */
.error-illustration {
    margin-bottom: 30px;
}

.error-illustration img {
    max-width: 300px;
    height: auto;
    opacity: 0.8;
}

/* Typography */
.error-404 .page-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.error-description {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Container */
.search-container {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #e9ecef;
}

.search-container p {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Search Form Styles */
.search-form {
    max-width: 500px;
    margin: 0 auto;
}

.search-form-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.search-form label {
    flex: 1;
    margin: 0;
}

.search-form .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.search-form .search-field {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: transparent;
}

.search-form .search-field:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-form .search-field::placeholder {
    color: #adb5bd;
}

.search-form .search-submit {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

.search-form .search-submit:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    transform: translateX(-2px);
}

.search-form .search-submit svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Old search styles for backward compatibility */
.search-container input[type="search"] {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-container input[type="search"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-container button[type="submit"] {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-container button[type="submit"]:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* Action Buttons */
.action-buttons {
    margin-bottom: 50px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons .button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 180px;
}

.home-button {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.home-button:hover {
    background: #005a87;
    border-color: #005a87;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 124, 186, 0.3);
}

.browse-button {
    background: transparent;
    color: #007cba;
    border-color: #007cba;
}

.browse-button:hover {
    background: #007cba;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 124, 186, 0.3);
}

/* Popular Categories */
.popular-categories {
    text-align: left;
}

.popular-categories h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-item {
    display: block;
    text-decoration: none;
    background: white;
    border-radius: 15px;
    padding: 15px;
    transition: all 0.3s ease;
    border: 2px solid #f8f9fa;
    text-align: center;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #007cba;
}

.category-image {
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 10px;
}

.category-image img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-item:hover .category-image img {
    transform: scale(1.1);
}

.category-name {
    display: block;
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.3;
}

.category-item:hover .category-name {
    color: #007cba;
}

/* Language-Specific Adjustments */
.error-404[data-lang="de"] .page-title,
.error-404[data-lang="nl"] .page-title {
    font-size: 2.2rem; /* Slightly smaller for longer German/Dutch titles */
}

.error-404[data-lang="fr"] .error-description,
.error-404[data-lang="it"] .error-description {
    font-size: 1.05rem; /* Slightly smaller for longer Romance language descriptions */
}

/* Responsive Design */
@media (max-width: 768px) {
    .error-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .error-404 .page-title {
        font-size: 2rem;
    }
    
    .error-description {
        font-size: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons .button {
        width: 100%;
        max-width: 280px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .error-illustration img {
        max-width: 250px;
    }
    
    /* Search form responsive */
    .search-form .search-submit-text {
        display: none;
    }
    
    .search-form .search-submit {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .error-404.not-found {
        padding: 40px 15px;
    }
    
    .error-content {
        padding: 25px 15px;
    }
    
    .error-404 .page-title {
        font-size: 1.8rem;
    }
    
    .search-container {
        padding: 20px 15px;
    }
    
    .search-form .search-field {
        padding: 14px 18px;
        font-size: 0.95rem;
    }
    
    .search-form .search-submit {
        padding: 14px 18px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .error-illustration img {
        max-width: 200px;
    }
}

/* RTL Support (for future Arabic/Hebrew support) */
[dir="rtl"] .search-container button[type="submit"] {
    right: auto;
    left: 5px;
}

[dir="rtl"] .category-grid {
    direction: rtl;
}

/* Print Styles */
@media print {
    .error-404.not-found {
        background: white;
        box-shadow: none;
    }
    
    .action-buttons,
    .search-container {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .error-content {
        border: 3px solid #000;
    }
    
    .action-buttons .button {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .category-item,
    .action-buttons .button,
    .search-container input[type="search"] {
        transition: none;
    }
    
    .category-item:hover {
        transform: none;
    }
    
    .action-buttons .button:hover {
        transform: none;
    }
}