/* ==========================================================================
   집수리집사 - 공통 스타일시트
   ========================================================================== */

:root {
  --navy: #0f2a47;
  --navy-light: #1e4066;
  --navy-soft: #eef3f8;
  --blue: #2563eb;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --white: #ffffff;
  --ink: #0b1a2e;
  --ink-soft: rgba(255, 255, 255, 0.72);
  --gray-900: #1a1f29;
  --gray-700: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f8f9fb;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(15, 42, 71, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 42, 71, 0.1);
  --shadow-lg: 0 20px 48px rgba(15, 42, 71, 0.16);
  --max-width: 1160px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Malgun Gothic", "맑은 고딕", sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

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

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-bottom: 14px;
}

.section {
  padding: 88px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.35;
}

.section-head p {
  color: var(--gray-500);
  font-size: 16px;
}

.section-alt {
  background: var(--gray-50);
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--navy-light);
  box-shadow: var(--shadow-md);
}

.btn-cta {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
}

.btn-cta:hover {
  background: var(--orange-dark);
}

.btn-outline {
  background: var(--white);
  color: var(--navy);
  border-color: var(--gray-200);
}

.btn-outline:hover {
  border-color: var(--navy);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-text .brand-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}

.brand-text .brand-tag {
  font-size: 12px;
  color: var(--ink-soft);
}

.main-nav {
  display: flex;
  gap: 30px;
}

.main-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--orange);
}

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

.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--white);
  font-size: 16px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--white);
  cursor: pointer;
}

/* ---------- 네비게이션 드롭다운 (시공 지역) ---------- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 0;
  cursor: pointer;
}

.nav-dropdown-toggle .caret {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--orange);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  display: flex;
  flex-direction: column;
  min-width: 150px;
  padding: 10px;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.nav-dropdown-menu a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.nav-dropdown-menu a.nav-dropdown-all {
  color: var(--orange);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 6px;
  padding-top: 12px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 히어로 (메인) ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 70px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 26, 46, 0.7) 0%, rgba(11, 26, 46, 0.88) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--orange);
}

.hero p {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 auto 32px;
  max-width: 480px;
}

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

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.hero-badge b {
  display: block;
  font-size: 17px;
  color: var(--white);
  font-weight: 800;
}

.hero-badge span {
  font-size: 13px;
  color: var(--ink-soft);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  font-size: 16px;
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ---------- 페이지 히어로 (서브페이지) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 64px 0 56px;
}

.breadcrumb {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
  color: var(--white);
}

.page-hero h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 800;
  margin-bottom: 16px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  max-width: 560px;
  margin-bottom: 28px;
}

.page-hero .hero-actions {
  margin-bottom: 0;
}

/* ---------- 서비스 카드 그리드 ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--navy-soft);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.service-card h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 14.5px;
  color: var(--gray-500);
  margin-bottom: 18px;
  min-height: 66px;
}

.service-card .card-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- 시공범위 리스트 ---------- */
.scope-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.scope-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--gray-700);
  font-weight: 600;
}

.scope-list li::before {
  content: "✓";
  color: var(--orange);
  font-weight: 900;
  flex-shrink: 0;
}

/* ---------- 갤러리 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  position: relative;
  background: var(--gray-100);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-more {
  text-align: center;
  margin-top: 36px;
}

/* ---------- 프로세스 ---------- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding: 30px 22px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.process-step .step-num {
  font-size: 34px;
  font-weight: 900;
  color: var(--navy-soft);
  -webkit-text-stroke: 1.5px var(--navy);
  margin-bottom: 14px;
}

.process-step h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.process-step p {
  font-size: 13.5px;
  color: var(--gray-500);
}

/* ---------- 신뢰 요소 ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.trust-item .trust-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--navy);
}

.trust-item .trust-num span {
  color: var(--orange);
}

.trust-item p {
  color: var(--gray-500);
  font-size: 14px;
  margin-top: 6px;
}

/* ---------- CTA 배너 ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.cta-banner h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  margin-bottom: 8px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.cta-banner .cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 푸터 ---------- */
.site-footer {
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .brand-name {
  color: var(--white);
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
}

.footer-col h5 {
  color: var(--white);
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-col li {
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 플로팅 문의 버튼 ---------- */
.floating-cta {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floating-cta a {
  height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.floating-cta .fc-call {
  background: var(--orange);
}

.floating-cta .fc-chat {
  background: var(--navy);
}

/* ---------- 라이트박스 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 30px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 26px;
  right: 30px;
  color: var(--white);
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
}

/* ---------- 반응형 ---------- */
@media (max-width: 960px) {
  .hero {
    min-height: 520px;
    padding: 100px 0 60px;
  }

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

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

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

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    opacity: 0;
    transition: all 0.25s ease;
    pointer-events: none;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: block;
  }

  .header-phone span {
    display: none;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    width: 100%;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    box-shadow: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: flex;
  }

  .section {
    padding: 60px 0;
  }

  .services-grid,
  .scope-list,
  .gallery-grid,
  .process-steps,
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-banner {
    padding: 36px 26px;
    flex-direction: column;
    text-align: center;
  }

  .cta-banner .cta-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .services-grid,
  .scope-list,
  .gallery-grid,
  .process-steps,
  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .floating-cta a {
    width: 52px;
    padding: 0;
  }

  .floating-cta a span {
    display: none;
  }
}
