/* ============================================================
 * News.css: 소식 및 상세 기사 통합 스타일 (최종 레이아웃 및 배경 수정)
 * ============================================================ */
/* ------------------------------------------------------------
 * 0. 전체 페이지 배경 설정 (주변 회색 제거)
 * ------------------------------------------------------------ */
body {
    background-color: #ffffff !important; /* 페이지 전체 배경을 흰색으로 고정 */
    margin: 0;
    padding: 0;
}
/* ------------------------------------------------------------
 * 1. 기본 레이아웃 및 여백 최적화
 * ------------------------------------------------------------ */
.news-section { padding: 30px 0; background: #fff; }

.news-container {
    padding: 0 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #333;
}

.btn-write {
    background: #ed5848; color: #fff; padding: 8px 15px; border-radius: 6px;
    text-decoration: none; font-weight: bold; font-size: 13px;
}

/* ------------------------------------------------------------
 * 2. 전체 목록 헤더 및 검색바
 * ------------------------------------------------------------ */
.list-header-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.list-header-group .sub-title {
    font-size: 17px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.search-inline-wrapper {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 3px 12px;
    width: 130px;
}

.search-inline-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 12px;
}

.search-btn-icon { font-size: 11px; color: #888; }

/* ------------------------------------------------------------
 * 3. 기사 목록 및 포인트 아이콘 (파란색 사각형)
 * ------------------------------------------------------------ */
.news-list-area ul { list-style: none; padding: 0; margin: 0; }
.news-list-item { border-bottom: 1px solid #eee; }
.news-list-item a {
    display: flex;
    align-items: flex-start;
    padding: 14px 0;
    text-decoration: none;
    color: #333;
}

.list-point-box {
    width: 6px;
    height: 6px;
    background-color: #2196F3;
    border-radius: 1px;
    margin-right: 12px;
    margin-top: 7px;
    flex-shrink: 0;
}

.list-title {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
    word-break: break-all;
    overflow-wrap: break-word;
    padding-right: 5px;
}

.list-date { font-size: 11px; color: #bbb; white-space: nowrap; margin-top: 3px;}

/* ------------------------------------------------------------
 * 4. 최신 소식 슬라이더 (가로 배치 강제 및 레이아웃 수정)
 * ------------------------------------------------------------ */
.news-slider-wrapper {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

/* 수직으로 쌓이는 현상을 방지하기 위해 flex와 row 방향을 강제합니다. */
.news-horizontal-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 15px;
    scroll-behavior: smooth;
    padding: 10px 0;
    width: 100%;
}
.news-horizontal-container::-webkit-scrollbar { display: none; }

.news-card {
    flex: 0 0 auto;
    width: 240px;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    background: #fff;
    display: block;
}

.card-img {
    width: 100%;
    height: 130px;
    min-height: 130px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.card-body { padding: 12px; }
.card-body h4 {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 6px;
    word-break: break-all;
}

.slider-control {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; background: rgba(255, 255, 255, 0.9);
    border: 1px solid #eee; border-radius: 50%; cursor: pointer; z-index: 5;
    display: flex; align-items: center; justify-content: center;
}
.prev { left: -10px; }
.next { right: -10px; }

/* ------------------------------------------------------------
 * 5. 기사 본문 상세 헤더 및 본문 (회색 배경 제거)
 * ------------------------------------------------------------ */
.article-container { max-width: 850px; margin: 40px auto; padding: 0 15px; background: #fff; }
.article-header { border-bottom: 1px solid #eee; padding-bottom: 25px; margin-bottom: 40px; background: #fff; }
.article-header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.article-category { font-weight: bold; color: #ed5848; font-size: 13px; }
.article-info { font-size: 13px; color: #aaa; text-align: center; width: 100%; display: block; }

/* 본문 영역의 배경을 흰색으로 명시합니다. */
.article-body {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    word-break: break-all;
    min-height: 300px;
    background-color: #fff !important;
}

/* ------------------------------------------------------------
 * 6. 관리자 전용 제어 버튼 (높이 일치 및 디자인 통일)
 * ------------------------------------------------------------ */
.admin-article-controls { display: flex; gap: 8px; align-items: center; }

.btn-admin-edit, .btn-admin-delete {
    height: 32px; /* 높이를 동일하게 고정 */
    padding: 0 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.btn-admin-edit { color: #2196F3; border: 1px solid #2196F3; }
.btn-admin-edit:hover { background: #2196F3; color: #fff; }

.btn-admin-delete { color: #ed5848; border: 1px solid #ed5848; }
.btn-admin-delete:hover { background: #ed5848; color: #fff; }

/* ------------------------------------------------------------
 * 7. 하단 내비게이션 (구분선 스타일 및 배경 흰색 통일)
 * ------------------------------------------------------------ */
.article-navigation-footer {
    margin-top: 60px;
    padding-top: 20px;
    background: #fff !important; /* 전체 배경을 흰색으로 고정 */
}

.nav-simple-list {
    border-top: 1px solid #333;
    margin-bottom: 30px;
    background: #fff;
}

.nav-simple-row {
    border-bottom: 1px solid #eee;
    background: #fff;
}

.nav-simple-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    text-decoration: none;
    color: #333;
    background: #fff;
    transition: background 0.2s;
}

.nav-simple-item:not(.disabled):hover {
    background: #fafafa;
}

.nav-dir {
    font-size: 11px;
    color: #ed5848;
    font-weight: bold;
    width: 60px;
    flex-shrink: 0;
}

.nav-title {
    font-size: 14px;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 비활성화된 항목의 배경도 흰색으로 고정 */
.nav-simple-item.disabled {
    color: #ccc;
    cursor: default;
    background: #fff !important;
}
.nav-simple-item.disabled .nav-dir { color: #bbb; }

.back-to-list-wrapper { text-align: center; background: #fff; }
.btn-minimal-back {
    color: #666;
    font-size: 13px;
    text-decoration: underline;
}

/* ------------------------------------------------------------
 * 8. 모바일 대응
 * ------------------------------------------------------------ */
@media (max-width: 767px) {
    .news-container { padding: 0 5px; }
    .search-inline-wrapper { width: 100px; }
    .nav-dir { width: 50px; }
}
