@charset "utf-8";

/* ----------------------------------------------------
   무한 슬라이드형 2줄 최신글 스킨 스타일 (gnb-cibi-marquee)
---------------------------------------------------- */
.gnb-cibi-marquee-wrap {
    background: #fff;
    padding: 40px 0px;
    border-radius: 12px;

    overflow: hidden;
    margin-bottom: 20px;
}

.gnb-cibi-marquee-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 10px;
}

.gnb-cibi-marquee-header h3 {
    margin: 0;
    font-size: 1.3rem;
    text-align: center;
}

.gnb-cibi-marquee-header h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.gnb-cibi-marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* 양쪽 끝 그라데이션 페이드 효과 */
.gnb-cibi-marquee-container::before,
.gnb-cibi-marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none; /* 클릭 방해 방지 */
}
.gnb-cibi-marquee-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}
.gnb-cibi-marquee-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}

/* 롤링 리스트 공통 속성 */
.gnb-cibi-marquee-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    width: max-content;
}

/* 첫 번째 줄: 왼쪽으로 이동 */
.gnb-cibi-marquee-list.move-left {
    animation: gnb-marquee-left 35s linear infinite;
    margin-bottom: 20px; /* 줄 간격 */
}

/* 두 번째 줄: 오른쪽으로 이동 */
.gnb-cibi-marquee-list.move-right {
    animation: gnb-marquee-right 35s linear infinite;
}

/* 마우스 오버 시 해당 줄 일시정지 */
.gnb-cibi-marquee-list:hover {
    animation-play-state: paused;
}

.gnb-cibi-marquee-item {
    /* PHP에서 넘어온 사이즈 변수를 활용하여 동적 사이즈 적용 */
    width: var(--thumb-w);
    height: var(--thumb-h);
    margin-right: 20px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    /* 호버 시 부드러운 전환 효과 (크기 변형 없음) */
    transition: border-color 0.3s ease;
}

.gnb-cibi-marquee-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 15px;
    box-sizing: border-box;
    text-decoration: none;
}

.gnb-cibi-marquee-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* 기본 흑백 처리, 마우스 오버 시 컬러 */
  /*  filter: grayscale(100%) opacity(0.6);*/
    transition: filter 0.3s ease;
}

/* 이미지가 없을 때 텍스트 스타일 */
.gnb-cibi-no-img {
    font-size: 0.9rem;
    color: #95a5a6;
    font-weight: bold;
    text-align: center;
}

/* 호버 시 보더 색상만 파란색으로 변경 (그림자/커짐 효과 제거) */
.gnb-cibi-marquee-item:hover {
    border-color: #3498db;
}

.gnb-cibi-marquee-item:hover img {
    filter: grayscale(0%) opacity(1);
}

/* 게시물 없음 안내 텍스트 */
.gnb-cibi-empty {
    text-align: center;
    padding: 50px 0;
    color: #7f8c8d;
    font-size: 1rem;
}

/* 왼쪽 이동 키프레임 */
@keyframes gnb-marquee-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 오른쪽 이동 키프레임 (시작점을 -50%로 잡고 0으로 이동) */
@keyframes gnb-marquee-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* 모바일 반응형 처리 */
@media (max-width: 768px) {
    .gnb-cibi-marquee-item {
        /* 모바일에서는 설정한 썸네일 사이즈의 70% 크기로 자동 축소 */
        width: calc(var(--thumb-w) * 0.7);
        height: calc(var(--thumb-h) * 0.7);
        margin-right: 15px;
        padding: 10px;
    }
    .gnb-cibi-marquee-list.move-left {
        margin-bottom: 15px;
    }
}