/* 컨테이너 */
.mcb-wrapper {
    /* max-width: 1200px; */
    /* margin: 0 auto; */
    font-family: inherit;
}

/* 헤더 (필터 & 검색) */
.mcb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2em;
    /*flex-wrap: wrap;*/
    gap: 1em;
    line-height: 1.0;
    font-size: 1rem;
}

/* 카테고리 버튼 */
.mcb-filters {
    background-color: #F6F6F6;
    padding: 0 0.55em;
}

.mcb-cat-btn {
    background: none;
    border: none;
    padding: 0.8em 0.4em;
    cursor: pointer;
    transition: all 0.3s;
    color: #B3B3B3;
    line-height: 1;
    font-size: inherit;
}

/*.mcb-cat-btn:hover, */.mcb-cat-btn.active {
    color: black;
}

/* 검색창 */
.mcb-search {
    display: flex;
    height: 2.55em;
}

.mcb-search input {
    padding: 0.5em 0.75em;
    border: none;
    border-right: none;
    font-size: inherit;
    background-color: #f6f6f6;
    font-family: inherit;
}

@media (max-width: 780px) {
    .mcb-search input {
        width: 100%;
    }
}

.mcb-search button {
    padding: 0.5em 1em;
    background: black;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

/* 그리드 레이아웃 (반응형 3~5열) */
.mcb-grid {
    display: grid;
    /* 화면 폭에 따라 자동 조절 (최소 220px) */
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.2em 0.6em;
}

.mcb-layout-list .mcb-grid {
    display:  block;
    border-top: 1px solid #f2f4f7;
}

/* 카드 스타일 */
.mcb-card {
    overflow: hidden;
    transition: transform 0.2s;
    background: #fff;
    position: relative;
}
.mcb-card:hover {
    transform: translateY(-0.3em);
}
/*.mcb-card.is-sticky {
    border-color: #333;
}*/

/* 링크 리셋 */
.mcb-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 썸네일 (1:1 비율 유지) */
.mcb-thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}
.mcb-thumb {
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}
.mcb-card:hover .mcb-thumb {
    /*transform: scale(1.03);*/
}

/* 썸네일이 와이드일 때 (상위 블록에 .wide-image 클래스 추가) */
.wide-image .mcb-thumb-wrap {
    padding-top: 66%;
}

.wide-image .mcb-grid {
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
}

@media (max-width: 780px) {
    .wide-image .mcb-grid {
        grid-template-columns: 1fr;
    }
}

/* 내용 영역 */
.mcb-content {padding-top: 0.6em;}
.mcb-meta {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #B3B3B3;
    margin-bottom: 0.2em;
    gap: 8px;
    /*font-weight: 500;*/
}
@media (max-width: 780px) {
    .mcb-meta {
        display: block;
        font-size: 0.875rem;
    }
}
.mcb-subcat {
    color: black;
}
.icon-new {
    width: 1em;
    height: 1em;
    vertical-align: -0.12em;
}
.icon-sticky {
    width: 1em;
    height: 1em;
    vertical-align: -0.12em;
}
.cat-color-edu {
    color: #00AAFF !important;
}
.cat-color-act {
    color: hsl(47 92% 46% / 1) !important;
}
.mcb-layout-gallery .cat-color-edu, .mcb-layout-gallery .cat-color-act {
    display: inline-block;
}

.mcb-title {
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.4;
    color: #111;
    /* 2줄 말줄임 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: normal;
}

@media (max-width: 780px) {
    .mcb-header {
        flex-direction: column;
        align-items: stretch;
    }
    .mcb-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .mcb-title {
        font-size: 1.125rem;
        /*white-space:  nowrap;
        overflow: hidden;
        text-overflow: ellipsis;*/
    }
}

/* 목록형의 경우 */

.mcb-list-link {
    display: flex;
    gap: 1em;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    padding: 0.8em 0;
    border-bottom: 1px solid #f2f4f7;
    transition: color 0.2s;
}

@media (max-width: 780px) {
    .mcb-list-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.33em;
        font-size: 1.125rem;
    }
}

.mcb-layout-list .mcb-col-cat {
    color: #B3B3B3;
}

.mcb-layout-list .mcb-col-date {
    font-size: 1rem;
    color: #B3B3B3;
    
}

.mcb-layout-list .icon-new {
    width: 0.55em;
    vertical-align: 0.066em;
}

.mcb-layout-list .icon-sticky {
    width: 0.55em;
    vertical-align: 0.066em;
}


/******************************************************/
/* 페이지별 커스텀 */

/* 메인페이지 */
.mcb-main .mcb-layout-gallery {
    position: relative;
}

.mcb-main .mcb-layout-gallery .mcb-grid {
    display: block;
    overflow-x: auto;
    white-space: nowrap;

    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mcb-main .mcb-layout-gallery .mcb-grid::-webkit-scrollbar {
    display: none;
}

.mcb-main .mcb-layout-gallery .mcb-grid::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    width: 1.5em;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), white);
}

.mcb-main .mcb-layout-gallery .mcb-grid .mcb-card {
    display: inline-block;
    width: 360px;
    margin-right: 0.5em
}

.mcb-main .mcb-layout-gallery .mcb-grid .mcb-card:last-child {
    margin-right: 2.5em;
}

@media (max-width: 780px) {
    .mcb-main .mcb-layout-gallery .mcb-grid .mcb-card {
        width: 260px;
        margin-right: 0.45em
    }
}