/* Reset & Base Styles */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { font-size: 16px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; color: #333; background: #fff; }

/* Typography */
h1, h2, h3 { font-weight: 600; color: #111; }
h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1.5rem; }
h2 { font-size: 1.75rem; margin-top: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; }
ul, ol { margin-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
em { font-style: italic; }
strong { font-weight: 700; }

/* Layout */
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* Navigation */
.site-nav { background: #fff; border-bottom: 1px solid #eee; padding: 1rem 0; position: sticky; top: 0; z-index: 100; }
.site-nav .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: #111; text-decoration: none; }
.nav-links { display: flex; list-style: none; gap: 1.5rem; align-items: center; }
.nav-links a { color: #666; text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: #111; text-decoration: underline; }

/* Language Switcher - Regional Grouping */
.lang-switcher { position: relative; }
.lang-btn { background: none; border: 1px solid #ddd; border-radius: 4px; padding: 0.3rem 0.75rem; font-size: 0.85rem; color: #666; cursor: pointer; display: flex; align-items: center; gap: 0.4rem; transition: all 0.2s ease; font-family: inherit; white-space: nowrap; }
.lang-btn:hover { border-color: #999; color: #333; }
.lang-btn::after { content: ''; display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; margin-left: 0.25rem; transition: transform 0.2s ease; }
.lang-switcher.open .lang-btn::after { transform: rotate(180deg); }

/* Main Dropdown */
.lang-dropdown { display: none; position: absolute; top: 100%; right: 0; background: #fff; border: 1px solid #eee; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); min-width: 200px; max-width: 240px; margin-top: 0.5rem; z-index: 1000; max-height: 80vh; overflow-y: auto; }
.lang-switcher.open .lang-dropdown { display: block; }

/* Region list container */
.lang-region-list { list-style: none; margin: 0; padding: 0; }

/* Region Items */
.lang-region { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid #eee; position: relative; }
.lang-region:last-child { border-bottom: none; }
.region-label { display: block; padding: 0.5rem 0.9rem; font-size: 0.7rem; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: 0.05em; background: #f8f9fa; cursor: default; white-space: nowrap; }

/* Submenu - nested within dropdown */
.lang-submenu { display: none; list-style: none; margin: 0; padding: 0; background: #fff; }
.lang-submenu.show { display: block; }
.lang-submenu li { margin: 0; }
.lang-submenu a { display: block; padding: 0.4rem 0.9rem 0.4rem 1.5rem; font-size: 0.82rem; color: #333; text-decoration: none; transition: background 0.15s ease; white-space: nowrap; }
.lang-submenu a:hover { background: #f8f9fa; text-decoration: none; }
.lang-submenu a.active { background: #f0f4ff; color: #2563eb; font-weight: 500; }

/* Hover indicator for regions */
.lang-region:hover { background: #f0f4ff; }
.lang-region:hover .region-label { color: #2563eb; }

/* Main content area */
.content { padding: 3rem 0; }

/* Project Grid */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; }
.project-card { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 1.5rem; }
.project-card h3 { margin-top: 0; }
.project-card p { color: #666; margin-bottom: 1rem; }

/* Footer */
.site-footer { background: #f8f9fa; border-top: 1px solid #eee; padding: 2rem 0; margin-top: 4rem; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-info, .footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: #666; font-size: 0.9rem; }
.footer-links a:hover { color: #111; text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .site-nav .container { flex-direction: column; gap: 1rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
    .lang-dropdown { right: -20px; max-width: 220px; }
}
