@charset "utf-8";

/* 웹진형 게시판 메인 컨테이너 */
.zzan-webzine-container {
    width: 100%;
    position: relative;
    /* 웹진형 전용 여백 추가 가능 */
}

/* 1. 웹진형 일반 게시글 리스트 아이템 */
.webzine-item {
    position: relative;
    padding: 30px 0;
    border-bottom: 1px solid var(--zzan-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}
.webzine-item:hover {
    background: var(--zzan-menu-hover-bg);
}

.webzine-link {
    display: flex;
    gap: 25px;
    text-decoration: none;
    color: inherit;
}

/* 썸네일 영역 */
.webzine-thumb {
    position: relative;
    width: 200px; /* 기본 너비, 비율에 따라 높이는 패딩으로 결정 */
    border-radius: 16px;
    overflow: hidden;
    background: var(--zzan-menu-hover-bg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    flex-shrink: 0;
    /* 비율은 인라인 스타일 패딩으로 제어됨 */
}
.webzine-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.webzine-item:hover .webzine-thumb img {
    transform: scale(1.05);
}
.no-thumb-mini {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--zzan-gray-text);
    background: var(--zzan-border);
}

/* 본문 영역 */
.webzine-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* flex 자식 생략 기호 버그 방지 */
}

.webzine-header {
    margin-bottom: 12px;
}
.cate-txt {
    display: inline-block;
    padding: 5px 12px 4px;
    background: var(--zzan-neon);
    color: #000 !important;
    font-size: 11px;
    font-weight: 800;
    border-radius: 50px;
    margin-bottom: 8px;
    line-height: 1;
}
.webzine-header .subject {
    font-size: 20px;
    font-weight: 800;
    color: var(--zzan-text);
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}
.webzine-item:hover .subject {
    color: var(--zzan-neon);
}

.webzine-body .summary {
    font-size: 15px;
    color: var(--zzan-gray-text);
    line-height: 1.6;
    margin: 0 0 15px 0;
    /* 멀티라인 말줄임 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: keep-all;
}

/* 하단 메타 정보 */
.webzine-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--zzan-gray-text);
    flex-wrap: wrap;
}
.webzine-footer .author-area {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--zzan-text);
}
.webzine-footer .profile-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--zzan-border);
}
.webzine-footer .bar {
    opacity: 0.5;
    font-size: 10px;
}
.webzine-footer .date {
    font-family: 'Montserrat', sans-serif;
}
.webzine-footer .stats {
    display: flex;
    align-items: center;
    gap: 8px;
}
.webzine-footer .voted {
    color: var(--zzan-neon);
    font-weight: 800;
}

/* 관리자 체크박스 정렬 보정 */
.webzine-item .col-chk {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    z-index: 10;
}
.webzine-item.has-chk .webzine-link {
    padding-left: 50px;
}


/* 2. 상단 공지사항 (갤러리/웹진 공통 스타일 확장) */
.webzine-notices {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--zzan-border);
}
.webzine-notices .normal-list-row {
    padding: 0 15px !important; /* 기본적으로 좌우 15px 여백을 주어 일반 사용자용 여백 확보 */
    display: flex !important;
    align-items: center;
}
/* 공지사항 메타 정보 스타일은 board.css / gallery.css의 스타일을 상속받되,
   웹진형의 너비에 맞게 유연하게 조정 */
.webzine-notices .col-title {
    padding-left: 0 !important; /* 체크박스가 없을 때는 패딩 없이 기본 여백 활용 */
}
.webzine-notices .col-title a {
    text-decoration: none;
    color: var(--zzan-text);
    transition: 0.2s;
}
.webzine-notices .col-title a:hover {
    color: var(--zzan-neon);
}


/* 3. 모바일 반응형 (Mobile Only) */
@media screen and (max-width: 768px) {
    /* 웹진형 컨테이너 모바일 좌우 여백 3px 적용 */
    .zzan-board-wrapper .zzan-webzine-container {
        padding: 0 3px;
    }

    .webzine-item {
        padding: 0; /* 내부 패딩 제거하고 컨테이너 자체가 카드가 되도록 함 */
        margin-bottom: 15px;
        border: 1px solid var(--zzan-border); /* 구분선 대신 전체 보더 적용 */
        border-radius: 16px; /* 카드 전체 라운드 적용 */
        background: var(--zzan-bg); /* 카드 배경색 복원 */
        overflow: hidden; /* 내부 내용이 둥근 모서리를 넘어가지 않게 방지 */
    }
    .webzine-link {
        flex-direction: column;
        gap: 0; /* 썸네일과 본문 사이 간격 없앰 (딱 붙게) */
    }
    .webzine-item.has-chk .webzine-link {
        padding-left: 0; /* 모바일에서는 패딩 해제하고 상하 배치 */
    }
    .webzine-item .col-chk {
        top: 15px;
        right: 15px; /* 관리자 체크박스를 우측 상단으로 이동 */
        left: auto;
        transform: none;
        z-index: 10;
        background: rgba(0,0,0,0.5);
        padding: 2px;
        border-radius: 6px;
    }

    /* 썸네일 너비 100% 확장 및 상단만 라운드 처리 */
    .webzine-thumb {
        width: 100% !important;
        border-radius: 16px 16px 0 0; /* 하단은 각지게, 상단만 둥글게 */
        box-shadow: none; /* 그림자 제거 */
        background: var(--zzan-menu-hover-bg);
    }
    
    .webzine-header-overlay {
        display: block;
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        pointer-events: none; /* 오버레이가 클릭을 막지 않도록 */
        z-index: 2;
    }
    .webzine-header-overlay .cate-txt {
        position: absolute;
        top: 15px; left: 15px;
        margin: 0;
        z-index: 3;
    }
    .webzine-header-overlay .subject-bg {
        position: absolute;
        bottom: 0; left: 0; width: 100%;
        padding: 40px 15px 15px;
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
        box-sizing: border-box;
    }
    .webzine-header-overlay .subject {
        color: #ffffff !important;
        font-size: 18px;
        font-weight: 800;
        margin: 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-all;
        white-space: normal;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }

    /* 모바일에서는 본문을 오버레이가 아닌 썸네일 하단에 배치 */
    .webzine-body {
        padding: 20px 15px; /* 내부 텍스트 여백을 예쁘게 줌 */
    }
    /* 제목은 썸네일에 노출하므로 하단 바디에서는 숨김 */
    .webzine-header.pc-only {
        display: none !important;
    }
    .webzine-body .subject {
        font-size: 18px; /* 모바일용 폰트 크기 조정 */
        white-space: normal; /* 모바일에서는 두 줄 표현 허용 */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-all;
    }
    .webzine-body .summary {
        font-size: 14px;
        -webkit-line-clamp: 2; /* 요약을 2줄로 줄임 */
        margin-bottom: 15px;
        color: var(--zzan-text); /* 요약 글꼴 가독성 높임 */
        opacity: 0.8;
    }
    .webzine-footer {
        font-size: 12px;
        gap: 8px;
    }
    .webzine-footer .profile-img {
        width: 20px; height: 20px;
    }

    /* 공지사항 모바일 타이트 여백 적용 (라운드 제거) */
    .webzine-notices .normal-list-row {
        padding: 0 !important;
        border-radius: 0; /* 네모반듯하게 라운드 제거 */
        margin-bottom: 10px;
        background: var(--zzan-menu-hover-bg);
    }
    .webzine-notices .mobile-list-content {
        padding: 15px 10px;
    }
}
