/* Common CSS for all MAEUM pages */
/* Optimized and cleaned version */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fonts */
@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 400;
    src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.woff2') format('woff2');
}
@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 700;
    src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.woff2') format('woff2');
}

/* Base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
}

body.kr {
    font-family: 'Inter', 'NanumSquareNeo', -apple-system, sans-serif;
}

/* Language Toggle - Container only, styles in language.js */
.lang-toggle {
    position: fixed;
    top: 20px;
    right: 40px;
    z-index: 1001; /* Above header but below dropdown menu */
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-right: 100px; /* Space for language dropdown */
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #0066FF;
}

/* Buttons */
.btn-primary {
    background: #0066FF;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary:hover {
    background: #0052CC;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #F5F5F5;
    color: #333;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
}

.btn-secondary:hover {
    background: #E5E5E5;
}

.btn-white {
    background: white;
    color: #0066FF;
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Sections */
.hero {
    padding: 140px 24px 80px;
    text-align: center;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.subtitle {
    font-size: 20px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #999;
    padding: 40px 24px;
    text-align: center;
}

.footer a {
    color: #999;
    text-decoration: none;
    margin: 0 12px;
}

.footer a:hover {
    color: #0066FF;
}

/* Mobile Menu Button - Text Based */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
}

.menu-toggle:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.menu-toggle.active {
    background: #0066FF;
    color: white;
    border-color: #0066FF;
}

/* Menu text content */
.menu-toggle .menu-text {
    display: inline-block;
    transition: all 0.3s ease;
}

.menu-toggle .close-text {
    display: none;
}

.menu-toggle.active .menu-text {
    display: none;
}

.menu-toggle.active .close-text {
    display: inline-block;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 20px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    display: block;
    transform: translateY(0);
}

.mobile-menu a {
    display: block;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-menu a:hover {
    background: #f5f5f5;
}

.mobile-menu a.nav-contact {
    background: #0066FF;
    color: white;
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

.mobile-menu a.nav-contact:hover {
    background: #0052CC;
}

/* Mobile Language Selector */
.mobile-lang-selector {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    margin-top: 10px;
}

.mobile-lang-selector label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.mobile-lang-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mobile-lang-btn {
    padding: 10px;
    border: 1px solid #e5e5e5;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.mobile-lang-btn:hover {
    background: #f5f5f5;
    border-color: #0066FF;
}

.mobile-lang-btn.active {
    background: #0066FF;
    color: white;
    border-color: #0066FF;
}

/* Tablet and Mobile Responsive */
@media (max-width: 768px) {
    /* Hide language toggle on mobile - it will be in the mobile menu */
    .lang-toggle {
        display: none !important;
    }

    .header {
        border-bottom: 1px solid #e5e5e5;
        height: 60px;
    }

    .nav {
        padding: 15px 20px;
        height: 60px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        font-size: 20px;
        flex: 1;
        text-align: left;
    }

    .hero h1 {
        font-size: 36px;
    }

    .nav-links {
        display: none;
        margin-right: 0; /* Reset margin on mobile */
    }

    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1002;
        min-width: auto;
        flex-shrink: 0;
    }

    .section-title {
        font-size: 28px;
    }

    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }

    /* Footer responsive */
    .footer {
        padding: 30px 20px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav {
        padding: 12px 16px;
    }

    .logo {
        font-size: 18px;
    }

    .menu-toggle {
        padding: 6px 12px;
        font-size: 13px;
    }

    .mobile-menu {
        padding: 16px;
        top: 54px; /* Adjust for smaller header */
    }

    .mobile-menu a {
        padding: 12px 16px;
        font-size: 15px;
    }

    .hero h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 16px;
        line-height: 1.4;
    }

    .hero {
        padding: 90px 16px 50px;
    }

    /* Button adjustments for mobile */
    .btn-primary,
    .btn-secondary,
    .btn-white {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .logo {
        font-size: 16px;
    }

    .menu-toggle {
        padding: 5px 10px;
        font-size: 12px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }
}
