/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans KR", Arial, sans-serif;
  background: #f5f6f7;
  color: #333;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-container {
  display: flex;
  align-items: center;
}
.logo-container img {
  margin-right: 10px; /* controls spacing between image and text */
}
.logo a {
  text-decoration: none;
  color: inherit; /* h1 색상 그대로 */
}

.nav a {
  margin-left: 15px;
  margin-right: 15px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 1.2rem;
}
.nav a:hover {
  color: #0078ff;
}

/* Common container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Page title */
.page-title {
  background: white;
  border-bottom: 1px solid #ddd;
}

.page-title h2 {
  font-size: 30px;
  margin-bottom: 10px;
}

.breadcrumb {
  font-size: 20px;
  color: #777;
}
.breadcrumb a:hover {
  color: #0078ff;
}
.breadcrumb a {
  text-decoration: none;
  color: #555;
}

/* Search */
.board-search {
  background: #f1f3f5;
  margin-top: 20px;
}

.search-box {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.search-box select,
.search-box input {
  padding: 8px;
  border: 1px solid #ccc;
}

.search-box button {
  padding: 8px 16px;
  background: #003964;
  color: white;
  border: none;
  cursor: pointer;
}
/* ===== Table full borders (Desktop) ===== */
.board-list table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid #ccc; /* outer border */
}

.board-list th,
.board-list td {
  padding: 14px;
  text-align: center;
  border: 1px solid #ccc; /* cell borders */
}

.board-list th {
  background: #f1f3f5;
  font-weight: 600;
}

.board-list td:nth-child(2) {
  text-align: left;
}

.board-list a {
  text-decoration: none;
  color: #003964;
}

.board-list .notice {
  background: #fafafa;
  font-weight: bold;
}

/* Pagination */
.pagination {
  text-align: center;
  margin: 30px 0 60px;
}

.pagination a {
  display: inline-block;
  padding: 6px 10px;
  margin: 0 2px;
  border: 1px solid #ccc;
  text-decoration: none;
  color: #333;
}

.pagination a.active {
  background: #003964;
  color: white;
}

/* Footer */
.footer {
  background: #2b2b2b;
  color: #ccc;
  text-align: center;
  padding: 30px 10px;
}

.footer a {
  color: #ccc;
  text-decoration: none;
}

#Marketbutton {
  position: fixed;
  bottom: 120px; /* distance from bottom */
  right: 60px; /* distance from right (near scroll bar) */
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%; /* round button */
  background-image: url("/images/buttonimg.png");
  background-size: cover;
  background-position: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

/* Back to top */
#backToTop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px 12px;
  background: #003964;
  color: white;
  border: none;
  cursor: pointer;
}



/* 아코디언 전용 스타일 추가 */
.notice-title {
  cursor: pointer;
  transition: background 0.2s;
}

.notice-title:hover {
  background-color: #f8f9fa !important;
}

.content-row {
  background-color: #fdfdfd;
}

.content-wrapper {
  padding: 30px;
  text-align: center; /* 이미지 중앙 정렬 */
  border-top: 1px dashed #ddd;
}

.content-wrapper img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  border: 1px solid #eee;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.content-wrapper p {
  font-size: 16px;
  line-height: 1.6;
  color: #444;
  word-break: keep-all;
}

/* =========================
   Mobile Responsive 
   ========================= */
@media (max-width: 980px) {
  /* Header */
  .header {
    padding: 12px 16px;
    flex-direction: row;
  }

  .logo-container img {
    height: 40px;
  }

  .logo a {
    font-size: 18px;
  }

  .nav a {
    font-size: 2rem;
  }

  /* Page title */
  .page-title .container {
    padding: 24px 16px;
  }

  .page-title h2 {
    font-size: 22px;
  }

  .breadcrumb {
    font-size: 12px;
  }

  /* Search box */
  .search-box {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .search-box select,
  .search-box input,
  .search-box button {
    width: 100%;
  }

  /* Table → Card style */
  /* table을 숨기지 말고, table의 레이아웃 방식만 일반 블록으로 바꿉니다 */
  .board-list table {
    display: block;
    border: none;
  }

  /* 제목 행(번호, 제목, 등록일)만 숨깁니다 */
  .board-list thead {
    display: none;
  }

  /* 나머지 tbody, tr, td는 이미 아래 코드에서 display: block 처리가 되어있으므로 잘 보일 것입니다 */

  .board-list tbody {
    display: block;
  }

  .board-list tr {
    display: block;
    background: white;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid #ddd;
  }

  .board-list tr.notice {
    border-left: 4px solid #003964;
  }

  .board-list td {
    display: block;
    border: none;
    padding: 6px 0;
    text-align: left;
    font-size: 14px;
  }

  .board-list td:nth-child(1) {
    font-size: 12px;
    color: #888;
  }

  .board-list td:nth-child(2) a {
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
  }

  .board-list td:nth-child(3),
  .board-list td:nth-child(4) {
    font-size: 12px;
    color: #666;
  }

  /* Pagination */
  .pagination a {
    padding: 6px 8px;
    font-size: 13px;
  }

  /* Footer */
  .footer {
    font-size: 12px;
    padding: 20px 10px;
  }

  /* Back to top */
  #backToTop {
    right: 14px;
    bottom: 14px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .board-list tr.content-row {
    display: none; /* JS에서 제어 */
    padding: 0;
    border: none;
    margin-bottom: 12px;
  }
  
  .content-wrapper {
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
  }
}


