/* ===========================================================
   서비스 상세페이지 공통 본문 레이아웃 (모든 /services/<slug>/ 에 마지막으로 로드)
   - 기존 색상·폰트·히어로 디자인은 유지하고, 본문 기준선·여백·사진·표·FAQ·CTA만 통일
   =========================================================== */

main{ --col:860px; --gap-s:16px; --gap-m:32px; --gap-l:56px; }

/* ---------- 본문 기준선: 모든 블록이 같은 왼쪽 시작선·같은 최대 너비 ---------- */
main > .container{ padding:0; }
main > .container > *{ max-width:var(--col); margin-left:0; margin-right:auto; }
main > .container > section{ padding:0; border-top:none; margin-top:var(--gap-l); }
main > .container > section + section{ border-top:none; }
main > .container > section > h2{ margin:0 0 var(--gap-s); }
main .container{ text-align:left; }

/* ---------- 타이포그래피 ---------- */
main p, main li, main td, main th{ text-align:left; }
main p, main li{ line-height:1.8; }
main .g-crumb{ margin:22px 0 0; }
main .g-lede{ max-width:var(--col); margin:24px 0 var(--gap-m); line-height:1.85; }
main .g-body{ max-width:var(--col); margin:0; }
main .g-body p{ margin:0 0 1em; max-width:68ch; }
main .g-body p:last-child{ margin-bottom:0; }
main h2{ margin:var(--gap-l) 0 var(--gap-s); }
main h3{ margin:var(--gap-m) 0 10px; }
main .g-body > h2:first-child,
main > .container > h2{ margin-top:var(--gap-l); }
main .g-body > h2{ margin-top:0; }
main .g-body > * + h2{ margin-top:var(--gap-l); }
main .g-body ~ .g-body{ margin-top:var(--gap-m); }
main > .container > * + .g-body{ margin-top:var(--gap-l); }
main > .container > .event-photo-grid + .g-body{ margin-top:var(--gap-m); }

/* 본문 사이 블록(표·흐름도·목록·카드) 위아래 여백 */
main > .container > :is(.g-data,.flow-horizontal,.flow-vertical,.proc-list,.chk-list,ol,ul,table,
  .unit-grid,.density-compare){ margin-top:var(--gap-m); margin-bottom:0; }
main > .container > * + :is(.g-data,.flow-horizontal,.proc-list){ margin-top:var(--gap-m); }

/* ---------- 현장사진: 1:1, PC 2열(4장은 4열) / 모바일 2열, 간격 동일 ---------- */
main .event-photo-grid{
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--gap-s);
  margin:var(--gap-m) 0 var(--gap-l); padding:0;
}
main .event-photo-grid.is-4{ grid-template-columns:repeat(4,minmax(0,1fr)); }
main .event-photo-grid figure{ margin:0; min-width:0; border-radius:14px; overflow:hidden; background:var(--card); }
main .event-photo-grid img{
  display:block; width:100%; height:auto; aspect-ratio:1/1; object-fit:cover; border-radius:14px;
}
main .event-photo-grid figcaption{ margin-top:8px; font-size:.82rem; color:var(--muted); }
main .event-photo-grid + *{ margin-top:0; }
@media (max-width:1023px){
  main .event-photo-grid.is-4{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px){
  main .event-photo-grid{ gap:10px; margin:24px 0 40px; }
}

/* ---------- 표 / 정보 카드 ---------- */
main .g-data{
  max-width:var(--col); width:100%; margin:var(--gap-m) 0 0; padding:24px;
  border-radius:0 14px 14px 0; box-shadow:none; background:var(--card);
}
main .g-data table, main table{ width:100%; border-collapse:collapse; table-layout:auto; }
main .g-data th, main .g-data td{ padding:12px 14px; line-height:1.7; }
main :is(.unit-card,.faq-card,.qna-card,.density-compare > *,.range-qa-card,.cost-qa-card){
  box-shadow:none; border-radius:14px; padding:20px;
}
main [class*="card"]:not(.svc-card), main [class*="-box"]{ box-shadow:none; }

@media (max-width:680px){
  main table, main table thead, main table tbody, main table tr, main table th, main table td{ display:block; width:100%; }
  main table{ white-space:normal; overflow:visible; }
  main table thead{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  main table tr{
    border:1px solid var(--line); border-radius:14px; padding:14px 16px; margin:0 0 12px;
    background:var(--card);
  }
  main table tr:last-child{ margin-bottom:0; }
  main table td, main table th{ border:none !important; padding:6px 0 !important; white-space:normal; }
  main table td[data-label]:not(#_)::before{
    content:attr(data-label); display:block; font-size:.74rem; font-weight:700;
    letter-spacing:.04em; color:var(--muted); margin-bottom:2px;
  }
  main table td:first-child{ font-weight:700; color:var(--dark); }
  main .g-data{ padding:18px 16px; }
  main .g-data table{ display:block; overflow:visible; white-space:normal; }
}

/* ---------- 관련 페이지 / FAQ / CTA 구역 ---------- */
main > .container > section.faq-section{ margin-top:var(--gap-l); }
main .g-related-grid{ margin-top:var(--gap-s) !important; }

main .faq-list{ display:flex; flex-direction:column; gap:0; margin:0; border-top:1px solid var(--line); }
main details.faq-item{ border-bottom:1px solid var(--line); padding:0; }
main details.faq-item > summary{
  list-style:none; cursor:pointer; display:flex; align-items:flex-start; gap:12px;
  padding:18px 4px; min-height:56px;
}
main details.faq-item > summary::-webkit-details-marker{ display:none; }
main details.faq-item > summary::after{
  content:"+"; margin-left:auto; flex:none; font-size:1.4rem; line-height:1.2; color:var(--accent); font-weight:700;
}
main details.faq-item[open] > summary::after{ content:"−"; }
main details.faq-item h3{ margin:0; font-size:1rem; line-height:1.55; display:flex; gap:10px; color:var(--dark); }
main details.faq-item h3 .q{ color:var(--main); font-weight:800; flex:none; }
main details.faq-item .a{ margin:0; padding:0 4px 20px 32px; color:var(--muted); font-size:.95rem; line-height:1.8; }
main details.faq-item > summary:focus-visible{ outline:2px solid var(--main); outline-offset:2px; }

.cta-band{ padding:64px 20px; }
.cta-band .g-cta-btn{ min-width:200px; min-height:52px; padding:15px 34px; display:inline-flex; align-items:center; justify-content:center; }
@media (max-width:820px){ .cta-band{ padding:48px 20px; } }

/* 소규모 워크샵 진행자 등 좁은 컨테이너 예외 해제 — 모든 페이지 같은 기준선 */
main > .container.intimate-wrap{ width:min(100% - 32px, var(--container)); max-width:none; margin-left:auto; margin-right:auto; }
