@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

.premium-gallery-wrapper { max-width: 1200px; margin: 0 auto; padding: 20px; font-family: 'Noto Sans KR', sans-serif; }

/* 헤더 & 검색 */
.md-list-header-flex { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 25px; border-bottom: 1px solid #e2e8f0; padding-bottom: 15px; }
.md-search-form { display: flex; gap: 5px; }
.md-search-select { padding: 8px; border: 1px solid #e2e8f0; border-radius: 4px; font-size: 13px; color: #475569; }
.md-search-input { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 4px; width: 200px; font-size: 13px; }
.md-search-btn { background: #1e293b; color: #fff; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; font-size: 13px; }

/* 갤러리 그리드 */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; margin-bottom: 40px; }
.gallery-item { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.gallery-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

/* 썸네일 박스 */
.thumb-box { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #f8fafc; }
.thumb-box img { width: 100%; height: 100%; object-fit: cover; }
.lock-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; z-index: 1; }

/* 정보 영역 */
.info-box { padding: 18px; }
.item-subject { font-size: 16px; font-weight: 600; color: #1e293b; margin-bottom: 10px; 
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memo-count { color: #3b82f6; font-size: 13px; margin-left: 4px; }
.item-meta { display: flex; justify-content: space-between; font-size: 13px; color: #94a3b8; }
.reply-icon { color: #64748b; margin-right: 5px; }

/* 페이징 & 버튼 */
.md-paging-container { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; }
.paging-side { flex: 1; }
.premium-paging-area { flex: 2; text-align: center; display: flex; justify-content: center; gap: 5px; }
.pg-link { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 6px; text-decoration: none; color: #64748b; font-size: 14px; }
.pg-link.active { background: #1e293b; color: #fff; border-color: #1e293b; }
.btn-write { background: #1e293b; color: #fff; padding: 10px 24px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 500; transition: background 0.2s; }
.btn-write:hover { background: #334155; }

.no-data { grid-column: 1 / -1; text-align: center; padding: 100px 0; color: #94a3b8; }
/* 헤더 전체 레이아웃 */
.premium-page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9; /* 하단 구분선으로 고급스러움 추가 */
	z-index:9;
}

/* 핵심: 타이틀과 경로를 한 줄로 정렬 */
.header-flex-row {
    display: flex;
    justify-content: space-between; /* 양 끝 정렬 */
    align-items: center; /* 세로 중앙 정렬 */
    flex-wrap: wrap; /* 모바일 대응 */
    gap: 15px;
}
.title-section { position:relative; }
/* 타이틀 스타일 */
.main-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0 20px;
    line-height: 30px;
    letter-spacing: -0.5px;
}
.main-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background-color: #2563eb;
    /* border-radius: 2px; */
}

/* 브레드크럼 (내용만큼만 배경색) */
.premium-breadcrumb {
    background-color: #f1f5f9; 
    padding: 8px 16px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
}

.breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bc-item { font-size: 13px; color: #64748b; text-decoration: none; display: flex; align-items: center; }
.bc-item.current { color: #1e293b; font-weight: 700; }
.sep { font-size: 9px; color: #cbd5e1; display: flex; align-items: center; }

/* 모바일 대응 */
@media (max-width: 768px) {
    .header-flex-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .premium-breadcrumb {
        order: -1; /* 모바일에서는 경로를 위로 */
        padding: 6px 12px;
    }
}

/* 첨부 이미지 모바일 최적화 스타일 */
.view-attached-images {
    width: 100%;
    padding: 15px 0; /* 위아래 여백 */
    display: flex;
    flex-direction: column; /* 이미지를 세로로 차곡차곡 배치 */
    gap: 12px; /* 이미지와 이미지 사이의 간격 */
    box-sizing: border-box;
}

.view-attached-images .img_wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 8px; /* 모서리를 둥글게 깎아 세련된 느낌 유도 */
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); /* 미세한 그림자로 이미지 경계 구분 */
    background: #fdfdfd;
}

.view-attached-images .img_wrap img {
    display: block;
    width: 100%; /* 부모 박스 너비에 100% 맞춤 (삐져나가지 않음) */
    height: auto; /* 비율 유지 */
    object-fit: cover;
    -webkit-user-drag: none; /* 모바일에서 드래그 오작동 방지 */
}


   /* 권한 없음 카드 디자인 (고급형) */
    .auth-denied-container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 80px 20px;
        background-color: #f9fafb;
        border: 1px solid #eee;
        border-radius: 12px;
        margin: 20px 0;
    }
    .auth-card { text-align: center; max-width: 400px; }
    .auth-icon { color: #d1d5db; margin-bottom: 20px; }
    .auth-card h3 { font-size: 20px; font-weight: 700; color: #111; margin-bottom: 12px; }
    .auth-card p { font-size: 15px; color: #666; margin-bottom: 25px; line-height: 1.5; }
    
    .btn-group { display: flex; gap: 10px; justify-content: center; }
    .btn-main { padding: 12px 24px; background: #00468c; color: #fff !important; text-decoration: none; border-radius: 6px; font-size: 14px; font-weight: 500; }
    .btn-back { padding: 12px 24px; background: #fff; border: 1px solid #ddd; color: #555 !important; text-decoration: none; border-radius: 6px; font-size: 14px; }
	
/* 디자인 보완 */
.premium-wrapper { font-family: 'Pretendard', sans-serif; max-width: 1200px; margin: 0 auto; }
.premium-list-table { width: 100%; border-collapse: collapse; margin-top: 0px; border-top: 2px solid #334155; }
.premium-list-table th { background: #f8fafc; padding: 12px; border-bottom: 1px solid #e2e8f0; font-size: 14px; color: #475569; }
.premium-list-table td { padding: 12px; border-bottom: 1px solid #f1f5f9; text-align: center; font-size: 14px; color: #334155; }
.td-subject { text-align: left !important; }
.subject-link { text-decoration: none; color: #1e293b; transition: color 0.2s; }
.subject-link:hover { color: #2563eb; }
.icon-lock { font-size: 12px; color: #94a3b8; margin-right: 4px; }
.reply-icon { color: #cbd5e1; margin-right: 5px; font-weight: bold; }
.text-locked { color: #94a3b8; cursor: pointer;}
.memo-count { color: #2563eb; font-size: 12px; margin-left: 5px; font-weight: bold; }


/* 페이징 영역 전체 컨테이너 */
.premium-paging-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
}

/* 기본 버튼 스타일 */
.pg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

/* 마우스를 올렸을 때 (Hover) */
.pg-link:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* 현재 페이지 활성화 (Active) */
.pg-link.active {
    background-color: #2563eb; /* 포인트 블루 컬러 */
    border-color: #2563eb;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

/* 이전/다음 글자 버튼 전용 */
.prev-next {
    font-size: 12px;
    font-weight: 500;
    background-color: #f1f5f9;
    color: #475569;
}

.prev-next:hover {
    background-color: #e2e8f0;
}

.board-write-box { width: 100%; padding: 10px; box-sizing: border-box; }
.w-table { width: 100%; border-collapse: collapse; border-top: 2px solid #555; background:#fff; }
.w-table th { width: 110px; background: #f9f9f9; padding: 10px; border-bottom: 1px solid #ddd; border-right: 1px solid #eee; text-align: right; font-size: 13px; color: #333; }
.w-table td { padding: 8px 12px; border-bottom: 1px solid #ddd; }
.input-form { width: 100%; height: 30px; border: 1px solid #ccc; padding: 0 5px; font-size: 13px; box-sizing: border-box; }

/* 기존 파일 목록 스타일 */
.old-file-item { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; background: #f1f5f9; padding: 5px 10px; border-radius: 4px; font-size: 12px; }
.del-check { color: #ef4444; font-weight: bold; cursor: pointer; }

.btn-group { text-align: center; margin-top: 20px; }
.btn-custom { display: inline-block; padding: 10px 30px; font-size: 14px; font-weight: bold; border-radius: 3px; cursor: pointer; text-decoration: none; border: none; }
.btn-gray { background: #888; color: #fff; margin-right: 5px; }
.btn-blue { background: #34495e; color: #fff; }
.btn-custom:hover { opacity: 0.9; }
/* 검색바 요소들의 높이를 34px로 통일 */
.md-search-select, 
.md-search-input, 
.md-search-btn {
    height: 34px; 
    box-sizing: border-box; /* 패딩이 높이에 영향을 주지 않도록 설정 */
    font-size: 13px;
    vertical-align: middle;
}

.md-search-select {
    padding: 0 5px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
}

.md-search-input {
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    width: 150px;
    outline: none;
}

.md-search-input:focus {
    border-color: #3b82f6;
}

.md-search-btn {
    padding: 0 15px;
    background: #334155;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    line-height: 34px; /* 버튼 텍스트 수직 중앙 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.md-search-btn:hover {
    background: #1e293b;
}

.subject-link { text-decoration: none; color: #333; }
.subject-link:hover { text-decoration: underline; }
.text-locked { color: #999; cursor: pointer; }
.badge-notice { background: #3182ce; color: #fff; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.row-notice { background: #f8faff; }
.reply-icon { color: #cbd5e0; margin-right: 5px; }
.btn-write { background: #3182ce; color: #fff; padding: 10px 25px; border-radius: 5px; text-decoration: none; display: inline-block; }
