@charset "UTF-8";

/* ==========================================
 * 1. 글로벌 리셋 & 13px 컴팩트 폰트 설정
 * ========================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.5;
    font-size: 13px;
    padding: 20px 10px;
}

a { color: #2563eb; text-decoration: none; transition: all 0.15s ease; }
a:hover { color: #1d4ed8; text-decoration: underline; }

.container {
    max-width: 960px;
    margin: 0 auto;
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}

/* ==========================================
 * 2. 헤더, iOS 스타일 다국어 & 관리자 뱃지
 * ========================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 2px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 10px;
}
.navbar .logo { font-size: 17px; font-weight: 700; color: #0f172a; }

.lang-switcher {
    display: inline-flex;
    background-color: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    gap: 2px;
}
.lang-btn {
    padding: 4px 10px; font-size: 11px; font-weight: 700;
    border-radius: 6px; color: #64748b !important;
    text-decoration: none !important; transition: all 0.15s ease; letter-spacing: 0.5px;
}
.lang-btn:hover { color: #0f172a !important; }
.lang-btn.active { background-color: #ffffff; color: #0f172a !important; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.admin-badge {
    background-color: #dc2626; color: #ffffff;
    padding: 4px 8px; border-radius: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}

/* ==========================================
 * 3. 모서리가 둥근 캡슐형(Pill) 분류 탭
 * ========================================== */
.cat-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.cat-tab {
    padding: 6px 14px; font-size: 12px; font-weight: 600;
    border-radius: 20px; background-color: #f8fafc; color: #475569 !important;
    border: 1px solid #cbd5e1; text-decoration: none !important; transition: all 0.15s ease;
}
.cat-tab:hover { background-color: #f1f5f9; border-color: #94a3b8; color: #0f172a !important; }

.cat-tab.active-ALL { background-color: #334155; border-color: #334155; color: #ffffff !important; }
.cat-tab.active-NOTICE { background-color: #dc2626; border-color: #dc2626; color: #ffffff !important; }
.cat-tab.active-QNA { background-color: #2563eb; border-color: #2563eb; color: #ffffff !important; }
.cat-tab.active-FAQ { background-color: #16a34a; border-color: #16a34a; color: #ffffff !important; }
.cat-tab.active-PHOTO { background-color: #2563eb; border-color: #2563eb; color: #ffffff !important; }
.cat-tab.active-ART { background-color: #9333ea; border-color: #9333ea; color: #ffffff !important; }
.cat-tab.active-DAILY { background-color: #16a34a; border-color: #16a34a; color: #ffffff !important; }

.badge-cat {
    display: inline-block; font-size: 10.5px; font-weight: 700;
    padding: 2px 7px; border-radius: 4px; margin-right: 6px; vertical-align: middle;
}
.badge-NOTICE { background-color: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.badge-QNA { background-color: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.badge-FAQ { background-color: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-PHOTO { background-color: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.badge-ART { background-color: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.badge-DAILY { background-color: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }

/* ==========================================
 * 4. 일반 테이블 & 갤러리 그리드 공통 레이아웃
 * ========================================== */
.board-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 12.5px; }
.board-table th { background: #f8fafc; color: #475569; font-weight: 600; text-align: center; padding: 10px 8px; border-bottom: 2px solid #e2e8f0; }
.board-table td { padding: 11px 8px; border-bottom: 1px solid #f1f5f9; }
.board-table tr:hover td { background: #f8fafc; }
.col-id { width: 8%; text-align: center; color: #64748b; font-size: 11.5px; }
.col-title { width: 50%; }
.col-author { width: 16%; text-align: center; font-weight: 500; }
.col-views { width: 11%; text-align: center; color: #64748b; font-size: 11.5px; }
.col-date { width: 15%; text-align: center; color: #64748b; font-size: 11.5px; }
.badge-file { font-size: 10px; background: #e2e8f0; color: #475569; padding: 1px 5px; border-radius: 3px; margin-left: 4px; font-weight: 600; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; margin-bottom: 25px; }
.gallery-card {
    background: #ffffff; border: 1px solid #cbd5e1; border-radius: 10px;
    overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column;
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); border-color: #94a3b8; }
.card-thumb-wrap { width: 100%; aspect-ratio: 4/3; background: #f8fafc; border-bottom: 1px solid #e2e8f0; overflow: hidden; position: relative; }
.card-thumb-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-card:hover .card-thumb-img { transform: scale(1.05); }
.card-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-weight: 700; font-size: 12px; background-color: #f1f5f9; }
.card-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-title { font-size: 13.5px; font-weight: 700; color: #0f172a; line-height: 1.4; margin: 6px 0 10px 0; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 11.5px; color: #64748b; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1f5f9; padding-top: 8px; }

/* ==========================================
 * 5. 컴팩트 공통 UI (버튼, 입력폼, 관리자 박스)
 * ========================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 7px 13px; font-size: 12px; font-weight: 600;
    border-radius: 6px; border: 1px solid transparent; cursor: pointer;
    text-decoration: none !important; white-space: nowrap; transition: all 0.15s ease;
}
.btn-primary { background: #2563eb; color: #fff !important; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #f1f5f9; color: #475569 !important; border-color: #cbd5e1; }
.btn-secondary:hover { background: #e2e8f0; color: #1e293b !important; }
.btn-danger { background: #ef4444; color: #fff !important; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 5px 10px; font-size: 11px; border-radius: 5px; }

.search-form { display: flex; gap: 6px; margin-bottom: 16px; }
.search-form input[type="search"] { flex: 1; padding: 7px 12px; font-size: 12.5px; border: 1px solid #cbd5e1; border-radius: 6px; outline: none; background: #f8fafc; }
.search-form input[type="search"]:focus { border-color: #2563eb; background: #fff; }

.pagination { display: flex; justify-content: center; gap: 4px; list-style: none; margin-top: 15px; }
.pagination a { padding: 4px 10px; font-size: 12px; color: #475569; background: #fff; border: 1px solid #cbd5e1; border-radius: 4px; }
.pagination a.active { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 600; }

.post-header { border-bottom: 1px solid #e2e8f0; padding-bottom: 15px; margin-bottom: 15px; }
.post-header h1 { font-size: 18px; color: #0f172a; margin-bottom: 8px; }
.post-meta { display: flex; gap: 12px; color: #64748b; font-size: 11.5px; }
.post-body { font-size: 13.5px; line-height: 1.7; min-height: 150px; white-space: pre-wrap; margin-bottom: 25px; }
.post-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 15px; border-top: 1px solid #e2e8f0; }
.inline-form { display: inline-flex; gap: 4px; align-items: center; }
.inline-form input[type="password"] { padding: 6px 10px; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 5px; width: 120px; }

.file-box { background: #f8fafc; border: 1px dashed #cbd5e1; padding: 10px 15px; border-radius: 6px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.preview-img { max-width: 100%; max-height: 450px; border-radius: 6px; margin: 0 auto 15px auto; display: block; border: 1px solid #e2e8f0; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin-bottom: 4px; }
.form-control { width: 100%; padding: 8px 11px; font-size: 12.5px; border: 1px solid #cbd5e1; border-radius: 6px; outline: none; font-family: inherit; background: #fff; }
.form-control:focus { border-color: #2563eb; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.comments-section { background: #f8fafc; padding: 18px; border-radius: 8px; margin-top: 25px; border: 1px solid #e2e8f0; }
.comments-section h3 { font-size: 14px; margin-bottom: 15px; color: #0f172a; }
.comment-item { background: #fff; padding: 12px; border-radius: 6px; margin-bottom: 8px; border: 1px solid #e2e8f0; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; font-size: 12px; }
.comment-body { font-size: 12.5px; color: #334155; white-space: pre-wrap; }

.admin-login-box { max-width: 360px; margin: 40px auto; background: #f8fafc; padding: 25px; border-radius: 10px; border: 1px solid #cbd5e1; text-align: center; }

@media (max-width: 640px) {
    .container { padding: 15px; }
    .col-views, .col-date { display: none; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .form-row { grid-template-columns: 1fr; }
    .post-actions { flex-direction: column; align-items: stretch; }
    .inline-form { justify-content: flex-end; width: 100%; margin-top: 8px; }
    .inline-form input[type="password"] { flex: 1; }
    .navbar { flex-direction: column; align-items: flex-start; }
}