/**
 * dep2_skins/out_3 스킨 스타일
 * 2뎁스 가로 탭만 (이미지 밖, 위로 올라감)
 * 참고: out_2 기반 - 1뎁스 셀렉트 제거 버전
 *
 * ★ 우측 확장 원리 (out_1과 동일 dep2_bg_layer 방식):
 * - dep2_bg_layer div로 width: calc(100% + 100vw) 확장
 * - out3_area는 overflow: visible
 * - body overflow-x: hidden으로 가로스크롤 방지
 */

/* ★ 서브 전체 가로스크롤 방지 (dep2_bg_layer 우측 확장용) */
body {
    overflow-x: hidden;
}

/* ========================================
   sub2d_menu_out_area.out3_area (이미지 밖 컨테이너)
   ======================================== */

/* PC */
@media only all and (min-width:768px) {
    .out3_area.sub2d_menu_out_area {
        width: 100%;
        float: left;
        position: relative;
        overflow: visible;
        margin-bottom: 20px;
        margin-top: -80px;
        z-index: 50;
    }
    .out3_area .contents-container {
        overflow: visible !important;
    }
}

/* 모바일 */
@media only all and (max-width:767px) {
    .out3_area.sub2d_menu_out_area {
        width: 100%;
        float: left;
        position: relative;
        overflow-x: hidden;
        margin-bottom: 10px;
        margin-top: -10px;
        z-index: 50;
    }
    .out3_area > .contents-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ========================================
   sub2d_menu_area (메뉴 영역)
   ======================================== */

/* PC */
@media only all and (min-width:768px) {
    .out3_area .sub2d_menu_area {
        width: 100%;
        float: left;
        position: relative;
    }
    /* ★ 배경 레이어: 메뉴 영역 + 우측 브라우저 끝까지 확장 */
    .out3_area .dep2_bg_layer {
        position: absolute;
        top: 0;
        left: 0;
        width: calc(100% + 100vw);
        height: 100%;
        border-radius: 12px 0px 0px 12px;
        overflow: hidden;
        backdrop-filter: blur(var(--dep2-bg-blur, 0px));
        -webkit-backdrop-filter: blur(var(--dep2-bg-blur, 0px));
        pointer-events: none;
        z-index: 0;
    }
    .out3_area .dep2_bg_layer::before {
        content: "";
        position: absolute;
        inset: 0;
        background-color: var(--dep2-bg-base-color, var(--dynamic-bg-color, var(--primary)));
        opacity: var(--dep2-bg-opacity, 1);
    }
}

/* 모바일 */
@media only all and (max-width:767px) {
    .out3_area .sub2d_menu_area {
        width: 100%;
        float: left;
        position: relative;
        margin-top: 10px;
        background-color: transparent;
        overflow: hidden;
    }
    .out3_area .dep2_bg_layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        overflow: hidden;
        backdrop-filter: blur(var(--dep2-bg-blur, 0px));
        -webkit-backdrop-filter: blur(var(--dep2-bg-blur, 0px));
        pointer-events: none;
        z-index: 0;
    }
    .out3_area .dep2_bg_layer::before {
        content: "";
        position: absolute;
        inset: 0;
        background-color: var(--dep2-bg-base-color, var(--dynamic-bg-color, var(--primary)));
        opacity: var(--dep2-bg-opacity, 1);
    }
}

/* ========================================
   Sub2d_gnb (2뎁스 메뉴 리스트)
   ======================================== */

/* PC */
@media only all and (min-width:768px) {
    .out3_area .Sub2d_scroller {
        position: relative;
        z-index: 1;
    }
    .out3_area ul.Sub2d_gnb {
        list-style: none;
        width: 100%;
        display: flex;
        flex-direction: row;
        padding: 0px 0px 0px 50px;
        background-color: transparent;
        height: var(--dep2-height, clamp(60px, 5vw, 80px));
        grid-gap: clamp(10px, calc(2.632vw + -0.526px), 50px);
        margin: 0;
    }
    .out3_area ul.Sub2d_gnb li {
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    .out3_area ul.Sub2d_gnb li a {
        padding: 10px 0px 10px 0px;
        font-weight: 600;
        position: relative;
        font-size: var(--dep2-font-size, clamp(14px, 1.1vw, 16px));
        color: rgba(255,255,255,0.70);
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .out3_area ul.Sub2d_gnb li a:hover {
        color: rgba(255,255,255,1);
    }
}

/* 모바일 */
@media only all and (max-width:767px) {
    .out3_area .Sub2d_scroller {
        position: relative;
        z-index: 1;
    }
    .out3_area ul.Sub2d_gnb {
        list-style: none;
        width: 100%;
        float: left;
        display: flex;
        flex-direction: row;
        padding: 0;
        background-color: transparent;
        margin: 0;
        height: var(--dep2-height-mo, 44px);
    }
    .out3_area ul.Sub2d_gnb li {
        padding: 0px 10px;
        height: 100%;
        display: flex;
        align-items: center;
    }
    .out3_area ul.Sub2d_gnb li a {
        padding: 0;
        font-weight: 400;
        position: relative;
        font-size: var(--dep2-font-size-mo, 14px);
        color: #fff;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* ========================================
   현재 선택된 메뉴 (active)
   ======================================== */
.out3_area ul.Sub2d_gnb li.active a {
    color: var(--dep2-active-color, var(--dynamic-point-color, #fff));
    border-radius: 50px;
    z-index: 99;
    position: relative;
}
.out3_area ul.Sub2d_gnb li.active a:after {
    width: 100%;
    float: left;
    height: 5px;
    background-color: var(--dep2-active-color, var(--dynamic-point-color, #333));
    position: absolute;
    bottom: 0px;
    left: 0px;
    content: "";
    border-radius: 10px;
}
/* hover 라인: 왼쪽→오른쪽 확장 */
.out3_area ul.Sub2d_gnb li:not(.active) a:after {
    content: "";
    position: absolute;
    bottom: 0px;
    left: 0px;
    width: 0;
    height: 5px;
    background-color: var(--dep2-active-color, var(--dynamic-point-color, #333));
    border-radius: 10px;
    transition: width 0.3s ease;
}
.out3_area ul.Sub2d_gnb li:not(.active) a:hover:after {
    width: 100%;
}

/* ========================================
   스크롤 래퍼 & 네비게이션
   ======================================== */

/* 모바일: 한 줄 가로 스크롤 + 버튼 */
@media only all and (max-width:767px) {
    .out3_area .Sub2d_viewport {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding: 0 35px;
        position: relative;
        scroll-snap-type: none;
        scrollbar-width: none;
        height: var(--dep2-height-mo, 44px);
    }
    .out3_area .Sub2d_viewport::-webkit-scrollbar {
        display: none;
    }
    .out3_area .Sub2d_viewport > ul.Sub2d_gnb {
        flex-wrap: nowrap !important;
        white-space: nowrap;
        gap: 0;
        width: max-content;
        min-width: 100%;
    }
    .out3_area .Sub2d_viewport > ul.Sub2d_gnb > li {
        flex: 0 0 auto;
        position: relative;
        white-space: nowrap;
    }

    /* 좌/우 네비 버튼 */
    .out3_area .Sub2d_nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        border: 0;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 999;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.2s ease;
        font-size: 18px;
        font-weight: bold;
    }
    .out3_area .Sub2d_nav:hover {
        background: rgba(0, 0, 0, 0.8);
        transform: translateY(-50%) scale(1.1);
    }
    .out3_area .Sub2d_nav.prev {
        left: 5px;
    }
    .out3_area .Sub2d_nav.next {
        right: 5px;
    }
    .out3_area .Sub2d_nav[hidden] {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-50%) scale(0.8);
    }
    .out3_area .Sub2d_scroller::before,
    .out3_area .Sub2d_scroller::after {
        display: none;
    }
}
