/* ===== 색상 (Red Bull 톤) ===== */
.rb-board-wrap,
.rb-view-wrap,
.rb-write-wrap {
  color: #1f2a44;
}
.rb-btn-primary {
  background: #ec1845;
  color: #fff;
  border: none;
}
.rb-btn-line {
  background: #fff;
  color: #001a72;
  border: 1px solid #001a72;
}
.rb-btn-ghost {
  background: #f4f6fb;
  color: #001a72;
  border: 1px solid transparent;
}
.rb-btn-ghost.active {
  border-color: #001a72;
}
.rb-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 999px;
  background: #fed502;
  color: #001a72;
}

a {
  color: #001a72;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ===== 공통 버튼 ===== */
.rb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.05s ease;
}
.rb-btn:active {
  transform: translateY(1px);
}

/* ===== 목록 헤더 ===== */
.rb-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 8px;
}
.rb-board-title {
  font-size: 22px;
  font-weight: 800;
  color: #001a72;
}
.rb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rb-view-toggle .rb-btn {
  padding: 8px 10px;
}

/* ===== 카테고리 탭 ===== */
.rb-cat-tabs {
  margin: 8px 0 14px;
}
.rb-cat-tabs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}
.rb-cat-tabs a {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #dbe1f0;
  border-radius: 999px;
  background: #fff;
  color: #1f2a44;
}
.rb-cat-tabs a.active,
.rb-cat-tabs a:hover {
  border-color: #001a72;
  color: #001a72;
}

/* ===== 검색바 ===== */
.rb-searchbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e6eaf5;
  border-radius: 16px;
  background: #fff;
  margin-bottom: 12px;
}
.rb-searchbar select,
.rb-searchbar input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d7deef;
  border-radius: 10px;
}
.rb-searchbar input {
  flex: 1;
}

/* ===== 카드형 그리드 ===== */
.rb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.rb-card {
  overflow: hidden;
  border: 1px solid #e5e9f7;
  border-radius: 18px;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.rb-card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16/10;
  background: #f2f4fb;
}
.rb-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rb-badge-new {
  position: absolute;
  left: 10px;
  top: 10px;
  background: #ec1845;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
}
.rb-badge-cmt {
  position: absolute;
  right: 10px;
  top: 10px;
  background: #001a72;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
}
.rb-card-body {
  padding: 12px 14px 14px;
}
.rb-card-title {
  font-size: 16px;
  line-height: 1.35;
  margin: 2px 0 6px;
}
.rb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: #6b748c;
}
.rb-meta-dot {
  opacity: 0.5;
}
.rb-meta-tags {
  margin-top: 8px;
}

.rb-empty {
  padding: 40px;
  text-align: center;
  color: #6b748c;
}

/* ===== 테이블형 ===== */
.rb-table-wrap {
  display: none;
}
.is-table .rb-grid {
  display: none;
}
.is-table .rb-table-wrap {
  display: block;
}

.rb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e5e9f7;
  border-radius: 12px;
  overflow: hidden;
}
.rb-table th,
.rb-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2fb;
  text-align: left;
}
.rb-table thead th {
  background: #f7f9ff;
  font-weight: 800;
  color: #001a72;
}
.rb-td-title a {
  font-weight: 700;
}
.rb-ico {
  margin-left: 6px;
  font-size: 12px;
  color: #ec1845;
}
.rb-td-empty {
  text-align: center;
  color: #6b748c;
}

/* ===== 페이지네이션 ===== */
.rb-paging {
  margin: 16px 0 24px;
  text-align: center;
}
.rb-paging .pg {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.rb-paging .pg_page,
.rb-paging .pg_current {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #dbe1f0;
  background: #fff;
}
.rb-paging .pg_current {
  background: #001a72;
  color: #fff;
  border-color: #001a72;
}

/* ===== 뷰 ===== */
.rb-view-header {
  margin: 10px 0 14px;
}
.rb-view-title {
  font-size: 24px;
  font-weight: 900;
  color: #001a72;
  margin: 0 0 6px;
}
.rb-view-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #6b748c;
  font-size: 13px;
}

.rb-attach {
  margin: 16px 0;
}
.rb-attach ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rb-attach-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #e5e9f7;
  background: #fff;
  border-radius: 10px;
}
.rb-attach-name {
  font-weight: 700;
}

.rb-view-content {
  border: 1px solid #eef2fb;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  line-height: 1.7;
}
.rb-links {
  margin: 14px 0;
}
.rb-links ul {
  list-style: disc;
  padding-left: 20px;
}

.rb-view-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 16px 0;
}
.rb-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.rb-prevnext a {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e9f7;
  background: #fff;
  display: inline-block;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rb-prevnext .ttl {
  font-weight: 700;
}

/* ===== 쓰기 ===== */
.rb-write-title {
  font-size: 22px;
  font-weight: 900;
  color: #001a72;
  margin: 10px 0 14px;
}
.rb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.rb-field label {
  font-weight: 800;
  color: #1f2a44;
}
.rb-field input[type="text"],
.rb-field select,
.rb-field textarea {
  padding: 10px 12px;
  border: 1px solid #d7deef;
  border-radius: 10px;
  background: #fff;
}
.rb-chk {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  color: #6b748c;
}
.rb-write-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}
.is-disabled {
  pointer-events: none;
  opacity: 0.5;
}
.rb-good-cnt,
.rb-bad-cnt {
  margin-left: 6px;
  font-weight: 800;
}
/* ===== 반응형 ===== */
@media (max-width: 1024px) {
  .rb-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .rb-board-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .rb-grid {
    grid-template-columns: 1fr;
  }
  .rb-searchbar {
    flex-wrap: wrap;
  }
  .rb-searchbar select {
    flex: 1;
  }
  .rb-table th:nth-child(1),
  .rb-table td:nth-child(1) {
    display: none;
  } /* No 숨김 */
  .rb-table colgroup col:first-child {
    width: 0;
  }
}
