/* 어반픽스 미닫이문수리 - 공용 스타일 */
:root {
  --bg: #ffffff;
  --bg-light: #f4f6f9;
  --bg-soft: #eef2f8;
  --text: #23272f;
  --text-sub: #5a6270;
  --border: #e3e7ee;
  --accent: #123a66;
  --accent-2: #1d5bb8;
  --accent-soft: #eaf1fb;
  --radius: 14px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* mobile fixed call bar 공간 확보 */
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(4px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-nav a {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.header-nav .nav-cases {
  color: var(--text);
  background: var(--bg-light);
}

.header-nav .nav-call {
  color: #fff;
  background: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-2); }

.btn-outline {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-block { width: 100%; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--accent-soft) 0%, #ffffff 100%);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero .container {
  text-align: center;
  position: relative;
  z-index: 1;
  animation: heroContentReveal 0.7s ease 0.4s both;
}

@keyframes heroContentReveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 미닫이문 열림 연출 */
.hero-doors {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  pointer-events: none;
}

.hero-door {
  flex: 1 1 50%;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-light) 100%);
}

.hero-door::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 46px;
  border-radius: 4px;
  background: var(--accent);
  opacity: 0.55;
  transform: translateY(-50%);
}

.hero-door-left {
  box-shadow: inset -1px 0 0 var(--border);
  animation: heroDoorLeft 1.05s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.hero-door-left::after { right: 18px; }

.hero-door-right {
  box-shadow: inset 1px 0 0 var(--border);
  animation: heroDoorRight 1.05s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.hero-door-right::after { left: 18px; }

@keyframes heroDoorLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes heroDoorRight {
  0% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-door { animation: none; display: none; }
  .hero .container, .cta-final .container { animation: none; opacity: 1; transform: none; }
}

/* CTA 섹션에서도 동일한 도어 오픈 연출 사용 (배경 톤에 맞게 색상만 재정의) */
.cta-final {
  position: relative;
  overflow: hidden;
}

.cta-final .container {
  position: relative;
  z-index: 1;
  animation: heroContentReveal 0.7s ease 0.4s both;
}

.cta-final .hero-door {
  background: linear-gradient(180deg, var(--accent) 0%, #0c2947 100%);
}

.cta-final .hero-door::after {
  background: #ffffff;
  opacity: 0.7;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: #ffffff;
  border: 1px solid var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 10px 0 24px;
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 17px;
  color: var(--text-sub);
  max-width: 640px;
  margin: 0 auto 8px;
}

.hero-region {
  font-weight: 700;
  color: var(--accent);
  margin-top: 14px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Section */
.section {
  padding: 56px 0;
}

.section-light {
  background: var(--bg-light);
}

.section-head {
  text-align: center;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--text-sub);
  font-size: 15px;
  margin: 0;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.card-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 마지막 줄이 정확히 채워지지 않을 때(예: 5장/3열) 가운데 정렬되도록 flex로 처리 */
.card-grid.cases-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.card-grid.cases-grid .card {
  flex: 0 1 calc((100% - 40px) / 3);
  max-width: calc((100% - 40px) / 3);
}

/* 시공서비스 카드는 텍스트를 가운데 정렬 */
.services-grid .card-body {
  align-items: center;
  text-align: center;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.card:hover, .card:hover {
  box-shadow: 0 8px 24px rgba(18,58,102,0.10);
  transform: translateY(-2px);
}

.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-soft);
}

.card-body {
  padding: 18px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.card-body p {
  font-size: 14px;
  color: var(--text-sub);
  margin: 0;
  flex: 1;
}

.card-link {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* Symptom / list grid */
.list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.list-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.list-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-card::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

a.list-card:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Door types */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tag {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
}

/* Process steps */
.process-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.process-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 14px;
  text-align: center;
}

.process-step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 10px;
}

.process-step p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* FAQ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 20px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "-"; }

.faq-item p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-sub);
}

/* Region */
.region-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.region-btn {
  background: #fff;
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.region-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Final CTA */
.cta-final {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 56px 0;
}

.cta-final h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

.cta-final .btn-primary {
  background: #fff;
  color: var(--accent);
}

.cta-final .btn-primary:hover {
  background: var(--accent-soft);
}

/* Footer */
.site-footer {
  background: #1a2230;
  color: #c9d0dc;
  padding: 44px 0 90px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.footer-info .footer-logo {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.footer-info p {
  margin: 2px 0;
  font-size: 13px;
  color: #a7b0bf;
}

.footer-sitemap-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.footer-sitemap-link::after {
  content: "\2192";
  font-size: 13px;
  color: #a7b0bf;
}

.footer-sitemap-link:hover { color: #cbd5e1; }

/* Fixed call controls */
.call-fixed {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 600;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(18,58,102,0.28);
  display: flex;
  align-items: center;
  gap: 8px;
}

.call-fixed:hover { background: var(--accent-2); }

.call-bar {
  display: none;
}

/* Mobile */
@media (max-width: 860px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cases-grid .card { flex-basis: calc((100% - 20px) / 2); max-width: calc((100% - 20px) / 2); }
  .list-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  body { padding-bottom: 78px; }
  .header-inner { padding: 12px 16px; }
  .logo { font-size: 17px; }
  .header-nav a { padding: 8px 11px; font-size: 13px; }
  .hero { padding: 40px 0 36px; }
  .hero h1 { font-size: 27px; }
  .hero p { font-size: 15px; }
  .section { padding: 40px 0; }
  .section-head h2 { font-size: 22px; }
  .card-grid, .card-grid.cols-5, .card-grid.cols-4 { grid-template-columns: 1fr; }
  .card-grid.cases-grid .card { flex-basis: 100%; max-width: 100%; }
  .list-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { flex-direction: column; gap: 26px; }

  .call-fixed { display: none; }

  .call-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 700;
    background: var(--accent);
    color: #fff;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    padding: 16px 0;
    box-shadow: 0 -6px 18px rgba(0,0,0,0.12);
  }
}
