/********************************************************
■ 전체 배너 및 레이아웃 조정
********************************************************/

/* ========================================
   1. 메인 배너 - 모바일 2열 fluid, 크롭 없음
======================================== */
.basic-banner,
.static-grid-banner {
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    row-gap: 4px !important;
    column-gap: 4px !important;
}

.basic-banner img,
.static-grid-banner img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

.basic-banner .item,
.static-grid-banner .item,
.basic-banner li,
.static-grid-banner li {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* PC(768px 이상): 400px 고정 */
@media (min-width: 768px) {
    .basic-banner,
    .static-grid-banner {
        grid-template-columns: 400px 400px !important;
    }
    .basic-banner img,
    .static-grid-banner img {
        width: 400px !important;
        height: 90px !important;
        object-fit: fill !important;
    }
    .basic-banner .item,
    .static-grid-banner .item,
    .basic-banner li,
    .static-grid-banner li {
        width: 400px !important;
        height: 90px !important;
        overflow: hidden !important;
    }
}

/* 사이드바 1열 유지 */
.col-md-3 .basic-banner,
.col-md-3 .static-grid-banner {
    grid-template-columns: 1fr !important;
}
.col-md-3 .basic-banner img,
.col-md-3 .static-grid-banner img {
    width: 100% !important;
    height: auto !important;
}
.col-md-3 .basic-banner .item,
.col-md-3 .static-grid-banner .item,
.col-md-3 .basic-banner li,
.col-md-3 .static-grid-banner li {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
}
.col-md-3 .basic-banner .img-wrap,
.col-md-3 .static-grid-banner .img-wrap,
.col-md-3 .basic-banner .img-item,
.col-md-3 .static-grid-banner .img-item {
    height: auto !important;
    overflow: visible !important;
}

/* ========================================
   2. 로그인/공지 영역
======================================== */
.na-outlogin, .outlogin-wrap, .login-box {
    width: 100% !important;
    max-width: 100% !important;
}
.na-outlogin img, .outlogin-wrap img, .login-box img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
}
.col-md-3 .na-widget img, .col-lg-3 .na-widget img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}

/* ========================================
   3. 커뮤니티 좌측 배너
======================================== */
#nt_side img, .side-basic img, .side-index img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}
#nt_side .item, .side-basic .item {
    width: 100% !important;
    margin: 5px 0 !important;
    overflow: hidden !important;
}
#nt_side { padding-right: 20px !important; }
.nt-contents { padding-left: 15px !important; }

/* ========================================
   4. 여백 조정
======================================== */
.nt-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
}
.row {
    margin-left: -5px !important;
    margin-right: -5px !important;
}
.row>[class*="col-"] {
    padding-left: 5px !important;
    padding-right: 5px !important;
}
#nt_main .row { gap: 5px !important; }

/* ========================================
   5. 팝업 모바일 최적화
======================================== */
@media (max-width: 767px) {
    #hd_pop {
        overflow: hidden !important;
        width: 100% !important;
    }
    #hd_pops_1, #hd_pops_2 {
        position: fixed !important;
        top: auto !important;
        bottom: 60px !important;
        width: 46vw !important;
        max-width: 46vw !important;
        height: auto !important;
        z-index: 9999 !important;
    }
    #hd_pops_1 { left: 2vw !important; }
    #hd_pops_2 { left: 52vw !important; }
    #hd_pops_1 .hd_pops_con,
    #hd_pops_2 .hd_pops_con {
        width: 100% !important;
        height: 46vw !important;
        overflow: hidden !important;
    }
    #hd_pops_1 .hd_pops_con img,
    #hd_pops_2 .hd_pops_con img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

/* ========================================
   6. 팝업 이미지 1:1 고정 (데스크탑)
======================================== */
.hd_pops_con {
    overflow: hidden !important;
}
.hd_pops_con img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* ========================================
   7. 모바일 배너 좌우 여백 제거
======================================== */
@media (max-width: 575px) {
    .home-main-banner,
    .home-mid-banner {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .home-main-banner .basic-banner,
    .home-main-banner .static-grid-banner,
    .home-mid-banner .basic-banner,
    .home-mid-banner .static-grid-banner {
        width: 100% !important;
    }
}
