/* ================================================
   HEADER ONLY
   ================================================ */

:root {
    --header-h: 94px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.35s, box-shadow 0.35s;
}

.main-page .site-header {
    background: #ffffff;
}

.main-page .site-header.scrolled,
body:not(.main-page) .site-header {
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(17, 38, 31, 0.08);
    border-bottom: 1px solid #e8eeeb;
}

.header-util {
    display: none !important;
}

.header-main {
    padding: 0;
    background: #ffffff;
}

.header-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--header-h);
    gap: 0;
    position: relative;
}

.logo {
    margin: 0;
    position: absolute;
    left: -82px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.logo a {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
}

.logo-sub {
    display: none;
}

.logo-img {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
}

.gnb {
    display: flex;
    margin: 0 auto;
    width: min(980px, 100%);
}

.gnb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
}

.gnb-item {
    position: static;
}

.gnb-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-h);
    padding: 0 12px;
    font-size: 19px;
    font-weight: 500;
    color: #1f252b;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
    letter-spacing: 0.2px;
}

.gnb-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.gnb-item:hover .gnb-link,
.gnb-link.active,
.gnb-link.is-mega-hover {
    color: var(--primary);
}

.gnb-item:hover .gnb-link::after,
.gnb-link.active::after,
.gnb-link.is-mega-hover::after {
    transform: scaleX(1);
}

.header-lang {
    position: absolute;
    right: -82px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-lang .lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 32px;
    border: 1px solid #d9e4df;
    border-radius: 16px;
    background: #ffffff;
    color: #6f7a82;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 0 12px;
    cursor: pointer;
}

.header-lang .lang-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: #eef4fb;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #2e3d37;
    transition: all 0.3s;
}

.mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e4ebe8;
    box-shadow: 0 18px 36px rgba(17, 38, 31, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

.site-header:hover .mega-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.mega-wrap {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(980px, 100%);
    margin: 0 auto;
    padding: 14px 0 28px;
}

.mega-col {
    flex: 1;
    padding: 8px 22px;
    border-right: 1px solid #edf2ef;
    border-radius: 0;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.mega-wrap>.mega-col:first-child {
    padding-left: 22px;
}

.mega-wrap>.mega-col:last-child {
    border-right: none;
    padding-right: 22px;
}

.mega-col--wide {
    flex: 1.3;
}

.mega-col-title {
    display: none;
}

.mega-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-col ul li {
    line-height: 1;
}

.mega-col ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 0;
    font-size: 16px;
    color: #5c6964;
    transition: color 0.2s;
    text-align: center;
    line-height: 1.45;
    white-space: normal;
}

.mega-col ul li a i {
    color: #8fa79c;
}

.mega-col ul li a:hover {
    color: var(--primary);
}

.mega-col.is-active,
.mega-col:hover {
    background: #f2f3f5;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -340px;
    width: 340px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e9edf0;
    flex-shrink: 0;
}

.mobile-logo-img {
    display: block;
    width: 158px;
    max-width: 100%;
    height: auto;
}

.mobile-close-btn {
    background: none;
    border: none;
    color: #1f2328;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.mobile-close-btn:hover {
    color: #000000;
}

.mobile-nav-inner {
    flex: 1;
    overflow-y: auto;
}

.mobile-gnb {
    list-style: none;
    margin: 0;
    padding: 0;
}

.m-item {
    border-bottom: 1px solid #edf1f4;
}

.m-title {
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14.5px;
    font-weight: 500;
    color: #111111;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.m-title i {
    transition: transform 0.3s;
    font-size: 11px;
    color: #7b8792;
}

.m-item.open .m-title i {
    transform: rotate(180deg);
}

.m-item.open .m-title {
    color: #000000;
}

.m-sub {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    background: #f7f9fb;
}

.m-item.open .m-sub {
    display: block;
}

.m-sub li a {
    display: block;
    padding: 11px 24px 11px 36px;
    font-size: 13.5px;
    color: #232a31;
    border-bottom: 1px solid #e9eef2;
    transition: color 0.2s, background 0.2s;
}

.m-sub li a:hover {
    color: #000000;
    background: #eef2f6;
}

.mobile-nav-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9edf0;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-nav-footer .lang-btn {
    min-width: 56px;
    height: 30px;
    border: 1px solid #d8dde2;
    border-radius: 15px;
    background: #ffffff;
    color: #6f7a82;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 0 10px;
}

.mobile-nav-footer .lang-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: #eef4fb;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    display: none;
}

.mobile-nav-overlay.show {
    display: block;
}

@media (max-width: 1200px) {
    :root {
        --header-h: 82px;
    }

    .gnb {
        display: none;
    }

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

    .logo {
        position: static;
        transform: none;
    }

    .logo-img {
        width: 188px;
    }

    .header-lang {
        display: none;
    }

    .mega-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --header-h: 72px;
    }

    .logo-img {
        width: 162px;
    }

    .mobile-logo-img {
        width: 132px;
    }
}
