/* 매매주 홈페이지 — 기존 앱의 골드/다크 톤을 그대로 이어받음 */
:root {
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --gold-dim: rgba(201, 168, 76, .15);
  --deep: #0D0B08;
  --dark: #1A1712;
  --card: #211E18;
  --text: #F0EBE0;
  --text-dim: #9A9080;
  --border: rgba(201, 168, 76, .2);
  --radius: 14px;
  --wrap: 1180px;
  --header-h: 72px;
  --serif: 'Noto Serif KR', 'Playfair Display', serif;
  --sans: 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
/* 일본어·중국어는 해당 글꼴 우선 */
body[data-lang="ja"] { --sans: 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', 'Noto Sans KR', sans-serif; --serif: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif; }
body[data-lang="zh"] { --sans: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Noto Sans KR', sans-serif; --serif: 'Songti SC', 'Noto Serif SC', serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { background: var(--deep); color: var(--text); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--deep); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--text-dim); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

/* ── 상단 바 ── */
.topbar { background: #070605; border-bottom: 1px solid var(--border); font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.topbar-links { display: flex; gap: 18px; color: var(--text-dim); flex-wrap: wrap; }
.topbar-links a:hover { color: var(--gold-light); }
.lang { display: flex; align-items: center; gap: 6px; }
.lang-select {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 28px 4px 10px; font-size: 13px; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}

/* ── 헤더 / GNB ── */
.header { position: sticky; top: 0; z-index: 50; background: rgba(13, 11, 8, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); transition: box-shadow .2s; }
.header.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.header-in { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-family: var(--serif); font-size: 20px; color: var(--gold-light); }
body:not([data-lang="ko"]) .logo-text small { display: none; }
.logo-text small { font-family: 'Playfair Display', serif; font-size: 10px; letter-spacing: .22em; color: var(--text-dim); }

.gnb-list { list-style: none; display: flex; gap: 4px; }
.gnb-item { position: relative; }
.gnb-link { display: block; padding: 24px 16px; font-weight: 500; font-size: 15px; white-space: nowrap; transition: color .15s; }
.gnb-item:hover > .gnb-link, .gnb-item:focus-within > .gnb-link { color: var(--gold-light); }
.gnb-link::after { content: ''; display: block; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .2s; margin-top: 4px; }
.gnb-item:hover > .gnb-link::after, .gnb-item:focus-within > .gnb-link::after { transform: scaleX(1); }
.sub {
  list-style: none; position: absolute; left: 50%; top: calc(100% - 6px); transform: translate(-50%, 6px);
  min-width: 190px; background: var(--dark); border: 1px solid var(--border); border-radius: 12px; padding: 8px;
  opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s; box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}
.gnb-item:hover .sub, .gnb-item:focus-within .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sub a { display: block; padding: 9px 14px; border-radius: 8px; font-size: 14px; color: var(--text-dim); white-space: nowrap; }
.sub a:hover { background: var(--gold-dim); color: var(--gold-light); }

.burger { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { width: 20px; height: 2px; background: var(--gold); transition: transform .2s, opacity .2s; }
.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 히어로 ── */
.hero { position: relative; overflow: hidden; padding: 110px 0 90px; text-align: center; background: radial-gradient(ellipse at 50% 0%, #2a2213 0%, var(--deep) 70%); }
.hero-glow { position: absolute; inset: -40% 20% auto; height: 520px; background: radial-gradient(circle, rgba(232, 201, 122, .22), transparent 65%); filter: blur(20px); pointer-events: none; }
.hero-in { position: relative; }
.eyebrow { font-family: 'Playfair Display', serif; letter-spacing: .4em; color: var(--gold); font-size: 13px; margin-bottom: 18px; }
.hero-title { font-family: var(--serif); font-size: clamp(36px, 6vw, 64px); font-weight: 700; line-height: 1.2; background: linear-gradient(180deg, #fff6dc, var(--gold-light) 55%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-desc { max-width: 620px; margin: 20px auto 0; color: var(--text-dim); font-size: 17px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.verse { margin: 56px auto 0; max-width: 640px; padding: 22px 28px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.verse p { font-family: var(--serif); font-size: 18px; }
.verse cite { display: block; margin-top: 8px; color: var(--gold); font-style: normal; font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid transparent; transition: transform .15s, background .15s, color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--deep); }
.btn-line { border-color: var(--gold); color: var(--gold-light); background: transparent; }
.btn-line:hover { background: var(--gold-dim); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ── 퀵링크 ── */
.quick { margin-top: -36px; position: relative; z-index: 2; }
.quick-grid { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 8px; font-size: 14px; text-align: center; border-right: 1px solid var(--border); transition: background .15s; }
.quick-item:last-child { border-right: 0; }
.quick-item:hover { background: var(--gold-dim); color: var(--gold-light); }
.qi { font-size: 28px; line-height: 1; }
.content-note { margin-top: 18px; text-align: center; font-size: 13px; color: var(--text-dim); }

/* ── 섹션 공통 ── */
.sec { padding: 84px 0; }
.sec-dark { background: var(--dark); }
.sec-head { margin-bottom: 28px; }
.sec-head h2 { font-family: var(--serif); font-size: clamp(26px, 3.2vw, 34px); color: var(--gold-light); }
.sec-head h2::before { content: ''; display: inline-block; width: 6px; height: 26px; background: var(--gold); border-radius: 3px; margin-right: 12px; vertical-align: -3px; }
.sec-head p { color: var(--text-dim); margin-top: 6px; }

/* 공지 + 소개 */
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: start; }
.notice-list { display: grid; gap: 10px; }
.notice { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.notice summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; }
.notice summary::-webkit-details-marker { display: none; }
.notice summary::after { content: '▾'; color: var(--gold); transition: transform .2s; }
.notice[open] summary::after { transform: rotate(180deg); }
.notice-title { flex: 1; font-weight: 500; }
.notice-date { color: var(--text-dim); font-size: 13px; white-space: nowrap; }
.notice-body { padding: 0 20px 18px; display: grid; gap: 12px; white-space: pre-line; color: #d9d2c3; }
.notice-body img { border-radius: 10px; }
.about-card { background: linear-gradient(160deg, #2a2316, var(--card)); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; text-align: center; }
.about-logo { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; border: 1px solid var(--border); }
.about-card h3 { font-family: var(--serif); color: var(--gold-light); font-size: 22px; margin-bottom: 10px; }
.about-card p { color: #d4ccbb; font-size: 15px; }
.coupang { display: block; margin-top: 20px; padding: 12px; border: 1px dashed var(--gold); border-radius: 10px; color: var(--gold-light); font-size: 14px; }
.coupang:hover { background: var(--gold-dim); }

/* 영상 카드 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.vcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.vcard:hover { transform: translateY(-3px); border-color: rgba(201, 168, 76, .45); }
.vthumb, .vframe { position: relative; aspect-ratio: 16 / 9; width: 100%; border: 0; background: linear-gradient(135deg, #3a2f18, #15120c); cursor: pointer; overflow: hidden; }
.vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.vthumb-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; opacity: .6; }
.vplay { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(13, 11, 8, .7); border: 1px solid var(--gold); color: var(--gold-light); font-size: 20px; padding-left: 4px; transition: transform .15s, background .15s; }
.vthumb:hover .vplay { transform: translate(-50%, -50%) scale(1.08); background: var(--gold); color: var(--deep); }
.vframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vinfo { padding: 14px 16px 6px; flex: 1; }
.vinfo h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.vinfo p { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.vactions { display: flex; gap: 8px; padding: 10px 16px 16px; flex-wrap: wrap; }
.vactions a { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--gold-light); }
.vactions a:hover { background: var(--gold-dim); }

/* 링크 카드 */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.lcard { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s, background .15s; }
.lcard:hover { border-color: var(--gold); background: #28241c; }
.lcard-icon { font-size: 26px; width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; background: var(--gold-dim); border-radius: 12px; }
.lcard-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lcard-text small { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard-arrow { color: var(--gold); }

/* 치유간증 찾기 */
.healfind { margin-top: 44px; padding: 30px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); text-align: center; }
.healfind h3 { font-family: var(--serif); color: var(--gold-light); font-size: 22px; }
.healfind > p { margin: 6px 0 20px; }
.hf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hf-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--dark); transition: background .15s, border-color .15s; }
.hf-btn span { font-size: 30px; }
.hf-btn:hover { background: var(--gold-dim); border-color: var(--gold); }

/* 탭 */
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab { padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); cursor: pointer; font-weight: 500; }
.tab.active { background: var(--gold); color: var(--deep); border-color: var(--gold); }
.pane { display: none; }
.pane.active { display: grid; }

/* 지교회 */
.branch-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.search { flex: 1; max-width: 420px; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); }
.search::placeholder { color: var(--text-dim); }
.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; max-height: 640px; overflow-y: auto; padding-right: 4px; }
.bcard { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.bcard h3 { font-size: 16px; color: var(--gold-light); }
.baddr { font-size: 14px; }
.bnote { font-size: 12px; color: var(--text-dim); }
.bactions { display: flex; gap: 8px; margin-top: 8px; }
.bactions a { font-size: 13px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; }
.bactions a:hover { background: var(--gold-dim); }

/* 설치 */
.install { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 36px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(135deg, #2a2316, var(--card)); }
.install h2 { font-family: var(--serif); color: var(--gold-light); font-size: 26px; margin-bottom: 12px; }
.install-steps { list-style: none; display: grid; gap: 6px; color: #d4ccbb; }
.install-steps li::before { content: '✓ '; color: var(--gold); }
.install-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* 푸터 */
.footer { background: #070605; border-top: 1px solid var(--border); padding: 50px 0 24px; color: var(--text-dim); font-size: 14px; }
.footer-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-brand { display: flex; gap: 14px; }
.footer-brand img { width: 48px; height: 48px; border-radius: 50%; }
.footer-brand strong { color: var(--gold-light); font-family: var(--serif); font-size: 18px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { color: var(--text); font-size: 14px; margin-bottom: 4px; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: var(--gold); color: var(--deep); padding: 10px 20px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 반응형 ── */
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .burger { display: flex; }
  .burger { position: relative; z-index: 2; }
  .gnb { position: fixed; z-index: 1; inset: 0 0 0 auto; padding-top: calc(var(--header-h) + 50px) !important; width: min(320px, 86vw); background: var(--dark); border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .25s; overflow-y: auto; padding: 12px; }
  .menu-open .gnb { transform: none; }
  .header { backdrop-filter: none; background: var(--deep); } /* fixed 메뉴가 헤더 기준으로 잡히지 않도록 */
  .gnb-list { flex-direction: column; }
  .gnb-link { padding: 14px 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
  .gnb-link::after { display: none; }
  .gnb-item:has(.sub) > .gnb-link::before { content: '+'; order: 2; color: var(--gold); }
  .gnb-item.open > .gnb-link::before { content: '−'; }
  .sub { position: static; transform: none; opacity: 1; visibility: visible; display: none; box-shadow: none; border: 0; background: transparent; padding: 4px 0 8px 12px; }
  .gnb-item:hover .sub, .gnb-item:focus-within .sub { transform: none; }
  .gnb-item.open .sub { display: block; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-item:nth-child(3n) { border-right: 0; }
  .quick-item:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
  .split { grid-template-columns: 1fr; }
  .install { flex-direction: column; align-items: flex-start; }
  .install-actions { justify-content: flex-start; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .topbar-links a:not(:first-child) { display: none; }
  .hero { padding: 80px 0 70px; }
  .sec { padding: 60px 0; }
  .hf-grid { grid-template-columns: 1fr; }
  .logo-text small { display: none; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
