/* ===================================================
   성공사례 게시판 (목록 / 글 / 관리자)
   =================================================== */

/* ---------- 목록 ---------- */
.case-board-section {
    padding: 90px 0 110px;
    background: var(--bg-dark);
}

.case-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.case-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(192, 156, 103, .18);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
    color: inherit;
}

.case-card:hover,
.case-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--border-gold);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
}

.case-card-thumb {
    aspect-ratio: 4 / 3;
    background: #12161a;
    overflow: hidden;
}

.case-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-card-thumb-empty {
    background: linear-gradient(135deg, #1a3a35 0%, #0d2822 100%);
}

.case-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 26px 24px 28px;
    flex: 1;
}

.case-card-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 30px;
    background: var(--gold);
    color: #111;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
}

.case-card-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
}

.case-card-sub {
    color: var(--text-gray);
    font-size: 15px;
    line-height: 1.7;
    flex: 1;
}

.case-card-date {
    font-family: var(--font-en);
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: .3px;
}

/* 빈 목록 */
.case-empty {
    padding: 70px 20px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, .14);
    border-radius: 16px;
}

.case-empty-text {
    color: var(--text-gray);
    font-size: 16px;
    margin-bottom: 20px;
}

/* ---------- 글 하나 ---------- */
.case-detail-page {
    background: var(--bg-dark);
    padding-bottom: 110px;
}

.case-detail-head {
    background: var(--bg-darkest);
    border-bottom: 1px solid var(--border-subtle);
    padding: 150px 0 52px;
    text-align: center;
}

.case-detail-head .case-card-badge {
    margin-bottom: 16px;
}

.case-detail-head h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.32;
    margin-bottom: 14px;
}

.case-detail-sub {
    color: var(--gold);
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.case-detail-date {
    font-family: var(--font-en);
    font-size: 14px;
    color: var(--text-dim);
}

.case-detail-container {
    max-width: 820px;
    padding-top: 56px;
}

.case-detail-body p {
    color: var(--text-light);
    font-size: 16.5px;
    line-height: 1.95;
    margin-bottom: 18px;
}

.case-detail-tasks {
    margin-top: 40px;
    padding-top: 36px;
    border-top: 1px solid var(--border-subtle);
}

.case-detail-tasks h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 18px;
}

.case-detail-tasks ul {
    list-style: none;
    padding: 0;
}

.case-detail-tasks li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.8;
}

.case-detail-tasks li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
}

.case-detail-figure {
    margin: 44px 0 0;
    padding: 28px;
    background: #2f5a4d;
    border: 1px solid rgba(192, 156, 103, .3);
    border-radius: 18px;
}

.case-detail-figure figcaption {
    margin-top: 16px;
    color: #f0dcb8;
    font-size: 14px;
    text-align: center;
    line-height: 1.6;
}

.case-detail-foot {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

/* ---------- 관리자 ---------- */
.admin-page {
    background: var(--bg-dark);
    min-height: 100vh;
    padding: 140px 0 90px;
}

.admin-shell {
    max-width: 880px;
}

.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-head h1 {
    font-size: 28px;
    font-weight: 800;
}

.admin-who {
    color: var(--text-gray);
    font-size: 14px;
}

.admin-panel {
    background: rgba(255, 255, 255, .03);
    border: 1px solid #3c3c3c;
    border-radius: 16px;
    padding: 34px 30px;
}

.admin-note {
    margin-bottom: 22px;
    padding: 14px 18px;
    border-left: 3px solid var(--gold);
    background: rgba(192, 156, 103, .08);
    border-radius: 0 8px 8px 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.75;
}

.admin-note.is-error {
    border-left-color: #ff6b6b;
    background: rgba(255, 107, 107, .1);
}

.admin-note.is-ok {
    border-left-color: #4caf7d;
    background: rgba(76, 175, 125, .1);
}

/* 글 목록 */
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.admin-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
}

.admin-row-thumb {
    width: 64px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 6px;
    object-fit: cover;
    background: #12161a;
}

.admin-row-main {
    flex: 1;
    min-width: 0;
}

.admin-row-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
}

.admin-row-meta {
    font-size: 13px;
    color: var(--text-gray);
}

.admin-row-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.admin-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}

.admin-tag-hidden {
    background: rgba(255, 255, 255, .12);
    color: var(--text-gray);
}

/* 작은 버튼 */
.btn-mini {
    padding: 9px 16px;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: transparent;
    color: var(--text-light);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-mini:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-mini.is-danger:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* 사진 미리보기 */
.admin-preview {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-preview img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .14);
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.admin-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 15px;
    cursor: pointer;
}

.admin-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--gold);
    cursor: pointer;
}

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
    .case-detail-head { padding: 130px 0 44px; }
    .case-detail-head h1 { font-size: 31px; }
    .admin-page { padding-top: 120px; }
}

@media (max-width: 768px) {
    .case-board-section { padding: 56px 0 72px; }
    .case-card-grid { grid-template-columns: 1fr; gap: 20px; }
    .case-card-title { font-size: 19px; }

    .case-detail-head { padding: 116px 0 34px; }
    .case-detail-head h1 { font-size: 24px; }
    .case-detail-sub { font-size: 15px; }
    .case-detail-container { padding-top: 34px; }
    .case-detail-body p { font-size: 15.5px; line-height: 1.85; }
    .case-detail-figure { padding: 18px; }

    .admin-page { padding: 104px 0 64px; }
    .admin-panel { padding: 24px 20px; }
    .admin-row { flex-wrap: wrap; }
    .admin-row-actions { width: 100%; }
    .admin-row-actions .btn-mini { flex: 1; }
}
