/* ============================================================
   1. 헤더 메뉴 설정 (기기별 최적화)
   ============================================================ */

/* [PC 버전] 1024px 이상: 텍스트 메뉴 유지 / 햄버거 버튼 숨김 */
@media only screen and (min-width: 1024px) {
    .av-burger-menu-main { display: none !important; }
    #header_main .main_menu {
        right: 0 !important;
        position: absolute !important;
        margin-right: 50px !important;
    }
}

/* [태블릿/모바일] 메뉴 위치 조절 */
@media only screen and (max-width: 1023px) {
    #header_main .main_menu {
        display: block !important;
        right: 0 !important;
        position: absolute !important;
        margin-right: 15px !important;
    }
    .logo img { max-height: 80% !important; }
}

.av-main-nav-wrap { float: right !important; }


/* ============================================================
   2. 마손리 반응형 레이아웃 (태블릿 이하 1열 강제 고정)
   ============================================================ */

/* [PC 버전] 화면이 클 때 3개씩 시원하게 배치 */
@media only screen and (min-width: 990px) {
    .av-masonry-entry {
        width: 33.3% !important; 
    }
}

/* [핵심: 태블릿 &amp; 모바일] 989px 이하부터는 무조건 1줄에 1개씩 크게! */
@media only screen and (max-width: 989px) {
    .av-masonry-entry {
        width: 100% !important; /* 2개씩 나오던 걸 1개로 강제 확대 */
        display: block !important;
        float: none !important;
    }
}

/* 마손리 전체 컨테이너 너비 제한 해제 */
#top .av-masonry-container {
    width: 100% !important;
    max-width: 100% !important;
}


/* ============================================================
   3. 마손리 디자인 (슬림 여백 &amp; 버튼 인양)
   ============================================================ */

#top .av-inner-masonry-content {
    padding: 15px 20px 22px 20px !important;
    height: auto !important;
    overflow: visible !important;
}

.av-inner-masonry-content-pos,
.av-masonry-entry-content {
    overflow: visible !important;
    height: auto !important;
    padding-bottom: 0 !important;
}

#top .av-masonry-entry-title {
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

#top .av-masonry-read-more {
    position: relative !important;
    display: inline-block !important;
    margin-top: 5px !important;
    bottom: auto !important;
    visibility: visible !important;
    font-size: 12px !important;
}


/* ============================================================
   4. 마손리 픽셀 틈새(좌우 흰선) 완벽 차단
   ============================================================ */

#top .av-masonry-entry .av-inner-masonry-img-wrapper {
    width: calc(100% + 4px) !important; 
    margin-left: -2px !important;       
    overflow: hidden !important;        
}

#top .av-masonry-entry img {
    width: 100% !important;
    max-width: none !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
}

#top .av-inner-masonry, 
#top .av-masonry-entry-with-image {
    background-color: transparent !important;
    border: none !important;
}