/* ===== 배관세척 - 공통 디자인 시스템 (딥그린) ===== */
:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #4ade80;
  --accent: #22c55e;
  --slate-900: #12211a;
  --slate-800: #1c2e25;
  --slate-700: #3a4c40;
  --slate-500: #66786c;
  --slate-300: #c9d3c9;
  --slate-100: #eef1ee;
  --slate-50: #f6f8f6;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
  --max-width: 1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--slate-800);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { padding-left: 0; list-style: none; margin: 0; }
h1, h2, h3, h4 { color: var(--slate-900); line-height: 1.35; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--slate-50); }
.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .04em;
  background: #f0fdf4;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-head p { color: var(--slate-500); font-size: 1.02rem; }

/* ===== 버튼 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 8px 22px rgba(37,99,235,.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: var(--white); color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: #f0fdf4; }
.btn-ghost { background: rgba(255,255,255,.14); color: var(--white); border-color: rgba(255,255,255,.5); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-lg { padding: 18px 34px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ===== 헤더 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-100);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.22rem; color: var(--slate-900); }
.brand svg { width: 30px; height: 30px; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { font-weight: 600; color: var(--slate-700); font-size: .98rem; transition: color .15s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }
.header-right { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--slate-900); margin: 5px 0; }

/* ===== 히어로 ===== */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--primary-dark) 60%, var(--accent) 130%);
  padding: 100px 0 84px;
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .34; z-index: 0; }
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(74,222,128,.35), transparent 55%),
              linear-gradient(180deg, rgba(18,33,26,.35), rgba(18,33,26,.78));
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; }
.hero-inner { max-width: 760px; }
.hero .eyebrow { background: rgba(255,255,255,.14); color: var(--white); }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 5vw, 3.2rem); margin-bottom: .4em; }
.hero .lead { font-size: 1.14rem; color: rgba(255,255,255,.86); max-width: 600px; margin-bottom: 34px; }
.hero .cta-row { margin-bottom: 14px; }
.hero-note { font-size: .88rem; color: rgba(255,255,255,.65); }

/* ===== 카드/그리드 공통 ===== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ===== 캐러셀 ===== */
.carousel-wrap { position: relative; }
.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--slate-100);
}
.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 8px; }
.keyword-card {
  scroll-snap-align: start;
  flex: 0 0 280px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--slate-100);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.keyword-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.keyword-card .kw-num {
  font-size: .78rem; font-weight: 800; color: var(--primary);
  background: #f0fdf4; display: inline-block; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.keyword-card .kw-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.keyword-card h3 { font-size: 1.14rem; margin-bottom: 8px; }
.keyword-card p { color: var(--slate-500); font-size: .92rem; flex: 1; }
.keyword-card .kw-link { margin-top: 14px; font-weight: 700; color: var(--primary); font-size: .92rem; }
.carousel-controls { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 4px; }
.carousel-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--slate-300);
  background: var(--white); cursor: pointer; font-size: 1.1rem; color: var(--slate-700);
}
.carousel-btn:hover { background: var(--slate-100); }

/* ===== 표 ===== */
.compare-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare-table th, .compare-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--slate-100); font-size: .95rem; }
.compare-table thead th { background: var(--slate-900); color: var(--white); font-weight: 700; }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:nth-child(even) { background: var(--slate-50); }
.compare-table .ok { color: var(--primary); font-weight: 700; }
.compare-table .bad { color: #ef4444; font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* ===== 체크리스트 ===== */
.checklist { display: grid; gap: 14px; }
.checklist li {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--white); border: 1px solid var(--slate-100); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow);
}
.checklist .ico {
  flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 800;
}

/* ===== 스텝 ===== */
.steps { display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.step { text-align: center; position: relative; }
.step .step-ico {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; box-shadow: var(--shadow);
}
.step h4 { font-size: 1rem; margin-bottom: 6px; }
.step p { color: var(--slate-500); font-size: .88rem; margin: 0; }

/* ===== Q&A ===== */
.faq { display: grid; gap: 14px; }
.faq-item { background: var(--white); border: 1px solid var(--slate-100); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 700; font-size: .98rem; color: var(--slate-900);
}
.faq-q::after { content: "+"; font-size: 1.4rem; color: var(--primary); font-weight: 400; transition: transform .2s ease; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 22px; color: var(--slate-500); font-size: .93rem; }
.faq-item.open .faq-a { max-height: 300px; padding: 0 22px 20px; }

/* ===== 이미지 갤러리 ===== */
.img-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 32px auto; max-width: 900px; }
.img-quad { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px auto; max-width: 820px; }
.img-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 0 auto; }
.img-frame img { width: 100%; object-fit: cover; }
figure.img-frame { margin: 0; }
figcaption { padding: 10px 14px; font-size: .82rem; color: var(--slate-500); background: var(--white); text-align: center; }

/* ===== 관련 페이지 카드 ===== */
.related-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 900px; margin: 0 auto; }
.related-card {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--white); border: 1px solid var(--slate-100); border-radius: 14px;
  padding: 18px 16px; font-weight: 700; font-size: .92rem; color: var(--primary);
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.related-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(0,0,0,.2); }

/* ===== 하단 CTA 밴드 ===== */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark), var(--slate-900));
  color: var(--white); border-radius: 24px; padding: 52px 40px; text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,.8); max-width: 560px; margin: 0 auto 26px; }
.cta-band .cta-row { justify-content: center; }

/* ===== 푸터 ===== */
.site-footer { background: var(--slate-900); color: var(--slate-300); padding: 52px 0 30px; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--slate-800); }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav a { color: var(--slate-300); font-weight: 600; font-size: .94rem; }
.footer-nav a:hover { color: var(--white); }
.footer-biz { padding-top: 24px; font-size: .86rem; color: var(--slate-500); line-height: 2; }
.footer-biz strong { color: var(--slate-300); }
.footer-biz .biz-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-copy { margin-top: 18px; font-size: .8rem; color: var(--slate-700); }

/* ===== 반응형 ===== */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .main-nav { position: fixed; top: 72px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 20px 18px; box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .2s ease; }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--slate-100); }
  .nav-toggle { display: block; }
  .header-right .btn span.btn-text { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .img-duo, .img-quad { grid-template-columns: 1fr; }
  .related-cards { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 76px 0 60px; }
  .footer-top { flex-direction: column; }
  .cta-band { padding: 40px 22px; }
  .carousel-controls { display: none; }
  .carousel-track { display: grid; grid-template-columns: repeat(2, 1fr); overflow-x: visible; scroll-snap-type: none; }
  .keyword-card { flex: none; width: auto; }
}
