/* 전체 wrap */
.qb-wrap { width: 100%; }

/* 히어로 */
.qb-hero {
  background: #f8fafd;
  border-bottom: 1px solid #e8eef5;
  padding: 4rem 2rem 3.5rem;
  text-align: center;
}
.qb-hero-inner { max-width: 680px; margin: 0 auto; }
.qb-badge {
  display: inline-block;
  background: #E6F1FB;
  color: #0C447C;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}
.qb-hero h1 {
  font-size: 32px;
  font-weight: 500;
  color: #111;
  line-height: 1.3;
  margin-bottom: 1rem;
}
.qb-hero h1 span { color: #185FA5; }
.qb-hero p {
  font-size: 15px;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* 검색 */
.qb-search {
  display: flex;
  max-width: 520px;
  margin: 0 auto 1.5rem;
  border: 1px solid #d0daea;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.qb-search input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  color: #111;
}
.qb-search button {
  background: #185FA5;
  color: #fff;
  border: none;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* 태그 */
.qb-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.qb-tags a {
  font-size: 12px;
  color: #185FA5;
  background: #E6F1FB;
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
}
.qb-tags a:hover { background: #B5D4F4; }

/* 섹션 공통 */
.qb-section { padding: 2.5rem 2rem; max-width: 1100px; margin: 0 auto; }
.qb-section-gray { background: #f8f8f8; max-width: 100%; padding: 2.5rem 2rem; }
.qb-section-gray .qb-cat-grid { max-width: 1100px; margin: 0 auto; }
.qb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.qb-section-header h2 {
  font-size: 16px;
  font-weight: 500;
  color: #111;
  margin: 0;
}
.qb-section-header a {
  font-size: 13px;
  color: #185FA5;
  text-decoration: none;
}

/* 문제 카드 */
.qb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.qb-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  transition: border-color 0.12s;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.qb-card:hover { border-color: #185FA5; }
.qb-card-top { margin-bottom: 10px; }
.qb-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  background: #E6F1FB;
  color: #0C447C;
}
.qb-card-text {
  font-size: 13px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 10px;
}
.qb-card-link {
  font-size: 12px;
  color: #185FA5;
  text-decoration: none;
}

/* 카테고리 */
.qb-cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.qb-cat-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.12s;
  display: block;
}
.qb-cat-card:hover { border-color: #185FA5; }
.qb-cat-name {
  font-size: 13px;
  font-weight: 500;
  color: #222;
}

/* 문제 상세 페이지 */
.qb-single-wrap {
  max-width: 760px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.qb-single-header { margin-bottom: 1.5rem; }
.qb-single-title {
  font-size: 20px;
  font-weight: 500;
  color: #111;
  margin-top: 0.75rem;
  line-height: 1.4;
}
.qb-single-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.qb-question-label {
  font-size: 11px;
  font-weight: 500;
  color: #185FA5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}
.qb-question-text {
  font-size: 15px;
  color: #222;
  line-height: 1.7;
}
.qb-choices {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qb-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.12s;
}
.qb-choice:hover { border-color: #185FA5; background: #f0f6ff; }
.qb-choice.selected { border-color: #185FA5; background: #E6F1FB; color: #0C447C; }
.qb-choice-num {
  font-weight: 500;
  color: #185FA5;
  min-width: 20px;
}
.qb-answer-wrap { margin-bottom: 1rem; }
.qb-answer-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 500;
  background: #185FA5;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.qb-answer-btn:hover { opacity: 0.88; }
.qb-answer-btn.active { background: #555; }
.qb-answer-box {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.qb-answer-num {
  font-size: 18px;
  font-weight: 500;
  color: #185FA5;
  margin-bottom: 1rem;
}
.qb-explanation { margin-top: 1rem; }
.qb-explanation-text {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
}
.qb-related {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qb-related a {
  font-size: 14px;
  color: #185FA5;
  text-decoration: none;
}
.qb-related a:hover { text-decoration: underline; }
.qb-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}
.qb-nav a {
  font-size: 14px;
  color: #185FA5;
  text-decoration: none;
}
.qb-nav a:hover { text-decoration: underline; }

/* 문제작성 폼 페이지 */
.wpuf-form-wrap,
.wpuf-form-add {
  max-width: 680px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.wpuf-form-add ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wpuf-form-add ul li {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.wpuf-form-add .wpuf-label label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
  display: block;
}
.wpuf-form-add .wpuf-label .required {
  color: #E24B4A;
  margin-left: 2px;
}
.wpuf-form-add input[type="text"],
.wpuf-form-add input[type="email"],
.wpuf-form-add input[type="url"],
.wpuf-form-add textarea,
.wpuf-form-add select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  background: #fafafa;
  color: #111;
  transition: border-color 0.15s;
}
.wpuf-form-add input[type="text"]:focus,
.wpuf-form-add textarea:focus,
.wpuf-form-add select:focus {
  border-color: #185FA5;
  background: #fff;
  outline: none;
}
.wpuf-form-add textarea { min-height: 100px; resize: vertical; }
.wpuf-form-add .wpuf-help {
  font-size: 12px;
  color: #aaa;
  margin-top: 4px;
  display: block;
}
.wpuf-form-add .wpuf-submit-button,
.wpuf-form-add input[type="submit"] {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 500;
  background: #185FA5;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 0.5rem;
}
.wpuf-form-add .wpuf-submit-button:hover,
.wpuf-form-add input[type="submit"]:hover { opacity: 0.88; }
.wpuf-form-add .wpuf-fields .category-wrap label {
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.wpuf-form-add .wpuf-fields .category-wrap input[type="checkbox"] {
  margin-right: 6px;
  accent-color: #185FA5;
}

/* 문제 목록 페이지 */
.qb-archive-wrap {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.qb-archive-header { margin-bottom: 2rem; }
.qb-archive-title {
  font-size: 22px;
  font-weight: 500;
  color: #111;
  margin-bottom: 1.25rem;
}
.qb-archive-search {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.qb-archive-search select {
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #111;
  outline: none;
  cursor: pointer;
  height: 42px;
}
.qb-archive-search select:focus { border-color: #185FA5; }
.qb-search-inner {
  display: flex;
  flex: 1;
  min-width: 200px;
  border: 2px solid #E24B4A !important;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qb-search-inner input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  color: #111;
  background: transparent;
}
.qb-search-inner button {
  background: #185FA5;
  color: #fff;
  border: none;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.qb-search-inner button:hover { opacity: 0.88; }
.qb-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 2rem;
}
.qb-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2rem;
}
.qb-pagination .page-numbers {
  padding: 8px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: all 0.12s;
}
.qb-pagination .page-numbers:hover { border-color: #185FA5; color: #185FA5; }
.qb-pagination .page-numbers.current { background: #185FA5; color: #fff; border-color: #185FA5; }
.qb-empty {
  text-align: center;
  padding: 4rem 0;
  color: #aaa;
  font-size: 15px;
}

/* 이동 경로 */
.qb-breadcrumb {
  font-size: 13px;
  color: #888;
  margin-bottom: 1rem;
}
.qb-breadcrumb a {
  color: #185FA5;
  text-decoration: none;
}
.qb-breadcrumb a:hover { text-decoration: underline; }

/* WPUF 비로그인 메시지 숨기기 */
.wpuf-message { display: none !important; }

/* 반응형 */
@media (max-width: 768px) {
  .qb-hero h1 { font-size: 24px; }
  .qb-grid { grid-template-columns: 1fr; }
  .qb-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qb-single-wrap { padding: 0 1rem; }
  .qb-single-title { font-size: 17px; }
  .qb-archive-grid { grid-template-columns: 1fr; }
  .qb-archive-search { flex-direction: column; }
  .wpuf-form-wrap, .wpuf-form-add { padding: 0 1rem; }
}