/* =========================================================
   TOP 부천 - Layout CSS
   헤더, 하단 네비, 컨테이너, 사이드 메뉴
   ========================================================= */

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 100%; /* 모바일에서 가로 풀폭 사용 */
  margin: 0 auto;
  padding: 0 12px; /* 좌우 패딩 축소 (16px → 12px) */
  position: relative;
}

.container-wide {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 90;
  background: rgba(10, 8, 6, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  opacity: 0.4;
}

.header-inner {
  max-width: 100%;
  margin: 0 auto;
  height: 100%;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: var(--space-sm);
}

.header-icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease);
}

.header-icon-btn:hover { background: rgba(212, 175, 55, 0.08); }
.header-icon-btn svg { width: 22px; height: 22px; }

/* 로고 */
.site-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
}

.site-logo .logo-main {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  padding-top: 6px;
}

.site-logo .logo-main::before {
  content: '👑';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  -webkit-text-fill-color: initial;
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

.site-logo .logo-sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0;
  align-self: flex-end;
  padding-bottom: 2px;
}

/* ---------- Side Menu (햄버거 메뉴) ---------- */
.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-gold);
  transform: translateX(-100%);
  transition: transform var(--dur-slow) var(--ease);
  z-index: 110;
  overflow-y: auto;
  padding: var(--space-xl) var(--space-lg);
}

.side-menu.is-open { transform: translateX(0); }

.side-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease);
  z-index: 100;
}

.side-menu-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-lg);
}

.side-menu-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-md);
}

.side-menu-close:hover { color: var(--gold); background: rgba(212, 175, 55, 0.08); }

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.side-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-sm);
  font-size: 0.95rem;
  color: var(--text-body);
  border-radius: var(--radius-md);
  transition: all var(--dur-fast) var(--ease);
  border-left: 2px solid transparent;
}

.side-nav a:hover {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
  border-left-color: var(--gold);
  padding-left: var(--space-md);
}

.side-nav a.is-active {
  color: var(--gold);
  border-left-color: var(--gold);
  padding-left: var(--space-md);
  background: rgba(212, 175, 55, 0.05);
}

.side-nav .arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.side-menu-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.side-menu-footer .address {
  color: var(--text-body);
  margin-bottom: var(--space-xs);
}

/* ---------- Bottom Fixed Nav (전화 + 카톡) ---------- */
/* ==========================================================
   [v3.1] Floating Contact - 우측 세로 플로팅 (전화/카톡)
   알약(pill) 형태로 SVG + 텍스트 깔끔하게
   ========================================================== */
.bottom-nav {
  position: fixed !important;
  right: 16px !important;
  bottom: 24px !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

.bottom-nav::before { display: none !important; }

.bottom-nav a {
  pointer-events: auto;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 18px 12px 14px;
  min-width: 110px;
  height: 48px;
  border-radius: 28px;
  text-decoration: none;
  position: relative;
  border: 1.5px solid;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
  white-space: nowrap;
}

/* 전화 = 화이트 (깔끔한 대비) */
.bottom-nav a:nth-child(1) {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 50%, #e8e8e8 100%);
  color: #1a130d;
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 -1px 0 rgba(0, 0, 0, 0.1) inset,
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.3);
  text-shadow: none;
}

.bottom-nav a:nth-child(1):hover {
  transform: translateY(-2px) translateX(-4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 0 rgba(0, 0, 0, 0.15) inset,
    0 10px 28px rgba(212, 175, 55, 0.4),
    0 3px 8px rgba(0, 0, 0, 0.4);
  border-color: var(--gold);
}

/* 카톡 = 옐로우 골드 */
.bottom-nav a:nth-child(2) {
  background: linear-gradient(135deg, #fbbf24 0%, #fcd34d 50%, #f59e0b 100%);
  color: #3b1f00;
  border-color: rgba(254, 240, 138, 0.6);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -1px 0 rgba(0, 0, 0, 0.15) inset,
    0 6px 20px rgba(245, 158, 11, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.bottom-nav a:nth-child(2):hover {
  transform: translateY(-2px) translateX(-4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset,
    0 10px 28px rgba(245, 158, 11, 0.6),
    0 3px 8px rgba(0, 0, 0, 0.35);
}

/* 펄스 링 — 호출 효과 */
.bottom-nav a::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid currentColor;
  opacity: 0;
  animation: floating-pulse 2.5s var(--ease) infinite;
  pointer-events: none;
}

.bottom-nav a:nth-child(2)::before {
  animation-delay: 1.25s;
}

@keyframes floating-pulse {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }
  80%, 100% {
    opacity: 0;
    transform: scale(1.15);
  }
}

/* 아이콘 동그라미 안에 */
.bottom-nav a svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

/* 텍스트 라벨 */
.bottom-nav a span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  font-family: 'Noto Sans KR', sans-serif;
}

/* 카톡 텍스트 */
.bottom-nav a:nth-child(2) span {
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* PC — 더 크고 시원하게 */
@media (min-width: 768px) {
  .bottom-nav {
    right: 24px !important;
    bottom: 32px !important;
    gap: 12px !important;
  }

  .bottom-nav a {
    min-width: 130px;
    height: 54px;
    padding: 14px 22px 14px 18px;
    border-radius: 30px;
    gap: 10px;
  }

  .bottom-nav a svg {
    width: 24px;
    height: 24px;
  }

  .bottom-nav a span {
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  .bottom-nav {
    right: 32px !important;
  }
}

/* ---------- Page Hero (공통) ---------- */
.page-hero {
  position: relative;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top, rgba(212, 175, 55, 0.12), transparent 60%),
    var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(212, 175, 55, 0.015) 2px, rgba(212, 175, 55, 0.015) 4px);
  pointer-events: none;
}

.page-hero .eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

.page-hero h1 {
  font-size: 1.75rem;
  line-height: 1.35;
  margin-bottom: var(--space-sm);
  position: relative;
}

.page-hero .page-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.page-hero .ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-md) auto 0;
  width: 120px;
  color: var(--gold);
  opacity: 0.7;
}

.page-hero .ornament::before,
.page-hero .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.page-hero .ornament::after {
  background: linear-gradient(90deg, currentColor, transparent);
}

.page-hero .ornament .mark {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
}

/* ---------- Main Content Spacing ---------- */
main { padding-bottom: var(--space-2xl); }

.section {
  padding: var(--space-xl) 0;
}

.section-title {
  font-size: 1.35rem;
  margin-bottom: var(--space-md);
}

/* ---------- Responsive: PC ---------- */
@media (min-width: 768px) {
  body {
    /* PC에서는 하단 고정 네비를 헤더 우측에 띄우는 방식으로 변경 */
    padding-bottom: 0;
  }

  .container { max-width: 720px; padding: 0 16px; }
  .header-inner { max-width: 720px; padding: 0 16px; }

  .site-header { height: 72px; }
  .site-logo { font-size: 1.75rem; }

  .page-hero { padding: var(--space-3xl) var(--space-md) var(--space-2xl); }
  .page-hero h1 { font-size: 2.5rem; }
}

@media (min-width: 1024px) {
  .container { max-width: 960px; }
  .header-inner { max-width: 960px; }
}

@media (min-width: 1280px) {
  .container { max-width: 1120px; }
  .header-inner { max-width: 1120px; }
  .page-hero h1 { font-size: 3rem; }
}

/* 사이드 메뉴 구분선 */
.side-nav-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
  margin: var(--space-md) 0;
  opacity: 0.6;
}

/* =========================================================
   [v4] 헤더 직후 공백 압축
   ========================================================= */
.site-header + main,
main {
  padding-top: 0; /* 헤더 바로 아래 공백 제거 */
}

/* page-hero 도 압축 (서브 페이지) */
.page-hero {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .page-hero {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-lg);
  }
}

/* main 컨테이너 첫 자식 (front-page.php 의 .main-hero) — 마진 0 */
main > section:first-child,
main > .main-hero:first-child {
  margin-top: 0;
}

/* =========================================================
   [v6] 모바일 가로폭 최적화
   ========================================================= */

/* 모바일 (768px 미만) */
@media (max-width: 767px) {
  /* 컨테이너 — 좌우 패딩 최소화 */
  .container {
    padding: 0 10px;
  }

  /* 카드/섹션 좌우 마진 제거 — 가로 끝까지 */
  .home-booking-card,
  .live-status-card,
  .featured-event,
  .home-event-card,
  .member-cta-card,
  .about-quick-card,
  .profile-gate {
    margin-left: 0;
    margin-right: 0;
  }

  /* 카드 내부 패딩 적정화 */
  .home-booking-card,
  .live-status-card,
  .featured-event,
  .home-event-card {
    padding: 16px 14px;
  }

  /* 페이지 히어로 좌우 패딩 축소 */
  .page-hero {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* 룸 그리드 — 모바일에서 4열 유지하면서 간격 줄임 */
  .home-room-grid {
    gap: 6px;
  }

  /* 폼 row — 모바일에서 한 줄 한 필드 */
  .home-form-row {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* 빠른 메뉴 그리드 — 가로 2열 유지하지만 간격 좁힘 */
  .quick-grid {
    gap: 8px;
  }

  /* 메인 features 카드 — 가로 풀폭 */
  .main-features-grid {
    grid-template-columns: 1fr;
  }

  /* 컨택트 카드 — 모바일 가로 풀폭 2분할 유지하되 간격 좁힘 */
  .contact-quick-grid {
    gap: 8px;
  }

  /* 시설 사진 그리드 — 간격 최소 */
  .facility-grid {
    gap: 4px;
  }

  /* 후기/공지 리스트 — 좌우 마진 제거 */
  .notice-list,
  .review-list {
    margin-left: 0;
    margin-right: 0;
  }

  .notice-item,
  .review-card {
    padding: 12px 14px;
  }

  /* 페이지 히어로 텍스트 적정화 */
  .page-hero h1 {
    font-size: 1.7rem;
    line-height: 1.3;
  }

  .page-hero .page-sub {
    font-size: 0.85rem;
  }

  /* section-label 좌우 마진 정리 */
  .section-label {
    margin-left: 0;
  }

  /* 이미지가 들어가는 카드들 — 가로 끝까지 사용 */
  .home-room-card,
  .profile-card {
    margin-left: 0;
    margin-right: 0;
  }

  /* divider-gold 좌우 마진 제거 */
  .divider-gold {
    margin-left: 0;
    margin-right: 0;
  }

  /* 모달 dialog — 모바일에서 화면 가득 */
  .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .modal-content {
    padding: 18px 16px !important;
  }
}

/* 작은 모바일 (375px 미만 — iPhone SE 등) */
@media (max-width: 374px) {
  .container {
    padding: 0 8px;
  }

  .home-booking-card,
  .featured-event,
  .home-event-card {
    padding: 14px 12px;
  }
}

/* =========================================================
   [v6] 사이드 메뉴 / 헤더 가독성 강화
   ========================================================= */

/* 사이드 메뉴 텍스트 가독성 */
.side-nav a {
  color: #ffffff !important;
  font-weight: 600 !important;
}

.side-nav a:hover {
  color: var(--gold-light) !important;
}

.side-nav a.is-active {
  color: var(--gold) !important;
  font-weight: 800 !important;
}

.side-menu-footer {
  color: var(--text-body);
}

.side-menu-footer .address {
  color: #ffffff !important;
  font-weight: 500;
}

/* 헤더 로고 가독성 */
.site-logo .logo-main {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.site-logo .logo-sub {
  color: var(--gold-light) !important;
}
