/*
Theme Name: 투명한 세상 허브
Theme URI: https://www.korhomesolution.com/
Author: 투명한 세상
Description: 수목·토지관리와 건물 외부 유지보수 전문사이트 네트워크의 공식 허브 테마.
Version: 1.0
Text Domain: korhome
*/

:root {
  --forest-deep: #263A32;
  --forest: #3F5A4D;
  --charcoal: #242725;
  --paper: #FAFAF8;
  --warm-gray: #F1F2EF;
  --copper: #B8663D;
  --earth: #7A604C;
  --line: #D8DDD8;
  --text: #202522;
  --muted: #69716C;
}

html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
img, video, svg, iframe { max-width: 100%; }
/* width/height 속성이 있는 img를 CSS aspect-ratio로 재조정하는 컨테이너(카드·갤러리·Before/After 등)에서
   속성값이 height를 강제로 고정해버리지 않도록 기본값을 auto로 되돌린다. */
img[width][height] { height: auto; }

body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(100% - 32px, 1240px); margin-inline: auto; }

h1, h2, h3, h4 { color: var(--charcoal); line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 7vw, 5.5rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--forest-deep); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--copper); outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(250, 250, 248, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.site-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--charcoal); flex: none; }
.site-header .brand svg { width: 30px; height: 30px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-weight: 500; color: var(--text); font-size: .96rem; }
.site-nav a:hover { color: var(--forest); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px; font-weight: 700; text-decoration: none;
  font-size: .98rem; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(184,102,61,.28); }
.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: #a2582f; }
.btn-outline { background: transparent; color: var(--forest-deep); border-color: var(--forest-deep); }
.btn-outline:hover { background: var(--forest-deep); color: #fff; }
.btn-ghost { background: var(--warm-gray); color: var(--charcoal); }
.header-cta { flex: none; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: var(--charcoal); display: block; }
.mobile-panel { display: none; }

@media (max-width: 860px) {
  .site-nav .nav-links { display: none; }
  .header-cta { display: none; }
  .hamburger { display: flex; }
  .site-header .bar { height: 64px; }
  .mobile-panel {
    display: none; position: fixed; inset: 64px 0 0 0; background: var(--paper); z-index: 480;
    padding: 28px 20px; overflow-y: auto;
  }
  .mobile-panel.open { display: block; }
  .mobile-panel ul { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 6px; }
  .mobile-panel a { display: block; padding: 14px 6px; text-decoration: none; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); }
}

/* ── Sections ── */
section { padding: 92px 0; }
section.tight { padding: 60px 0; }
.section-head { max-width: 720px; margin: 0 0 46px; }
.section-head .eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; color: var(--copper); margin-bottom: 12px; display: block; }
.section-head h2 { margin-bottom: 12px; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 46px; }
.section-head-row .section-head { margin-bottom: 0; }
@media (max-width: 700px) { section { padding: 64px 0; } }
.bg-charcoal { background: var(--charcoal); color: #EDEEEA; }
.bg-charcoal h1, .bg-charcoal h2, .bg-charcoal h3 { color: #fff; }
.bg-forest { background: var(--forest-deep); color: #EDEEEA; }
.bg-forest h2, .bg-forest h3 { color: #fff; }
.bg-warm { background: var(--warm-gray); }
.muted { color: var(--muted); }

/* ── Hero ── */
.hero { padding: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 45% 55%; align-items: stretch; min-height: 760px; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 60px 56px 60px max(20px, calc((100vw - 1240px) / 2 + 20px)); }
.hero-copy h1 { margin-bottom: 6px; }
.hero-copy .lede { font-size: 1.18rem; color: var(--muted); margin: 20px 0 30px; max-width: 46ch; line-height: 1.75; }
.hero-labels { display: flex; flex-direction: column; gap: 10px; margin-bottom: 38px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-labels span { font-weight: 600; color: var(--forest); font-size: .98rem; letter-spacing: .01em; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-media { position: relative; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 48px 16px 32px; order: 1; }
  .hero-media { order: 2; height: 320px; }
}

/* ── Two-axis intro ── */
.axis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.axis-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 40px; box-shadow: 0 8px 24px rgba(36,39,37,.05); }
.axis-card .tag { display: inline-block; padding: 5px 14px; border-radius: 999px; background: var(--warm-gray); color: var(--forest-deep); font-size: .82rem; font-weight: 700; margin-bottom: 16px; }
.axis-card ul { margin: 16px 0 0; padding-left: 1.2em; color: var(--muted); }
@media (max-width: 780px) { .axis-grid { grid-template-columns: 1fr; } }

/* ── Service carousel ── */
.carousel-wrap { position: relative; }
.card-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 14px; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.card-track:focus-visible { outline: 3px solid var(--copper); }
.carousel-nav {
  position: absolute; top: 38%; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(36,39,37,.12);
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5;
  font-size: 1.1rem; color: var(--forest-deep); transition: background .15s ease, color .15s ease;
}
.carousel-nav:hover { background: var(--forest-deep); color: #fff; }
.carousel-nav.prev { left: -23px; }
.carousel-nav.next { right: -23px; }
@media (max-width: 900px) { .carousel-nav { display: none; } }

.service-card {
  flex: 0 0 320px; scroll-snap-align: start; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column;
  box-shadow: 0 8px 24px rgba(36,39,37,.06); transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(36,39,37,.12); }
.service-card .thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--warm-gray); }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-card .thumb.placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; text-align: center; padding: 20px; }
.service-card .thumb-arrow {
  position: absolute; right: 16px; bottom: -20px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--copper); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; box-shadow: 0 6px 16px rgba(184,102,61,.35); transition: transform .2s ease;
}
.service-card:hover .thumb-arrow { transform: scale(1.08) rotate(-6deg); }
.service-card .body { padding: 30px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.service-card .status { font-size: .76rem; font-weight: 700; letter-spacing: .07em; margin-bottom: 10px; }
.service-card .status.active { color: var(--forest); }
.service-card .status.prep { color: var(--muted); }
.service-card h3 { margin-bottom: 6px; }
.service-card .more { margin-top: auto; padding-top: 16px; font-weight: 700; color: var(--copper); font-size: .92rem; }
@media (max-width: 680px) {
  .card-track { flex-direction: column; overflow-x: visible; scroll-snap-type: none; padding: 4px 4px 4px; }
  .service-card { flex: none; width: 100%; scroll-snap-align: none; }
}
@media (min-width: 681px) and (max-width: 1080px) { .service-card { flex-basis: 44%; } }

/* ── Network blocks ── */
.network-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.network-block {
  background: var(--charcoal); color: #EDEEEA; border-radius: 16px; padding: 30px 26px;
  text-decoration: none; display: block; transition: transform .2s ease, background .2s ease;
}
.network-block:hover { transform: translateY(-4px); background: #1c1e1c; }
.network-block h3 { color: #fff; }
.network-block .goto { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--copper); font-weight: 700; font-size: .88rem; }
@media (max-width: 980px) { .network-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .network-grid { grid-template-columns: 1fr; } }

/* ── Before/After ── */
.ba-set { margin-bottom: 44px; }
.ba-set .ba-label { font-weight: 700; margin-bottom: 14px; font-size: 1.05rem; }
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ba-pair figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 26px rgba(36,39,37,.10); }
.ba-pair img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.ba-pill {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  background: rgba(32, 37, 34, .82); color: #fff; font-weight: 700; font-size: .74rem;
  letter-spacing: .1em; padding: 6px 14px; border-radius: 999px;
}
.ba-pill-after { background: rgba(184, 102, 61, .92); }
@media (max-width: 480px) {
  .ba-pair { gap: 10px; }
  .ba-pill { left: 8px; bottom: 8px; padding: 4px 10px; font-size: .66rem; letter-spacing: .06em; }
}

/* ── Steps ── */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.step { text-align: left; position: relative; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--forest-deep); color: #fff; font-weight: 700; font-size: .92rem; margin-bottom: 16px; }
.step::after {
  content: "›"; position: absolute; top: 20px; right: -18px; font-size: 1.3rem; font-weight: 700;
  color: var(--line); display: block;
}
.step:last-child::after { display: none; }
.bg-forest .step::before { background: var(--copper); }
.bg-forest .step::after { color: rgba(255,255,255,.28); }
.bg-forest .step p { color: #C8CCC7; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .step::after { display: none; } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* ── Tables ── */
table.spec-table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 20px 0;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff;
}
table.spec-table th, table.spec-table td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: .96rem; }
table.spec-table tr:last-child td { border-bottom: 0; }
table.spec-table th { background: var(--warm-gray); font-weight: 700; }
@media (max-width: 640px) {
  table.spec-table.stack, table.spec-table.stack thead, table.spec-table.stack tbody, table.spec-table.stack th, table.spec-table.stack td, table.spec-table.stack tr { display: block; }
  table.spec-table.stack thead { display: none; }
  table.spec-table.stack tr { border: 1px solid var(--line); border-radius: 4px; margin-bottom: 12px; padding: 10px 14px; }
  table.spec-table.stack td { border: 0; padding: 6px 0; }
  table.spec-table.stack td::before { content: attr(data-label); display: block; font-weight: 700; color: var(--muted); font-size: .78rem; margin-bottom: 2px; }
}

/* ── Field types ── */
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.type-chip {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px 16px;
  text-align: center; font-weight: 700; transition: border-color .2s ease, transform .2s ease;
}
.type-chip:hover { border-color: var(--copper); transform: translateY(-2px); }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.faq-item .a { color: var(--muted); }

/* ── CTA band ── */
.cta-band { text-align: center; padding: 70px 0; }
.cta-band p { font-size: 1.2rem; margin-bottom: 26px; }

/* ── Footer ── */
.site-footer { background: var(--charcoal); color: #C8CCC7; padding: 56px 0 28px; }
.site-footer a { color: #C8CCC7; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 30px; margin-bottom: 26px; border-bottom: 1px solid #3a3f3b;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: #fff; }
.footer-brand svg { width: 26px; height: 26px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 26px; }
.footer-links a { font-size: .92rem; font-weight: 500; }
.footer-nap { margin-bottom: 26px; }
.footer-nap p { margin: 0 0 6px; font-size: .88rem; color: #9ba39c; }
.footer-bottom { border-top: 1px solid #3a3f3b; padding-top: 20px; font-size: .82rem; color: #8b9089; }
@media (max-width: 680px) { .footer-top { flex-direction: column; align-items: flex-start; } }

.pro-site-link { margin-top: 8px; }
.pro-site-link a { font-weight: 700; color: var(--forest); text-decoration: underline; font-size: .92rem; }

/* ── 전문사이트 카드 (관련 전문사이트 / 허브페이지 공용) ── */
.site-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.site-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  text-decoration: none; color: var(--text); display: flex; flex-direction: column;
  box-shadow: 0 8px 22px rgba(36,39,37,.06); transition: transform .2s ease, box-shadow .2s ease;
}
.site-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(36,39,37,.1); }
.site-card .thumb { aspect-ratio: 4/3; background: var(--warm-gray); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.site-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-card .thumb span { color: var(--muted); font-weight: 700; }
.site-card .body { padding: 20px 20px 22px; }
.site-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.site-card .more { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--copper); font-size: .86rem; }
@media (max-width: 780px) { .site-card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .site-card-grid { grid-template-columns: 1fr; } }

/* ── 전문사이트 허브: 서비스군 블록 ── */
.site-group { margin-bottom: 8px; }
.site-group h3 { font-size: 1.15rem; margin-bottom: 6px; }
.site-group .empty-note { color: var(--muted); font-size: .92rem; padding: 14px 0; }
.axis-block + .axis-block { margin-top: 56px; }

/* ── Split photo+text layout ── */
.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split-row img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; display: block; box-shadow: 0 12px 28px rgba(36,39,37,.08); }
.split-row.reverse { direction: rtl; }
.split-row.reverse > * { direction: ltr; }
@media (max-width: 780px) { .split-row { grid-template-columns: 1fr; } }

/* ── Checklist ── */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.check-list li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--forest); color: #fff; font-size: .78rem; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* ── Narrow Before/After (서비스 소개페이지 전용, 본문폭의 70~80%) ── */
.ba-narrow { max-width: 78%; margin-inline: auto; }
@media (max-width: 780px) { .ba-narrow { max-width: 100%; } }

/* ── Generic content page layout ── */
.page-hero { background: var(--warm-gray); padding: 64px 0 50px; border-bottom: 1px solid var(--line); }
.page-hero .lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.breadcrumb { font-size: .84rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { text-decoration: underline; }
.prose { max-width: 74ch; }
.prose p { color: var(--text); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; display: block; }
@media (max-width: 780px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 780px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px;
  text-decoration: none; color: var(--text); display: block; box-shadow: 0 8px 22px rgba(36,39,37,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(36,39,37,.1); }
.related-card h3 { font-size: 1rem; margin-bottom: 6px; }
