/* =========================================
   Variables & Reset
   ========================================= */
:root {
    --primary-color: #0056b3; 
    --primary-hover: #004494;
    --text-dark: #111111;
    --text-light: #555555;
    --bg-white: #ffffff;
    --nav-height: 90px;
    --nav-scrolled-height: 90px; 
    --transition-speed: 0.3s;
    --shadow-sm: 0 4px 20px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 40px rgba(0,0,0,0.08);
}

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

body.no-scroll {
    overflow: hidden;
}

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

ul {
    list-style: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================
   기본 설정 및 폰트
   ============================================ */
@font-face {
    font-family: 'GmarketSansMedium';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'GmarketSansLight';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansLight.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'GmarketSansBold';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'GmarketSansMedium', sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
}

/* =========================================
   Header & Navigation
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: transparent;
    transition: all var(--transition-speed) cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1000;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    height: var(--nav-scrolled-height);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.header-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 80px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo img {
    height: 35px;
    width: auto;
    transition: transform var(--transition-speed) ease, filter var(--transition-speed) ease;
}

.logo:hover img {
    transform: scale(1.02);
}

/* Mobile Menu Toggle (Hamburger) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* Breathing room */
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Above drawer */
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 16px; /* Elegant slim ratio */
}

.menu-text {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--text-dark);
    display: none; /* Hidden on mobile */
    transition: color 0.3s ease;
}

.header.scrolled .menu-text {
    color: var(--text-dark);
}

@media (min-width: 1024px) {
    .menu-toggle {
        padding: 14px 20px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 4px;
        gap: 12px;
        transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .header.scrolled .menu-toggle {
        border-color: rgba(0, 0, 0, 0.15);
    }

    .hamburger-icon {
        width: 38px;
        height: 18px;
    }

    .menu-text {
        display: block;
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    /* Premium invert hover effect */
    .menu-toggle:hover {
        background-color: var(--text-dark);
        border-color: var(--text-dark);
    }
    
    .menu-toggle:hover .menu-text {
        color: var(--bg-white);
    }
    
    .menu-toggle:hover .hamburger-icon .line {
        background-color: var(--bg-white);
    }
}

.hamburger-icon .line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center;
    border-radius: 2px;
}

.header.scrolled .hamburger-icon .line {
    background-color: var(--text-dark);
}

/* Ensure lines remain dark when drawer is open and overlaying white background */
.menu-toggle.active .hamburger-icon .line {
    background-color: var(--text-dark) !important;
}

@media (min-width: 1024px) {
    .menu-toggle.active:hover .hamburger-icon .line {
        background-color: var(--bg-white) !important;
    }
}

/* Elegant asymmetry with middle line shorter, aligned to right */
.hamburger-icon .line:nth-child(2) {
    width: 60%;
    margin-left: auto;
}

/* Expands on hover to create a slight animation */
.menu-toggle:hover .hamburger-icon .line:nth-child(2) {
    width: 100%;
}

.menu-toggle.active .hamburger-icon .line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .hamburger-icon .line:nth-child(2) {
    opacity: 0;
    width: 100%;
}

.menu-toggle.active .hamburger-icon .line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* =========================================
   Mobile Drawer Navigation
   ========================================= */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 450px; /* Slightly wider for desktop viewing capability */
    height: 100vh;
    background-color: var(--bg-white);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    padding-top: var(--nav-height);
    overflow-y: auto;
}

.mobile-drawer.active {
    right: 0;
}

.drawer-inner {
    padding: 20px 30px;
}

.mobile-nav-item {
    border-bottom: 1px solid #f1f1f1;
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    font-size: 1.05rem; /* Slightly smaller and refined */
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    color: var(--primary-color);
}

.mobile-nav-link i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
    color: var(--text-light);
}

.mobile-nav-link.active i {
    color: var(--primary-color);
}

.mobile-dropdown-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fafafa;
    border-radius: 8px;
    margin-bottom: 0;
}

.mobile-dropdown-list li {
    border-top: 1px solid #f1f1f1;
}

.mobile-dropdown-list li:first-child {
    border-top: none;
}

.mobile-sublink {
    display: block;
    position: relative;
    padding: 15px 20px;
    font-size: 1rem;
    color: #333333;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    font-weight: 400;
}

.mobile-sublink::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1.5px;
    background-color: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.mobile-sublink:hover {
    color: var(--primary-color);
    background-color: #f8fafc;
    padding-left: 35px; /* Pushes text right to make room for the line */
}

.mobile-sublink:hover::before {
    width: 15px; /* Elegant line slides in */
}


/* =========================================
   Footer (hmgroup style)
   ========================================= */
.site-footer {
    margin-top: 0;
    background-color: #212529;
    border-top: 1px solid #343a40;
    padding: 60px 0 40px;
    font-size: 0.9rem;
    color: #f8f9fa;
}

.footer-inner {
    max-width: 1760px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-info p {
    font-family: 'GmarketSansLight', sans-serif;
    margin: 0 0 8px 0;
    color: #ced4da;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-info .divider {
    margin: 0 8px;
    color: #6c757d;
    font-weight: 300;
}

.footer-copyright {
    font-family: 'GmarketSansLight', sans-serif;
    color: #868e96;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* ============================================
   상단으로 이동 버튼 (Scroll to Top)
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 86, 179, 0.55);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.visible {
    display: flex;
}

.scroll-to-top:hover {
    background-color: rgba(0, 86, 179, 0.85);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.scroll-to-top i {
    font-size: 20px;
    color: #fff;
}

/* =========================================
   Light Background Header Override
   ========================================= */
.header-light .logo img {
    filter: none;
}
.header-light .hamburger-icon .line {
    background-color: var(--text-dark);
}
.header-light .menu-text {
    color: var(--text-dark);
}

@media (min-width: 1024px) {
    .header-light .menu-toggle {
        border-color: rgba(0, 0, 0, 0.15);
    }
}

/* =========================================
   공통 반응형 스타일 (헤더, 푸터 등)
   ========================================= */
@media (max-width: 768px) {
    :root {
        --nav-scrolled-height: 70px;
    }

    .header-inner {
        padding: 0 20px;
    }
    
    .logo img {
        height: 28px;
    }

    .hamburger-icon {
        width: 26px;
        height: 18px;
    }
    
    .hamburger-icon .line:nth-child(2) {
        width: 100%;
        margin-left: 0;
    }
    
    .menu-toggle.active .hamburger-icon .line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active .hamburger-icon .line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Footer Mobile */
    .site-footer {
        padding: 40px 0 30px;
    }
    
    .footer-inner {
        padding: 0 20px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .footer-info p {
        font-size: 0.85rem;
    }

    .footer-copyright {
        font-size: 0.65rem;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .scroll-to-top i {
        font-size: 18px;
    }
}

/* =========================================
   공통 서브페이지 섹션 & 구분선 스타일
   ========================================= */
.hero-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 0;
    width: 100%;
}

.hero-section {
    padding-bottom: 60px;
}

@media (max-width: 767.98px) {
    .hero-section {
        padding-bottom: 30px;
    }
}
