/* =========================================================
   선교사상담센터 — 공통 디자인 시스템
   Figma: 119 (1440 canvas)
   ========================================================= */

:root {
  /* Brand — Figma 실측값 (node 1:155 dev context) */
  --orange: #FF8800;          /* #f80 — 로고·인용부호·구분선 */
  --orange-tab: #F08933;      /* 활성 탭 배경 */
  --orange-dark: #E0740F;
  --orange-light: #FBB56A;
  --peach: #FCEEE1;
  --peach-soft: #FBF3EA;
  --peach-deep: #F7E2CC;

  /* Neutral */
  --ink: #222222;
  --ink-2: #333333;
  --text: #4E4E4E;            /* 본문 제목·브레드크럼 */
  --gray: #777777;            /* 본문 보조 (Figma #777) */
  --gray-2: #666666;
  --gray-3: #AAAAAA;
  --line: #EEEEEE;
  --line-2: #DDDDDD;
  --bg-soft: #FAFAFA;

  /* Footer — Figma 실측값 */
  --footer-bg: #333333;
  --footer-text: #F2FFFF;

  /* Shadow */
  --shadow-header: 0 7px 4px rgba(0,0,0,.25);
  --shadow-tab: 18px 9px 6.8px rgba(0,0,0,.25);

  /* Layout */
  --container: 1200px;
  --header-h: 95px;
  --radius: 12px;

  /* Type */
  --font: 'Noto Sans KR', 'Apple SD Gothic Neo', -apple-system, sans-serif;
  --font-serif: 'Nanum Myeongjo', 'Noto Serif KR', serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, dl, dd, table, th, td {
  margin: 0; padding: 0;
}
ul, ol { list-style: none; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: sticky; top: 0; z-index: 200;
  background: #fff;
  box-shadow: var(--shadow-header);
}
.header__inner {
  height: var(--header-h);
  padding: 0 73px 0 114px;
  display: flex; align-items: center;
}
.logo { display: flex; flex-direction: column; line-height: 1.1; flex: none; }
.logo__sub { font-size: 14px; font-weight: 300; color: #000; padding-left: 4px; }
.logo__main {
  font-size: 32px; font-weight: 900; color: var(--orange);
  letter-spacing: -1px; line-height: 1.25;
}

.gnb { display: flex; margin-left: 97px; }
.gnb > li > a {
  display: block;
  width: 131px; text-align: center;
  font-size: 18px; font-weight: 400; color: #000;
  padding: 8px 0;
  transition: color .2s;
}
.gnb > li > a:hover,
.gnb > li.is-active > a { color: var(--orange); font-weight: 700; }

.hamburger {
  margin-left: auto;
  width: 28px; height: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hamburger span {
  display: block; height: 3px; width: 100%;
  background: var(--orange); border-radius: 3px;
  transition: transform .3s, opacity .3s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* =========================================================
   SUB PAGE HERO
   Figma: 배너 Rectangle 32 (y=95, h=348) + 탭 (y=395, 187x52)
   → 배너 348px, 탭이 48px 겹침, 탭 1칸 = 187x52
   ========================================================= */
.subhero {
  position: relative;
  height: 348px;
  padding-bottom: 48px;
  background: var(--peach-deep) center/cover no-repeat;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  color: #fff;
}
.subhero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(245,133,31,.45), rgba(120,70,20,.30));
}
.subhero > * { position: relative; z-index: 1; }
.subhero__title {
  font-size: 48px; font-weight: 700; letter-spacing: -1px;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.breadcrumb {
  margin-top: 14px;
  font-size: 15px; color: #FFFFFF;
  display: flex; gap: 10px; justify-content: center;
}
.breadcrumb li + li::before { content: ">"; margin-right: 10px; opacity: .8; }

/* 탭 — 배너 하단에 48px 걸침. 탭 1칸 = 187px (탭 수에 따라 전체 폭 자동) */
.subtab {
  width: max-content; max-width: 100%;
  margin: -48px auto 0;
  position: relative; z-index: 5;
  display: flex;
  background: #fff;
  border-radius: 9px;
  box-shadow: var(--shadow-tab);
  overflow: hidden;
}
.subtab li { width: 187px; position: relative; }
.subtab li + li::before {
  content: ""; position: absolute; left: 0; top: 16px;
  width: 1px; height: 24px; background: var(--line-2);
}
.subtab a {
  background: #FEFEFE;
  display: flex; align-items: center; justify-content: center;
  height: 52px;
  font-size: 15px; color: var(--gray);
  transition: background .2s, color .2s;
}
.subtab a:hover { color: var(--orange); }
.subtab li.is-active a { background: var(--orange-tab); color: #fff; font-size: 14px; font-weight: 500; }
.subtab li.is-active + li::before,
.subtab li.is-active::before { opacity: 0; }

/* 페이지 콘텐츠 래퍼 */
.page { padding: 100px 0 120px; }
.page-title {
  font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 16px;
}
.page-lead {
  font-size: 15px; color: var(--gray); text-align: center; margin-bottom: 56px;
}

/* 섹션 헤딩 (도트 장식) */
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 {
  font-size: 30px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 12px;
}
.section-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.section-head p { margin-top: 12px; font-size: 14px; color: var(--gray); }

/* =========================================================
   COMPONENTS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 34px; border-radius: 8px;
  font-size: 15px; font-weight: 500;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-dark); }
.btn--ghost { border: 1px solid var(--orange); color: var(--orange); background: #fff; }
.btn--ghost:hover { background: var(--orange); color: #fff; }
.btn--gray { background: #EFEFEF; color: var(--gray-2); }
.btn--lg { padding: 18px 60px; font-size: 17px; }
.btn--block { width: 100%; }
.btn:disabled, .btn.is-disabled {
  background: #E0E0E0; color: #A0A0A0; cursor: not-allowed; border-color: #E0E0E0;
}

.more {
  display: inline-block;
  font-size: 12px; color: var(--orange);
  border: 1px solid var(--orange); border-radius: 20px;
  padding: 4px 14px;
  transition: background .2s, color .2s;
}
.more:hover { background: var(--orange); color: #fff; }

.card {
  border: 1px solid var(--line); border-radius: 14px;
  background: #fff; padding: 30px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.07); transform: translateY(-4px); }

.icon-circle {
  flex: none;
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--peach-soft);
  display: flex; align-items: center; justify-content: center;
}
.icon-circle svg { width: 30px; height: 30px; }

/* 게시판 테이블 */
.board { border-top: 2px solid var(--ink); }
.board th, .board td {
  padding: 18px 10px; text-align: center;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.board th { font-weight: 700; background: var(--bg-soft); }
.board td.subject { text-align: left; }
.board td.subject a:hover { color: var(--orange); text-decoration: underline; }

/* 페이지네이션 */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.pagination a {
  min-width: 36px; height: 36px; padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); border-radius: 6px;
  font-size: 14px; color: var(--gray-2);
  transition: .2s;
}
.pagination a:hover { border-color: var(--orange); color: var(--orange); }
.pagination a.is-active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* 폼 */
.field { margin-bottom: 22px; }
.field > label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.field .req { color: var(--orange); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; padding: 13px 16px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: #fff; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245,133,31,.14);
}
.textarea { min-height: 160px; resize: vertical; }
.checkbox, .radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; }
.checkbox input, .radio input { width: 18px; height: 18px; accent-color: var(--orange); }

/* 이미지 자리표시자
   .ph        — 실제 사진이 들어갈 자리 (에셋 대기)
   .ph--design — Figma 시안 자체가 #D9D9D9 회색 박스인 자리 (시안 그대로) */
.ph {
  background: var(--peach-soft);
  display: flex; align-items: center; justify-content: center;
  color: #C9B49E; font-size: 14px;
  border-radius: 8px;
}
.ph--design {
  background: #D9D9D9;
  color: #8C8C8C;
  border-radius: 0;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--footer-bg); color: #CFCFCF; }
.footer__policy {
  display: flex; justify-content: center; gap: 110px;
  padding: 16px 0 4px;
}
.footer__policy a { font-size: 14px; font-weight: 300; color: #FFFFFF; }
.footer__policy a:hover { color: var(--orange); }

.footer__main {
  max-width: var(--container); margin: 0 auto;
  padding: 22px 24px 46px;
  display: flex; gap: 120px;
}
.footer__tel { font-size: 20px; font-weight: 600; color: var(--footer-text); letter-spacing: .5px; }
.footer__fax { font-size: 16px; font-weight: 600; color: var(--footer-text); margin-top: 4px; }
.footer__hours { font-size: 10px; font-weight: 600; color: var(--footer-text); margin-top: 14px; }
.footer__hours + .footer__hours { margin-top: 2px; }
.footer__company h4 { font-size: 16px; font-weight: 600; color: var(--footer-text); margin-bottom: 12px; }
.footer__company p { font-size: 12px; line-height: 2; color: var(--footer-text); }
.footer__company .accent { color: red; }

/* =========================================================
   MOBILE MENU
   ========================================================= */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 190;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(0,0,0,.10);
  display: none;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: 16px 24px; border-bottom: 1px solid #F4F4F4; }
.mobile-nav a:hover { color: var(--orange); background: var(--peach-soft); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1280px) {
  .header__inner { padding: 0 24px; }
  .gnb { margin-left: 48px; }
  .gnb > li > a { width: auto; padding: 8px 22px; }
}
@media (max-width: 960px) {
  .gnb { display: none; }
  .footer__main { flex-direction: column; gap: 34px; }
  .footer__policy { gap: 40px; flex-wrap: wrap; }
  .subhero { height: 260px; padding-bottom: 40px; }
  .subhero__title { font-size: 32px; }
  .page { padding: 70px 0 90px; }
}
@media (max-width: 620px) {
  .subhero { height: 220px; padding-bottom: 34px; }
  .subtab { flex-wrap: wrap; width: auto; margin-inline: 16px; }
  .subtab li { width: 50%; flex: 1 0 50%; }
  .subtab li::before { display: none; }
  .board th:nth-child(1), .board td:nth-child(1) { display: none; }
}
