/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif KR', serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    color: #333;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

.font-korean {
    font-family: 'Noto Serif KR', serif;
}

.font-elegant {
    font-family: 'Cormorant Garamond', serif;
}

/* Background Colors */
.bg-white { background-color: #ffffff; }
.bg-gray-50 {
    background-color: #f9fafb;
    padding: 20px;
}
.bg-gray-700 { background-color: #374151; }
.bg-gray-900 { background-color: #111827; }

/* Text Colors */
.text-white { color: #ffffff; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }

/* Typography */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }

.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.text-center { text-align: center; }
.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* Spacing */
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }

.p-12 { padding: 3rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-20 { margin-bottom: 5rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.ml-6 { margin-left: 1.5rem; }

/* Borders */
.border-t { border-top: 1px solid #e5e7eb; }
.border-gray-700 { border-color: #374151; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows */
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }

/* Flex & Grid */
.flex { /*display: flex;*/ }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Width & Height */
.w-full { width: 100%; }
.w-16 { width: 64px; }
.w-64 { width: 320px; }
.h-10 { height: 2.5rem; }
.h-16 { height: 64px; }
.h-64 { height: 320px; }
.h-auto { height: auto; }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Opacity */
.opacity-90 { opacity: 0.9; }

/* Transitions */
.transition { transition: all 0.3s ease; }

/* ===== HEADER NAVIGATION (UNIFIED) ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.3s ease;
    background-color: transparent;
}

.header.scrolled {
    background-color: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

@media (min-width: 768px) {
    .header.scrolled {
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-logo-img {
    height: 5rem;
    transition: opacity 0.3s;
}

.header-logo:hover .header-logo-img {
    opacity: 0.9;
}

/* Logo size adjustment for scrolled state */
.header.scrolled .header-logo-img {
    height: 4rem;
}

/* Desktop Navigation */
.header-nav {
    display: none;
    align-items: center;
    gap: 2.5rem;
    flex: 1;
    justify-content: center;
}

.header-link {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.header:not(.scrolled) .header-link {
    color: #ffffff;
}

.header:not(.scrolled) .header-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.header.scrolled .header-link {
    color: #1f2937;
}

.header.scrolled .header-link:hover {
    color: #4338ca;
}

.header-link.active {
    font-weight: 500;
}

.header-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: currentColor;
}

/* Language Selector */
.lang-selector {
    display: none;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 320px;
}

.lang-btn {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s;
    letter-spacing: 0.02em;
}

.header:not(.scrolled) .lang-btn {
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.1);
}

.header:not(.scrolled) .lang-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
}

.header.scrolled .lang-btn {
    color: #6b7280;
    background-color: #f3f4f6;
}

.header.scrolled .lang-btn:hover {
    color: #1f2937;
    background-color: #e5e7eb;
}

.lang-btn.active {
    font-weight: 600;
}

.header:not(.scrolled) .lang-btn.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.25);
}

.header.scrolled .lang-btn.active {
    color: #ffffff;
    background-color: #4338ca;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s;
}

.header:not(.scrolled) .mobile-menu-btn {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.header:not(.scrolled) .mobile-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 모바일: 스크롤해도 햄버거 버튼 흰색 유지 */
.header.scrolled .mobile-menu-btn {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.header.scrolled .mobile-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 데스크톱: 스크롤시 어두운 색상 */
@media (min-width: 768px) {
    .header.scrolled .mobile-menu-btn {
        color: #1f2937;
        background-color: #f3f4f6;
    }

    .header.scrolled .mobile-menu-btn:hover {
        background-color: #e5e7eb;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    display: flex;
    max-height: 500px;
}

.mobile-link {
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:hover,
.mobile-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding-left: 2rem;
}

.mobile-link.active {
    font-weight: 500;
    border-left: 3px solid #4338ca;
}

/* Mobile Language Selector */
.mobile-lang {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.3);
}

.mobile-lang a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.375rem;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    text-align: center;
    white-space: nowrap;
}

.mobile-lang a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-lang a.active {
    color: #ffffff;
    background-color: #4338ca;
    font-weight: 500;
}

/* ===== FOOTER ===== */
.footer {
    background-color: #111827;
    color: #ffffff;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-logo {
    height: 6rem;
    margin: 0 auto 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-info {
    font-size: 0.875rem;
    line-height: 1.8;
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.footer-icon-link {
    background-color: rgba(255, 255, 255, 0.1);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-icon-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2.5rem;
    margin-top: 1rem;
    text-align: center;
}

.footer-powered {
    font-size: 0.75rem;
    color: #9ca3af;
    transition: color 0.3s;
}

.footer-powered:hover {
    color: #ffffff;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    .header-nav,
    .lang-selector {
        display: flex;
    }

    .mobile-menu-btn {
        display: none;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:text-5xl {
        font-size: 3rem;
    }

    .md\:text-8xl {
        font-size: 6rem;
    }

    .md\:text-2xl {
        font-size: 1.5rem;
    }

    .md\:text-xl {
        font-size: 1.25rem;
    }

    .md\:order-1 {
        order: 1;
    }

    .md\:order-2 {
        order: 2;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-contact {
        justify-content: flex-end;
    }
}

@media (min-width: 1024px) {
    .text-6xl {
        font-size: 4.5rem;
    }
}
