/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: #666;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    color: #333;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #2563eb;
}

.language-selector {
    position: relative;
}

.language-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.language-dropdown.active {
    display: block;
}

.language-option {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.language-option:hover {
    background-color: #f8fafc;
    color: #2563eb;
}

.language-option:last-child {
    border-bottom: none;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #666;
    border: 1px solid #e2e8f0;
}

.btn-outline:hover {
    background: #f8fafc;
    color: #2563eb;
    border-color: #2563eb;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Quick Navigation */
.quick-nav {
    padding: 4rem 0;
    background: #f8fafc;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.nav-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.nav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    color: inherit;
}

.nav-card h3 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.bg-light {
    background: #f8fafc;
}

/* Tabs */
.continent-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: #2563eb;
    color: #fff;
}

.continent-panel {
    display: none;
}

.continent-panel.active {
    display: block;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.country-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.country-card h4 {
    color: #2563eb;
    margin-bottom: 1rem;
}

.country-card ul {
    list-style: none;
}

.country-card li {
    margin-bottom: 0.5rem;
}

.country-card a {
    color: #666;
    transition: color 0.3s ease;
}

.country-card a:hover {
    color: #2563eb;
}

/* Companies Section */
.company-filters {
    margin-bottom: 2rem;
}

.company-filters select {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 1rem;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.company-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.company-card h4 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.company-region {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Knowledge Section */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.knowledge-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.knowledge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.knowledge-card h3 a {
    color: #333;
    text-decoration: none;
}

.knowledge-card h3 a:hover {
    color: #2563eb;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.difficulty {
    background: #e0f2fe;
    color: #0277bd;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.read-time {
    color: #666;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #1e293b;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    text-align: center;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .continent-tabs {
        justify-content: center;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .nav-grid,
    .country-grid,
    .companies-grid,
    .knowledge-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Performance Optimizations */
.nav-card,
.company-card,
.knowledge-card {
    will-change: transform;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.tab-btn:focus,
.language-btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}