/* ── 1. 기본 리셋 ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
    background: #f3f3f3;
    font-size: 14px;
    color: #222;
}

/* ── 2. 헤더 및 배너 ── */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0;
    background-color: #fff;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px 10px 0;
    flex-wrap: wrap;
    gap: 8px;
    background-color: white;
}

.logo-area img { height: 48px; }

.top-util { display: flex; gap: 12px; flex-wrap: wrap; }
.top-util a { font-size: 12px; color: #555; text-decoration: none; }
.top-util a.orange { color: #e07000; font-weight: 700; }
.top-util a:hover { color: #1a3a6b; }

.header-banner-group header {
    background: #26734d;
    margin-bottom: 12px;
    color: white;
    padding: 10px 0;
    font-weight: bold;
}

.main-nav { list-style: none; display: flex; flex-wrap: wrap; }
.main-nav li a {
    display: block;
    padding: 10px 18px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 15px;
}
.main-nav li a:hover { color: #c8a951; }

.header-banner-container {
    line-height: 0;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
    border: 1px solid #ddd;
    border-top: none;
}
.header-banner-container img { width: 100%; display: block; }

/* ── 3. 콘텐츠 레이아웃 (PC 기준: 200px) ── */
.contents-wrap {
    display: grid;
    grid-template-columns: 200px 1fr; /* 사이드바 200px 고정 */
    gap: 14px;
    align-items: start;
    padding: 0 10px 10px 10px;
}

.sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    width: 200px; /* 명시적으로 너비 고정 */
}

/* ── 4. 사이드바 내부 스타일 ── */
.side-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    color: #555;
    line-height: 1.8;
}

.side-menu-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.side-menu-list, .side-submenu-list { list-style: none; }

.side-menu-list li a {
    display: block;
    padding: 12px 15px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.side-submenu-list li a {
    display: block;
    padding: 7px 12px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.side-menu-list li:last-child a, .side-submenu-list li:last-child a { border-bottom: none; }
.side-menu-list li a:hover, .side-submenu-list li a:hover { background: #f7f5f0; color: #1a3a6b; }

/* ── 5. 게시판 스타일 ── */
.board-section { min-width: 0; }

.board-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.board-title {
    background: #1a3a6b;
    color: #fff;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
}

.post-header { padding: 10px 14px; border-bottom: 1px solid #eee; }
.post-subject { font-size: 14px; font-weight: 700; color: #1a3a6b; margin-bottom: 6px; }

/* 게시글 정보 아이콘 간격 조정 */
.post-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px; /* 아이콘/텍스트 세트 간의 간격 10px */
    font-size: 12px;
    color: #777;
}

.post-read { padding: 14px; font-size: 14px; line-height: 1.8; color: #333; }

/* ── 6. 게시글 목록 ── */
.board-list {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.post-list { list-style: none; }
.post-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid #cdcdcd;
    gap: 8px;
}

.post-list li:nth-child(even) { background-color: #e0ebeb; }
.post-list li:last-child { border-bottom: none; }

.post-list a { text-decoration: none; flex: 1; min-width: 0; display: flex; }
.post-list .subject {
    font-size: 13px;
    color: #222;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-list a:hover .subject { color: #1a3a6b; text-decoration: underline; }
.post-list span:last-child { font-size: 13px; color: #555; white-space: nowrap; flex-shrink: 0; }

/* ── 7. 첨부파일 및 페이지네이션 ── */
.attached-file ul { list-style: none; margin-bottom: 10px; }
.attached-file ul li { padding: 3px 0; border-bottom: 1px dashed #e5e5e5; }
.attached-file a { text-decoration: none; color: #5211f7; font-size: 14px; font-weight: bold; }

.pagination { display: flex; justify-content: center; gap: 4px; margin-bottom: 16px; }
.pagination a {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    background: #fff;
}
.pagination a.active { background: #1a3a6b; color: #fff; border-color: #1a3a6b; font-weight: 700; }

.footer {
    background: #1a3a6b;
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 16px;
    border-radius: 0 0 6px 6px;
    margin-top: 16px;
    font-size: 12px;
    line-height: 1.8;
}

/* ── 8. 모바일 UI 전용 ── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.hamburger-btn span { width: 24px; height: 2px; background: #1a3a6b; transition: 0.3s; }

.sidebar-close {
    display: none;
    width: 100%;
    padding: 10px;
    background: #f0f0f0;
    border: none;
    text-align: right;
    font-size: 13px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 99;
}
.sidebar-overlay.open { display: block; }

/* ── 9. 반응형 통합 (768px 이하) ── */
@media (max-width: 768px) {
    .top-util { display: none; }
    .hamburger-btn { display: flex; }
    .sidebar-close { display: block; }

    .contents-wrap {
        grid-template-columns: 1fr;
        padding: 10px 0;
        gap: 10px;
    }

    .sidebar {
        display: block !important;
        position: fixed;
        top: 0;
        left: -270px;
        width: 200px; /* 모바일 슬라이드도 200px 유지 */
        height: 100%;
        background: #fff;
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 15px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    .sidebar.open { left: 0 !important; }

    .board-item, .board-list { border-left: none; border-right: none; border-radius: 0; }
    .post-info { flex-direction: column; gap: 4px; align-items: flex-start; }
    .main-nav li a { padding: 8px 12px; font-size: 13px; }
}

/* ── 10. 초소형 모바일 (480px 이하) ── */
@media (max-width: 480px) {
    .post-list li { padding: 8px 6px; }
    .post-list .subject { max-width: 18ch; }
    .post-list span:last-child { font-size: 11px; }
}