/* ═══════════════════════════════════════════════
   금보리페어 · 데크공사 — 디자인 시스템
   Primary: 차콜 브라운 #3d2e1e (목재·데크 소재 톤에 부합)
   폰트: Pretendard / 참조: parkingline.bobeabuild.com 레이아웃 패턴
   ═══════════════════════════════════════════════ */

:root {
  --primary: #3d2e1e;
  --primary-dark: #2a2015;
  --primary-light: #6b5642;
  --ink: #1a1a1a;
  --text-muted: #6b6b6b;
  --bg: #ffffff;
  --bg-alt: #f8f8f7;
  --border: #e6e2dc;
  --card-radius: 0.75rem;
  --radius: 0.375rem;
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
table { border-collapse: collapse; width: 100%; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(61, 46, 30, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.fade-in-up { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-in-up.is-visible { opacity: 1; transform: translateY(0); }

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.85rem; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0.9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 1.25rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }

/* ── SERVICE 섹션 ── */
.service-section { padding: 5rem 0 4rem; }
.service-intro { max-width: 720px; margin-bottom: 3rem; }
.service-intro h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; margin-bottom: 1.25rem; letter-spacing: -0.02em; }
.service-intro p { font-weight: 300; color: var(--text-muted); font-size: 1.02rem; margin-bottom: 0.5rem; }

.service-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
.service-card {
  border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden;
  transition: all 0.3s ease; display: block;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 12px 28px rgba(0,0,0,0.08); }
.service-card .thumb { aspect-ratio: 3/4; overflow: hidden; }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.service-card:hover .thumb img { transform: scale(1.04); }
.service-card .body { padding: 1rem; }
.service-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 0.35rem; }
.service-card .desc { font-size: 0.82rem; font-weight: 300; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.5rem; }
.service-card .more { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); transition: color 0.3s; }
.service-card:hover .more { color: var(--primary); }

/* ── Hero (좌우분할) ── */
.hero-section { background: var(--bg-alt); padding: 4rem 0 5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.hero-text .eyebrow { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; margin-bottom: 1rem; letter-spacing: 0.02em; }
.hero-text .headline { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.5; margin-bottom: 1.25rem; }
.hero-text .sub { color: var(--text-muted); font-weight: 300; margin-bottom: 1.75rem; font-size: 1rem; }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-tags { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
.hero-tags strong { color: var(--primary); font-weight: 700; }

.hero-slider { position: relative; border-radius: var(--card-radius); overflow: hidden; aspect-ratio: 3/4; box-shadow: 0 20px 50px rgba(0,0,0,0.12); }
.hero-slider .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero-slider .slide.active { opacity: 1; }
.hero-slider img { width: 100%; height: 100%; object-fit: cover; }
.hero-dots { position: absolute; bottom: 1rem; left: 0; right: 0; display: flex; justify-content: center; gap: 0.5rem; }
.hero-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.55); cursor: pointer; transition: all 0.3s; }
.hero-dots span.active { background: #fff; transform: scale(1.3); }

/* ── 서브 히어로 (NSEO / 상세페이지) ── */
.sub-hero { position: relative; }
.sub-hero-img { width: 100%; aspect-ratio: 21/9; overflow: hidden; }
.sub-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.sub-hero-body { padding: 3rem 0 3.5rem; background: var(--bg-alt); }
.sub-hero-body h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 800; margin: 0.75rem 0 1rem; }
.sub-hero-body .sub-desc { color: var(--text-muted); font-weight: 300; margin-bottom: 1.75rem; max-width: 640px; }
.sub-hero-body .back-link { display: inline-block; margin-bottom: 1rem; font-size: 0.85rem; color: var(--text-muted); }

.info-bar { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden; margin: 2rem 0; }
.info-bar div { padding: 1.1rem 1.25rem; border-right: 1px solid var(--border); }
.info-bar div:last-child { border-right: none; }
.info-bar .k { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.3rem; letter-spacing: 0.04em; }
.info-bar .v { font-weight: 700; font-size: 0.95rem; }

/* ── 시공사례 갤러리 (메인) ── */
.gallery-section { padding: 5rem 0; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.25rem); font-weight: 800; margin-bottom: 0.75rem; }
.section-head p { color: var(--text-muted); font-weight: 300; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.gallery-card {
  border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden;
  transition: all 0.3s ease; cursor: pointer; text-decoration: none; display: block; background: #fff;
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.gallery-card .card-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.gallery-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-card:hover .card-thumb img { transform: scale(1.03); }
.case-badge {
  position: absolute; top: 0.75rem; left: 0.75rem;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  background: var(--primary); color: #fff;
  padding: 0.2rem 0.6rem; border-radius: 0.25rem;
}
.gallery-card .card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.card-title { font-weight: 800; font-size: 1rem; line-height: 1.4; }
.card-sub { font-weight: 300; font-size: 0.875rem; color: var(--text-muted); }
.card-more { font-size: 0.875rem; font-weight: 600; color: var(--text-muted); transition: color 0.3s ease; }
.gallery-card:hover .card-more { color: var(--primary); }

/* ── CASE 섹션 (NSEO) : 이미지 4장 2열 ── */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.case-grid figure { border-radius: var(--card-radius); overflow: hidden; border: 1px solid var(--border); }
.case-grid img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.case-grid figcaption { padding: 0.85rem 1rem; font-size: 0.85rem; color: var(--text-muted); background: #fff; }

/* ── BEFORE/AFTER 2열 갤러리 (상세페이지) ── */
.ba-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1.5rem; }
.ba-gallery img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--card-radius); border: 1px solid var(--border); }

/* ── PROCESS STEP (상세페이지) ── */
.process-block { margin-top: 2rem; display: flex; flex-direction: column; gap: 2.5rem; }
.process-block .step-row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1.75rem; align-items: center; }
.process-block .step-num { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; margin-bottom: 0.75rem; }
.process-block h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.5rem; }
.process-block p { color: var(--text-muted); font-weight: 400; }
.step-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.step-images img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.step-images.single { grid-template-columns: 1fr; }

/* ── 시공 요약 박스 ── */
.summary-box { border-left: 3px solid var(--primary); background: var(--bg-alt); padding: 1.5rem 1.75rem; border-radius: 0 var(--card-radius) var(--card-radius) 0; margin: 2.5rem 0; }
.summary-box h3 { font-weight: 800; margin-bottom: 0.85rem; }
.summary-box ul li { padding-left: 1.1rem; position: relative; margin-bottom: 0.5rem; color: var(--ink); }
.summary-box ul li::before { content: '—'; position: absolute; left: 0; color: var(--primary); }

/* ── PROJECT VIDEO ── */
.video-section { padding: 5rem 0; background: var(--bg-alt); }
.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--card-radius); overflow: hidden; margin-bottom: 2rem; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── WHY US ── */
.whyus-section { padding: 5rem 0; }
.whyus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.whyus-card { border: 1px solid var(--border); border-radius: var(--card-radius); padding: 2rem; }
.whyus-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.75rem; }
.whyus-card p { color: var(--text-muted); font-weight: 400; }

/* ── PROCESS (메인 4단계) ── */
.process-section { padding: 5rem 0; background: var(--bg-alt); }
.process-steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.process-step-card { text-align: left; }
.process-step-card .num { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 1rem; }
.process-step-card h3 { font-weight: 800; font-size: 1.05rem; margin-bottom: 0.5rem; }
.process-step-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ── 시공 단계 (NSEO 번호목록) ── */
.step-list { counter-reset: step; margin-top: 1.5rem; }
.step-list li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.step-list li:last-child { border-bottom: none; }
.step-list .badge { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; }
.step-list strong { display: block; margin-bottom: 0.25rem; }
.step-list span.desc { color: var(--text-muted); font-size: 0.92rem; }

/* ── 본문 (NSEO 소개, 비교표) ── */
.content-section { padding: 4rem 0; }
.content-section h2 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 800; margin-bottom: 1.5rem; }
.content-section > .container > p { color: var(--ink); margin-bottom: 1.1rem; max-width: 760px; }

.compare-table { margin-top: 1.5rem; border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden; }
.compare-table table { width: 100%; }
.compare-table th, .compare-table td { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.92rem; }
.compare-table th { background: var(--bg-alt); font-weight: 700; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-note { margin-top: 0.75rem; font-size: 0.8rem; color: var(--text-muted); }

/* ── FAQ ── */
.faq-section { padding: 5rem 0; background: var(--bg-alt); }
.faq-list { max-width: 800px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 1.4rem 0; font-size: 1rem; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-q .icon { flex: none; font-size: 1.2rem; color: var(--primary); transition: transform 0.3s ease; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: var(--text-muted); font-size: 0.94rem; }
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 1.4rem; }

/* ── CTA ── */
.cta-section { padding: 5rem 0; }
.cta-box { background: var(--primary); border-radius: var(--card-radius); padding: 4rem 2.5rem; text-align: center; color: #fff; }
.cta-box h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 800; margin-bottom: 1rem; }
.cta-box .sub { opacity: 0.85; font-weight: 300; margin-bottom: 2rem; }
.cta-actions { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.25rem; }
.cta-box .btn-primary { background: #fff; color: var(--primary); }
.cta-box .btn-primary:hover { background: #f0ece5; }
.cta-box .btn-outline { color: #fff; border-color: rgba(255,255,255,0.5); }
.cta-box .btn-outline:hover { background: rgba(255,255,255,0.15); }
.trust-badges { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.trust-badges .badge-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; opacity: 0.9; }

/* ── 메인 유도 배너 (NSEO) ── */
.main-cta-banner { background: var(--bg-alt); border-radius: var(--card-radius); padding: 2.5rem; text-align: center; margin: 3rem 0; }
.main-cta-banner p { font-weight: 700; margin-bottom: 1.25rem; font-size: 1.05rem; }

/* ── 관련 서비스 카드 그리드 ── */
.related-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-top: 1.5rem; }
.related-card { border: 1px solid var(--border); border-radius: var(--card-radius); padding: 1.25rem; transition: all 0.25s ease; }
.related-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.related-card .related-label { font-size: 0.7rem; color: var(--primary); font-weight: 700; letter-spacing: 0.06em; margin-bottom: 0.5rem; display: block; }
.related-card h3 { font-size: 0.95rem; font-weight: 800; margin-bottom: 0.4rem; }
.related-card p { font-size: 0.8rem; color: var(--text-muted); }
.related-card.current { background: var(--bg-alt); border-style: dashed; }
.related-card.current .related-label { color: var(--text-muted); }

/* ── Footer ── */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 3.5rem 0 0; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem 3rem; display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.footer-desc { color: var(--text-muted); font-size: 0.88rem; margin: 1rem 0 1.25rem; font-weight: 300; }
.footer-contact-link { font-weight: 700; color: var(--primary); font-size: 0.9rem; }
.footer-links h4 { font-size: 0.85rem; font-weight: 800; margin-bottom: 1rem; }
.footer-links li { margin-bottom: 0.6rem; font-size: 0.88rem; color: var(--text-muted); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.25rem; text-align: center; font-size: 0.78rem; color: var(--text-muted); }

/* ── Floating 버튼 ── */
.floating-btn {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 200;
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--primary); color: #fff; padding: 0.9rem 1.35rem;
  border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(61,46,30,0.35);
}
.floating-btn .pulse-ring {
  position: absolute; inset: 0; border-radius: 999px; border: 2px solid var(--primary);
  animation: pulse-ring 3s ease-out infinite;
}
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.35); opacity: 0; } }

/* ── STEP (contact.php) ── */
.contact-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 2.5rem 0; }
.contact-step { border: 1px solid var(--border); border-radius: var(--card-radius); padding: 2rem 1.5rem; text-align: center; }
.contact-step .num { font-size: 1.75rem; font-weight: 800; color: var(--primary); margin-bottom: 0.75rem; }
.contact-step h3 { font-weight: 800; margin-bottom: 0.5rem; }
.contact-step p { color: var(--text-muted); font-size: 0.9rem; }
.contact-actions { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0; }
.sms-only { display: none; }
.notice-box { background: var(--bg-alt); border-radius: var(--card-radius); padding: 1.75rem 2rem; margin: 2rem 0; }
.notice-box h3 { font-weight: 800; margin-bottom: 1rem; }
.notice-box ul li { padding-left: 1.1rem; position: relative; margin-bottom: 0.6rem; color: var(--text-muted); font-size: 0.92rem; }
.notice-box ul li::before { content: '—'; position: absolute; left: 0; color: var(--primary); }

/* ── 404 ── */
.error-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem 1.25rem; }
.error-page .code { font-size: 4.5rem; font-weight: 800; color: var(--primary); }
.error-page h1 { font-size: 1.5rem; font-weight: 800; margin: 1rem 0; }
.error-page p { color: var(--text-muted); margin-bottom: 2rem; }

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-slider { max-width: 420px; margin: 0 auto; }
  .whyus-grid { grid-template-columns: 1fr; }
  .process-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .info-bar { grid-template-columns: repeat(2, 1fr); }
  .info-bar div:nth-child(2) { border-right: none; }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
  .process-block .step-row { grid-template-columns: 1fr; }
  .contact-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .ba-gallery { grid-template-columns: 1fr; }
  .step-images { grid-template-columns: 1fr; }
  .process-steps-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-table { overflow-x: auto; }
  .floating-btn span:last-child { display: none; }
  .floating-btn { padding: 1rem; border-radius: 50%; }
  .cta-box { padding: 2.5rem 1.5rem; }
}
