:root {
  --primary: #0f766e;
  --primary-dark: #0a4f4a;
  --accent: #f59e0b;
  --text: #1a1a24;
  --muted: #5b5b6a;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --border: #e3e8ef;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Malgun Gothic", sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.btn { display: inline-block; padding: 12px 24px; border-radius: 8px; font-weight: 600; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-lg { padding: 16px 32px; font-size: 18px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font-weight: 800; font-size: 20px; color: var(--primary); }

/* Hero */
.hero { position: relative; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; padding: 200px 0 170px; text-align: center; overflow: hidden; }
.hero-video { display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; min-width: 100%; min-height: 100%; object-fit: cover; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; }
.hero .badge { display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); padding: 6px 16px; border-radius: 999px; font-size: 13px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); margin: 0 0 16px; font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.hero p { font-size: clamp(15px, 2vw, 18px); opacity: .95; max-width: 560px; margin: 0 auto 32px; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.hero .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero { padding: 110px 0 80px; }
}

/* Sections */
section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 12px; }
.section-title p { color: var(--muted); margin: 0; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } }

.card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 24px; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(20,93,160,.12); }
.card .icon { font-size: 32px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

.image-placeholder { aspect-ratio: 4/3; border-radius: 12px; background: repeating-linear-gradient(135deg, var(--bg-soft), var(--bg-soft) 10px, #e9eef5 10px, #e9eef5 20px); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }

.photo-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 0 0 28px; }
.photo-row img { width: 320px; max-width: 100%; height: 240px; object-fit: cover; border-radius: 12px; }

/* Region page narrative — two-column newspaper layout on desktop, distinct from case page's single column */
.region-body { column-count: 2; column-gap: 40px; }
.region-body p { break-inside: avoid; margin: 0 0 16px; }
@media (max-width: 760px) {
  .region-body { column-count: 1; }
}

/* Region/case layout variants */
.photo-stack { display: flex; flex-direction: column; gap: 16px; }
.region-sidebar-layout, .region-split-layout, .case-sidebar-layout, .case-split-layout {
  display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start;
}
.region-split-layout, .case-split-layout { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) {
  .region-sidebar-layout, .region-split-layout, .case-sidebar-layout, .case-split-layout {
    grid-template-columns: 1fr;
  }
}

.bg-soft { background: var(--bg-soft); }

/* CTA band */
.cta-band { background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.12), transparent 60%), linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; text-align: center; }
.cta-band h2 { font-size: clamp(17px, 2.4vw, 21px); margin: 0 0 10px; }
.cta-band p { opacity: .9; margin: 0 0 24px; }

/* Footer */
.site-footer { background: #111827; color: #cbd5e1; padding: 24px 0 0; }
.footer-info { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 20px; }
.footer-info h3 { color: #fff; margin: 0; font-size: 16px; }
.footer-info p { margin: 0; font-size: 13px; }
.footer-bottom { border-top: 1px solid #1f2937; padding: 16px 0; font-size: 13px; text-align: center; }

/* Floating buttons */
.floating-stack { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.top-btn { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.12); font-size: 18px; cursor: pointer; align-items: center; justify-content: center; }
.floating-btn { position: relative; width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; box-shadow: 0 8px 20px rgba(20,93,160,.4); }
.pulse-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--primary); animation: pulse 3s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 16px 0 0; }
.breadcrumb a:hover { color: var(--primary); }

/* Guide */
#guide h3 { font-size: 20px; margin: 32px 0 10px; color: var(--primary-dark); }
#guide h3:first-of-type { margin-top: 0; }
#guide p { color: var(--muted); margin: 0 0 14px; }
#guide ul, #guide ol { margin: 0 0 20px; padding-left: 22px; color: var(--muted); }
#guide li { margin-bottom: 6px; }
#guide ol li strong { color: var(--text); }
#guide .grid { margin-bottom: 32px; }
#guide .card h3 { font-size: 16px; margin: 0 0 6px; }
#guide .card p { font-size: 14px; margin: 0; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; margin-bottom: 10px; }

/* Compact 3-up summary strip (증상/원인/처리, 건물유형/증상/처리방식 등) — stays 3 columns even on mobile */

/* Force a whole row (5-step process, 6-service icons) to fit on one line on mobile — shrink, don't scroll or wrap */
.row-fit-5 .short-label, .row-fit-6 .short-label { display: none; }
@media (max-width: 900px) {
  .row-fit-5, .row-fit-6 { display: grid !important; gap: 4px; }
  .row-fit-5 { grid-template-columns: repeat(5, 1fr); }
  .row-fit-6 { grid-template-columns: repeat(6, 1fr); }
  .row-fit-5 .card, .row-fit-6 .card { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; text-align: center; }
  .row-fit-5 .step-num { width: 20px; height: 20px; font-size: 11px; margin-bottom: 2px; flex-shrink: 0; }
  .row-fit-6 .icon { font-size: 16px; margin-bottom: 2px; line-height: 1; }
  .row-fit-5 h3, .row-fit-6 h3 { font-size: 10px; margin: 0; line-height: 1.2; white-space: nowrap; }
  .row-fit-5 p, .row-fit-6 p { display: none; }
  .row-fit-5 .full-label, .row-fit-6 .full-label { display: none; }
  .row-fit-5 .short-label, .row-fit-6 .short-label { display: inline; }
}

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.summary-strip .card { padding: 12px 8px; text-align: center; }
.summary-strip .icon { font-size: 22px; margin-bottom: 4px; }
.summary-strip h3 { font-size: 13px; margin: 0 0 4px; color: var(--muted); font-weight: 600; }
.summary-strip p { font-size: 13px; margin: 0; line-height: 1.35; }
@media (max-width: 480px) {
  .summary-strip { gap: 6px; }
  .summary-strip .card { padding: 8px 4px; }
  .summary-strip .icon { font-size: 18px; }
  .summary-strip h3 { font-size: 11px; }
  .summary-strip p { font-size: 11px; }
}

/* Region page theme variants — hero/summary/CTA accent rotates per region, header/footer stay shared */
.hero.rtheme-a { background: linear-gradient(135deg, #1e3a5f 0%, #0f2942 100%); }
.hero.rtheme-b { background: linear-gradient(135deg, #c2410c 0%, #7c2d12 100%); }
.hero.rtheme-c { background: linear-gradient(135deg, #166534 0%, #052e16 100%); }
.hero.rtheme-d { background: linear-gradient(135deg, #6d28d9 0%, #2e1065 100%); }
.hero.rtheme-e { background: linear-gradient(135deg, #292524 0%, #0c0a09 100%); }
.hero.rtheme-f { background: linear-gradient(135deg, #be123c 0%, #4c0519 100%); }
.hero.rtheme-g { background: linear-gradient(135deg, #4338ca 0%, #1e1b4b 100%); }
.hero.rtheme-h { background: linear-gradient(135deg, #0e7490 0%, #083344 100%); }

.icon-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin: 0 auto 8px; }
.summary-strip.rtheme-a .card { border-radius: 14px; border-left: 4px solid #3b82f6; }
.summary-strip.rtheme-a .icon-mark { background: #3b82f6; }
.summary-strip.rtheme-b .card { border-radius: 4px; border-left: 4px solid #ea580c; }
.summary-strip.rtheme-b .icon-mark { background: #ea580c; border-radius: 2px; }
.summary-strip.rtheme-c .card { border-radius: 20px; border-left: 4px solid #16a34a; }
.summary-strip.rtheme-c .icon-mark { background: #16a34a; }
.summary-strip.rtheme-d .card { border-radius: 10px; border-left: 4px solid #8b5cf6; }
.summary-strip.rtheme-d .icon-mark { background: #8b5cf6; }
.summary-strip.rtheme-e .card { border-radius: 2px; border-top: 3px solid #f59e0b; border-left: none; }
.summary-strip.rtheme-e .icon-mark { background: #f59e0b; border-radius: 0; }
.summary-strip.rtheme-f .card { border-radius: 16px; border-left: 4px solid #e11d48; }
.summary-strip.rtheme-f .icon-mark { background: #e11d48; }
.summary-strip.rtheme-g .card { border-radius: 12px; border-top: 4px solid #4f46e5; border-left: none; }
.summary-strip.rtheme-g .icon-mark { background: #4f46e5; }
.summary-strip.rtheme-h .card { border-radius: 14px; border-left: 4px solid #0891b2; }
.summary-strip.rtheme-h .icon-mark { background: #0891b2; }

.btn-primary.rtheme-a { background: #1e3a5f; border-radius: 8px; }
.btn-primary.rtheme-a:hover { background: #16304f; }
.btn-primary.rtheme-b { background: #c2410c; border-radius: 4px; }
.btn-primary.rtheme-b:hover { background: #9a3412; }
.btn-primary.rtheme-c { background: #166534; border-radius: 999px; }
.btn-primary.rtheme-c:hover { background: #14532d; }
.btn-primary.rtheme-d { background: #6d28d9; border-radius: 6px; }
.btn-primary.rtheme-d:hover { background: #5b21b6; }
.btn-primary.rtheme-e { background: #292524; border: 1px solid #f59e0b; border-radius: 2px; }
.btn-primary.rtheme-e:hover { background: #1c1917; }
.btn-primary.rtheme-f { background: #be123c; border-radius: 999px; }
.btn-primary.rtheme-f:hover { background: #9f1239; }
.btn-primary.rtheme-g { background: #4338ca; border-radius: 8px; }
.btn-primary.rtheme-g:hover { background: #3730a3; }
.btn-primary.rtheme-h { background: #0e7490; border-radius: 999px; }
.btn-primary.rtheme-h:hover { background: #155e75; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin: 10px 0 0; color: var(--muted); }
