/* =========================================================
   석재·대리석 시공 사이트 공통 스타일 (모바일 우선)
   ========================================================= */
:root {
  --ink: #1d1f22;
  --ink-soft: #4a4f57;
  --muted: #7a8089;
  --line: #e6e3de;
  --bg: #ffffff;
  --bg-stone: #f5f3ef;
  --dark: #23262b;
  --accent: #c8102e;      /* 전화 버튼 / 강조 */
  --accent-dark: #a00d25;
  --gold: #b08d57;        /* 석재 느낌 포인트 */
  --sms: #2f6fde;
  --radius: 14px;
  --bar-h: 64px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  word-break: keep-all;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); /* 하단 고정바 공간 */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }
.section.stone { background: var(--bg-stone); }
.section-title { font-size: 1.45rem; font-weight: 800; }
.section-sub { color: var(--muted); margin-top: -4px; margin-bottom: 24px; font-size: .95rem; }
.eyebrow { display: inline-block; color: var(--gold); font-weight: 700; font-size: .85rem; letter-spacing: .04em; margin-bottom: 6px; }

/* ---------- 헤더 ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 900; font-size: 1.1rem; letter-spacing: -0.03em; }
.logo small { color: var(--gold); font-weight: 700; margin-left: 4px; font-size: .75rem; }
.header-tel {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; font-weight: 800;
  padding: 8px 14px; border-radius: 999px; font-size: .9rem;
}
.nav { display: none; gap: 22px; font-weight: 600; font-size: .95rem; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }

/* ---------- 히어로 ---------- */
.hero {
  position: relative; color: #fff;
  background: var(--dark);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,22,25,.35) 0%, rgba(20,22,25,.85) 100%);
}
.hero .wrap { position: relative; padding-top: 44px; padding-bottom: 36px; }
.hero-badge {
  display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 14px;
}
.hero h1 { font-size: 1.85rem; font-weight: 900; }
.hero h1 em { font-style: normal; color: #ffd27a; }
.hero-desc { color: rgba(255,255,255,.85); font-size: 1rem; margin-bottom: 22px; }
.hero-points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.hero-points li { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; font-size: .97rem; }
.hero-points li::before { content: "✔"; color: #ffd27a; flex: none; }
.hero-cta { display: grid; gap: 10px; }

/* ---------- 버튼 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 20px; border-radius: 12px;
  font-weight: 800; font-size: 1.05rem; border: 0; cursor: pointer; text-align: center;
}
.btn-call { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(200,16,46,.35); }
.btn-call:active { background: var(--accent-dark); }
.btn-call .num { font-size: 1.15rem; letter-spacing: .02em; }
.btn-sms { background: var(--sms); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-line { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }

/* ---------- 신뢰 숫자 ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.trust div { text-align: center; padding: 18px 4px; }
.trust div + div { border-left: 1px solid var(--line); }
.trust strong { display: block; font-size: 1.35rem; font-weight: 900; color: var(--ink); }
.trust span { font-size: .8rem; color: var(--muted); }

/* ---------- 증상 체크 ---------- */
.symptoms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.symptom {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.symptom .ph { aspect-ratio: 4/3; }
.symptom-body { padding: 12px; }
.symptom h3 { font-size: 1rem; margin-bottom: 4px; }
.symptom p { font-size: .85rem; color: var(--ink-soft); margin: 0; }

/* ---------- 사진 자리(이미지 없을 때 표시) ---------- */
.ph {
  position: relative; background: linear-gradient(135deg, #d9d4cc, #ece8e1 50%, #cfc9bf);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph .ph-label { font-size: .75rem; color: #6d675e; font-weight: 600; padding: 8px; text-align: center; }

/* ---------- 시공 전후 ---------- */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-radius: var(--radius); overflow: hidden; }
.ba figure { margin: 0; position: relative; }
.ba .ph { aspect-ratio: 3/4; }
.ba figcaption {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  background: rgba(0,0,0,.65); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.ba figure.after figcaption { background: var(--accent); }

/* ---------- 시공사례 카드 ---------- */
.cards { display: grid; gap: 14px; }
.card {
  display: flex; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; padding: 10px;
}
.card .ph { width: 108px; flex: none; aspect-ratio: 1/1; border-radius: 10px; }
.card-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  background: var(--bg-stone); color: var(--ink-soft);
}
.tag.region { background: #fbe9ec; color: var(--accent-dark); }
.card h3 { font-size: .98rem; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card p { font-size: .82rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.more-link { display: block; text-align: center; margin-top: 18px; font-weight: 700; color: var(--ink-soft); }

/* ---------- 지역 필터 ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--ink-soft);
}
.chip.active { background: var(--dark); border-color: var(--dark); color: #fff; }

/* ---------- 서비스 ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.service { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; }
.service .ico { font-size: 1.5rem; margin-bottom: 6px; }
.service h3 { font-size: 1rem; margin-bottom: 2px; }
.service p { font-size: .83rem; color: var(--muted); margin: 0; }

/* ---------- 진행 절차 ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 10px; }
.steps li {
  counter-increment: s; display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border-radius: var(--radius); padding: 14px; border: 1px solid var(--line);
}
.steps li::before {
  content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--dark); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .9rem;
}
.steps strong { display: block; }
.steps span { font-size: .87rem; color: var(--muted); }

/* ---------- 왜 우리 ---------- */
.why { display: grid; gap: 10px; }
.why div { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--bg-stone); }
.why b { font-size: 1.4rem; flex: none; }
.why strong { display: block; }
.why span { font-size: .87rem; color: var(--ink-soft); }

/* ---------- 서비스 지역 ---------- */
.areas { display: flex; flex-wrap: wrap; gap: 6px; }
.areas span { background: #fff; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 28px 16px 0; font-weight: 700; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q. "; color: var(--accent); }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.3rem; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-soft); font-size: .95rem; padding: 0 0 16px; margin: 0; }

/* ---------- 중간/하단 CTA ---------- */
.cta-box {
  background: var(--dark); color: #fff; border-radius: var(--radius); padding: 26px 20px; text-align: center;
}
.cta-box h2 { font-size: 1.3rem; }
.cta-box p { color: rgba(255,255,255,.75); font-size: .93rem; }
.cta-box .btn { margin-top: 10px; }

/* ---------- 푸터 ---------- */
.footer { background: #17191c; color: #9aa0a8; font-size: .82rem; padding: 32px 0 24px; }
.footer strong { color: #fff; font-size: 1rem; display: block; margin-bottom: 8px; }
.footer p { margin: 0 0 4px; }

/* ---------- 하단 고정 전화바 ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: grid; grid-template-columns: 1fr 2.2fr; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(0,0,0,.08);
}
.callbar a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; border-radius: 10px; font-weight: 800; font-size: 1rem;
}
.callbar .cb-sms { background: var(--sms); color: #fff; font-size: .92rem; }
.callbar .cb-call { background: var(--accent); color: #fff; font-size: 1.08rem; animation: pulse 2.4s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,16,46,.45); }
  50% { box-shadow: 0 0 0 8px rgba(200,16,46,0); }
}

/* ---------- 게시글(시공사례 상세) ---------- */
.post-head { padding: 22px 0 6px; }
.crumb { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.crumb a { text-decoration: underline; }
.post-head h1 { font-size: 1.5rem; font-weight: 900; }
.post-meta { font-size: .83rem; color: var(--muted); }
.summary {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px;
  background: var(--bg-stone); border-radius: var(--radius); padding: 16px; font-size: .93rem; margin: 18px 0;
}
.summary dt { color: var(--muted); font-weight: 600; }
.summary dd { margin: 0; font-weight: 700; }
.post-body h2 { font-size: 1.2rem; margin-top: 34px; padding-left: 10px; border-left: 4px solid var(--gold); }
.post-body p { color: var(--ink-soft); }
.post-body ul { padding-left: 20px; color: var(--ink-soft); }
.post-body li { margin-bottom: 6px; }
.post-photo { margin: 16px 0; }
.post-photo .ph { aspect-ratio: 1/1; border-radius: var(--radius); }
.post-photo figcaption { font-size: .83rem; color: var(--muted); margin-top: 6px; text-align: center; }
.inline-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 2px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; margin: 28px 0;
}
.inline-cta p { margin: 0; font-weight: 700; font-size: .95rem; color: var(--ink); }
.inline-cta a { flex: none; background: var(--accent); color: #fff; font-weight: 800; padding: 10px 16px; border-radius: 10px; }

/* ---------- 태블릿/PC ---------- */
@media (min-width: 768px) {
  .nav { display: flex; }
  .hero .wrap { padding-top: 90px; padding-bottom: 80px; max-width: 760px; margin-left: max(16px, calc((100vw - var(--max)) / 2)); }
  .hero h1 { font-size: 2.6rem; }
  .hero-cta { grid-template-columns: 1.4fr 1fr; }
  .symptoms { grid-template-columns: repeat(4, 1fr); }
  .services { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(5, 1fr); }
  .steps li { flex-direction: column; }
  .post { max-width: 760px; margin: 0 auto; }
  .ba-wrap { max-width: 760px; }
  .callbar { max-width: 520px; left: 50%; transform: translateX(-50%); border-radius: 16px 16px 0 0; }
}

/* ---------- 현장 사진 갤러리 ---------- */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; background: var(--bg-stone); }
.gallery figure:first-child { grid-column: 1 / -1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.sym-ico { font-size: 1.6rem; padding: 14px 12px 0; }
@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery figure:first-child { grid-column: auto; }
}
