/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* 스크롤 시 헤더 스타일 */
.header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.header.scrolled .logo .logo_white {
    opacity: 0;
}

.header.scrolled .logo .logo_black {
    opacity: 1;
}

.header.scrolled .nav-link {
    color: #111;
}

.header.scrolled .menu-icon-white {
    opacity: 0;
}

.header.scrolled .menu-icon-black {
    opacity: 1;
}

/* 서브페이지 헤더 스타일 */
.sub-page .header {
    background: transparent;  /* 초기에는 투명 */
}

/* 서브페이지 초기 상태 스타일 */
.sub-page .header .logo .logo_white {
    opacity: 1;  /* 흰색 로고 보이게 */
}

.sub-page .header .logo .logo_black {
    opacity: 0;  /* 검정 로고 숨기기 */
}

.sub-page .header .nav-link {
    color: #fff;  /* 메뉴 텍스트 흰색으로 */
}

/* 서브페이지 전체메뉴 버튼 스타일 */
.sub-page .header .menu-icon-white {
    opacity: 1;  /* 흰색 메뉴 아이콘 보이게 */
}

.sub-page .header .menu-icon-black {
    opacity: 0;  /* 검정 메뉴 아이콘 숨기기 */
}

/* 스크롤 시 서브페이지 헤더 스타일 */
.sub-page .header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.sub-page .header.scrolled .logo .logo_white {
    opacity: 0;
}

.sub-page .header.scrolled .logo .logo_black {
    opacity: 1;
}

.sub-page .header.scrolled .nav-link {
    color: #111;
}

.sub-page .header.scrolled .menu-icon-white {
    opacity: 0;
}

.sub-page .header.scrolled .menu-icon-black {
    opacity: 1;
}

/* 메인페이지 헤더 스타일 */
.main-page .header {
    background: transparent;
}

.main-page .header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* 메인페이지 전체메뉴 버튼 스타일 */
.main-page .header .menu-icon-white {
    opacity: 1;
}

.main-page .header .menu-icon-black {
    opacity: 0;
}

.main-page .header.scrolled .menu-icon-white {
    opacity: 0;
}

.main-page .header.scrolled .menu-icon-black {
    opacity: 1;
}

/* Logo */
.logo {
    height: 40px;
    position: relative;
}

.logo a {
    display: block;
    height: 100%;
    width: 120px;  /* 로고 너비 지정 */
}

.logo img {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    transition: opacity 0.3s ease;
}

/* 서브페이지 로고 스타일 */
.sub-page .header .logo img.logo_white {
    opacity: 0;
}

.sub-page .header .logo img.logo_black {
    opacity: 1;
}

/* 메인페이지 로고 스타일 */
.main-page .header .logo img.logo_white {
    opacity: 1;
}

.main-page .header .logo img.logo_black {
    opacity: 0;
}

.main-page .header.scrolled .logo img.logo_white {
    opacity: 0;
}

.main-page .header.scrolled .logo img.logo_black {
    opacity: 1;
}

/* Navigation */
nav {
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 50px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    position: relative;
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    padding: 35px 0;
}

/* 서브메뉴 스타일 */
.sub-menu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%; /* 상위 메뉴 바로 아래 위치 */
    left: 0;
    transform: translateY(10px);
    min-width: 200px;
    list-style: none;
    background: rgba(0,0,0,0.8);
    padding: 15px;
    margin-top: 10px;
    transition: all 0.3s ease;
    border-radius: 5px;
    pointer-events: none;
    z-index: 998;
}

.nav-item:hover .sub-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.sub-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.sub-menu a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.sub-menu li {
    padding: 0;
    margin: 0;
}

.sub-menu a:hover {
    color: #aaa;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

/* Header Utils */
.header-utils {
    display: flex;
    gap: 15px;
}

.all-menu-btn {
    position: relative;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-icon-white,
.menu-icon-black,
.close-icon {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
    width: 24px;
    height: 24px;
}

.menu-icon-white {
    opacity: 1;
}

.menu-icon-black {
    opacity: 0;
}

.close-icon {
    opacity: 0;
    z-index: 2;
}

/* 메뉴 열린 상태 스타일 */
.all-menu-btn.active .menu-icon-white,
.all-menu-btn.active .menu-icon-black {
    opacity: 0;
}

.all-menu-btn.active .close-icon {
    opacity: 1;
}

/* Full Menu */
.full-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    padding: 100px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-menu.active {
    opacity: 1;
    visibility: visible;
}

/* 메뉴 열린 상태에서 헤더 스타일 */
.header.menu-open {
    background: transparent !important;
}

.header.menu-open nav {
    opacity: 0;
    visibility: hidden;
}

/* 전체메뉴 스타일 */
.full-menu-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

.full-menu-list {
    list-style: none;
}

.full-menu-item {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.full-menu.active .full-menu-item {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(0.1s * var(--index));
}

.full-menu-title {
    color: #fff;
    font-size: 42px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.full-menu-title:hover {
    color: #aaa;
}

/* 전체메뉴 서브메뉴 스타일 */
.full-submenu {
    display: block;
    list-style: none;
    padding-left: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease;
}

.menu-wrapper:hover .full-submenu {
    max-height: 150px;
    opacity: 1;
    margin-top: 10px;
}

.full-submenu li {
    margin: 8px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    transition-delay: calc(0.08s * var(--index));
}

.menu-wrapper:hover .full-submenu li {
    opacity: 1;
    transform: translateY(0);
}

.full-submenu a {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 4px 0;
}

.full-submenu a:hover {
    color: #fff;
}

/* Fixed Buttons */
.fixed-btns {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inquiry-btn, .top-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.inquiry-btn {
    background: #0066b3;
}

.inquiry-btn img, .top-btn img {
    width: 50%;
    height: 50%;
    object-fit: contain;
}

.top-btn {
    background: #fff;
    border: 1px solid #eee;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
}

.top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* 서브페이지 fixed-btns 스타일 */
.sub-page .fixed-btns {
    position: fixed !important;
    z-index: 9999;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: #222;
    padding: 80px 40px;
    color: #999;
    z-index: 1;
    visibility: hidden;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;  /* 푸터 폰트 사이즈 수정 */
}

/* NEWS 섹션에서만 푸터 표시 */
.main-page.fp-viewing-news footer {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 서브페이지 footer 스타일 */
.sub-page footer {
    position: relative;
    visibility: visible;
    opacity: 1;
    transform: none;
    margin-top: 200px;
    height: 250px;
}

.footer-info {
    font-size: 13px;  /* 푸터 정보 폰트 사이즈 */
    line-height: 1.6;
}

.footer-copyright {
    font-size: 13px;  /* 카피라이트 폰트 사이즈 */
    margin-top: 20px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    footer {
        position: relative;
        height: auto;
        padding: 40px 20px;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .logo {
        height: 32px;
    }

    .nav-menu {
        display: none;
    }

    .header.menu-open .all-menu-btn {
        right: 20px;
        top: 24px;
    }

    .fixed-btns {
        display: none; /* 모바일에서 버튼들 숨기기 */
    }

    .inquiry-btn img, .top-btn img {
        width: 50%;
        height: 50%;
    }

    .footer-inner {
        width: 100%;
    }

    .footer-logo img {
        height: 30px;
        width: auto;
    }

    .footer-info {
        font-size: 12px;
        word-break: keep-all;
        line-height: 1.6;
    }

    .footer-copyright {
        font-size: 11px;
        line-height: 1.4;
        word-break: keep-all;
    }

    .footer-copyright br {
        display: block;
    }

    .nav-item {
        height: 60px;
    }

    .nav-link {
        height: 60px;  /* 모바일 헤더 높이에 맞춤 */
        line-height: 60px;
    }

    .full-menu {
        padding: 60px 20px;
        align-items: flex-start;
    }

    .full-menu-content {
        text-align: left;
    }

    .full-menu-title {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .full-menu-item {
        margin-bottom: 20px;
    }

    .full-submenu {
        padding-left: 10px;
    }

    .full-submenu a {
        font-size: 14px;
    }

    /* 모바일에서는 클릭으로 서브메뉴 토글 */
    .menu-wrapper.active .full-submenu {
        display: block;
    }

    .menu-wrapper.active .full-submenu li {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .header {
        height: 60px;
        padding: 0 15px;
    }

    .logo {
        height: 28px;
    }

    .all-menu-btn img {
        width: 22px;
        height: 22px;
    }

    .header.menu-open .all-menu-btn {
        right: 15px;
        top: 19px;
    }

    .fixed-btns {
        display: none; /* 작은 화면에서도 버튼들 숨기기 */
    }

    .inquiry-btn, .top-btn {
        width: 45px;
        height: 45px;
        bottom: 8%;
        right: 4%;
    }

    .inquiry-btn img, .top-btn img {
        width: 50%;
        height: 50%;
    }

    footer {
        padding: 30px 15px;
        margin-top: 30px;
    }

    .nav-item {
        height: 60px;
    }
}

/* Header White Style */
.header.white {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.header.white .logo .logo_white {
    opacity: 0;
}

.header.white .logo .logo_black {
    opacity: 1;
}

.header.white .nav-link {
    color: #111;
}

.header.white .menu-icon-white {
    opacity: 0;
}

.header.white .menu-icon-black {
    opacity: 1;
} 