/* ==========================================================
   공통 헤더 (index.html / 서브 페이지 공용)
   ========================================================== */
#header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    transition: background .4s ease;
}
#header .header-inner{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    padding: 0 60px;
}
#header .logo a{
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}
/* 투명 헤더: 위에서 아래로 사라지는 옅은 어두운 그라데이션으로 흰 글씨 가독성 확보 */
#header::before{
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,.2) 50%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: -1;
}
/* 글씨 그림자 */
#header .logo a,
#header .gnb a{
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
/* 오른쪽 그룹: 메뉴(단지 안내 | 세대 안내) + 분양문의 + 관심고객등록 */
#header .header-right{
    display: flex;
    align-items: center;
    gap: 44px;
}
#header .gnb{
    display: flex;
    align-items: center;
}
#header .gnb li{
    display: flex;
    align-items: center;
}
#header .gnb li + li::before{
    content: "|";
    margin: 0 18px;
    font-size: 14px;
    color: rgba(255,255,255,.55);
}
#header .gnb a{
    font-size: 17px;
    font-weight: 600;
    color: #fff;
}
#header .utils{
    display: flex;
    align-items: center;
    gap: 28px;
}
#header .utils .tel{
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 18px;
    background: #C9962E;
    color: #fff;
}
#header .utils .tel .info{
    font-size: 16px;
    font-weight: 600;
}
#header .utils .tel .num{
    font-family: "Pretendard", sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
}
#header .utils .customer{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 22px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    transition: background .3s, color .3s, border-color .3s;
}
#header .utils .customer:hover{
    background: #C9962E;
    border-color: #C9962E;
}
/* hand 아이콘 (검은 원본 → 흰색) */
#header .utils .customer .ico{
    display: block;
    width: 22px;
    height: 22px;
    background: url(../images/hand.png) center / contain no-repeat;
    filter: brightness(0) invert(1);
}

/* 단지 안내 드롭다운 */
#header .gnb li.has-sub{
    position: relative;
}
#header .gnb .sub{
    position: absolute;
    left: 50%;
    top: 100%;
    padding-top: 22px;
    transform: translate(-50%, 8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, transform .3s ease, visibility 0s .3s;
}
#header .gnb li.has-sub:hover .sub,
#header .gnb li.has-sub:focus-within .sub{
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity .3s ease, transform .3s ease, visibility 0s;
}
#header .gnb .sub ul{
    min-width: 168px;
    padding: 10px 0;
    background: #fff;
    border-top: 2px solid #C9962E;
    box-shadow: 0 16px 34px -12px rgba(0,0,0,.28);
}
#header .gnb .sub li{
    display: block;
}
#header .gnb .sub li + li::before{
    content: none;
}
#header .gnb .sub a{
    display: block;
    padding: 12px 24px;
    font-family: "Pretendard", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-shadow: none;
    white-space: nowrap;
    transition: color .2s, background .2s;
}
#header .gnb .sub a:hover{
    color: #C9962E;
    background: #faf6ee;
}

/* 스크롤 후 (서브 페이지) */
#header.is-solid{
    background: rgba(28,26,22,.94);
}
#header.is-solid::before{
    opacity: 0;
}

/* 모바일 메뉴 (js/header.js 에서 생성) */
.m_menu_btn,
.m_menu,
.m_menu_dim{display: none;}

@media(max-width:1080px){
    #header .header-inner{
        height: 64px;
        padding: 0 20px 0 12px;
        justify-content: flex-start;
        gap: 6px;
    }
    #header .logo a{font-size: 21px; white-space: nowrap;}
    #header .header-right{margin-left: auto;}
    #header .utils .tel{white-space: nowrap; flex-shrink: 0;}

    /* 햄버거 버튼 */
    /* 로고/전화번호가 nowrap이라 좁은 폰에서 버튼만 눌리지 않도록 크기 고정 */
    .m_menu_btn{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        gap: 6px;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        background: none;
        cursor: pointer;
    }
    .m_menu_btn span{
        display: block;
        flex-shrink: 0;
        width: 26px;
        height: 2px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,.3);
    }

    /* 어두운 배경 */
    .m_menu_dim{
        display: block;
        position: fixed;
        inset: 0;
        z-index: 500;
        background: rgba(0,0,0,.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity .35s ease, visibility 0s .35s;
    }
    /* 왼쪽 메뉴 패널 */
    .m_menu{
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 501;
        width: 82%;
        max-width: 340px;
        background: #fff;
        overflow-y: auto;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .4s cubic-bezier(.22,.61,.36,1), visibility 0s .4s;
    }
    .m_menu_open{overflow: hidden;}
    .m_menu_open .m_menu_dim{
        opacity: 1;
        visibility: visible;
        transition: opacity .35s ease;
    }
    .m_menu_open .m_menu{
        transform: translateX(0);
        visibility: visible;
        transition: transform .4s cubic-bezier(.22,.61,.36,1);
    }

    .m_menu_head{
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 64px;
        padding: 0 12px 0 24px;
        border-bottom: 1px solid #eee;
    }
    .m_menu_logo{
        font-size: 20px;
        font-weight: 700;
        color: #C9962E;
    }
    /* 닫기(X) 버튼 */
    .m_menu_close{
        position: relative;
        width: 40px;
        height: 40px;
        border: 0;
        background: none;
        cursor: pointer;
    }
    .m_menu_close::before,
    .m_menu_close::after{
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 22px;
        height: 2px;
        background: #333;
    }
    .m_menu_close::before{transform: translate(-50%,-50%) rotate(45deg);}
    .m_menu_close::after{transform: translate(-50%,-50%) rotate(-45deg);}

    .m_menu_list{
        flex: 1;
        padding: 12px 0;
    }
    .m_menu_list > li{
        padding: 18px 24px;
        border-bottom: 1px solid #f2efe9;
    }
    .m_menu_list .dep1{
        display: block;
        font-size: 19px;
        font-weight: 700;
        line-height: 1.3;
        color: #222;
    }
    .m_menu_list .dep2{
        margin-top: 10px;
    }
    .m_menu_list .dep2 a{
        display: block;
        padding: 8px 0 8px 12px;
        font-family: "Pretendard", sans-serif;
        font-size: 15px;
        line-height: 1.3;
        color: #666;
    }
    .m_menu_list .dep2 a::before{
        content: "- ";
        color: #C9962E;
    }

    .m_menu_foot{
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 20px 24px calc(28px + env(safe-area-inset-bottom, 0px));
    }
    .m_menu_foot a{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 50px;
        font-size: 16px;
        font-weight: 600;
    }
    /* 흰색 hand 아이콘이 보이도록 어두운 버튼 */
    .m_customer{
        background: #2b2620;
        color: #fff;
    }
    .m_customer .ico{
        width: 20px;
        height: 20px;
        background: url(../images/hand.png) center / contain no-repeat;
        filter: brightness(0) invert(1);
    }
    .m_tel{
        background: #C9962E;
        color: #fff;
    }
    .m_tel .num{
        font-family: "Pretendard", sans-serif;
        font-size: 20px;
        color: #fff;
    }
    #header .gnb{display:none;}
	#header .utils .customer{display: none;}
	#header .utils .tel{height: 34px; padding: 0 12px; gap: 6px;}
	#header .utils .tel .info{font-size: 12px;}
	#header .utils .tel .num{font-size: 17px;}
}
/* 좁은 폰 (갤럭시 등 360px) */
@media(max-width:380px){
    #header .header-inner{padding: 0 12px 0 6px; gap: 2px;}
    #header .logo a{font-size: 18px;}
    #header .utils .tel{padding: 0 9px; gap: 5px;}
    #header .utils .tel .info{font-size: 11px;}
    #header .utils .tel .num{font-size: 15px;}
}
