/* ===========================================================
   board2.css  (Scoped by .board-scope)
   -----------------------------------------------------------
   - 화이트 테마 (페이지 배경 #fff 에 어울리도록 디자인)
   - 전역 충돌 방지를 위해 .board-scope를 접두로 사용
   =========================================================== */

/* 
   .board-scope : 게시판 전체 래퍼
   - 기본 글자색 #222
   - line-height 1.5
   - 배경을 #fff로 지정 (부모 페이지가 흰색일 경우)
*/
.board-scope {
  background: #fff;
  color: #222;
  line-height: 1.5;
}

/*
   .board-scope * : 마진/패딩 초기화, box-sizing, 폰트
*/
.board-scope * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

/*
   .board-scope .container :
   - 가로 폭 제한 1024px
   - 내부 여백 1rem
   - 배경 흰색 카드 느낌 + 부드러운 그림자
*/
.board-scope .container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 1rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ------------------------------------
   공통 버튼 / 링크 (btn-link)
------------------------------------- */
.board-scope .btn-link,
.board-scope a.btn-link {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  margin-right: 0.25rem;
  text-decoration: none;
  border: 1px solid #ccc;
  background: transparent;
  color: #555;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: all 0.25s ease;
}
.board-scope .btn-link:hover {
  background: #fff;      /* hover 시 밝은 배경 */
  border-color: #1a73e8; /* 테두리만 살짝 파란색 */
  color: #000;
}

/* 버튼 구역 */
.board-scope .btn-area {
  margin-bottom: 1rem;
}

/* ------------------------------------
   table (기본 text형 목록)
------------------------------------- */
.board-scope table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ddd;
  margin-top: 0.8rem;
  background: #fff;
}
.board-scope table thead th {
  background: #fff;          /* 기존 #f5f5f5 → #fff */
  color: #222;
  padding: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
  font-weight: 600;
}
.board-scope table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid #e5e5e5;
  vertical-align: middle;
  color: #555;
}
.board-scope table tbody tr:hover {
  background: #fff;          /* 기존 #fafafa → #fff */
}
.board-scope table a {
  color: #1a73e8;
}
.board-scope table a:hover {
  text-decoration: underline;
}

/* ------------------------------------
   그리드(grid) 목록
------------------------------------- */
.board-scope .grid-container {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  /* 폭이 부족해도 지정된 열(data-cols) 수만큼 유지 */
}

/* data-cols로 열 개수 설정 */
.board-scope .grid-container[data-cols="2"] {
  grid-template-columns: repeat(2, 1fr);
}
.board-scope .grid-container[data-cols="3"] {
  grid-template-columns: repeat(3, 1fr);
}
.board-scope .grid-container[data-cols="4"] {
  grid-template-columns: repeat(4, 1fr);
}
.board-scope .grid-container[data-cols="5"] {
  grid-template-columns: repeat(5, 1fr);
}

/* 그리드 아이템 */
.board-scope .grid-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.75rem;
  text-align: center;
  transition: box-shadow 0.2s;
}
.board-scope .grid-item:hover {
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
.board-scope .grid-item img {
  display: block;
  margin: 0 auto 0.5rem auto;
}
.board-scope .grid-item h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: #222;
}
.board-scope .grid-item p {
  font-size: 0.85rem;
  color: #555;
}

/* ------------------------------------
   썸네일(thumbnail) 목록
------------------------------------- */
.board-scope .thumb-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #ddd;
}
.board-scope .thumb-item img {
  border: 1px solid #ccc;
  background: #fff; /* 기존 #f5f5f5 → #fff */
  border-radius: 4px;
  display: block;
}
.board-scope .thumb-item h3 {
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
  color: #222;
}
.board-scope .thumb-item p {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
}
.board-scope .thumb-item a {
  text-decoration: none;
  color: #1a73e8;
}
.board-scope .thumb-item a:hover {
  text-decoration: underline;
}

/* ------------------------------------
   블로그(blog) 목록
------------------------------------- */
.board-scope .blog-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  margin: 0.8rem 0;
  transition: box-shadow 0.2s;
}
.board-scope .blog-item:hover {
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
.board-scope .blog-item h2 {
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
  color: #222;
}
.board-scope .blog-item img {
  display: block;
  margin: 0.5rem 0;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #fff; /* 기존 #f5f5f5 → #fff */
}
.board-scope .blog-item p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
}

/* ------------------------------------
   글 보기(게시글 읽기)
------------------------------------- */
.board-scope .post-view {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1.5rem;
  margin-top: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 게시글 제목 */
.board-scope .post-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: #222;
  line-height: 1.3;
}

/* 게시글 메타정보 */
.board-scope .post-meta {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #777;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

/* 게시글 실제 내용 */
.board-scope .post-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
}

/* 게시글 내 이미지 */
.board-scope .post-image {
  margin: 1rem 0;
  border: 1px solid #ccc;
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s;
}
.board-scope .post-image:hover {
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

/* ------------------------------------
   글쓰기/수정 폼
------------------------------------- */
.board-scope form p {
  margin-bottom: 1rem;
}
.board-scope form label {
  display: inline-block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: #444;
}
.board-scope form input[type="text"],
.board-scope form input[type="file"],
.board-scope form textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  background: #fff;
  color: #222;
}
.board-scope form textarea {
  resize: vertical;
}
.board-scope form button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  background: #1a73e8;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.board-scope form button:hover {
  background: #1358ac;
}

/* ------------------------------------
   반응형
------------------------------------- */
@media (max-width: 768px) {
  /* 썸네일 목록은 세로로 배치 */
  .board-scope .thumb-item {
    flex-direction: column;
  }
}
