@charset "utf-8";

/* ==========================================================
   [ 0. 게시판 레이아웃 공통 여백 ]
   ========================================================== */
.board-intro-inner { text-align: center;padding: 60px 0 40px;  }
.board-list-sec { padding: 0 0 100px; }
.board-inner { max-width: 1500px; margin: 0 auto; padding: 0 5vw; }
.board-empty { padding: 80px 0 !important; color: #888 !important; text-align: center; }


/* ==========================================================
   [ 1. 게시판 리스트 공통 스타일 ]
   ========================================================== */

/* 게시판 상단 (검색 및 총 건수) */
.board-top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 15px; }
.board-total { font-size: 1rem; color: #555; }
.board-total b { color: #111; font-weight: 800; }
.board-search { display: flex; }
.board-search input { width: 220px; padding: 8px 12px; border: 1px solid #ccc; border-right: none; font-size: 0.95rem; outline: none; }
.board-search button { background: #333; color: #fff; border: none; padding: 0 20px; cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: background 0.2s; }
.board-search button:hover { background: #111; }

/* 게시판 리스트 표 */
.board-list { width: 100%; border-collapse: collapse; border-top: 2px solid #222; }
.board-list th { padding: 18px 10px; border-bottom: 1px solid #ddd; background: #fdfdfd; font-weight: 600; color: #333; font-size: 1.05rem; }
.board-list td { padding: 18px 10px; border-bottom: 1px solid #eee; text-align: center; color: #555; font-size: 1rem; }
.board-list tbody tr:hover td { background: #fafafa; }

/* 제목 영역 */
.board-list .td-subject { text-align: left; padding-left: 20px; }
.board-list .td-subject a { color: #222; display: inline-block; width: 100%; transition: color 0.2s; }
.board-list .td-subject a:hover { color: var(--c-darkgray); text-decoration: underline; }

/* 공지 뱃지 & 아이콘 */
.notice-badge { background: #dc3545; color: #fff; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; margin-right: 8px; vertical-align: middle; }
.file-icon { color: #999; margin-left: 6px; font-size: 0.9rem; }

/* 페이징 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 50px; }
.pagination a, .pagination strong { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #ddd; background: #fff; color: #555; text-decoration: none; font-size: 1rem; transition: all 0.2s; }
.pagination a:hover { border-color: var(--c-darkgray);}
.pagination strong { color: var(--c-darkgray); font-weight: 700; border-color: var(--c-darkgray); }

/* ==========================================================
   [ 2. 게시판 상세 보기 (View) 공통 스타일 ]
   ========================================================== */

/* 상세 상단 (제목 및 정보) */
.board-view-header { border-bottom: 1px solid #ccc; padding: 0 0 15px; margin-bottom: 40px; display: flex; justify-content: space-between; align-items: flex-end; }
.board-view-title { font-size: 1.8rem; font-weight: 700; color: #111; margin: 0; word-break: keep-all; overflow-wrap: break-word; line-height: 1.4; flex: 1; }
.board-view-info { color: #888; font-size: 0.95rem; flex-shrink: 0; margin-left: 20px; }
.board-view-info span { display: flex; align-items: center; gap: 6px; }

/* 첨부파일 박스 */
.board-view-file { background: #f8f9fa; border: 1px solid #eee; padding: 15px 20px; border-radius: 4px; margin-bottom: 40px; display: flex; flex-direction: column; gap: 8px; }
.board-view-file a { color: #555; text-decoration: none; font-size: 0.95rem; transition: color 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.board-view-file a:hover { color: var(--c-darkgray); text-decoration: underline; }

/* 본문 내용 */
/* ✨ 여기에 text-align: center; 를 추가하여 전체 가운데 정렬 처리! */
.board-view-content { min-height: 300px; padding: 0 0 60px; font-size: 1.05rem; color: #333; line-height: 1.8; word-break: keep-all; overflow-wrap: break-word; text-align: center; }
.board-view-content img { max-width: 100%; height: auto !important; margin: 0 auto; display: block; }

/* 목록으로 돌아가기 버튼 영역 */
.board-btn-wrap { text-align: center; border-top: 1px solid #222; padding-top: 40px; margin-top: 40px; }
.btn-board-list { display: inline-block; background: #333; color: #fff; padding: 14px 40px; font-size: 1.05rem; font-weight: 700; border-radius: 4px; transition: background 0.2s; }
.btn-board-list:hover { background: #111; color: #fff; }


/* ==========================================================
   [ 3. 모바일 반응형 공통 ]
   ========================================================== */
@media (max-width: 768px) {
  .board-top { flex-direction: column; align-items: flex-start; gap: 15px; }
  .board-search { width: 100%; }
  .board-search input { flex: 1; }
  .board-list th, .board-list td { padding: 14px 5px; font-size: 0.95rem; }
  .board-list .td-subject { padding-left: 10px; }
  
  .board-view-title { font-size: 1.4rem; }
  .board-btn-wrap { margin-top: 20px; padding-top: 30px; }
  .btn-board-list { width: 100%; }
}

/* ==========================================================
   [ 4. 매거진(갤러리) 리스트 전용 스타일 ]
   ========================================================== */
.magazine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px 30px; padding-top: 40px; border-top: 2px solid #222; }
.mag-card { display: block; text-decoration: none; color: #333; }
.mag-card:hover .mag-thumb img { transform: scale(1.05); }
.mag-card:hover .mag-title { color: var(--c-darkgray); text-decoration: underline; }

/* 썸네일 영역 (가로세로 비율 고정) */
.mag-thumb { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; margin-bottom: 20px; background: #f4f4f4; border: 1px solid #eaeaea; }
.mag-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; display: block; }
.mag-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 1.2rem; font-weight: 600; letter-spacing: 0.1em; }

/* 텍스트 영역 */
.mag-info { text-align: center; padding: 0 10px; }
.mag-title { font-size: 1.25rem; font-weight: 700; color: #111; margin: 0 0 10px; line-height: 1.4; word-break: keep-all; overflow-wrap: break-word; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color 0.2s; }
.mag-date { font-size: 0.95rem; color: #888; font-family: var(--font-en), sans-serif; }

/* 매거진 모바일 반응형 */
@media (max-width: 1024px) {
    .magazine-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
}
@media (max-width: 768px) {
  .magazine-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 10px; padding-top: 30px; }
  
  /* 사진이 작아지므로 제목 크기도 알맞게 축소 */
  .mag-title { font-size: 1rem; }
  .mag-info { padding: 0 5px; }
      .board-view-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .board-view-info { margin-left: 0; }
}


/* ============================================================
   ✨ 검색창 및 버튼 강제 교정 (취소 버튼 빨간색 상자화)
   ============================================================ */

/* 1. 검색 폼 부모 영역을 Flex로 정렬 */
.board-top .board-search {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* 2. 입력창 / 검색버튼 / 취소버튼 높이 및 박스 세팅 */
.board-top .board-search input[type="text"] {
  height: 46px !important;
  box-sizing: border-box !important;
}

/* 3. 검색 버튼 (검정색) */
.board-top .board-search button,
.board-top .board-search .btn-search-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 46px !important;
  padding: 0 20px !important;
  background-color: #333333 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  line-height: 46px !important;
}

/* 4. 취소 버튼 (검색 버튼과 완전 동일한 높이/모양 + 빨간색 배경) */
.board-top .board-search a.btn-search-cancel,
.board-top .board-search .btn-reset-search {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 46px !important;
  padding: 0 20px !important;
  background-color: #d32f2f !important; /* 빨간색 배경 */
  color: #ffffff !important; /* 흰색 글자 */
  border: none !important;
  border-radius: 4px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  line-height: 46px !important;
  transition: background-color 0.2s ease !important;
}

/* 취소 버튼 마우스 올렸을 때 */
.board-top .board-search a.btn-search-cancel:hover,
.board-top .board-search .btn-reset-search:hover {
  background-color: #b71c1c !important; /* 약간 더 진한 빨간색 */
  color: #ffffff !important;
}
