/* 공통 페이지네이션 */
.pager{
  display:flex;justify-content:center;align-items:center;gap:var(--space-2);
  margin-top:2rem;
}
.pager__link{
  padding:.5rem .75rem;border:1px solid var(--color-border);background-color:var(--color-bg);
  color:var(--color-text-muted);text-decoration:none;border-radius:var(--radius-sm);font-size:var(--fs-small);
  transition:background .2s,color .2s,border-color .2s,transform .05s;
}
.pager__link:hover{ background-color:var(--color-hover-bg); color:var(--color-text); }
.pager__link--active{ background-color:var(--color-primary); color:#fff; border-color:var(--color-primary); }
.pager__link--active:hover{ background-color:var(--color-primary-600); color:#fff; border-color:var(--color-primary); }
.pager__link--disabled{ opacity:.5; pointer-events:none; cursor:not-allowed; }

/* ==========================================================================
   List 페이지 (notice/qna 목록)
   - 검색 컨트롤/테이블/공지 행
   ========================================================================== */
.board__controls{ display:flex; align-items:center; gap: 10px; margin:10px 0; }
.board__search{ display:flex; margin-left: auto; gap:var(--space-gap); }

/* select는 고정 너비 (가장 안정적) */
.board__search .board__select {
    flex: 0 0 120px;   /* 고정폭 */
}

.board__input{
  flex: 1 1 250px;         /* 남은 공간을 대부분 차지 */
}
.board__search .button{
  flex: 0 0 auto;
  white-space: nowrap;    /* '검색' 줄바꿈 방지 */
}

.board__table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  width: 100%;
}

.board__table{ width:100%; border-collapse:collapse; table-layout: auto; }
.board__thead .board__head-cell{
  border-bottom:1px solid var(--color-border); padding:var(--space-2) var(--space-3);
  text-align:center; font-weight:600; color:var(--color-text);
}
.board__head-cell--left{ text-align:left; }

.board__tbody .board__row{ border-bottom:1px solid var(--color-border); }
.board__cell{ padding:var(--space-2) var(--space-3); text-align:center; color:var(--color-text); }
.board__cell--title{ text-align:left; font-weight:500; }
.board__cell--title, .board__cell--title a{ color:var(--color-text); text-decoration:none; }
.board__cell--title:hover, .board__cell--title a:hover{ color:var(--color-primary); }

/* ==========================================================================
   Detail 페이지 (notice/qna 상세)
   - post/attachments/actions/comments
   ========================================================================== */
.post{}
.post__header{ padding-bottom:20px; border-bottom:1px solid var(--color-border); }
.post__title{ font-size:1.8rem; font-weight:600; color:#0f172a; margin-bottom:15px; line-height:1.4; }

/* Meta */
.post__meta{
  display:flex; gap:20px; flex-wrap:wrap; font-size:var(--fs-small); color:var(--color-text-muted); margin:0; padding:0;
}
.post__meta-item{ display:flex; align-items:center; gap:8px; }
.post__meta-label{ font-weight:600; color:var(--color-text-sub); }
.post__meta-value{}

/* Body & Content */
.post__body{ margin-top:20px; border-bottom: 1px solid var(--color-border);}
.post__content{ line-height:2; color:#334155; margin-bottom:20px;min-height: 300px; }

/* Attachments */
.post__attachments{ padding:20px 0; background-color:var(--color-surface); border-top:1px solid var(--color-border); }
.post__attachments-title{ font-weight:600; color:var(--color-text-sub); margin-bottom:15px; }
.post__attachments-list{ list-style:none; margin:0; padding:0; }
.post__attachments-item{
  padding:10px 15px; background-color:#fff; border:1px solid var(--color-border); var(--radius-md); margin-bottom:8px;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease; cursor:pointer;
}
.post__attachments-item:hover{
  border-color:var(--color-primary); transform:translateY(-1px); box-shadow:0 2px 8px rgba(59,130,246,.12);
}

/* Actions */
.post__actions{
  display:flex; justify-content:center; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 20px;
}

/* Comments */
.comments{
  background-color:#fff; border-radius:var(--radius-lg); box-shadow:0 4px 20px rgba(0,0,0,.08);
  padding:30px; margin-top:10px;
}
.comments__title{
  font-size:var(--fs-xlarge); font-weight:600; color:#0f172a; margin-bottom:20px;
  padding-bottom:10px; border-bottom:2px solid var(--color-border);
}
.comment{
  padding:20px; border:1px solid var(--color-border); border-radius:var(--radius-md); margin-bottom:15px; background-color:#fafafa;
  transition:box-shadow .2s ease, border-color .2s ease;
}
.comment:hover{ box-shadow:0 2px 8px rgba(0,0,0,.05); }
.comment__header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; font-size:var(--fs-small); }
.comment__author{ font-weight:600; color:var(--color-text-sub); }
.comment__date{ color:var(--color-text-muted); }
.comment__content{ color:#334155; line-height:1.6; }

/* Responsive (detail) */
@media (max-width:768px){
  .post__title{ font-size:var(--fs-xxlarge) }
  .post__header, .post__body{ padding:20px 0; }
  .post__meta{ flex-direction:column; gap:10px; }
}

/* ==========================================================================
   Regist 페이지 (게시글 작성/등록)
   - notice / post-form
   ========================================================================== */
/* 작성 안내 박스 */
.notice{
  background-color:#f8f9ff; border:1px solid #e3e8ff; border-radius:var(--radius-md);
  padding:10px; margin-bottom:20px; color:var(--color-primary);
}
.notice__title{ margin-bottom:10px; font-weight:700; color:var(--color-text-sub); }
.notice__list{ margin:0 0 0 20px; padding:0; }
.notice__item{}

.board__table {
  table-layout: fixed;                  
  min-width: var(--board-table-min, 600px);
}

/* 등록 폼 */
.post-form{}
.post-form__group{ margin-bottom:20px; }
.post-form__label{ display:block; margin-bottom:6px; color:#555; font-weight:600; }
.post-form__required{ color:#e74c3c; margin-left:3px; }

.post-form__input,
.post-form__textarea,
.post-form__select{
  width:100%; border:1px solid var(--color-border); border-radius:var(--radius-md); padding:.625rem .75rem;
  background-color:#fff; color:var(--color-text);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.post-form__input::placeholder, .post-form__textarea::placeholder{ color:var(--color-text-muted); }
.post-form__input:focus, .post-form__textarea:focus, .post-form__select:focus{
  outline:none; border-color:var(--color-primary);
}
.post-form__textarea{ min-height:300px; }

.post-form__row{ display:flex; gap:20px; }
.post-form__row .post-form__group{ flex:1; }

/* 파일 업로드 */
.post-form__file{ position:relative; display:inline-block; width:100%; }
.post-form__file-input{ position:absolute; inset:0; opacity:0; width:100%; height:100%; }
.post-form__file-label{
  display:flex; align-items:center; justify-content:center; padding:10px;
  border:1px dashed #d0d0d0; border-radius:var(--radius-md); background-color:#fafafa; cursor:pointer; color:#666;
  transition:border-color .2s ease, color .2s ease, background-color .2s ease;
}
.post-form__file-label:hover{ border-color:var(--color-primary); color:var(--color-primary); background-color:#f5f9ff; }

/* 액션 */
.post-form__actions{
  display:flex; justify-content:center; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 20px;
}

/* Responsive (regist) */
@media (max-width:768px){ .post-form__row{ flex-direction:column; gap:0; } }

/* ==========================================================================
   Contact 페이지 (문의하기)
   - 연락처 카드(contact) / 문의 폼(inquiry)
   ========================================================================== */
.contact{}
.contact__grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(100px,1fr)); gap:1.5rem; margin-bottom:1rem; }
.contact__card{
  background-color:#fff; padding:1.5rem; border-radius:var(--radius-md);
  box-shadow:0 1px 3px rgba(0,0,0,.1); text-align:center;
}
.contact__card-title{ var(--fs-large); font-weight:600; color:#1e293b; }
.contact__card-value{ color:#64748b; }
.contact__help{ font-size:var(--fs-xsmall); color:#94a3b8; }

.inquiry{ margin-top:1rem; }

/* 행/그룹/라벨 */
.inquiry__row{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.inquiry__group{ margin-bottom:1.5rem; }
.inquiry__label{ display:block; font-weight:600; color:var(--color-text); margin-bottom:.5rem; font-size:var(--fs-small);}
.inquiry__required{ color:#ef4444; }

/* 입력류 */
.inquiry__input,
.inquiry__select,
.inquiry__textarea{
  width:100%; border:1px solid var(--color-border); border-radius:var(--radius-md); padding:.625rem .75rem;
  background-color:#fff; color:var(--color-text);
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.inquiry__input::placeholder, .inquiry__textarea::placeholder{ color:var(--color-text-muted); }
.inquiry__input:focus, .inquiry__select:focus, .inquiry__textarea:focus{
  outline:none; border-color:var(--color-primary);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.inquiry__textarea{ height:150px; line-height:1.6; resize:vertical; }

/* 셀렉트 화살표 */
.inquiry__select{
  cursor:pointer; appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg fill='black' viewBox='0 0 24 24' width='16' height='16' xmlns='http://www.w3.org/2000/svg'><path d='M6 9l6 6 6-6' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat:no-repeat; background-position:right 15px center; background-size:20px;
  padding-right:2.25rem;
}

/* 도움말/체크박스 */
.inquiry__help{ font-size:var(--fs-xsmall); color:#94a3b8; margin-top:.25rem; }
.inquiry__checkbox{ display:flex; align-items:center; gap:.5rem; margin-top:1.5rem; }
.inquiry__checkbox-input{ width:auto; margin:0; }
.inquiry__checkbox-label{ margin:0; font-size:var(--fs-small); color:var(--color-text-muted); }

/* 액션 정렬 (레거시 .actions 하위호환) */
.actions,
.post-form__actions{ display:flex; justify-content:center; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 20px; }

/* Responsive (contact) */
@media (max-width:768px){
  .inquiry__row{ grid-template-columns:1fr; }
}

/* ==========================================================================
   FAQ 페이지
   - 카테고리 탭 / 검색 / 아코디언 / 하단 문의배너
   ========================================================================== */
.category-tabs{
  display:flex; justify-content:center; gap:.5rem; margin: 1rem 0; flex-wrap:wrap;
}
.category-tab{
  padding:.75rem 1.5rem; background-color:#fff; border:1px solid var(--color-border);
  border-radius:var(--radius-sm); color:var(--color-text-muted); text-decoration:none;
  font-size:var(--fs-small); transition:background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.category-tab:hover{ background-color:var(--color-hover-bg); color:var(--color-text); }
.category-tab.active{ background-color:var(--color-primary); color:#fff; border-color:var(--color-primary); }

/* 검색 */
.search-section{ margin-bottom:1rem; }
.search-box{ display:flex; max-width:600px; margin:0 auto; gap:.5rem; }
.search-box input{
  flex:1; padding:1rem 1.5rem; border:1px solid var(--color-border); font-size:var(--fs-medium);
  transition:border-color .2s, box-shadow .2s; background-color:#fff; color:var(--color-text);
}
.search-box input::placeholder{ color:var(--color-text-muted); }
.search-box input:focus{
  outline:none; border-color:var(--color-primary);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

/* FAQ 아코디언 */
.faq-section{ background-color:#fff; overflow:hidden; }
.faq-item{ border-bottom:1px solid var(--color-hover-bg); }
.faq-item:last-child{ border-bottom:none; }

.faq-question{
  padding:1.5rem 0; cursor:pointer; display:flex; justify-content:space-between; align-items:center;
  transition:background .2s; background-color:#fff;
}
.faq-question:hover{ background-color:var(--color-surface); }
.faq-question.active{ background-color:var(--color-hover-bg); }

.question-text{
  font-size:var(--fs-large); font-weight:600; color:var(--color-text);
  display:flex; align-items:center; gap:.5rem; flex-wrap:wrap;
}
.question-icon{ position:relative; width:24px; height:24px; }
.question-icon::after{
  content:''; position:absolute; top:50%; left:50%; width:8px; height:8px;
  border-right:2px solid var(--color-text-muted); border-bottom:2px solid var(--color-text-muted);
  transform:translate(-50%,-50%) rotate(45deg);
  transition:transform .3s cubic-bezier(.4,0,.2,1), border-color .2s;
}
.faq-question.active .question-icon::after{
  transform:translate(-50%,-50%) rotate(-135deg); border-color:var(--color-primary);
}

.faq-answer{ max-height:0; overflow:hidden; transition:max-height .3s ease; }
.faq-answer.open{ max-height:500px; }
.answer-content{ padding:1rem 2rem; color:var(--color-text-sub); font-size:var(--fs-medium); line-height:1.7; }

/* 태그 */
.tag{
  display:inline-block; background-color:#e0f2fe; color:#0369a1; padding:.25rem .5rem;
  border-radius:var(--radius-sm); font-size:var(--fs-xsmall); font-weight:500;
}

/* 하단 문의 배너 */
.contact-section{
  margin-top:3rem; text-align:center; background-color:#fff; padding: clamp(24px, 5vw, 40px); border-radius:var(--radius-md);
  box-shadow:0 1px 3px rgba(0,0,0,.1);
}
.contact-section h3{ margin-bottom: 1rem; }
.contact-section p{ color:var(--color-text-muted); margin-bottom:1rem; }
/* 기존 .contact-btn 하위 호환 */
.contact-btn{
  display:inline-flex; align-items:center; justify-content:center; padding:.75rem 2rem;
  background:#10b981; color:#fff; border-radius:var(--radius-sm); text-decoration:none;
  transition:background .2s, transform .05s;
}
.contact-btn:hover{ background-color:#059669; transform:translateY(-1px); }

/* Responsive (faq) */
@media (max-width:768px){
  .category-tabs{ justify-content:space-between;  margin: .75rem 0; }
  .category-tab{ padding:5px; }
  .search-box input { padding: 10px;}
  .faq-question { padding: .75rem 0; }
  .answer-content{ padding:0 1rem; font-size:var(--fs-small);}
  .question-text{ font-size:var(--fs-small); }
  .contact-section { margin-top: 1rem; }
  .contact-section h3 { margin-bottom: .75rem; }
  .contact-section p { margin-bottom: .75rem; }
}