/* =========================================
   Header Component (Extracted from main.css)
========================================= */
.header-wrap {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: 0.3s;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    height: 40px;
    font-weight: 800;
    font-size: 24px;
    color: #01419a; /* Trust Blue */
    display: flex;
    align-items: center;
}

.header-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.nav-list {
    display: flex;
    height: 100%;
    gap: 5px;
    align-items: center;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    border-radius: 30px;
    transition: 0.3s;
    background: transparent;
}

.nav-item:hover {
    color: #01419a;
    background: rgba(1, 65, 154, 0.05); /* Trust Blue Alpha */
}

.header-util {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-consult {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 24px;
    background: #01419a; /* Trust Blue */
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 2px; /* Sharper edges */
    transition: 0.3s;
    border: 1px solid #01419a;
}

.btn-consult:hover {
    background: #002e70; /* Darker Blue */
    box-shadow: 0 5px 15px rgba(1, 65, 154, 0.2);
}

.btn-hamburger {
    display: none;
    font-size: 32px;
    color: #111111;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: none;
    padding: 40px 0;
    z-index: 999;
}

.header-wrap:hover .mega-menu {
    display: block;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
}

.mega-col-title {
    color: #01419a;
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
    border-bottom: 2px solid #01419a;
    padding-bottom: 8px;
}

.mega-sub-item {
    display: block;
    margin-bottom: 10px;
    color: #666666;
    font-size: 15px;
}

.mega-sub-item:hover {
    color: #00d2ff;
    transform: translateX(5px);
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.mobile-menu-wrap {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: #ffffff;
    z-index: 2001;
    transition: 0.4s cubic-bezier(0.33, 1, 0.68, 1);
    display: flex;
    flex-direction: column;
}

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

.mobile-menu-wrap.active {
    right: 0;
}

.m-head {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eeeeee;
}

.m-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

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

.m-menu-tit {
    font-weight: 700;
    margin-bottom: 10px;
    color: #01419a;
    display: block;
}

.m-sub-link {
    display: block;
    padding: 12px 0;
    color: #555555;
    border-bottom: 1px solid #f5f5f5;
    font-size: 15px;
    transition: 0.2s;
}

.m-sub-link:hover {
    color: #01419a;
    padding-left: 10px;
}

@media (max-width: 1200px) {
    .nav-list {
        display: none;
    }
    .mega-menu {
        display: none !important;
    }
    .btn-hamburger {
        display: block;
    }
    .btn-consult {
        display: none;
    }
}

@media (max-width: 768px) {
    .m-menu-item {
        margin-bottom: 15px;
    }
    .m-menu-tit {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 8px;
    }
    .m-sub-link {
        padding: 10px 0;
        font-size: 14px;
    }
}

/* 2nd Header implementation (scrolled) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 90px;
    background-color: transparent;
    transition: background-color 0.3s, box-shadow 0.3s, height 0.4s ease-out;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header .wrap {
    max-width: 1300px;
    margin: 0 auto;
}

.header.scrolled {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    background-color: rgba(255, 255, 255, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #eee;
}
.header.menu-open {
    height: 400px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}
.header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}
.header .logo {
    z-index: 2;
    width: 140px;
    height: auto;
    margin-top: 0px;
}
.header .logo img {
    width: 100%;
    transition: opacity 0.3s;
}
.header .logo .logo-dark {
    display: block;
}
.header .logo .logo-white {
    display: none;
}
.header .logo .logo-white img {
    filter: brightness(0) invert(1);
}
/* --- Desktop Navigation --- */
.nav-desktop {
    display: flex;
    align-items: center;
    height: 100%;
}
.nav-desktop .gnb {
    display: flex;
    gap: 30px;
}
.nav-desktop .gnb > li {
    width: auto;
    box-sizing: border-box;
}
.nav-desktop .gnb > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    position: relative;
    height: 90px;
    width: 100%;
    font-size: 20px;
    font-weight: 700;
    color: #343a40; /* 기본 텍스트 색상 (스크롤 전) */
    transition: color 0.3s;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}
/* 스크롤 전 투명 배경일 때 텍스트 색상 (흰색) */
.header:not(.scrolled):not(.menu-open) .nav-desktop .gnb > li > a {
    color: #ffffff;
}
/* 스크롤 전 모바일 트리거 색상 (흰색) */
.header:not(.scrolled):not(.menu-open) #menu-toggle {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
/* 스크롤 전/메뉴 닫혔을 때 (투명 배경) 흰색 로고 표시 */
.header:not(.scrolled):not(.menu-open) .logo .logo-white {
    display: block;
}
.header:not(.scrolled):not(.menu-open) .logo .logo-dark {
    display: none;
}
.nav-desktop .gnb > li > a:hover {
    color: #072646; /* Updated Color */
}
/* 스크롤 안됐을 때 호버 색상 */
.header:not(.scrolled):not(.menu-open) .nav-desktop .gnb > li > a:hover {
    color: #ddd;
}
.nav-desktop .gnb > li > a::after {
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #072646; /* Updated Color */
    transition: width 0.3s;
    content: "";
    transform: translateX(-50%);
}
/* 스크롤 안됐을 때 밑줄 색상 */
.header:not(.scrolled):not(.menu-open) .nav-desktop .gnb > li > a::after {
    background-color: #ffffff;
}
.nav-desktop .gnb > li:hover > a::after {
    width: calc(100% - 36px);
}

/* --- Mega Menu --- */
.mega-menu-panel {
    position: absolute;
    top: 90px;
    left: 0;
    z-index: 1;
    width: 100%;
    visibility: hidden;
    padding: 30px 0;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, visibility 0.4s;
    opacity: 0;
    transform: translateY(-10px);
    border-top: 1px solid #eee;
}
.header.menu-open .mega-menu-panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}
.mega-menu-panel .wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center; /* 변경: 기존 flex-end에서 center로 변경하여 화면 가운데 정렬 구현 */
    height: auto;
}
.submenu-column.megaf {
    margin-left: 0;
}
.submenu-column {
    flex: none; /* 균등 분할 해제 */
    width: 180px;
    box-sizing: border-box;
    padding: 0 18px;
}
.submenu-column h4 {
    font-size: 19px;
    font-weight: 700;
    color: #000; /* Updated Color */
    margin-bottom: 5px;
    padding-bottom: 10px;
    word-break: keep-all;
    white-space: nowrap;
    text-align: left; /* 좌측 정렬 명시 */
}
.submenu-column ul li a {
    display: block;
    padding: 9px 0;
    font-size: 16px;
    color: #495057;
    transition: color 0.3s, transform 0.3s;
    word-break: keep-all;
    white-space: nowrap;
    text-align: left; /* 좌측 정렬 명시 */
}
.submenu-column ul li a:hover {
    color: #072646; /* Updated Color */
    transform: translateX(4px);
}

#menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001; /* 1000인 헤더보다 높게 */
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

@media (max-width: 1024px) {
    .nav-desktop {
        display: none !important;
    }
    .mega-menu-panel {
        display: none !important;
    }
    #menu-toggle {
        display: block !important;
        background: transparent;
        border: none;
        outline: none;
    }
    .header {
        height: 70px;
    }
    .header .wrap {
        padding: 0 20px;
        height: 70px;
    }
    #menu-toggle {
        top: 15px;
        right: 15px;
    }
    .header .logo {
        width: 120px;
    }
}

#menu-toggle i {
    font-size: 28px;
}


.header.scrolled #menu-toggle {
    color: #333;
}


/* =========================================
   Mobile Sidebar & Dimmed Layer (Redesigned 2026)
========================================= */

/* 1. Dimmed Background with Smooth Blur Transition */
#layoutDimmed {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4); /* Midnight charcoal dim */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    cursor: pointer;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#layoutDimmed.active {
    display: block;
    opacity: 1;
}

/* 2. Glassmorphism Sidebar Drawer (#aside) */
#aside {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 380px; /* 세련되게 모바일/태블릿 적정폭 제한 */
    height: 100%;
    background: rgba(255, 255, 255, 1); /* Frosted Glass Base */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 2001;
    clip-path: inset(0 0 0 100%);
    pointer-events: none;
    transition: clip-path 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
}

@media (max-width: 480px) {
    #aside {
        max-width: 100%; /* 모바일 기기에서는 꽉 차게 */
    }
}

#aside.active {
    clip-path: inset(0);
    pointer-events: auto;
}

/* 3. Sidebar Header (Intro) */
#aside .intro {
    padding: 0 24px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    box-sizing: border-box;
    background: transparent;
}

#aside .log img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

/* 4. Elegant Home Card (mobile-home-bar) */
.mobile-home-bar {
    margin: 16px 24px 8px 24px;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 20px -5px rgba(1, 65, 154, 0.15);
    transition: all 0.3s ease;
}

.mobile-home-bar a {
    background: linear-gradient(135deg, #01419a 0%, #00275c 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.mobile-home-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -5px rgba(1, 65, 154, 0.25);
}

.mobile-home-bar a i {
    font-size: 20px;
    color: #ffffff;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-home-bar:hover a i {
    transform: scale(1.18) rotate(-8deg);
}

/* 5. Navigation Container (#lnb) */
#lnb {
    flex: 1;
    padding: 12px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#lnb > ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#lnb > ul > li {
    width: 100%;
    border-bottom: none;
}

/* 1차 메뉴 스타일 - 카딩 및 인디케이터 적용 */
#lnb > ul > li > a {
    display: block;
    padding: 16px 20px;
    font-size: 16.5px;
    font-weight: 700;
    color: #334155; /* Slate 700 */
    position: relative;
    border-radius:0px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 호버 시 부드러운 배경 반사 */
#lnb > ul > li > a:hover {
    background: rgba(15, 23, 42, 0.03);
    color: #0f172a;
}

/* 아코디언 화살표 - 탄성 회전 효과 */
#lnb > ul > li > a::after {
    content: '\e942'; /* xeicon angle down */
    font-family: 'xeicon';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s;
    font-size: 14px;
    color: #94a3b8;
    font-weight: 400;
}

/* 1차 활성화(on) 상태 디자인 */
#lnb > ul > li.on > a {
    color: #01419a; /* 브랜드 블루 */
    background: rgba(1, 65, 154, 0.05); /* 브랜드 블루 연한 투명 배경 */
}

/* 활성화 시 왼쪽 세로 인디케이터 바 생성 */
#lnb > ul > li.on > a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0%;
    height: 100%;
    width: 4px;
    background: #01419a;
    animation: indicator-in 0.3s ease forwards;
}

@keyframes indicator-in {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

#lnb > ul > li.on > a::after {
    transform: translateY(-50%) rotate(180deg);
    color: #01419a;
}

/* 6. Submenu (Accordion Drawer) */
#lnb > ul > li > ul {
    display: none;
    background: rgba(241, 245, 249, 0.45); /* 반투명 그레이 톤 */
    border-radius: 12px;
    margin: 4px 4px 8px 4px;
    padding: 6px 0;
}

#lnb > ul > li > ul > li > a {
    display: block;
    padding: 12px 20px 12px 32px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b; /* Slate 500 */
    position: relative;
    transition: all 0.3s ease;
}

/* 서브메뉴 왼쪽 은은한 닷(dot) 구분선 */
#lnb > ul > li > ul > li > a::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

#lnb > ul > li > ul > li > a:hover {
    color: #01419a;
    padding-left: 36px;
}

#lnb > ul > li > ul > li > a:hover::before {
    background: #01419a;
    transform: translateY(-50%) scale(1.5);
}

#lnb > ul > li > ul > li > a::after {
    display: none;
}

/* 7. Close Button (Glass Circular Button) */
.btnClose {
    position: relative;
    width: 40px;
    height: 40px;
    font-size: 18px;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.05); /* 투명 칩 */
    border-radius: 50%;
    border: none;
    outline: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btnClose:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
    transform: rotate(90deg) scale(1.08);
}

/* 8. Bottom SNS Area (Neumorphic Touch) */
.aside-sns-area {
    padding: 18px 24px;
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.sns-title {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
}

.sns-icons {
    margin-top:10px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
margin-top:10px;
}

.sns-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sns-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

.sns-btn.kakao {
    background: #fee500;
    color: #3c1e1e;
}
.sns-btn.kakao:hover {
    background: #fada0a;
}
.sns-btn.naver {
    background: #19ce60;
    color: #ffffff;
}
.sns-btn.naver:hover {
    background: #15b552;
}
.sns-btn.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    color: #ffffff;
}
.sns-btn.instagram:hover {
    opacity: 0.95;
}

/* 9. Bottom Contact Actions (3D Float Dual Buttons) */
.aside-footer-actions {
    width: 100%;

    box-sizing: border-box;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    background: #ffffff;
    padding: 12px 16px 20px 16px; /* 아래로 살짝 밀어 여유 공간 구현 */
}
.quick-wrapper{
    display: flex;
    width: 100%;
    gap: 10px;
}

.btn-aside-call,
.btn-aside-quote {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px; /* 살짝 슬림하고 콤팩트하게 변경 */
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
}

.btn-aside-call {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.btn-aside-call i {
    font-size: 18px;
    color: #ffffff;
}

.btn-aside-call:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.35);
}

.btn-aside-quote {
    background: linear-gradient(135deg, #01419a 0%, #00275c 100%);
    color: #ffffff;
}

.btn-aside-quote i {
    font-size: 18px;
    color: #ffffff;
}

.btn-aside-quote:hover {
    background: linear-gradient(135deg, #003680 0%, #001a3d 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(1, 65, 154, 0.35);
}



