/* ================= 헤더 / GNB ================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    /* 모든 페이지(홈 포함)에서 흰 배경 헤더 + 원색 로고 → 파란 Hero 위에서도 로고가 또렷하게 보임 */
    background-color: #fff;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-header .logo {
    display: flex;
    align-items: center;
}
.site-header .logo img {
    height: 34px;
    width: auto;
}

.gnb-pc {
    display: flex;
    height: 100%;
}

.gnb-list {
    display: flex;
    align-items: center;
    gap: 44px;
    height: 100%;
}

.gnb-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.gnb-link {
    display: block;
    padding: 8px 4px;
    font-weight: 700;
    font-size: .98rem;
    color: var(--color-text);
    transition: color .3s ease;
}

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

.gnb-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    min-width: 170px;
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.gnb-item:hover .gnb-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.gnb-dropdown li a {
    display: block;
    padding: 10px 22px;
    color: var(--color-text);
    font-size: .9rem;
    white-space: nowrap;
}

.gnb-dropdown li a:hover,
.gnb-dropdown li a.active {
    color: var(--color-primary);
    background-color: var(--color-bg);
}

/* 햄버거 버튼 (모바일 전용) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
}

.gnb-mobile {
    display: none;
}

/* 고정 헤더 만큼 본문 오프셋 */
.site-main {
    padding-top: var(--header-height);
}

/* ================= 사이드바 (LNB) ================= */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 40px;
    padding: 60px 20px;
}

.sidebar {
    border-right: 1px solid var(--color-border);
    padding-right: 24px;
}

.sidebar-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-primary);
}

.sidebar-menu li a {
    display: block;
    padding: 12px 8px;
    color: var(--color-muted);
    border-radius: var(--radius);
    transition: background-color .2s ease, color .2s ease;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    color: var(--color-primary);
    background-color: var(--color-bg);
    font-weight: 700;
}

.content-area {
    min-width: 0;
}

/* ================= 푸터 ================= */
.site-footer {
    background-color: #222;
    color: #ccc;
    padding: 48px 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-name {
    margin-bottom: 14px;
}
.footer-logo {
    height: 30px;
    width: auto;
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: .85rem;
}

.footer-copyright {
    font-size: .8rem;
    color: #888;
}

/* ================= 태블릿 (768~1199px) ================= */
@media (min-width: 768px) and (max-width: 1199px) {
    .gnb-list {
        gap: 26px;
    }
    .layout-with-sidebar {
        grid-template-columns: 180px 1fr;
        gap: 24px;
    }
}

/* ================= 모바일 (767px 이하) ================= */
@media (max-width: 767px) {
    .gnb-pc {
        display: none;
    }
    .hamburger {
        display: flex;
    }

    .gnb-mobile {
        display: block;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        background-color: #fff;
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    }
    .gnb-mobile.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .gnb-mobile-item {
        border-bottom: 1px solid var(--color-border);
    }
    .gnb-mobile-title {
        display: block;
        padding: 16px 20px;
        font-weight: 700;
    }
    .gnb-mobile-sub li a {
        display: block;
        padding: 12px 32px;
        color: var(--color-muted);
        font-size: .9rem;
    }
    .gnb-mobile-sub li a.active {
        color: var(--color-primary);
        font-weight: 700;
    }

    .site-main {
        padding-top: var(--header-height);
    }

    .layout-with-sidebar {
        grid-template-columns: 1fr;
        padding: 32px 16px;
        gap: 20px;
    }
    /* 그리드 항목은 기본이 min-width:auto 라서, 내용이 넓으면(글자 크기를 키운 폰 등) 트랙이 화면보다 커져
       페이지 전체가 축소돼 보인다 → 항목이 트랙 안에서 줄어들 수 있게 한다 */
    .layout-with-sidebar > * {
        min-width: 0;
    }
    /* .layout-with-sidebar 자체가 .container 인데 각 페이지가 또 .container 로 감싸 좌우 여백이 이중 적용됨 */
    .content-area > .container {
        padding-left: 0;
        padding-right: 0;
    }
    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding-right: 0;
        padding-bottom: 20px;
    }
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        gap: 8px;
    }
    .sidebar-menu li a {
        white-space: nowrap;
    }
}
