/* =========================================================
   서로돌봄 공개 홈페이지 공통 CSS
   대상: layouts/public.blade.php 확장 페이지
        (board/*, legal/*)
   ========================================================= */

:root {
  --green:#6DBE6A; --green-ink:#3f9b54; --green-soft:#eaf6ec;
  --blue:#4A90E2;  --blue-ink:#2f6fc0;  --blue-soft:#e7f0fc;
  --yellow:#FFB833; --yellow-soft:#fff3da;
  --ink:#1e2a24; --soft:#5d6b62; --faint:#9aa69e; --line:#e8efe9;
  --bg:#ffffff; --bg-tint:#f4f8f5;
  --radius:22px;
  --shadow:0 18px 50px rgba(60,120,80,.14);
  --shadow-sm:0 8px 24px rgba(60,120,80,.10);
  --maxw:1160px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body {
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.5; overflow-x: hidden; font-size: 18px;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ── 레이아웃 ── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── 헤더 ── */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(60,120,80,.05);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand svg { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: stretch; gap: 28px; }
.nav-links > a { display: flex; align-items: center; font-size: 16.5px; font-weight: 600; color: var(--soft); white-space: nowrap; transition: color .15s; }
.nav-links > a:hover, .nav-links > a.active { color: var(--ink); }
.btn-dl {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green); color: #fff;
  font-size: 14.5px; font-weight: 800;
  padding: 9px 20px; border-radius: 999px; white-space: nowrap;
  transition: filter .15s;
}
.btn-dl:hover { filter: brightness(1.07); }

/* ── 페이지 히어로 ── */
.page-hero { background: var(--bg-tint); border-bottom: 1px solid var(--line); padding: 52px 0 40px; }
.page-hero h1 { font-size: clamp(26px, 3.8vw, 42px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.page-hero p { font-size: 17px; color: var(--soft); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--faint); margin-bottom: 20px; }
.breadcrumb a { color: var(--faint); }
.breadcrumb a:hover { color: var(--soft); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb .cur { color: var(--soft); font-weight: 600; }

/* ── 페이지 본문 ── */
.page-body { padding: 56px 0 80px; }

/* ── 공통 법적 문서 ── */
.legal-wrap { max-width: 800px; margin: 0 auto; }
.legal-effective { font-size: 14px; color: var(--faint); margin-bottom: 40px; }
.legal-toc { background: var(--bg-tint); border: 1.5px solid var(--line); border-radius: 16px; padding: 24px 28px; margin-bottom: 48px; }
.legal-toc h3 { font-size: 14px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.legal-toc ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 7px; }
.legal-toc li a { font-size: 15px; color: var(--green-ink); font-weight: 600; }
.legal-toc li a:hover { text-decoration: underline; }
.legal-section { margin-bottom: 52px; scroll-margin-top: 100px; }
.legal-section h2 { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--green-soft); display: flex; align-items: center; gap: 10px; }
.legal-section h2 span.num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--green-ink); color: #fff; border-radius: 8px; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.legal-section h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 22px 0 10px; }
.legal-section p, .legal-section li { font-size: 16.5px; line-height: 1.85; color: #2d3d34; }
.legal-section ul, .legal-section ol { padding-left: 1.5em; margin: 8px 0 16px; display: flex; flex-direction: column; gap: 6px; }
.legal-section table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 14px 0; }
.legal-section th { background: var(--bg-tint); font-weight: 700; color: var(--ink); padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.legal-section td { padding: 10px 14px; border: 1px solid var(--line); color: #2d3d34; vertical-align: top; line-height: 1.7; }
.highlight-box { background: var(--green-soft); border-left: 3px solid var(--green-ink); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 14px 0; font-size: 15px; color: var(--green-ink); font-weight: 600; }

/* ── 게시판 ── */
.board-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 0; }
.board-tab { font-size: 15px; font-weight: 700; color: var(--faint); padding: 12px 22px; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s; cursor: pointer; }
.board-tab.active, .board-tab:hover { color: var(--green-ink); }
.board-tab.active { border-bottom-color: var(--green-ink); }
.board-wrap { background: #fff; border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; margin-top: 32px; }
.board-header { display: grid; grid-template-columns: 80px 1fr 130px 80px; align-items: center; padding: 12px 24px; background: var(--bg-tint); border-bottom: 1.5px solid var(--line); font-size: 13px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.board-row { display: grid; grid-template-columns: 80px 1fr 130px 80px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); transition: background .12s; }
.board-row:last-child { border-bottom: none; }
.board-row:hover { background: var(--bg-tint); }
.board-num { font-size: 13px; color: var(--faint); text-align: center; }
.board-title-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.board-title-link { font-size: 16.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.board-title-link:hover { color: var(--green-ink); }
.board-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; flex-shrink: 0; }
.badge-pin { background: var(--green-soft); color: var(--green-ink); }
.badge-new { background: #fff3e0; color: #e65c00; }
.board-date { font-size: 13.5px; color: var(--faint); }
.board-views { font-size: 13px; color: var(--faint); text-align: center; }
.empty-box { text-align: center; padding: 80px 24px; color: var(--faint); }
.empty-box svg { margin: 0 auto 18px; opacity: .35; }
.empty-box p { font-size: 15px; }
.pagination-wrap { display: flex; justify-content: center; gap: 6px; padding: 28px 0 4px; flex-wrap: wrap; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--soft); border: 1.5px solid var(--line); transition: all .15s; }
.page-btn:hover { border-color: var(--green); color: var(--green-ink); }
.page-btn.active { background: var(--green-ink); color: #fff; border-color: var(--green-ink); }
.page-btn.disabled { opacity: .35; pointer-events: none; }

/* 게시글 상세 */
.post-wrap { max-width: 800px; margin: 0 auto; }
.post-meta-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.post-type-badge { font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); }
.post-date { font-size: 14px; color: var(--faint); }
.post-views { font-size: 14px; color: var(--faint); display: flex; align-items: center; gap: 4px; }
.post-title { font-size: clamp(22px, 3.5vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.35; margin-bottom: 28px; }
.post-divider { border: none; border-top: 1.5px solid var(--line); margin: 0 0 32px; }
.post-body { font-size: 17.5px; line-height: 1.85; color: #2a3830; }
.post-body p { margin-bottom: 1em; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 32px; border-top: 1.5px solid var(--line); }
.post-nav-item { padding: 16px 20px; border: 1.5px solid var(--line); border-radius: 14px; transition: border-color .15s, background .15s; }
.post-nav-item:hover { border-color: var(--green); background: var(--green-soft); }
.post-nav-label { font-size: 12px; font-weight: 700; color: var(--faint); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.post-nav-title { font-size: 14.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-nav-empty { border-color: var(--line); opacity: .45; pointer-events: none; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 700; color: var(--soft); margin-top: 32px; padding: 10px 20px; border: 1.5px solid var(--line); border-radius: 999px; transition: all .15s; }
.back-btn:hover { border-color: var(--green); color: var(--green-ink); }

/* ── 고객지원 ── */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 52px; }
.support-card { background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 32px; transition: box-shadow .2s, border-color .2s; }
.support-card:hover { box-shadow: var(--shadow-sm); border-color: var(--green); }
.support-icon { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.support-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.support-card p { font-size: 14.5px; color: var(--soft); line-height: 1.7; }
.contact-link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--green-ink); margin-top: 14px; }
.faq-wrap { margin-bottom: 56px; }
.faq-wrap h2 { font-size: 22px; font-weight: 800; margin-bottom: 24px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; font-size: 16px; font-weight: 700; color: var(--ink); user-select: none; }
.faq-q svg { flex-shrink: 0; transition: transform .25s; color: var(--faint); }
.faq-item.open .faq-q svg { transform: rotate(180deg); color: var(--green-ink); }
.faq-a { display: none; font-size: 15px; line-height: 1.8; color: var(--soft); padding-bottom: 20px; }
.faq-item.open .faq-a { display: block; }
.notice-strip { background: var(--green-soft); border-radius: 16px; padding: 24px 28px; display: flex; align-items: center; gap: 18px; margin-bottom: 52px; }
.notice-strip svg { flex-shrink: 0; color: var(--green-ink); }
.notice-strip p { font-size: 15px; font-weight: 600; color: var(--green-ink); line-height: 1.6; }

/* 계정삭제 */
.delete-wrap { max-width: 680px; margin: 0 auto; }
.step-list { display: flex; flex-direction: column; gap: 0; margin: 32px 0 48px; position: relative; }
.step-list::before { content: ""; position: absolute; left: 24px; top: 48px; bottom: 48px; width: 2px; background: var(--line); z-index: 0; }
.step-item { display: flex; gap: 20px; align-items: flex-start; position: relative; z-index: 1; padding: 8px 0; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--green-ink); color: #fff; font-size: 17px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-content { padding-top: 10px; }
.step-content h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.step-content p { font-size: 15px; color: var(--soft); line-height: 1.75; }
.step-content code { display: inline-block; background: var(--bg-tint); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-family: monospace; font-size: 14px; color: var(--ink); }
.warn-box { background: #fff8f0; border: 1.5px solid #ffcc88; border-radius: 16px; padding: 22px 26px; margin: 32px 0; }
.warn-box h3 { font-size: 15.5px; font-weight: 800; color: #c07b1a; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.warn-box ul { padding-left: 1.4em; display: flex; flex-direction: column; gap: 7px; }
.warn-box li { font-size: 15px; color: #7a5010; line-height: 1.7; }
.alt-method { background: var(--bg-tint); border-radius: 16px; padding: 24px 28px; margin-top: 32px; }
.alt-method h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.alt-method p { font-size: 15px; color: var(--soft); line-height: 1.75; }
.alt-method a { color: var(--green-ink); font-weight: 700; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.info-table th { background: var(--bg-tint); font-weight: 700; padding: 10px 14px; border: 1px solid var(--line); text-align: left; width: 180px; }
.info-table td { padding: 10px 14px; border: 1px solid var(--line); color: #2d3d34; line-height: 1.7; }

/* ── 푸터 ── */
footer { background: #16201b; color: #cdd6cf; padding: 52px 0 32px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.foot-brand { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 14px; }
footer .foot-desc { font-size: 13.5px; line-height: 1.7; color: #9aa89f; max-width: 280px; }
footer h4 { font-size: 13px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
footer li a { font-size: 14px; color: #9aa89f; transition: color .15s; }
footer li a:hover { color: #cdd6cf; }
.foot-biz { font-size: 12.5px; color: #6b7c72; line-height: 2; border-top: 1px solid rgba(255,255,255,.07); padding-top: 20px; margin-bottom: 20px; }
.foot-biz strong { color: #9aa89f; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid rgba(255,255,255,.07); padding-top: 20px; font-size: 13px; color: #6b7c72; }
.foot-bottom a { color: #9aa89f; transition: color .15s; }
.foot-bottom a:hover { color: #cdd6cf; }
.foot-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-legal a.hi { color: #cdd6cf; font-weight: 700; }

/* ── 드롭다운 nav ── */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-drop-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: 16.5px; font-weight: 600; font-family: inherit; white-space: nowrap;
  color: var(--soft); display: flex; align-items: center; gap: 4px;
  transition: color .15s; height: 100%;
}
.nav-drop-btn:hover, .nav-drop-btn.active { color: var(--ink); }
.nav-drop-btn svg { transition: transform .2s; }
.nav-dropdown.is-open .nav-drop-btn svg { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 8px 32px rgba(60,120,80,.12);
  padding: 6px; min-width: 130px;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 100;
}
/* 메뉴와 버튼 사이 hover 단절 방지용 투명 브리지 */
.nav-drop-menu::before {
  content: ''; position: absolute; bottom: 100%; left: 0; right: 0; height: 12px;
}
.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown.is-open .nav-drop-menu {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.nav-drop-menu a {
  display: block; padding: 9px 14px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; color: var(--soft); white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav-drop-menu a:hover, .nav-drop-menu a.active { background: var(--green-soft); color: var(--green-ink); }

/* ── 햄버거 버튼 ── */
.hamb {
  display: none; width: 42px; height: 42px;
  border: 2px solid var(--line); border-radius: 11px; background: #fff;
  align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0;
}

/* ── 모바일 슬라이드 패널 ── */
.mnav {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,20,14,.45); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.mnav.open { opacity: 1; pointer-events: auto; }
.mnav-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 76%; max-width: 320px;
  background: #fff; padding: 20px 20px 32px;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.3,1);
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
}
.mnav.open .mnav-panel { transform: none; }
.mnav-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.mnav-brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; }
.mnav-brand svg { width: 30px; height: 30px; }
.mnav-close {
  width: 38px; height: 38px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mnav-link {
  display: block; font-size: 16px; font-weight: 700; color: var(--ink);
  padding: 14px 6px; border-bottom: 1px solid var(--line);
}
.mnav-link:last-of-type { border-bottom: none; }
.mnav-link.active { color: var(--green-ink); }
.mnav-sub {
  display: flex; flex-direction: column;
  border-bottom: 1px solid var(--line); padding: 6px 0 6px;
}
.mnav-sub-label {
  font-size: 16px; font-weight: 700; color: var(--ink);
  padding: 8px 6px; display: flex; align-items: center; justify-content: space-between;
}
.mnav-sub a {
  display: block; font-size: 14.5px; font-weight: 600; color: var(--soft);
  padding: 9px 6px 9px 16px;
}
.mnav-sub a.active { color: var(--green-ink); }
.mnav-dl {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; background: var(--green); color: #fff;
  font-size: 15px; font-weight: 800; border-radius: 999px;
  padding: 13px 24px; margin-top: 20px; width: 100%;
}

/* ── 반응형 ── */
/* 헤더 메뉴는 데스크톱 nav가 붐비기 전에 햄버거로 전환(글자 확대로 880px대 2줄 방지) */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .btn-dl { display: none; }
  .hamb { display: flex; }
}
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .support-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .foot-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 36px 0 28px; }
  .board-header, .board-row { grid-template-columns: 1fr 80px; }
  .board-header .col-num, .board-header .col-views,
  .board-row .board-num, .board-row .board-views { display: none; }
  .post-nav { grid-template-columns: 1fr; }
}
/* ── Reveal 스크롤 애니메이션 (전역) ── */
.reveal{opacity:0;transform:translateY(28px);transition:opacity .65s cubic-bezier(.2,.7,.3,1),transform .65s cubic-bezier(.2,.7,.3,1)}
.reveal.from-left{transform:translateX(-28px)}
.reveal.from-right{transform:translateX(28px)}
.reveal.scale{transform:scale(.9)}
.reveal.in{opacity:1!important;transform:none!important}

/* ── 공통 버튼 ── */
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15.5px; font-weight: 700; font-family: inherit;
  padding: 12px 26px; border-radius: 999px;
  border: 2px solid var(--green); color: var(--green-ink);
  background: #fff; cursor: pointer; transition: all .15s;
}
.btn-outline:hover { background: var(--green-soft); border-color: var(--green-ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
