/* 전역 레이아웃 및 헤더/푸터 */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* 상단 고정 헤더 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-normal);
}

/* [개선 2] 스크롤 내릴 때 반투명화 & 글자 선명 대비 강조 */
.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom-color: rgba(226, 223, 215, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* [개선 4] 로고 이미지 스타일 */
.header-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.footer-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 0;
  filter: brightness(0.95);
  flex-shrink: 0;
}

.brand-logo .brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  letter-spacing: 0;
}

/* 네비게이션 메뉴 (짧은 단어, 줄바꿈 방지) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  padding: 8px 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
}

/* 헤더 우측 유틸리티 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 메인 동적 레이아웃 마운트 루트 */
#layout-builder-root {
  flex: 1;
}

/* 푸터 영역 */
.site-footer {
  background-color: #1a1c20;
  color: #8c9099;
  padding: 60px 0 40px;
  border-top: 1px solid #272a31;
  font-size: 0.8125rem;
  line-height: 1.8;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid #282b33;
}

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

.footer-brand h3 {
  color: #e4e6eb;
  font-size: 1.125rem;
  margin-bottom: 2px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-link {
  color: #a3a7b1;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-info-row span {
  white-space: nowrap;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  color: #646873;
}

/* 레이아웃 빌더 동적 마운트 루트 (초기 깜빡임 방지 및 뷰포트 높이 확보) */
#layout-builder-root {
  min-height: calc(100vh - var(--header-height));
  background-color: var(--color-bg, #ffffff);
  display: flex;
  flex-direction: column;
}

