/**
 * 항공 서비스 전용 헤더 스타일 (Flexbox/Grid 기반)
 */

/* ==================== nm/may 스타일 헤더 (.header) ==================== */
header.header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

header.header .navbar {
    display: flex;
    align-items: center;
    height: 56px;
    gap: 12px;
}

header.header .navbar-brand a {
    display: block;
    line-height: 0;
}

header.header .navbar-brand img {
    display: block;
}


/* ==================== 기존 헤더 (#header1) ==================== */

li{
    list-style: none;
}
#header1 {
    position: relative;
    width: 100%;
    margin: 0 auto;
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
}

/* head_search_roll1 - 검색 영역 */
#header1 .head_search_roll1 {
    position: relative;
    width: 100%;
    border-bottom : none !important;
}

#header1 .head_search_roll1 .head_search {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

#header1 .head_search_roll1 .head_search ul{
    width: 450px !important;
}
/* 로고 */
#header1 .head_search_roll1 .head_search h1 {
    flex-shrink: 0;
    margin: 0;
}

#header1 .head_search_roll1 .head_search h1 a {
    display: block;
    line-height: 0;
}

#header1 .head_search_roll1 .head_search h1 img {
    width: 200px;
    height: 53px;
    display: block;
}

/* 검색 폼 */
#header1 .head_search_roll1 .head_search form {
    flex: 1;
    max-width: 520px;
    margin: 0;
}

#header1 .head_search_roll1 .head_search form p {
    position: relative;
    margin: 0;
}

#header1 .head_search_roll1 .head_search form p input[type="text"] {
    width: 100%;
    max-width: 388px;
    padding: 0 0 0 10px;
    height: 50px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f8f8f8;
    font-size: 14px;
    color: #333;
    letter-spacing: -0.5px;
    transition: all 0.2s ease;
}

#header1 .head_search_roll1 .head_search form p input[type="text"]:focus {
    outline: none;
    border-color: #003c87;
    background: #fff;
}

#header1 .head_search_roll1 .head_search form p input[type="text"]::placeholder {
    color: #999;
}

#header1 .head_search_roll1 .head_search form p a {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    padding: 8px 12px;
    transition: color 0.2s;
}

#header1 .head_search_roll1 .head_search form p a:hover {
    color: #003c87;
}

/* 헤더 우측 메뉴 (마이페이지, 예약조회, 로그인) - 피그마 디자인 기반 */
#header1 .head_search_roll1 .head_search > ul.header-menu,
#header1 .head_search_roll1 .head_search > ul {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
}

#header1 .head_search_roll1 .head_search > ul.header-menu > li,
#header1 .head_search_roll1 .head_search > ul > li {
    position: relative;
    display: flex;
    align-items: center;
}

#header1 .head_search_roll1 .head_search > ul.header-menu > li:not(:last-child),
#header1 .head_search_roll1 .head_search > ul > li:not(:last-child) {
    margin-right: 38px;
}

/* 텍스트 링크 스타일 (마이페이지, 예약조회) - 피그마 디자인 */
#header1 .head_search_roll1 .head_search > ul.header-menu > li > a,
#header1 .head_search_roll1 .head_search > ul > li > a {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    font-weight: 500;
    font-style: normal;
    color: #555555;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    line-height: 18px;
    letter-spacing: -0.75px;
}

#header1 .head_search_roll1 .head_search > ul.header-menu > li > a:hover,
#header1 .head_search_roll1 .head_search > ul > li > a:hover {
    color: #2a2a2a;
}

/* 로그인 버튼 스타일 - 피그마 디자인 */
#header1 .head_search_roll1 .head_search > ul.header-menu > li > button,
#header1 .head_search_roll1 .head_search > ul > li > button {
    background: #2a2a2a;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 0;
    width: 125px;
    height: 30px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 500;
    font-style: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 16.8px;
    letter-spacing: -0.7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#header1 .head_search_roll1 .head_search > ul.header-menu > li > button:hover,
#header1 .head_search_roll1 .head_search > ul > li > button:hover {
    background: #1a1a1a;
}

#header1 .head_search_roll1 .head_search > ul.header-menu > li > button:active,
#header1 .head_search_roll1 .head_search > ul > li > button:active {
    background: #0a0a0a;
}

/* GNB 메뉴 - 피그마 디자인 기반 */
#gnb1 {
    width: 100%;
    height: auto !important;
    background: none !important;
}
#gnb1::before{
    background: none !important;
}

#gnb1 .gnb1_align {
    max-width: 1200px;
    margin: 0 auto;
}

#gnb1 .gnb_list1 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

#gnb1 .gnb_list1 li {
    flex-shrink: 0;
}

#gnb1 .gnb_list1 li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 500;
    font-style: normal;
    color: #2a2a2a;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    line-height: 19.2px;
    letter-spacing: -0.8px;
}

/* 메뉴 아이콘 스타일 */
#gnb1 .gnb_list1 li a .menu-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#gnb1 .gnb_list1 li a .menu-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

#gnb1 .gnb_list1 li a .menu-text {
    white-space: nowrap;
}

/* 호버 효과 */
#gnb1 .gnb_list1 li a:hover {
    color: #2a2a2a;
    background-color: transparent;
}

/* 활성 메뉴 (현재 페이지) */
#gnb1 .gnb_list1 li.on a {
    color: #2a2a2a;
    font-weight: 500;
}

#gnb1 .gnb_list1 li.on a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
}

/* 모바일 헤더 */
.header-mobile {
    display: none;
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-mobile .btn-back {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #333;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.header-mobile .btn-back:hover {
    background-color: #f5f5f5;
}

.header-mobile .btn-back:active {
    background-color: #e5e5e5;
}

.header-mobile .mobile-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #2a2a2a;
    flex: 1;
    text-align: center;
    margin: 0;
    padding: 0 16px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 햄버거 버튼 */
.header-mobile .btn-hamburger {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.header-mobile .btn-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #2a2a2a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header-mobile .btn-hamburger:hover span {
    background-color: var(--primary-color);
}

.header-mobile .btn-hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.header-mobile .btn-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.header-mobile .btn-hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 모바일 사이드 메뉴 */
.mobile-side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    pointer-events: none;
}

.mobile-side-menu.active {
    display: block;
    pointer-events: auto;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-side-menu.active .mobile-menu-overlay {
    opacity: 1;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-side-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.mobile-menu-header h3 {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #2a2a2a;
    margin: 0;
}

.mobile-menu-header .btn-menu-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.mobile-menu-header .btn-menu-close:hover {
    background-color: #f5f5f5;
    color: #2a2a2a;
}

.mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}

.mobile-menu-body::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu-body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.mobile-menu-body::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.mobile-menu-body::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* 모바일 메뉴 로고 */
.mobile-menu-logo a {
    display: block;
    line-height: 0;
}

.mobile-menu-logo img {
    width: 180px;
    height: auto;
    display: block;
}

/* 모바일 메뉴 검색 */
.mobile-menu-search {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.mobile-search-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mobile-search-input-wrapper input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f8f8;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
}

.mobile-search-input-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
}

.mobile-search-input-wrapper input[type="text"]::placeholder {
    color: #999;
}

.mobile-search-input-wrapper .btn-search-submit {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mobile-search-input-wrapper .btn-search-submit:hover {
    background-color: var(--primary-hover);
}

/* 모바일 사용자 메뉴 */
.mobile-menu-user {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.mobile-user-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-user-menu li {
    margin: 0;
}

.mobile-user-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background-color: #f8f8f8;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #2a2a2a;
}

.mobile-user-menu li a:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.mobile-user-menu li a .menu-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.mobile-user-menu li a .menu-text {
    flex: 1;
}

/* 모바일 GNB 메뉴 */
.mobile-menu-gnb {
    margin-bottom: 0;
}

.mobile-gnb-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-gnb-menu li {
    margin: 0;
}

.mobile-gnb-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background-color: #f8f8f8;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #2a2a2a;
    position: relative;
}

.mobile-gnb-menu li a:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.mobile-gnb-menu li.on a {
    background-color: #fff5f8;
    color: var(--primary-color);
    font-weight: 600;
}

.mobile-gnb-menu li.on a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background-color: var(--primary-color);
    border-radius: 0 2px 2px 0;
}

.mobile-gnb-menu li a .menu-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-gnb-menu li a .menu-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mobile-gnb-menu li a .menu-text {
    flex: 1;
}

/* ==================== 반응형 - 태블릿 (1200px 초과 시 데스크톱 헤더 표시) ==================== */
@media (min-width: 1201px) {
    /* 데스크톱 헤더 표시 */
    #header1 {
        display: block !important;
    }
    
    /* 모바일 헤더 숨김 */
    .header-mobile {
        display: none !important;
    }
    
    /* GNB 메뉴 표시 */
    #gnb1 {
        display: block !important;
    }
}

/* ==================== 반응형 - 태블릿 (1024px ~ 1200px) ==================== */
@media (max-width: 1240px) and (min-width: 1025px) {
    /* 이 구간은 모바일 헤더가 표시됨 */
    #header1 .head_search_roll1 .head_search{
        width: 1100px  !important;
    }
    #header1 .head_search_roll1 .head_search h1{
        width : auto !important;
    }
    #gnb1::before{
        display: none !important;
    }
    #gnb1 .gnb1_align{
        width: 1100px  !important;
    }

}

/* ==================== 반응형 - 모바일 ==================== */
@media (max-width: 1200px) {
    /* 데스크톱 헤더 숨김 */
    #header1 {
        display: none !important;
    }
    
    /* 모바일 헤더 표시 */
    .header-mobile {
        display: flex !important;
    }
    
    /* GNB 메뉴 모바일에서 숨김 (햄버거 메뉴로 이동) */
    #gnb1 {
        display: none !important;
    }
    
    /* 모바일 사이드 메뉴 스타일 조정 */
    .mobile-menu-content {
        width: 85%;
        max-width: 360px;
    }
    
    .mobile-menu-logo img {
        width: 160px;
    }
    
    .mobile-menu-search {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .mobile-menu-user {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .mobile-user-menu li a,
    .mobile-gnb-menu li a {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .mobile-user-menu li a .menu-icon,
    .mobile-gnb-menu li a .menu-icon {
        width: 22px;
        height: 22px;
        font-size: 18px;
    }
}

/* ==================== 반응형 - 작은 모바일 ==================== */
@media (max-width: 480px) {
    .header-mobile {
        padding: 10px 12px;
    }
    
    .header-mobile .btn-back {
        width: 36px;
        height: 36px;
        padding: 6px;
        font-size: 20px;
    }
    
    .header-mobile .btn-hamburger {
        width: 24px;
        height: 20px;
    }
    
    .header-mobile .btn-hamburger span {
        height: 2.5px;
    }
    
    .header-mobile .mobile-title {
        font-size: 16px;
        padding: 0 12px;
    }
    
    .mobile-menu-content {
        width: 90%;
        max-width: 320px;
    }
    
    .mobile-menu-header {
        padding: 14px 16px;
    }
    
    .mobile-menu-header h3 {
        font-size: 16px;
    }
    
    .mobile-menu-body {
        padding: 16px;
    }
    
    .mobile-menu-logo {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .mobile-menu-logo img {
        width: 140px;
    }
    
    .mobile-menu-search {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
    
    .mobile-menu-user {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
    
    .mobile-user-menu li a,
    .mobile-gnb-menu li a {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* ==================== 반응형 - 매우 작은 모바일 ==================== */
@media (max-width: 360px) {
    .header-mobile {
        padding: 8px 10px;
    }
    
    .header-mobile .btn-back {
        width: 32px;
        height: 32px;
        padding: 4px;
        font-size: 18px;
    }
    
    .header-mobile .btn-hamburger {
        width: 22px;
        height: 18px;
    }
    
    .header-mobile .mobile-title {
        font-size: 15px;
        padding: 0 8px;
    }
    
    .mobile-menu-content {
        width: 95%;
        max-width: 300px;
    }
    
    .mobile-menu-header {
        padding: 12px 14px;
    }
    
    .mobile-menu-header h3 {
        font-size: 15px;
    }
    
    .mobile-menu-body {
        padding: 14px;
    }
    
    .mobile-menu-logo img {
        width: 120px;
    }
    
    .mobile-user-menu li a,
    .mobile-gnb-menu li a {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .mobile-user-menu li a .menu-icon,
    .mobile-gnb-menu li a .menu-icon {
        width: 20px;
        height: 20px;
        font-size: 16px;
    }
}
