/* =====================================================
   화이트빌드케어 | common.css (히어로 배경 이미지 통합)
   ===================================================== */

:root {
  --navy:        #06223b;
  --navy2:       #0e3558;
  --blue:        #2d6f9f;
  --blue-light:  #4a8fc0;
  --sky:         #e9f4fb;
  --gold:        #b78f65;

  --bg-body:     #f7fafc;
  --bg-white:    #ffffff;
  --bg-soft:     #f6f9fc;
  --bg-section:  #eef5fa;

  --text:        #102033;
  --text-mid:    #34495e;
  --muted:       #5e6d7c;
  --muted-light: #8a9ab5;

  --line:        #dce6ef;
  --line-light:  #eef1f6;
  --shadow-sm:   0 4px 16px rgba(6,34,59,0.06);
  --shadow-md:   0 8px 32px rgba(6,34,59,0.10);
  --shadow-lg:   0 18px 48px rgba(6,34,59,0.14);
  --shadow-xl:   0 24px 64px rgba(6,34,59,0.18);

  --max:         1120px;
  --header-h:    92px;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   20px;
  --radius-xl:   24px;

  --font: "Noto Sans KR","Malgun Gothic",Arial,sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text);
  line-height: 1.72;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: var(--font); }

/* ══════════ iframe 헤더/푸터 ══════════ */
.include-frame { display: block; width: 100%; border: 0; }

.include-frame--header {
  height: var(--header-h);
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 16px rgba(6,34,59,0.08);
  overflow: visible;
}

.include-frame--footer {
  height: 320px;
  background: transparent;
}

/* ══════════ 페이지 본문 ══════════ */
.page-main {
  padding-top: var(--header-h);
  background: linear-gradient(180deg,
    var(--bg-white) 0%,
    var(--bg-body)  55%,
    var(--bg-section) 100%
  );
  min-height: calc(100vh - var(--header-h));
}

.container { width: min(100% - 64px, var(--max)); margin: 0 auto; }

/* ══════════ 섹션 공통 ══════════ */
.section { padding: 80px 0; }

.section-title {
  text-align: center;
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 900;
  color: var(--navy);
  margin: 0 0 14px;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.section-title span { color: var(--blue); }

.section-subtitle {
  text-align: center;
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 48px;
  line-height: 1.75;
}

/* ══════════ 카드 시스템 ══════════ */
.card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

/* ══════════ 그리드 시스템 ══════════ */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5,1fr); gap: 20px; }
.grid-6 { display: grid; grid-template-columns: repeat(6,1fr); gap: 16px; }

/* ══════════ 버튼 시스템 ══════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 30px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 15px;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: linear-gradient(180deg, var(--navy2) 0%, var(--navy) 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(6,34,59,0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #1a3d60 0%, #0a2d4a 100%);
  box-shadow: 0 14px 36px rgba(6,34,59,0.35);
}

.btn-secondary {
  background: linear-gradient(180deg, #fff, #edf3f7);
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #f0f6fa, #e4eef5);
  border-color: #c0cdd9;
  box-shadow: var(--shadow-md);
}

.btn-large {
  height: 64px;
  padding: 0 44px;
  font-size: 18px;
  border-radius: 14px;
}

/* ══════════ 서비스 카드 ══════════ */
.service-card { overflow: hidden; cursor: pointer; }

.service-card-img-wrap {
  overflow: hidden;
  position: relative;
}

.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.service-card:hover .service-card-img { transform: scale(1.06); }

.service-card-badge {
  position: absolute;
  top: 14px; left: 14px;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: rgba(6,34,59,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  backdrop-filter: blur(4px);
}

.service-card-body {
  padding: 22px 24px 26px;
  text-align: center;
}

.service-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 8px;
}

.service-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

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

.service-card-link:hover {
  color: var(--navy);
  transform: translateX(3px);
}

/* ══════════ 플로팅 CTA ══════════ */
.floating-cta {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: #fff;
  padding: 16px 26px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 40px rgba(6,34,59,0.35);
  transition: all 0.3s ease;
  animation: float-pulse 2.5s infinite;
}

.floating-cta:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 18px 50px rgba(6,34,59,0.45);
  animation: none;
}

@keyframes float-pulse {
  0%,100% { box-shadow: 0 12px 40px rgba(6,34,59,0.35), 0 0 0 0 rgba(6,34,59,0.4); }
  50%      { box-shadow: 0 12px 40px rgba(6,34,59,0.35), 0 0 0 14px rgba(6,34,59,0); }
}

/* ══════════ 폼 스타일 ══════════ */
.form-control {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: all 0.2s;
  outline: none;
  width: 100%;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45,111,159,0.10);
}

.form-control::placeholder { color: #a8b5c2; }

/* ══════════════════════════════════════════
   페이지 히어로 배경 이미지 시스템 (핵심)
══════════════════════════════════════════ */

/* 기본 히어로 구조 */
.page-hero,
.premium-hero {
  background: linear-gradient(135deg,
    var(--navy)  0%,
    var(--navy2) 50%,
    #1a4a78      100%
  ) !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 330px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
}

/* 1층: 배경 이미지 레이어 */
.page-hero::before,
.premium-hero::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  
  /* CSS 변수로 각 페이지별 이미지 받아옴 */
  background-image: var(--hero-bg, none) !important;
  
  /* 핵심 수정: mix-blend-mode 주석처리 + opacity 조정 */
  opacity: 0.45 !important;
  /* mix-blend-mode: luminosity !important; ← 이 라인 주석처리 */
  
  pointer-events: none !important;
  z-index: 0 !important;
}.page-hero::before,
.premium-hero::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  
  /* CSS 변수로 각 페이지별 이미지 받아옴 */
  background-image: var(--hero-bg, none) !important;
  
  /* 핵심 수정: mix-blend-mode 주석처리 + opacity 조정 */
  opacity: 0.45 !important;
  /* mix-blend-mode: luminosity !important; ← 이 라인 주석처리 */
  
  pointer-events: none !important;
  z-index: 0 !important;
}
/* 2층: 브랜드 그라디언트 오버레이 (텍스트 가독성) */
.page-hero::after,
.premium-hero::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(135deg,
    rgba(6,34,59,0.78)   0%,
    rgba(26,53,88,0.58)  50%,
    rgba(30,95,168,0.35) 100%
  ) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* 히어로 내부 컨테이너 */
.page-hero-inner,
.premium-hero-inner {
  position: relative !important;
  z-index: 2 !important;
  width: min(100% - 48px, 1122px) !important;
  margin: 0 auto !important;
  padding: 56px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 32px !important;
}

/* 프리미엄 페이지 중앙 정렬 */
.premium-hero .premium-hero-inner {
  justify-content: center !important;
  text-align: center !important;
  flex-direction: column !important;
}

/* 히어로 텍스트 영역 */
.page-hero-text { flex: 1 !important; }

/* 브레드크럼 */
.page-breadcrumb {
  font-size: 13px !important;
  color: rgba(255,255,255,0.60) !important;
  margin-bottom: 16px !important;
}

.page-breadcrumb a {
  color: rgba(255,255,255,0.60) !important;
  transition: color 0.2s !important;
}

.page-breadcrumb a:hover {
  color: rgba(255,255,255,0.90) !important;
}

.page-breadcrumb span {
  color: rgba(255,255,255,0.90) !important;
}

/* 히어로 제목 */
.page-hero-title,
.premium-hero h1 {
  font-size: clamp(28px, 4vw, 44px) !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  line-height: 1.25 !important;
  margin: 0 0 14px !important;
  letter-spacing: -0.03em !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.30) !important;
}

/* 히어로 설명 */
.page-hero-desc,
.premium-hero p {
  font-size: 15px !important;
  color: rgba(255,255,255,0.85) !important;
  line-height: 1.8 !important;
  margin: 0 !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.20) !important;
}

/* 히어로 이미지 (services.html) */
.page-hero-img {
  width: 280px !important;
  height: 200px !important;
  object-fit: cover !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.40) !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 2 !important;
}

/* 작업사례 실적 뱃지 */
.hero-stats {
  display: flex !important;
  justify-content: center !important;
  gap: 24px !important;
  flex-wrap: wrap !important;
  margin-top: 24px !important;
}

.hero-stat {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.20) !important;
  border-radius: 50px !important;
  padding: 10px 20px !important;
  backdrop-filter: blur(8px) !important;
}

.hero-stat-text strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.hero-stat-text span {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

/* ══════════ 반응형 ══════════ */
@media (max-width: 900px) {
  :root { --header-h: 72px; }

  .container { width: min(100% - 32px, var(--max)); }
  
  .include-frame--header {
    height: 72px;
    overflow: visible;
  }
  
  .include-frame--footer { height: 520px; }

  .section { padding: 60px 0; }

  .grid-6, .grid-5, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }

  .floating-cta {
    bottom: 20px; right: 20px;
    padding: 13px 20px;
    font-size: 14px;
  }

  /* 히어로 반응형 */
  .page-hero,
  .premium-hero {
    min-height: 280px !important;
  }

  .page-hero-inner,
  .premium-hero-inner {
    padding: 48px 0 !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .page-hero-img { display: none !important; }

  .hero-stats {
    flex-direction: column !important;
    gap: 12px !important;
  }
}

@media (max-width: 600px) {
  .include-frame--footer { height: 680px; }

  .grid-4 { grid-template-columns: 1fr; }
  .btn-large { height: 56px; padding: 0 32px; font-size: 16px; }

  .page-hero,
  .premium-hero {
    min-height: 260px !important;
  }

  .page-hero-inner,
  .premium-hero-inner {
    padding: 40px 0 !important;
  }

  .page-hero-title,
  .premium-hero h1 {
    font-size: clamp(24px, 6vw, 32px) !important;
  }

  .hero-stats {
    flex-direction: column !important;
    gap: 10px !important;
  }
}
