/* -------------------------------
   諛섏쓳�삎 誘몃뵒�뼱荑쇰━
-------------------------------- */

/* 紐⑤컮�씪 硫붾돱 �넗湲 踰꾪듉 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 50px;
    height: 50px;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #262626;
    margin: 5px auto;
    transition: 0.3s;
    border-radius: 2px;
}

/* 硫붾돱 �뿴�졇�쓣 �븣 X 紐⑥뼇�쑝濡� 蹂寃� */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* 紐⑤컮�씪 硫붾돱 �삤踰꾨젅�씠 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.mobile-menu-overlay.active {
    left: 0;
}

/* 紐⑤컮�씪 硫붾돱 �뿤�뜑 */
.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header h2 {
    font-size: 18px;
    font-weight: 500;
    color: #262626;
    margin: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    line-height: 1;
}

/* 紐⑤컮�씪 �꽕鍮꾧쾶�씠�뀡 */
.mobile-menu-nav {
    padding: 0;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

.mobile-menu-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-nav > ul > li {
    border-bottom: 1px solid #eee;
}

.mobile-menu-nav > ul > li > a {
    display: block;
    padding: 18px 20px;
    color: #262626;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
}

/* �꽌釉뚮찓�돱 �넗湲 �븘�씠肄� */
.submenu-toggle {
    float: right;
    color: #999;
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* 紐⑤컮�씪 �꽌釉뚮찓�돱 */
.mobile-submenu {
    background: #f8f8f8;
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.active {
    display: block;
    max-height: 500px;
}

.mobile-submenu li {
    border-bottom: 1px solid #e5e5e5;
}

.mobile-submenu li:last-child {
    border-bottom: none;
}

.mobile-submenu li a {
    display: block;
    padding: 12px 20px 12px 40px;
    font-size: 15px;
    color: #666;
    font-weight: 400;
    text-decoration: none;
}

.mobile-submenu li a:hover {
    background: #efefef;
    color: #262626;
}

.submenu-toggle {
    float: right;
    color: #999;
    font-size: 14px;
}

/* 諛깅뱶濡� */
.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
}

.mobile-backdrop.active {
    display: block;
}

/* �뜲紐⑥슜 而⑦뀗痢� �뒪���씪 */
.demo-content {
    padding: 40px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.demo-content h2 {
    margin-bottom: 20px;
    color: #262626;
}

.demo-content p {
    color: #666;
    line-height: 1.6;
}


@media (max-width: 1024px) {
    .mainVisual ul.bxslider li {
        height: 500px;
        background-size: cover;
    }
    .mainVisual .bx-wrapper .bx-controls .bx-controls-direction a {
        width: 40px;
        height: 40px;
    }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
    /* body overflow 처리 */
    body {
        overflow-x: hidden;
    }

    /* 슬라이더 컨테이너 - 화면 전체 너비 */
    .mainVisual {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(-50vw + 50%);
        padding: 0;
        margin:0;
    }

    .mainVisual .bx-wrapper {
        max-width: 100%;
        margin:0;
    }

    /* li 높이와 배경 설정 */
    .mainVisual ul.bxslider li {
        height: 220px;
        background-size: contain; /* cover 대신 contain으로 전체 이미지 표시 */
        background-position: center center;
        background-repeat: no-repeat;
    }

    /* 각 슬라이드 배경 재지정 */
    .mainVisual ul.bxslider li.v1 {
        background-size: contain;
        background-repeat: no-repeat;
    }

    .mainVisual ul.bxslider li.v2 {
        background-size: contain;
        background-repeat: no-repeat;
    }

    .mainVisual ul.bxslider li.v3 {
        background-size: contain;
        background-repeat: no-repeat;
    }

    .mainVisual ul.bxslider li.v4 {
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* 컨트롤 위치 조정 */
    .mainVisual .bx-wrapper .bx-controls {
        bottom: 20px;
    }

    .mainVisual .bx-wrapper .bx-controls .bx-pager {
        width: 90%;
        max-width: 300px;
        bottom: 5px;
    }

    .mainVisual .bx-wrapper .bx-controls .bx-controls-direction a {
        width: 30px;
        height: 30px;
        background-size: contain;
        top: 50%;
        transform: translateY(-50%);
    }

    .mainVisual .bx-wrapper .bx-controls .bx-controls-direction .bx-prev {
        left: 10px;
        top:-90px;
    }

    .mainVisual .bx-wrapper .bx-controls .bx-controls-direction .bx-next {
        right: 10px;
        top:-90px;
    }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
  .mainVisual ul.bxslider li {
      height: 160px;
  }

  .mainVisual .bx-wrapper .bx-controls .bx-pager {
      max-width: 250px;
  }

  .mainVisual .bx-wrapper .bx-controls .bx-controls-direction a {
      width: 24px;
      height: 24px;
  }

  .mainVisual .bx-wrapper .bx-controls .bx-controls-direction .bx-prev {
      left: 5px;
      top:-50px;
  }

  .mainVisual .bx-wrapper .bx-controls .bx-controls-direction .bx-next {
      right: 5px;
      top:-50px;
  }

  #header h1 {
      font-size: 18px;
  }

  .mobile-menu-overlay {
      width: 90%;
  }
}


@media (max-width: 768px) {
    /* 헤더와 슬라이더 사이 여백 제거 */
    #header {
        margin-bottom: 0;
    }

    /* 슬라이더 위 여백 제거 */
    .mainVisual {
        margin-top: 0;
        padding-top: 0;
    }

    /* 슬라이더 부모 요소 여백 제거 */
    .mainVisual + * {
        margin-top: 0;
        padding-top: 0;
    }

    /* 모든 상하 여백 강제 제거 */
    body > *:has(.mainVisual) {
        margin: 0;
        padding: 0;
    }
}

/* �깭釉붾┸ 媛濡� (Landscape) */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    body {
        width: 100%;
    }

    .mobile-menu-toggle {
        display: block;
    }

    #header nav {
        display: none;
    }

    .header-container {
        min-height: 70px;
        padding: 0 15px;
    }

    #header h1 {
        font-size: 20px;
        margin-top: 0 !important;
    }

    #header .topMenu {
        display: none;
    }

    h1.logo {
        position: relative;
        right: 40%;
    }
}

/* �깭釉붾┸/紐⑤컮�씪 �꽭濡� (1024px �씠�븯) */
@media (max-width: 1024px) and (orientation: portrait) {
    body {
        width: 100%;
        min-width: inherit;
    }

    .mobile-menu-toggle {
        display: block;
    }

    #header .topMenu {
        display: none;
        height: 0px;
    }

    #header {
        background: #fff;
        position: fixed;
        width: 100%;
        z-index: 100;
        height:55px;
    }

    #header nav {
        display: none;
    }

    .header-container {
        min-height: 75px;
        padding: 0 10px;
        display: grid;
    }

    #header h1 {
        font-size: 20px;
        margin-top: 0 !important;
    }

    h1.logo {
        position: relative;
        left: 50px;
        top: 10px;
    }

    .m_auto {
        margin: 0 auto;
        max-width: 380px;
        overflow: hidden;
    }

    .container {
        padding-top: 75px;
    }

    /* 硫붿씤 �꺆 �쁺�뿭 */
    .main_tab_area {
        position: relative;
        margin: auto;
        width: 100% !important;
        height: 475px;
        display: block;
    }

    .main_con01, .main_con02 {
        margin: 0 auto;
        height: 400px;
        display: contents;
    }

    .tit_h3 {
        font-size: 20px;
    }


    .main_tab_area .tabs {
        height: 150px;
    }

    .main_tab_area .tabs li {
        width: 50%;
        font-size: 20px;
    }

    .main_tab_area .tabs li a {
        width: 100%;
        border: 1px solid #ccc;
    }

    .main_tab_area .tabs li a.last {
        border-right: none;
        width: 100%;
    }

    /* �꺆 鍮꾩＜�뼹 */
    .tab01Visual ul.bxslider li a,
    .tab02Visual ul.bxslider li a,
    .tab03Visual ul.bxslider li a,
    .tab04Visual ul.bxslider li a {
        width: 50%;
    }

    .tab01Visual ul.bxslider li a h4,
    .tab02Visual ul.bxslider li a h4,
    .tab03Visual ul.bxslider li a h4,
    .tab04Visual ul.bxslider li a h4 {
        font-size: 25px;
    }

    .tab01Visual ul.bxslider li a p,
    .tab02Visual ul.bxslider li a p,
    .tab03Visual ul.bxslider li a p,
    .tab04Visual ul.bxslider li a p {
        font-size: 15px;
    }

    /* 而⑦뀗痢� �쁺�뿭 */
    .con01 {
        width: 100%;
    }

    .main_con02 {
        width: 100%;
    }

    .main_tab_area02 {
        width: 100%;
    }

    .tab_content02 {
        width: 87%;
        border-top: 1px solid #d7d7d7
    }

    .tab_content02 ul li a {
        width: 275px;
    }

    .main_tab_area02 .tabs02 {
        width: 378px;
    }

    .main_tab_area02 .tabs02 li {
        width: 33% !important;
    }

    .main_tab_area02 .tabs02 li a.first,
    .main_tab_area02 .tabs02 li a,
    .main_tab_area02 .tabs02 li a.last {
        width: 100%;
    }

    /* con02 �쁺�뿭 */
    .con02 {
        margin: 30px 22px -65px 0 !important;
        width: 100%;
    }

    .con02Visual {
        width: 100%;
    }

    .con02Visual ul.bxslider li {
        width: 100%;
    }

    .con02Visual ul.bxslider li.v1 {
        background: url(../image/main/con_v1.jpg) no-repeat;
        background-size: contain;
    }

    /* con03 �쁺�뿭 */
    .con03 {
        margin: 83px 0 0 0;
        width: 100%;
    }

    .con03 a.first {
        background: #647189 url(../image/main/con03_01.gif) no-repeat 55px center;
    }

    .con03 a.two {
        margin: 20px 0 0 0;
        background: #23304b url(../image/main/con03_02.gif) no-repeat 55px center;
    }

    .con03 a {
        padding: 34px 0 34px 150px;
    }

    .main_con {
        padding: 0 0 40px 0;
    }

    .main_con03 {
        width: 100%;
    }

    .main_con03 ul {
        margin: 30px auto;
    }

    .main_con03 ul li {
        width: 47%;
        background: none;
        margin: 5px 0 30px 10px;
    }
}

        .demo-content {
            padding: 40px 20px;
            text-align: center;
            max-width: 1200px;
            margin: 0 auto;
        }

        .demo-content h2 {
            margin-bottom: 20px;
            color: #262626;
        }

        .demo-content p {
            color: #666;
            line-height: 1.6;
        }
        /* ============================================
           탭 메뉴 모바일 반응형 - 2열 그리드
           ============================================ */

        @media screen and (max-width: 768px) {
            /* 탭 컨테이너 */
            .tab_area {
                height: auto !important;
                margin-bottom: 20px;
                overflow: visible;
                border: none;
            }

            .tab_area.line_one {
                height: auto !important;
            }

            .tab_area ul {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 0;
                width: 100%;
                border: 1px solid #d7d7d7;
                box-sizing: border-box;
            }

            /* 모든 탭 아이템 */
            .tab_area ul li {
                float: none;
                width: 100% !important;
                margin: 0;
                border-right: 1px solid #d7d7d7;
                border-bottom: 1px solid #d7d7d7;
                box-sizing: border-box;
            }

            /* 오른쪽 열 보더 제거 */
            .tab_area ul li:nth-child(even) {
                border-right: none;
            }

            /* 마지막 행 하단 보더 제거 */
            .tab_area ul li:last-child,
            .tab_area ul li:nth-last-child(2):nth-child(odd) {
                border-bottom: none;
            }

            /* 홀수 개일 때 마지막 아이템 전체 너비 */
            .tab_area ul li:last-child:nth-child(odd) {
                grid-column: 1 / -1;
                border-right: none;
                border-bottom: none;
            }

            .tab_area ul li.quad,
            .tab_area ul li.quad.none,
            .tab_area ul li.triple,
            .tab_area ul li.triple.none,
            .tab_area ul li.double,
            .tab_area ul li.double.none,
            .tab_area ul li.penta,
            .tab_area ul li.penta.none,
            .tab_area ul li.none {
                width: 100% !important;
            }

            .tab_area ul li a {
                width: 100%;
                height: 55px;
                line-height: 55px;
                font-size: 18px !important;
                border: none !important;
                box-sizing: border-box;
                text-decoration: none;
                display: block;
            }

            .tab_area ul li a.last,
            .tab_area ul li a.top {
                border: none !important;
            }

            /* 활성화 상태 */
            .tab_area ul li a.on,
            .tab_area ul li a:hover {
                background: #a9c14f;
                color: #fff;
                font-weight: 500;
            }

            /* 화살표 숨김 */
            .tab_area ul li a span,
            .tab_area ul li a:hover span,
            .tab_area ul li a.on span {
                display: none !important;
            }

            /* 서브 탭 (2열 그리드) */
            .tab_area.sub_tab ul {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 0;
            }

            .tab_area ul li.sub {
                width: 100% !important;
                border-right: 1px solid #d7d7d7;
                border-bottom: 1px solid #888888;
            }

            .tab_area ul li.sub:nth-child(even) {
                border-right: none;
            }

            .tab_area ul li.sub:last-child,
            .tab_area ul li.sub:nth-last-child(2) {
                border-bottom: none;
            }

            .tab_area ul li.sub.none {
                width: 100% !important;
            }

            .tab_area ul li.sub a {
                width: 100%;
                height: 55px;
                line-height: 55px;
                font-size: 15px;
                border: none !important;
                background: #fff;
                box-sizing: border-box;
            }

            .tab_area ul li.sub a.last {
                border: none !important;
            }

            /* 서브 탭 활성화 */
            .tab_area ul li.sub a.on {
                color: #a9c14f;
                font-weight: 600;
                background: #f8f9fa;
            }

            .tab_area ul li.sub a:hover {
                color: #a9c14f;
                background: #f8f9fa;
            }

            /* 서브 탭 하단 라인 */
            .tab_area ul li.sub a:hover span,
            .tab_area ul li.sub a.on span {
                display: block !important;
                margin-left: 0 !important;
                position: absolute;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%);
                background: #a9c14f;
                width: 80px;
                height: 4px;
            }
        }

        /* 작은 모바일 */
        @media screen and (max-width: 480px) {
            .tab_area {
                margin-bottom: 15px;
            }

            .tab_area ul li a {
                height: 50px;
                line-height: 50px;
                font-size: 12px !important;
            }

            .tab_area ul li.sub a {
                height: 50px;
                line-height: 50px;
                font-size: 12px !important;
            }

            .tab_area ul li.sub a:hover span,
            .tab_area ul li.sub a.on span {
                width: 60px;
                height: 3px;
            }
        }
