@charset "utf-8";

/* ============================================================
   FAQ 커스텀 스타일 (공지사항/QA 스타일 기반)
   ============================================================ */

:root {
  --nc-primary:   #6b4a2b;
  --nc-text:      #2b2b2b;
  --nc-meta:      #888;
  --nc-border:    #e8ddd5;
  --nc-border-lt: #f0eae4;
  --nc-header-bg: #f6f4ef;
  --duration-fast: 0.2s;
}

/* 배경·타이틀 영역 */
#wrapper         { background: #fff !important; }
#wrapper_title   { display: none !important; }
#container_title { display: none !important; }

#container_wr {
  width: 100% !important;
  max-width: 1490px !important;
}
#container {
  width: 100% !important;
  max-width: 100% !important;
}

/* 페이지 컨테이너 */
#faq_page { padding: 60px 0 100px; }

/* 페이지 헤더 */
.board-page-header { margin-bottom: 32px; }

.board-page-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (max-width: 1280px) {
  .board-page-title { font-size: 2.4rem; }
}

@media (max-width: 768px) {
  .board-page-title { font-size: 2rem; }
}

/* ── 카테고리 + 검색 한 줄 배치 ── */
.faq-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
  flex-wrap: wrap;
}

/* ── 카테고리 탭 ── */
#bo_cate { margin: 0 !important; }

#bo_cate h2 {
  position: absolute;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

#bo_cate ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
  margin: 0;
}

#bo_cate li {
  display: block !important;
  padding: 0 !important;
}

#bo_cate a {
  display: flex !important;
  align-items: center;
  height: 50px !important;
  padding: 0 20px !important;
  border-radius: 30px !important;
  border: 1px solid #ededed !important;
  background: transparent !important;
  color: #444 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  white-space: nowrap;
  line-height: normal !important;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
}

#bo_cate a:hover,
#bo_cate a:focus {
  text-decoration: none;
  border-color: var(--nc-primary) !important;
  color: var(--nc-primary) !important;
  background: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 74, 43, 0.15);
}

#bo_cate #bo_cate_on {
  background: var(--nc-primary) !important;
  border-color: var(--nc-primary) !important;
  color: #fff !important;
  font-weight: 700 !important;
  transform: none !important;
  box-shadow: 0 4px 16px rgba(107, 74, 43, 0.3) !important;
}

#bo_cate #bo_cate_on:hover {
  transform: none !important;
  box-shadow: 0 4px 16px rgba(107, 74, 43, 0.3) !important;
}

/* ── 검색 ── */
#faq_sch {
  display: flex !important;
  justify-content: flex-end;
  align-items: center;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  text-align: left !important;
  flex-shrink: 0;
}

#faq_sch legend { display: none; }

#faq_sch .sch_tit { display: none !important; }

#faq_sch form {
  display: flex;
  gap: 8px;
  align-items: center;
}

#faq_sch .frm_input {
  height: 44px !important;
  border: 1px solid var(--nc-border) !important;
  border-radius: 6px !important;
  font-size: 16px;
  color: var(--nc-text);
  padding: 0 14px !important;
  width: 240px !important;
  background: #fff;
  box-sizing: border-box;
}

#faq_sch .frm_input::placeholder { color: #aaa; }

#faq_sch .btn_submit {
  height: 44px !important;
  padding: 0 20px !important;
  font-size: 16px !important;
  font-weight: 600;
  color: #fff !important;
  background: var(--nc-primary) !important;
  border-radius: 6px !important;
  border: none !important;
  cursor: pointer;
  width: auto !important;
  transition: background 0.18s;
}

#faq_sch .btn_submit:hover { background: #5a3d24 !important; }

/* ── FAQ 목록 ── */
#faq_wrap { margin: 0 0 40px; }

#faq_wrap h2 {
  position: absolute;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

#faq_wrap ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--nc-primary);
}

#faq_wrap li {
  border-bottom: 1px solid var(--nc-border);
  background: #fff;
  position: relative;
}

#faq_wrap li:first-child { border-top: none !important; }

/* Q 헤더 행 */
#faq_wrap li h3 {
  min-height: 0 !important;
  line-height: 1.55;
  padding: 18px 56px 18px 58px !important;
  position: relative;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--nc-text);
  cursor: pointer;
  transition: background var(--duration-fast);
}

#faq_wrap li h3:hover { background: #faf8f5; }

/* Q 레이블 */
#faq_wrap li h3 .tit_bg {
  position: absolute !important;
  top: 50% !important;
  left: 14px !important;
  transform: translateY(-50%);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 30px !important;
  height: 30px !important;
  background: var(--nc-primary) !important;
  color: #fff !important;
  border-radius: 50% !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

/* 질문 링크 */
#faq_wrap li h3 a {
  color: var(--nc-text);
  text-decoration: none;
  display: block;
}

#faq_wrap li h3 a:hover { color: var(--nc-primary); }

#faq_wrap li h3.faq_li_open a { color: var(--nc-primary); }

/* 열기/닫기 버튼 */
#faq_wrap li h3 .tit_btn {
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  transform: translateY(-50%);
  border: none !important;
  width: 30px !important;
  height: 30px !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 !important;
}

.tit_arrow {
  display: inline-block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background-color: #aaa;
  -webkit-mask-image: url('/img/mfarm/icon/ic-expand.svg');
  mask-image: url('/img/mfarm/icon/ic-expand.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: transform 0.25s ease, background-color 0.18s;
}

#faq_wrap li h3:hover .tit_arrow { background-color: var(--nc-primary); }

#faq_wrap li h3.faq_li_open .tit_arrow {
  transform: rotate(180deg);
  background-color: var(--nc-primary);
}

/* ── 답변 영역 ── */
#faq_con .con_inner {
  display: none;
  overflow: hidden;
  background: transparent !important;
  border: none !important;
}

#faq_con .con_inner_body {
  position: relative;
  padding: 20px 24px 24px 58px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--nc-text);
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* A 레이블 */
#faq_con .con_inner_body::before {
  content: 'A';
  position: absolute;
  top: 20px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--nc-meta);
  color: #fff;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}


/* ── 빈 목록 ── */
.empty_list {
  padding: 60px 0;
  text-align: center;
  color: var(--nc-meta);
  font-size: 16px;
}

/* ── 관리자 버튼 ── */
.faq_admin { text-align: right; margin-top: 12px; }

/* ── 페이지네이션 ── */
.pg_wrap {
  float: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  clear: both;
  margin: 40px 0 12px;
  padding: 0;
}

.pg_wrap .pg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.pg_wrap .pg_page,
.pg_wrap .pg_current {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border: 1px solid var(--nc-border);
  border-radius: 4px;
  font-size: 16px;
  color: #555;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pg_wrap .pg_page:hover {
  background: var(--nc-header-bg);
  border-color: var(--nc-primary);
  color: var(--nc-primary);
}

.pg_wrap .pg_current {
  background: var(--nc-primary) !important;
  border-color: var(--nc-primary) !important;
  color: #fff !important;
  font-weight: 700;
}

/* ============================================================
   반응형
   ============================================================ */

@media (max-width: 1600px) {
  #faq_page { padding-left: 60px; padding-right: 60px; }
}

@media (max-width: 1280px) {
  #faq_page { padding-left: 40px; padding-right: 40px; }
}

@media (max-width: 768px) {
  #faq_page { padding: 40px 20px 60px; }

  .board-page-header { margin-bottom: 20px; }

  /* 카테고리 + 검색 수직 정렬 */
  .faq-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }

  #bo_cate a { height: 40px !important; padding: 0 14px !important; font-size: 14px !important; }

  #faq_sch { justify-content: stretch; }

  #faq_sch form { width: 100%; }

  #faq_sch .frm_input { width: 100% !important; flex: 1; }

  /* FAQ 아이템 */
  #faq_wrap li h3 {
    padding: 16px 48px 16px 48px !important;
    font-size: 16px;
    font-weight: 600;
  }

  #faq_wrap li h3 .tit_bg {
    width: 26px !important;
    height: 26px !important;
    font-size: 13px !important;
    left: 12px !important;
  }

  #faq_wrap li h3 .tit_btn {
    right: 10px !important;
    width: 26px !important;
    height: 26px !important;
  }

  .tit_arrow { width: 24px; height: 24px; }

  /* 답변 영역 */
  #faq_con .con_inner_body {
    padding: 16px 16px 20px 48px;
    font-size: 15px;
  }

  #faq_con .con_inner_body::before {
    width: 26px !important;
    height: 26px !important;
    font-size: 13px !important;
    left: 12px !important;
    top: 16px !important;
  }

  /* 페이지네이션 */
  .pg_wrap { margin: 28px 0 8px; }

  .pg_wrap .pg_page,
  .pg_wrap .pg_current { min-width: 32px; height: 32px; font-size: 14px; }
}
