@charset "utf-8";

/* ========================================================
   THECORE Header Stylesheet (header.css)
   Pixel-Perfect alignment with Figma Design & Spec
   - Header Height: 63px
   - Left/Right Padding: clamp(24px, 3.125vw, 60px) (Matches main sections)
   - Logo: THECORE (Pretendard Bold 26px / #212529)
   - Menu: 16px / SemiBold 600 / gap 40px
   - Toggle: Modern 2-line minimalist hamburger icon
======================================================== */

.gnb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 88px;
    z-index: 1000;
}

.gnb__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f7f7f2;
    box-shadow: none;
    transition: background-color 0.35s ease, box-shadow 0.35s ease;
    z-index: 1;
}

/* Fixed Header on Scroll */
.gnb.is-fixed {
    position: fixed;
}

.gnb.is-fixed .gnb__bg {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

/* Inner Container: 1920px max, side padding aligned with .sec-smart-campaigns */
.gnb__inner {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1920px;
    height: 88px;
    margin: 0 auto;
    padding: 0 clamp(24px, 4.44444vw, 96px);
    box-sizing: border-box;
}

/* Logo */
.gnb__logo {
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 31px;
    letter-spacing: -0.02em;
    color: #212529;
    text-decoration: none;
    transition: color 0.35s ease;
    display: inline-flex;
    align-items: center;
}

.gnb__logo { gap: 10px; }
.gnb__symbol { display: block; width: 30px; height: 30px; }
.gnb .gnb__contact {
    display: inline-flex; align-items: center; justify-content: space-between;
    box-sizing: border-box; min-width: 156px; min-height: 48px;
    padding: 0 26px; margin-right: 32px; border-radius: 40px;
    background: #c90000; color: #fff; font-size: 16px; font-weight: 600;
    transition: background .2s;
}
.gnb__contact span { font: 400 26px/1 sans-serif; }
.gnb .gnb__contact:hover { background: #9e0000; }
.gnb a:focus-visible, .gnb button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

/* Menu (SERVICE, WORK, ABOUT, CONTACT) */
.gnb__menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: auto;
    margin-right: 32px;
}

.gnb__link {
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 19px;
    color: #212529;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
    position: relative;
    padding: 6px 0;
}

.gnb__link:hover,
.gnb__menu li.active .gnb__link {
    color: #ba0000;
}

/* Toggle Button: Figma Spec 2-line Minimalist Icon */
.gnb__toggle {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 14px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 4;
}

.gnb__toggle .bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #212529;
    border-radius: 1px;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.25s ease,
                background-color 0.35s ease;
}

.gnb__toggle.is-active .line-1 {
    transform: translateY(6px) rotate(45deg);
}

.gnb__toggle.is-active .line-2 {
    transform: translateY(-6px) rotate(-45deg);
}

/* ========================================================
   Hero Banner Dark Phase Adaptation (Banner Variant 2 & 3)
======================================================== */
.gnb.is-dark-theme:not(.is-hover):not(.is-pinned) .gnb__bg {
    background-color: transparent !important;
    box-shadow: none !important;
}

.gnb.is-dark-theme:not(.is-hover):not(.is-pinned) .gnb__logo {
    color: #ffffff !important;
}

.gnb.is-dark-theme:not(.is-hover):not(.is-pinned) .gnb__menu li > a {
    color: #ffffff !important;
}

.gnb.is-dark-theme:not(.is-hover):not(.is-pinned) .gnb__toggle .bar {
    background-color: #ffffff !important;
}

/* ========================================================
   GNB Mega Overlay (전체메뉴 펼침)
======================================================== */
.gnb-overlay {
    position: absolute;
    top: 88px;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 2;
    padding: 40px 0 50px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    box-sizing: border-box;
}

.gnb-overlay.is-open,
.gnb.is-hover .gnb-overlay,
.gnb.is-pinned .gnb-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gnb-overlay__inner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 clamp(24px, 3.125vw, 60px);
    box-sizing: border-box;
}

.gnb-overlay__cols {
    display: flex;
    justify-content: flex-end;
    gap: 60px;
}

.gnb-overlay__col {
    min-width: 150px;
}

.gnb-overlay__title {
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 22px;
    color: #212529;
    margin: 0 0 20px 0;
    letter-spacing: 0.02em;
}

.gnb-overlay__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gnb-overlay__list a {
    font-family: 'Pretendard', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 20px;
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.gnb-overlay__list a:hover {
    color: #ba0000;
    transform: translateX(4px);
}

/* ========================================================
   Responsive Media Queries
======================================================== */
@media (max-width: 1280px) {
    .gnb__menu {
        gap: 28px;
        margin-right: 28px;
    }
}

@media (max-width: 1024px) {
    .gnb__menu {
        gap: 20px;
        margin-right: 20px;
    }
    .gnb-overlay__cols {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .gnb {
        height: 72px;
    }
    .gnb__inner {
        height: 72px;
    }
    .gnb__logo {
        font-size: 20px;
    }
    .gnb__logo { gap: 7px; }
    .gnb__symbol { width: 25px; height: 25px; }
    .gnb .gnb__contact { min-width: 100px; min-height: 38px; padding: 0 14px; margin: 0 18px 0 auto; font-size: 12px; }
    .gnb__contact span { font-size: 21px; }

    /* Mobile: Slide-in / Dropdown menu */
    .gnb__menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 40px 24px;
        gap: 24px;
        overflow-y: auto;
        z-index: 99;
        margin: 0;
    }

    .gnb__menu.is-open {
        display: none;
    }

    .gnb__menu .gnb__link {
        font-size: 20px;
        font-weight: 700;
    }

    .gnb-overlay {
        top: 72px;
        padding: 30px 20px;
        max-height: calc(100svh - 72px);
        overflow-y: auto;
    }

    .gnb-overlay__cols {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 359px) {
    .gnb__inner { padding-inline: 18px; }
    .gnb__logo { font-size: 18px; }
    .gnb .gnb__contact { min-width: 88px; margin-right: 14px; padding-inline: 12px; }
}
