/* CSS Variables for Design System */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

    body.menu-open {
        overflow: hidden;
    }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Modern Layout */
.modern-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.modern-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    height: 40px;
    width: auto;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    display: none;
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

    .nav-link:hover,
    .nav-link.active {
        color: white;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }

        .nav-link.active::after {
            content: '';
            position: absolute;
            bottom: -1rem;
            left: 50%;
            transform: translateX(-50%);
            width: 4px;
            height: 4px;
            background: white;
            border-radius: 50%;
        }

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-outline-light {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

    .btn-outline-light:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

.btn-link {
    background: none;
    border: none;
    padding: 0.5rem;
}

.language-selector {
    display: flex;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-brand-logo {
    height: 32px;
}

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.mobile-nav {
    padding: 1rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

    .mobile-nav-link:hover {
        background: var(--bg-tertiary);
        color: var(--primary-color);
    }

    .mobile-nav-link.featured {
        background: var(--primary-color);
        color: white;
        margin: 0 1rem;
        border-radius: var(--radius-md);
    }

        .mobile-nav-link.featured:hover {
            background: var(--primary-dark);
            color: white;
        }

.mobile-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    min-height: 0;
}

/* Footer */
.modern-footer {
    background: var(--text-primary);
    color: white;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 3rem 0;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    height: 40px;
    width: 116px;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.875rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h6 {
    color: white;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.footer-column a,
.footer-column span {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

    .footer-column a:hover {
        color: white;
    }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

    .footer-bottom p {
        margin: 0;
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.875rem;
    }

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .social-link:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-2px);
    }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .loading-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error UI */
.error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    padding: 1rem;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-xl);
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.reload-btn {
    color: white;
    text-decoration: underline;
    font-weight: 500;
}

.dismiss-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }

    .brand-text {
        display: block;
    }

    .main-nav,
    .header-actions .language-selector {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}
