@charset "UTF-8";

/* =========================================================
   HEADER & LOGO
========================================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: #ffffff;
    color: #111111;
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
}

.header-inner {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.logo img {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
}


/* =========================================================
   NAV & DROPDOWN (PC)
========================================================= */

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 1차 메뉴 모든 링크 공통 (HOME, 회사소개, 제품소개, 문의하기) */
.nav a.nav-link,
.nav .nav-item>a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    color: #333333;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color 0.25s ease;
}

/* [마우스 오버] 폰트 색상 강조 변경 */
.nav a.nav-link:hover,
.nav .nav-item:hover>a {
    color: #d8a22a !important;
}

/* [Active] 현재 페이지 메뉴 색상 상시 유지 */
.nav a.nav-link.active,
.nav .nav-item.active>a {
    color: #d8a22a !important;
    font-weight: 700;
}

/* [Active] 하단 인디케이터 바 */
.nav a.nav-link.active::after,
.nav .nav-item.active>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #d8a22a;
}

/* 드롭다운 부모 컨테이너 */
.nav-item.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* 드롭다운 서브메뉴 레이어 (PC 기본 숨김) */
.nav-item.dropdown .dropdown-menu {
    position: absolute;
    top: 90px;
    /* Header 높이 */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 160px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    list-style: none;
    padding: 10px 0;
    margin: 0;

    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1001;
}

/* 서브메뉴 각 항목 */
.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #555555;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
    color: #d8a22a !important;
    background: #f8f9fa;
}

/* 마우스 호버 시 서브메뉴 노출 */
.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 모바일 메뉴 버튼 (PC에선 숨김) */
.menu-button {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111111;
    font-size: 25px;
    cursor: pointer;
}


/* =========================================================
   MOBILE RESPONSIVE HEADER (768px 이하) - 수정
========================================================= */

@media (max-width: 768px) {
    .header {
        height: 60px;
    }

    .header-inner {
        padding: 0 20px;
    }

    .logo img {
        height: 32px;
    }

    .menu-button {
        display: block;
    }

    /* 모바일 드롭다운 메뉴 영역 */
    .nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        height: auto;
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        background: #ffffff;
        border-top: 1px solid #eee;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    }

    .nav.active {
        display: flex;
    }

    .nav a.nav-link,
    .nav .nav-item>a {
        height: auto;
        padding: 12px 10px;
        font-size: 15px;
        /* 모바일에서는 호버 시 위치 변동 방지 */
        position: static;
    }

    .nav a.nav-link.active::after,
    .nav .nav-item.active>a::after {
        display: none;
    }

    /* 드롭다운 부모 요소 위치 고정 */
    .nav-item.dropdown {
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        position: relative;
    }

    /* 모바일 서브메뉴: PC의 중앙정렬(transform, left) 속성을 확실하게 초기화 */
    .nav-item.dropdown .dropdown-menu {
        position: static !important;
        left: auto !important;
        transform: none !important; /* PC용 translateX(-50%) 완전히 제거 */
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: none !important;
        padding-left: 15px;
        background: #f9f9f9;
        width: 100%;
        transition: none !important; /* 호버 시 튀는 애니메이션 끄기 */
    }

    /* 호버 시 위치 변형이 일어나지 않도록 강제 고정 */
    .nav-item.dropdown:hover .dropdown-menu {
        transform: none !important;
    }

    .dropdown-menu li a {
        text-align: left;
        padding: 10px 15px;
        font-size: 14px;
        color: #555555;
    }
}