/* =============================================
   제로제이분양 — 공통 스타일 (모바일 우선)
   ============================================= */

/* 변수 */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-bg: #f0f2f5;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-error: #ef4444;
  --color-success: #22c55e;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --desktop-bp: 900px;
  --form-col-width: 400px;
  --transition: 0.2s ease;
}

/* 리셋 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'Apple SD Gothic Neo', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 15px;
}

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

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

/* =============================================
   반응형 유틸
   ============================================= */
.mobile-only  { display: block; }
.desktop-only { display: none; }

/* =============================================
   모바일 전용 상단 헤더
   ============================================= */
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.mobile-header-inner {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  gap: 10px;
}

.mobile-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.mobile-header-apt {
  font-size: clamp(13px, 4vw, 15px);
  font-weight: 700;
  color: var(--color-text);
  /* 작은 화면에서 단지명 길면 두 줄까지 자연스럽게 */
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}

.mobile-header-phone {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(13px, 4vw, 15px);
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.mobile-header-phone-icon {
  font-size: 14px;
}

/* =============================================
   데스크탑 상단 헤더 (모바일 숨김)
   ============================================= */
.desktop-header {
  display: none;
}

/* =============================================
   레이아웃 — 모바일: 단일 컬럼
   ============================================= */
.layout-wrap {
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-surface);
  min-height: 100vh;
  padding-bottom: 68px; /* CTA 바 높이와 동일 */
}

.gallery-col,
.form-col {
  width: 100%;
}

/* =============================================
   담당자 명함 섹션 (실제 명함 스타일 — 네이비 테두리 + 와인색 안내)
   ============================================= */
.card-section {
  background: var(--color-bg);
  padding: 20px 16px;
  border-bottom: 1px solid var(--color-border);
}

.card-inner {
  background: #fff;
  border: 3px solid #1a1a3e;
  border-radius: 8px;
  padding: 12px 16px 10px;
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 0;
  border-bottom: 2px solid #eef0f5;
}

.card-apt-name {
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 800;
  color: #1a1a3e;
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 0;
  word-break: keep-all;
  line-height: 1.2;
}

#mobile-logo-wrap img,
#desktop-logo-wrap img {
  height: 44px;
  max-width: 150px;
  width: auto;
  object-fit: contain;
  display: block;
}

#desktop-logo-wrap img {
  height: 52px;
  max-width: 180px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 2px 0 0;
}

.card-manager-name {
  font-size: clamp(22px, 7vw, 30px);
  font-weight: 800;
  color: var(--color-text);
  display: flex;
  align-items: baseline;
  gap: 10px;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.card-manager-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.02em;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 4px;
  align-self: center;
  flex-shrink: 0;
}

.card-phone-link {
  display: inline-flex;
  align-items: center;
  font-size: clamp(24px, 8.4vw, 34px);
  font-weight: 800;
  color: #c81e1e;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-family: 'Pretendard', sans-serif;
  line-height: 1.1;
  transition: opacity var(--transition);
}

.card-phone-link:hover,
.card-phone-link:active {
  opacity: 0.85;
}

.card-address {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 2px solid #eef0f5;
  font-size: 12.5px;
  color: #4b5563;
  line-height: 1.35;
}

.card-address-label {
  flex-shrink: 0;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.card-address-text {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.card-notice {
  margin-top: 14px;
  background: linear-gradient(135deg, #8b1538 0%, #6b1028 100%);
  color: #fff;
  text-align: center;
  padding: 18px 20px;
  border-radius: 8px;
  font-size: clamp(15px, 4.4vw, 18px);
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 10px rgba(139, 21, 56, 0.25);
}

/* =============================================
   동영상 섹션 (명함과 이미지 갤러리 사이)
   ============================================= */
.video-section {
  width: 100%;
  background: #000;
  border-bottom: 1px solid var(--color-border);
}

.video-hint {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #dc2626 100%);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  animation: video-hint-pulse 1.6s ease-in-out infinite;
  transition: opacity 0.4s ease, max-height 0.4s ease, padding 0.4s ease;
}

.video-hint.hidden {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

@keyframes video-hint-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  display: flex;
  justify-content: center;
}

.property-video {
  display: block;
  width: 100%;
  max-height: 75vh;
  margin: 0 auto;
  background: #000;
  outline: none;
}

/* 비디오 클릭 토글 영역 — 상단만 덮어 하단 native controls (재생바/볼륨/전체화면) 자유 사용 */
.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 56px; /* 하단 56px는 native controls 영역으로 비움 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.25s ease;
}

.video-section.paused .video-play-overlay {
  background: rgba(0, 0, 0, 0.25);
}

.video-section.paused .video-play-overlay:hover {
  background: rgba(0, 0, 0, 0.35);
}

.video-play-icon {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  padding-left: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.video-section.paused .video-play-icon {
  opacity: 1;
  transform: scale(1);
  animation: video-play-pulse 1.8s ease-in-out infinite;
}

.video-section.playing .video-play-icon {
  opacity: 0;
  transform: scale(0.6);
  animation: none;
  pointer-events: none;
}

@keyframes video-play-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(255, 255, 255, 0); }
  50%      { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 0 14px rgba(255, 255, 255, 0.15); }
}

@media (min-width: 900px) {
  .video-section {
    border-bottom: 2px solid var(--color-bg);
  }
  .property-video {
    max-height: calc(100vh - 64px);
  }
}

/* =============================================
   이미지 갤러리 섹션 — 스크롤시 부드럽게 떠오르는 페이드 인 효과
   ============================================= */
.gallery-section {
  padding: 0;
}

.gallery-section img {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--color-border);
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(36px) scale(0.985);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.gallery-section img.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-section img:last-child {
  border-bottom: none;
}

/* 모션을 줄이고 싶은 사용자(접근성) */
@media (prefers-reduced-motion: reduce) {
  .gallery-section img {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =============================================
   예약 폼 섹션
   ============================================= */
.form-section {
  padding: 32px 20px 40px;
  background: var(--color-surface);
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #111827;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 24px;
  line-height: 1.55;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.form-label .required {
  color: var(--color-error);
  margin-left: 2px;
  font-weight: 800;
}

.form-input,
.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-input.error,
.form-select.error {
  border-color: var(--color-error);
}

.form-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* ─────────────────────────────────────────
   날짜 입력 placeholder 트릭 (iOS Safari 호환)
   - input[type="date"]는 placeholder 미지원
   - 빈 값일 때만 가짜 placeholder 표시
───────────────────────────────────────── */
.date-wrap {
  position: relative;
}
.date-wrap .date-input {
  width: 100%;
}
.date-wrap .date-placeholder {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
  display: none;
}
.date-wrap[data-empty="true"] .date-placeholder {
  display: block;
}
/* iOS Safari: 빈 값일 때 native "yyyy. mm. dd." 회색 텍스트 숨김 */
.date-wrap[data-empty="true"] .date-input::-webkit-datetime-edit {
  color: transparent;
}
.date-wrap[data-empty="true"] .date-input:focus::-webkit-datetime-edit {
  color: inherit;
}
.date-wrap[data-empty="true"] .date-input:focus + .date-placeholder {
  display: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-error {
  display: none;
  font-size: 12px;
  color: var(--color-error);
  margin-top: 5px;
}

.form-error.visible {
  display: block;
}

.privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0 8px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
}

.privacy-notice-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.privacy-notice-body {
  font-size: 14.5px;
  font-weight: 600;
  color: #1e3a8a;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.privacy-notice-body strong {
  color: var(--color-primary-dark);
  font-weight: 800;
}

.privacy-notice-sub {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  letter-spacing: 0;
}

.btn-submit {
  width: 100%;
  padding: 18px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: clamp(16px, 4.6vw, 19px);
  font-weight: 800;
  cursor: pointer;
  margin-top: 20px;
  letter-spacing: 0.04em;
  transition: background var(--transition), transform var(--transition);
  font-family: inherit;
}

.btn-submit:hover {
  background: var(--color-primary-dark);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* =============================================
   하단 고정 CTA 바 (모바일 전용)
   ============================================= */
.cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

.cta-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  text-decoration: none;
  transition: filter var(--transition);
}

.cta-btn:active {
  filter: brightness(0.9);
}

.cta-btn {
  position: relative;
  overflow: hidden;
}

.cta-phone-btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: clamp(19px, 5.4vw, 23px);
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.cta-reserve-btn {
  background: linear-gradient(135deg, #d99528 0%, #b87016 100%);
  color: #fff;
  font-size: clamp(18px, 5vw, 21px);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cta-btn-icon {
  font-size: 22px;
  line-height: 1;
}

/* 빛 줄기가 좌→우로 부드럽게 흐르는 강조 효과 (shimmer) */
.cta-phone-btn::after,
.cta-reserve-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.38) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: cta-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

.cta-reserve-btn::after {
  animation-delay: 1.5s;
}

@keyframes cta-shimmer {
  0%        { left: -75%; }
  60%, 100% { left: 125%; }
}

@keyframes pulse-fab {
  0%, 100% { box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45), 0 0 0 0 rgba(239, 68, 68, 0); }
  50%      { box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5),  0 0 0 12px rgba(239, 68, 68, 0.15); }
}

@media (prefers-reduced-motion: reduce) {
  .cta-phone-btn, .cta-reserve-btn, .fab-main { animation: none !important; }
}

/* =============================================
   FAB (모바일 전용)
   ============================================= */
.fab-wrap {
  position: fixed;
  right: 16px;
  bottom: 72px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.fab-main {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f87171 0%, #ef4444 55%, #dc2626 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  animation: pulse-fab 2.4s ease-in-out infinite;
}

.fab-main:active {
  transform: scale(0.93);
}

.fab-main-line {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.28s ease, opacity 0.2s ease;
}

.fab-wrap.open .fab-menu {
  max-height: 220px;
  opacity: 1;
  pointer-events: auto;
}

.fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #1a1a2e;
  border: none;
  border-radius: 28px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition);
}

.fab-item:active {
  background: #2d2d44;
}

.fab-top {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  font-size: 16px;
  line-height: 1;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease;
  margin-bottom: 4px;
}

.fab-top:active {
  transform: scale(0.92);
}

.fab-item-icon {
  font-size: 18px;
  line-height: 1;
}

.fab-item-label {
  font-size: 13px;
}

/* =============================================
   이미지 확대 라이트박스
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lightbox-fade-in 0.2s ease-out;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: lightbox-zoom-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  border-radius: 8px;
  font-size: 32px;
  line-height: 1;
  font-weight: 300;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:active,
.lightbox-next:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lightbox-zoom-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* 모바일에서는 좌우 버튼 작게 */
@media (max-width: 600px) {
  .lightbox-prev, .lightbox-next {
    width: 40px;
    height: 56px;
    font-size: 28px;
  }
  .lightbox-counter { font-size: 12px; }
}

/* =============================================
   모바일 진입 팝업 (프리미엄 이미지)
   ============================================= */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  animation: popup-fade-in 0.25s ease-out;
}

.popup-content {
  position: relative;
  background: #fff;
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: popup-scale-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.popup-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(90vh - 56px);
  object-fit: contain;
  background: #000;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.popup-close:hover {
  background: rgba(0, 0, 0, 0.75);
}

.popup-dismiss {
  background: var(--color-text);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}

.popup-dismiss:hover { background: #2d2d44; }

@keyframes popup-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popup-scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* =============================================
   토스트 알림
   ============================================= */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a2e;
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 200;
  max-width: 340px;
  text-align: center;
  white-space: normal;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { background: var(--color-success); }
.toast.error   { background: var(--color-error); }

/* =============================================
   로딩 스피너
   ============================================= */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================
   데스크탑 레이아웃 (900px 이상)
   ============================================= */
@media (min-width: 900px) {

  /* 유틸 전환 */
  .mobile-only  { display: none !important; }
  .desktop-only { display: block; }

  /* 상단 헤더 */
  .desktop-header {
    display: block;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  }

  .desktop-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .desktop-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .desktop-apt-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
  }

  .desktop-header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.03em;
    transition: opacity var(--transition);
  }

  .desktop-header-phone:hover {
    opacity: 0.8;
  }

  .desktop-phone-icon {
    font-size: 18px;
  }

  /* 2단 레이아웃 */
  .layout-wrap {
    max-width: 1200px;
    display: flex;
    align-items: flex-start;
    padding-bottom: 0;
    min-height: calc(100vh - 64px);
    background: transparent;
  }

  /* 왼쪽: 이미지 갤러리 */
  .gallery-col {
    flex: 1;
    min-width: 0;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
  }

  .gallery-section img {
    border-bottom: 2px solid var(--color-bg);
  }

  /* 데스크탑에서 FAB은 form-col 왼쪽에 위치 */
  .fab-wrap {
    right: max(
      calc(var(--form-col-width) + 24px),
      calc(50vw - 600px + var(--form-col-width) + 24px)
    );
    bottom: 32px;
  }

  /* 오른쪽: 명함 + 폼 (sticky) */
  .form-col {
    width: var(--form-col-width);
    flex-shrink: 0;
    position: sticky;
    top: 64px;                        /* 헤더 높이만큼 */
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--color-surface);
    scrollbar-width: thin;
  }

  .form-col::-webkit-scrollbar {
    width: 4px;
  }
  .form-col::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
  }

  /* 사이드 명함 */
  .form-col .card-section {
    border-bottom: 1px solid var(--color-border);
  }

  /* 폼 패딩 조정 */
  .form-section {
    padding: 28px 24px 40px;
  }
}

/* =============================================
   메인 홍보 페이지 (index.html) 전용
   ============================================= */
.page-wrap {
  background: var(--color-bg);
  min-height: 100vh;
}

/* ── 히어로 ── */
.main-hero {
  background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 50%, #2563eb 100%);
  color: #fff;
  padding: 28px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.main-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.18), transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(251,191,36,0.18), transparent 45%);
}

.main-hero > * { position: relative; z-index: 1; }

.main-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.main-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-login-btn {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.admin-login-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.main-hero h1 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-accent {
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 15px;
  opacity: 0.92;
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #1e3a8a;
  padding: 15px 32px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.btn-hero-icon {
  font-size: 16px;
}

.btn-hero-secondary {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  transition: color 0.15s, background 0.15s;
}

.btn-hero-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ── 공통 섹션 ── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 8px;
}

.section-headline {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  color: var(--color-text);
}

/* ── 특징 ── */
.main-features {
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 20px 32px;
}

.features-grid {
  display: grid;
  gap: 14px;
}

.feature-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 24px 22px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.04);
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 12px;
  font-size: 22px;
  margin-bottom: 14px;
}

.feature-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── 프로세스 ── */
.main-process {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px;
}

.process-list {
  display: grid;
  gap: 12px;
}

.process-step {
  background: #fff;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.process-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.process-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.process-desc {
  font-size: 12.5px;
  color: var(--color-text-muted);
}

/* ── 신뢰 ── */
.main-trust {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 20px 24px;
}

.trust-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.trust-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.trust-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 6px;
}

.trust-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── 연락처 ── */
.main-contact {
  text-align: center;
  padding: 40px 20px 32px;
  background: linear-gradient(180deg, transparent 0%, #fff 100%);
}

.contact-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.contact-phone {
  display: inline-block;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--color-primary-dark);
  text-decoration: none;
  margin-bottom: 10px;
  transition: opacity 0.15s;
}

.contact-phone:hover {
  opacity: 0.85;
}

.contact-sub {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ── 푸터 ── */
.main-footer {
  text-align: center;
  padding: 24px 20px 32px;
  border-top: 1px solid var(--color-border);
  background: #fff;
}

.main-footer p {
  font-size: 12px;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .main-hero { padding: 36px 24px 96px; }
  .main-hero h1 { font-size: 44px; }
  .hero-sub { font-size: 17px; }
  .hero-cta { flex-direction: row; gap: 18px; }
  .section-headline { font-size: 28px; margin-bottom: 36px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .process-list { grid-template-columns: repeat(4, 1fr); }
  .process-step { flex-direction: column; text-align: center; padding: 24px 18px; align-items: center; }
  .contact-phone { font-size: 48px; }
}

@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(4, 1fr); }
}
