/* 헤더 기본 스타일 */
.header {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px; z-index: 1000;
    transition: all 0.4s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.header.scrolled {
    background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(20px);
    height: 70px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.header.hide { transform: translateY(-100%); }
.header.menu-open { background-color: transparent; border-bottom: none; }

.header-container {
    max-width: 1600px; height: 100%; margin: 0 auto; padding: 0 30px;
    display: flex; justify-content: space-between; align-items: center;
    position: relative; z-index: 1100;
}
.logo a { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

/* 데스크탑 네비게이션 */
.desktop-nav { display: flex; align-items: center; gap: 50px; } /* 간격 넓힘 */

.gnb { display: flex; gap: 40px; }

.nav-link {
    position: relative; font-size: 16px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.05em; padding: 5px 0;
    color: rgba(255, 255, 255, 0.8);
}
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px;
    background-color: #f57309; transform: scaleX(0); transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.nav-link.active { color: #f57309; }
.nav-link.active::after { transform: scaleX(1); transform-origin: left; }

/* 유틸리티 (버튼 포함) */
.util-nav { display: flex; align-items: center; gap: 20px; }

/* 온라인 견적 버튼 스타일 */
.btn-estimate {
    position: relative; padding: 10px 28px; 
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px; 
    font-size: 15px; font-weight: 700; 
    color: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
    white-space: nowrap; /* 줄바꿈 방지 */
}

/* 햄버거 버튼 */
.hamburger-btn {
    display: none; background: none; border: none; flex-direction: column;
    gap: 6px; padding: 5px; z-index: 1200; position: relative;
}
.hamburger-btn .line { width: 24px; height: 2px; background-color: #fff; transition: all 0.3s; }
.header.menu-open .hamburger-btn .line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header.menu-open .hamburger-btn .line:nth-child(2) { opacity: 0; }
.header.menu-open .hamburger-btn .line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 모바일 오버레이 */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: rgba(0, 0, 0, 0.95); backdrop-filter: blur(10px);
    z-index: 1050; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; pointer-events: none; transition: 0.4s ease;
}
.header.menu-open .mobile-menu-overlay { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-menu-inner { text-align: center; width: 100%; }
.mobile-gnb li { margin: 25px 0; opacity: 0; transform: translateY(20px); transition: 0.5s ease; }
.header.menu-open .mobile-gnb li { opacity: 1; transform: translateY(0); }
.header.menu-open .mobile-gnb li:nth-child(1) { transition-delay: 0.1s; }
.header.menu-open .mobile-gnb li:nth-child(2) { transition-delay: 0.2s; }
.header.menu-open .mobile-gnb li:nth-child(3) { transition-delay: 0.3s; }
.header.menu-open .mobile-gnb li:nth-child(4) { transition-delay: 0.4s; }
.mobile-gnb a { font-family: 'Oswald', sans-serif; font-size: 36px; font-weight: 700; color: #fff; }
.mobile-gnb a.active { color: #f57309; }
.mobile-social { margin-top: 40px; display: flex; justify-content: center; gap: 20px; }
.mobile-social a { font-size: 24px; color: #888; }

/* 서브 페이지 헤더 */
body.sub-page .header {
    background-color: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 반응형 */
@media (max-width: 1024px) {
    .desktop-nav .gnb { display: none; } /* 태블릿 이하 GNB 숨김 */
    .util-nav .btn-estimate { display: none; } /* 버튼도 숨김 (모바일 메뉴 안으로) */
    .hamburger-btn { display: flex; }
}
@media (max-width: 768px) { .header-container { padding: 0 20px; } }

/* 호버 효과 (PC) */
@media (hover: hover) and (pointer: fine) {
    .nav-link:hover { color: #fff; }
    .nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
    
    /* 버튼 호버 효과 */
    .btn-estimate:hover { 
        background-color: #fff; 
        color: #000; 
        border-color: #fff; 
    }
    
    .mobile-gnb a:hover { color: #f57309; -webkit-text-stroke: 1px #f57309; }
    .mobile-social a:hover { color: #f57309; }
}