/* ================================================================
   BOARD COMMON
   모든 게시판에서 공통으로 사용하는 제목, 상단 도구 영역
================================================================ */
.board-section {
  padding: 104px 0 130px;
  background: #fff;
}

.board-heading {
  margin-bottom: 48px;
  text-align: center;
}

.board-heading > p {
  margin-bottom: 12px;
  color: #0078df;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .14em;
}

.board-heading h2 {
  color: var(--navy-950);
  font-size: clamp(34px, 2.6vw, 48px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.04em;
}

.board-heading > span {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 52px;
  padding-bottom: 18px;
 
}

.board-total {
  flex: 0 0 auto;
  color: #65727d;
  font-size: 16px;
}

.board-total strong {
  color: #0078df;
  font-weight: 800;
}

/* ================================================================
   BOARD COMMON : SEARCH
   include/search.php 공통 검색 폼
================================================================ */
.board-search {
  display: grid;
  grid-template-columns: 142px minmax(220px, 370px) 58px;
  width: min(100%, 570px);
  height: 54px;
}

.board-search-label {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.board-search-select,
.board-search-input,
.board-search-button {
  min-width: 0;
  height: 54px;
  border-radius: 0;
}

.board-search-select {
  padding: 0 44px 0 18px;
  color: var(--navy-950);
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #172331 50%), linear-gradient(135deg, #172331 50%, transparent 50%);
  background-position: calc(100% - 21px) 24px, calc(100% - 16px) 24px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  border: 1px solid #cfd7de;
  font-size: 16px;
  cursor: pointer;
  appearance: none;
}

.board-search-input {
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfd7de;
  border-right: 0;
  border-left: 0;
  font-size: 16px;
}

.board-search-input::placeholder {
  color: #9aa4ad;
}

.board-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #0078df;
  border: 1px solid #0078df;
  transition: background-color .2s ease, border-color .2s ease;
}

.board-search-button:hover,
.board-search-button:focus {
  background: var(--navy-950);
  border-color: var(--navy-950);
}

.board-search-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

/* ================================================================
   BOARD COMMON : PAGER
   include/pager.php 공통 페이지네이션
================================================================ */
.board-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 72px;
}

.board-pager-numbers {
  display: flex;
  gap: 7px;
}

.board-pager-control,
.board-pager-number {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #4f5c67;
  background: #fff;
  border: 1px solid #d4dadd;
  font-size: 15px;
  font-weight: 600;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.board-pager-control:hover,
.board-pager-control:focus,
.board-pager-number:hover,
.board-pager-number:focus {
  color: #0078df;
  border-color: #0078df;
}

.board-pager-number.is-current {
  color: #fff;
  background: #0078df;
  border-color: #0078df;
  font-weight: 800;
}

.board-pager-control.is-disabled {
  color: #b5bcc2;
  background: #f7f7f6;
  border-color: #e0e2e2;
  pointer-events: none;
}

.board-pager-control svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

/* ================================================================
   GALLERY BOARD : LIST
   네 개 앨범 게시판에서 동일하게 사용하는 갤러리 목록
================================================================ */
.gallery-board-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 46px 24px;
  margin-top: 42px;
}

.gallery-board-item {
  min-width: 0;
}

.gallery-board-item > a {
  display: block;
  color: var(--ink);
}

.gallery-board-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #edf1f4;
}

.gallery-board-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(7, 22, 38, .08);
  pointer-events: none;
}

.gallery-board-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.gallery-board-item > a:hover .gallery-board-thumb img,
.gallery-board-item > a:focus .gallery-board-thumb img {
  transform: scale(1.035);
}

.gallery-board-copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 3px 20px;
  border-bottom: 1px solid #d8e0e6;
}

.gallery-board-copy strong {
  overflow: hidden;
  color: var(--navy-950);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-board-copy time {
  flex: 0 0 auto;
  padding-top: 3px;
  color: #87929b;
  font-size: 14px;
  line-height: 1.5;
}

/* ================================================================
   NEWS BOARD : LIST
   갤러리 목록 디자인을 사용하며 본문 미리보기만 두 줄 추가
================================================================ */
.news-board-copy {
  display: flex;
  flex-direction: column;
  min-height: 174px;
  padding: 21px 3px 20px;
  border-bottom: 1px solid #d8e0e6;
}

.news-board-thumb {
  background: #f5f6f7;
}

.news-board-thumb img {
  object-fit: contain;
}

.news-board-copy strong {
  display: block;
  overflow: hidden;
  color: var(--navy-950);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-board-copy p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.2em;
  margin-top: 10px;
  color: #6c7882;
  font-size: 15px;
  line-height: 1.6;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-board-copy time {
  display: block;
  margin-top: auto;
  padding-top: 16px;
  color: #87929b;
  font-size: 14px;
  line-height: 1.5;
}

/* ================================================================
   LIST BOARD : TABLE
   교회주보 등 일반 목록형 게시판에서 공통으로 사용하는 테이블
================================================================ */
.board-list-wrap {
  margin-top: 42px;
  border-top: 2px solid var(--navy-950);
}

.board-list-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.board-list-table caption {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.board-list-col-number {
  width: 92px;
}

.board-list-col-author {
  width: 158px;
}

.board-list-col-date {
  width: 156px;
}

.board-list-col-file {
  width: 124px;
}

.board-list-table thead th {
  height: 64px;
  padding: 0 18px;
  color: var(--navy-950);
  background: #f7f9fa;
  border-bottom: 1px solid #cad4dc;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.board-list-table tbody tr {
  border-bottom: 1px solid #e0e5e9;
  transition: background-color .2s ease;
}

.board-list-table tbody tr:hover {
  background: #f8fbfe;
}

.board-list-table tbody td,
.board-list-table tbody th {
  height: 76px;
  padding: 14px 18px;
  color: #68747e;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  vertical-align: middle;
}

.board-list-table .board-list-subject {
  padding-right: 28px;
  padding-left: 28px;
  text-align: left;
}

.board-list-subject a {
  display: inline-block;
  overflow: hidden;
  max-width: 100%;
  color: var(--navy-950);
  font-size: 17px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s ease;
}

.board-list-subject a:hover,
.board-list-subject a:focus {
  color: #0078df;
}

.board-list-file a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #63717c;
  font-size: 14px;
  transition: color .2s ease;
}

.board-list-file a:hover,
.board-list-file a:focus {
  color: #0078df;
}

.board-list-file i {
  color: #0078df;
  font-size: 16px;
}

.board-list-file-empty {
  color: #aab2b8;
}

/* ================================================================
   SERMON BOARD : LIST
   주일예배, 다음세대, 중고등부, 특별영상에서 공통으로 사용하는 가로형 목록
================================================================ */
.sermon-board-list {
  margin-top: 42px;
  border-top: 2px solid var(--navy-950);
}

.sermon-board-item {
  border-bottom: 1px solid #dde3e7;
}

.sermon-board-row {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  min-height: 272px;
  padding: 35px 28px;
}

.sermon-board-video {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #e8edf1;
  border: 1px solid rgba(7, 22, 38, .08);
}

.sermon-board-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.sermon-board-copy {
  display: block;
  min-width: 0;
  color: var(--ink);
}

.sermon-board-category {
  display: block;
  margin-bottom: 10px;
  color: #0078df;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
}

.sermon-board-copy h3 {
  overflow: hidden;
  color: var(--navy-950);
  font-size: clamp(20px, 1.65vw, 25px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s ease;
}

.sermon-board-copy:hover h3,
.sermon-board-copy:focus h3 {
  color: #0078df;
}

.sermon-board-info {
  margin-top: 22px;
}

.sermon-board-info > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  margin-top: 9px;
  line-height: 1.55;
}

.sermon-board-info dt {
  color: #7a8791;
  font-size: 15px;
  font-weight: 700;
}

.sermon-board-info dd {
  overflow: hidden;
  color: #43515d;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================================================================
   BOARD COMMON : VIEW
   include/view.php 공통 상세보기
================================================================ */
.board-view {
  margin-top: 42px;
  background: #fff;
  border-top: 2px solid var(--navy-950);
}

.board-view-page-section .board-view {
  margin-top: 0;
}

.board-view-header {
  padding: 32px 24px 30px;
  border-bottom: 1px solid #d8e0e6;
}

.board-view-title-row {
  min-height: 47px;
}

.board-view-title {
  color: var(--navy-950);
  font-size: clamp(25px, 2.5vw, 36px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.04em;
  word-break: keep-all;
}

.board-view-meta {
  display: flex;
  flex-wrap: wrap;
  margin-top: 15px;
  color: #7b8790;
  font-size: 15px;
  line-height: 1.5;
}

.board-view-meta > div {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 31px;
}

.board-view-meta > div::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 1px;
  height: 13px;
  background: #d7dde2;
  transform: translateY(-50%);
}

.board-view-meta > div:last-child {
  padding-right: 0;
}

.board-view-meta > div:last-child::after {
  display: none;
}

.board-view-meta dt {
  color: #4e5d68;
  font-weight: 700;
}

.board-view-meta dd {
  min-width: 1.4em;
}

.board-view-content {
  min-height: 430px;
  padding: clamp(46px, 5vw, 72px) 24px clamp(54px, 6vw, 86px);
  color: #3c4954;
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

.board-view-content h2,
.board-view-content h3,
.board-view-content h4 {
  margin: 1.6em 0 .65em;
  color: var(--navy-950);
  font-weight: 700;
  line-height: 1.4;
}

.board-view-content h2:first-child,
.board-view-content h3:first-child,
.board-view-content h4:first-child {
  margin-top: 0;
}

.board-view-content ul,
.board-view-content ol {
  margin: 1em 0;
  padding-left: 1.5em;
}

.board-view-content ul {
  list-style: disc;
}

.board-view-content ol {
  list-style: decimal;
}

.board-view-content img {
  display: block;
  max-width: 100%;
  height: auto !important;
  margin-right: auto;
  margin-left: auto;
}

.board-view-content iframe,
.board-view-content video {
  display: block;
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.sermon-view-player {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
  background: #000;
}

.sermon-view-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.board-view-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.board-view-content a {
  color: #0078df;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.board-view-neighbor-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 64px;
  align-items: center;
  border-top: 1px solid #d8e0e6;
}

.board-view-neighbor-row:last-child {
  border-bottom: 1px solid #d8e0e6;
}

.board-view-neighbor-label {
  position: relative;
  display: flex;
  height: 100%;
  padding: 0 24px;
  align-items: center;
  color: var(--navy-950);
  font-size: 15px;
  font-weight: 700;
}

.board-view-neighbor-label svg {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #9aa5ad;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transform: translateY(-50%);
}

.board-view-neighbor-row > a,
.board-view-neighbor-empty {
  min-width: 0;
  padding: 20px 24px;
  overflow: hidden;
  color: #586671;
  font-size: 15px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-view-neighbor-row > a:hover,
.board-view-neighbor-row > a:focus {
  color: #0078df;
}

.board-view-actions {
  display: flex;
  justify-content: center;
  padding-top: 40px;
}

.board-view-list-button {
  display: inline-flex;
  width: 112px;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--navy-950);
  background: #fff;
  border: 1px solid #cfd7de;
  font-size: 15px;
  font-weight: 700;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.board-view-list-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.board-view-list-button:hover,
.board-view-list-button:focus {
  color: #fff;
  background: var(--navy-950);
  border-color: var(--navy-950);
}

/* ================================================================
   BOARD RESPONSIVE
================================================================ */
@media (max-width: 980px) {
  .board-section {
    padding: 82px 0 100px;
  }

  .board-toolbar {
    align-items: flex-end;
  }

  .gallery-board-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-board-copy {
    display: block;
  }

  .gallery-board-copy strong {
    display: block;
  }

  .gallery-board-copy time {
    display: block;
    margin-top: 8px;
  }

  .board-list-col-number {
    width: 74px;
  }

  .board-list-col-author {
    width: 130px;
  }

  .board-list-col-date {
    width: 132px;
  }

  .board-list-col-file {
    width: 74px;
  }

  .board-list-table thead th,
  .board-list-table tbody td,
  .board-list-table tbody th {
    padding-right: 12px;
    padding-left: 12px;
  }

  .board-list-file span {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .sermon-board-row {
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 32px;
    min-height: 230px;
    padding: 30px 18px;
  }

  .sermon-board-info {
    margin-top: 16px;
  }

  .board-view-header {
    padding: 27px 18px 25px;
  }

  .board-view-content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .board-view-neighbor-row {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .board-view-neighbor-label,
  .board-view-neighbor-row > a,
  .board-view-neighbor-empty {
    padding-right: 16px;
    padding-left: 16px;
  }

}

@media (max-width: 640px) {
  .board-section {
    padding: 64px 0 78px;
  }

  .board-heading {
    margin-bottom: 34px;
  }

  .board-heading > p {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .board-heading h2 {
    font-size: 30px;
  }

  .board-heading > span {
    margin-top: 10px;
    font-size: 15px;
  }

  .board-toolbar {
    display: block;
    margin-top: 34px;
    padding-bottom: 16px;
  }

  .board-total {
    margin-bottom: 13px;
    font-size: 14px;
  }

  .board-search {
    grid-template-columns: 96px minmax(0, 1fr) 50px;
    height: 50px;
  }

  .board-search-select,
  .board-search-input,
  .board-search-button {
    height: 50px;
    font-size: 14px;
  }

  .board-search-select {
    padding-right: 30px;
    padding-left: 12px;
    background-position: calc(100% - 17px) 22px, calc(100% - 12px) 22px;
  }

  .board-search-input {
    padding: 0 12px;
  }

  .gallery-board-list {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-top: 30px;
  }

  .gallery-board-copy {
    padding-top: 17px;
  }

  .gallery-board-copy strong {
    font-size: 17px;
  }

  .news-board-copy {
    padding-top: 17px;
  }

  .news-board-copy strong {
    font-size: 17px;
  }

  .board-list-wrap {
    margin-top: 30px;
  }

  .board-list-table,
  .board-list-table tbody,
  .board-list-table tr,
  .board-list-table th,
  .board-list-table td {
    display: block;
  }

  .board-list-table colgroup,
  .board-list-table thead,
  .board-list-number,
  .board-list-file-empty {
    display: none;
  }

  .board-list-table tbody tr {
    position: relative;
    padding: 21px 46px 21px 0;
  }

  .board-list-table tbody td,
  .board-list-table tbody th,
  .board-list-table .board-list-subject {
    width: auto;
    height: auto;
    padding: 0;
    text-align: left;
  }

  .board-list-subject a {
    display: block;
    font-size: 16px;
  }

  .board-list-author,
  .board-list-date {
    display: inline-block !important;
    margin-top: 8px;
    color: #82909a !important;
    font-size: 13px !important;
  }

  .board-list-author::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 11px;
    margin: 0 9px;
    background: #d4dadd;
    vertical-align: -1px;
  }

  .board-list-file {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
  }

  .board-list-file a {
    width: 36px;
    height: 36px;
    border: 1px solid #d8e0e6;
  }

  .board-list-file i {
    font-size: 15px;
  }

  .sermon-board-list {
    margin-top: 30px;
  }

  .sermon-board-row {
    display: block;
    min-height: 0;
    padding: 25px 0 27px;
  }

  .sermon-board-copy {
    padding: 20px 4px 0;
  }

  .sermon-board-category {
    margin-bottom: 7px;
    font-size: 12px;
  }

  .sermon-board-copy h3 {
    font-size: 19px;
    white-space: normal;
  }

  .sermon-board-info {
    margin-top: 15px;
  }

  .sermon-board-info > div {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 9px;
    margin-top: 7px;
  }

  .sermon-board-info dt,
  .sermon-board-info dd {
    font-size: 14px;
  }

  .sermon-board-info dd {
    white-space: normal;
  }

  .board-view {
    margin-top: 30px;
  }

  .board-view-header {
    padding: 22px 10px 20px;
  }

  .board-view-title-row {
    min-height: 35px;
  }

  .board-view-title {
    font-size: 22px;
    line-height: 1.45;
  }

  .board-view-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 16px;
    margin-top: 10px;
    font-size: 12px;
  }

  .board-view-meta > div {
    gap: 7px;
    padding-right: 0;
  }

  .board-view-meta > div::after {
    display: none;
  }

  .board-view-content {
    min-height: 300px;
    padding: 32px 10px 44px;
    font-size: 15px;
  }

  .board-view-neighbor-row {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 56px;
  }

  .board-view-neighbor-label {
    padding: 15px 10px;
    font-size: 13px;
  }

  .board-view-neighbor-label svg {
    right: 5px;
    width: 17px;
    height: 17px;
  }

  .board-view-neighbor-row > a,
  .board-view-neighbor-empty {
    padding: 16px 10px;
    font-size: 13px;
  }

  .board-view-actions {
    padding-top: 25px;
  }

  .board-view-list-button {
    width: 100%;
    height: 48px;
  }

  .board-pager {
    gap: 4px;
    margin-top: 52px;
  }

  .board-pager-numbers {
    gap: 4px;
  }

  .board-pager-control,
  .board-pager-number {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    font-size: 13px;
  }
}

@media (max-width: 390px) {
  .board-pager-control,
  .board-pager-number {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }
}
