/* header.css*/

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 60;
  border-bottom: 1px solid rgba(239, 220, 169, 0.88);
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(18px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

/* 히어로 이미지 벗어났을 때 원래 스타일 (기본값이므로 별도 처리 불필요) */
/* 히어로 이미지 위에 있을 때 투명 — index.html의 인라인 style이 담당 */
.site-header.header--scrolled {
  background: rgba(255, 253, 247, 0.92) !important;
  border-bottom-color: rgba(239, 220, 169, 0.88) !important;
  backdrop-filter: blur(18px) !important;
}

/*
.site-header.header--scrolled .brand span:last-child {
  color: var(--text) !important;
}
  */

/*
.site-header.header--scrolled .site-nav a {
  color: var(--muted) !important;
}
*/
.site-header.header--scrolled .site-nav a:hover,
.site-header.header--scrolled .site-nav a.active {
  background: rgba(212, 160, 23, 0.14) !important;
  color: var(--primary-dark) !important;
}

.header-inner {
  height: var(--header-height);
  min-height: 0;
  overflow: hidden;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.6rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;

  flex-wrap: nowrap;
  overflow: hidden;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(212, 160, 23, 0.14);
  color: var(--primary-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-cta {
  min-width: 182px;
}

.header-cta.active {
  background: var(--primary-dark);
}

.nav-toggle {
  display: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  border-radius: 999px;
  background: var(--text);
}

/* =========================
   Header Responsive
   ========================= */

@media (max-width: 1200px) {
  .site-nav a {
    padding-inline: 12px;
    font-size: 0.95rem;
  }
}

/* =========================
   Header final layout
   ========================= */

.header-inner {
  height: var(--header-height);
  min-height: var(--header-height);
  overflow: visible;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand .logo,
.brand img.logo {
  display: block;
  width: 210px;
  height: auto;
}

.header-menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}

.site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(212, 160, 23, 0.14);
  color: var(--primary-dark);
}

.header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-cta {
  min-width: 182px;
}

.header-cta.active {
  background: var(--primary-dark);
}

/* 햄버거 버튼 기본은 PC에서 숨김 */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(122, 85, 18, 0.18);
  border-radius: 999px;
  background: #fff3d8;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0;
  border-radius: 999px;
  background: #7a5512;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   Mobile / Tablet folded header
   ========================= */

@media (max-width: 1024px) {
  .site-header {
    z-index: 1000;
    overflow: visible;
    background: rgba(255, 253, 247, 0.96) !important;
    border-bottom: 1px solid rgba(239, 220, 169, 0.88) !important;
    backdrop-filter: blur(18px) !important;
  }

  .header-inner {
    width: min(100% - 32px, 1180px);
    height: var(--header-height);
    min-height: var(--header-height);
    overflow: visible;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .brand .logo,
  .brand img.logo {
    width: 190px;
    max-width: 62vw;
    height: auto;
  }

  .nav-toggle {
    display: inline-flex !important;
  }

  .header-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;

    display: none;
    width: 100%;
    height: auto;

    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;

    background: #fffdf7 !important;
    border-top: 1px solid rgba(239, 220, 169, 0.88);
    border-bottom: 1px solid rgba(239, 220, 169, 0.88);
    border-radius: 0;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);

    padding: 0;
    z-index: 999;
  }

  .site-header.nav-open .header-menu {
    display: flex !important;
  }

  .site-nav {
    width: 100%;
    flex: none;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;

    padding: 0;
    background: transparent;
    border: 0;
    overflow: visible;
  }

  .site-nav a,
  .site-nav a:link,
  .site-nav a:visited,
  .site-nav a:hover,
  .site-nav a:active {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 58px;
    padding: 0 20px;

    border-radius: 0;
    border-bottom: 1px solid rgba(239, 220, 169, 0.42);

    background: transparent !important;
    color: #6b5734 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;

    font-size: 1rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }

  .site-nav a.active,
  .site-nav a:hover {
    background: #fff3d8 !important;
    color: #7a5512 !important;
  }

  .header-actions {
    width: 100%;
    display: flex;
    justify-content: center;

    padding: 18px 20px 20px;
    background: #fffdf7;
  }

  .header-cta,
  .header-cta:link,
  .header-cta:visited {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 54px;

    border-radius: 0;
    color: #fff !important;
    background: #f2a900 !important;

    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;
  }
}

@media (max-width: 560px) {
  .brand .logo,
  .brand img.logo {
    width: 170px;
    max-width: 58vw;
  }

  .nav-toggle {
    width: 46px;
    height: 46px;
  }

  .site-nav a,
  .site-nav a:link,
  .site-nav a:visited {
    height: 48px;
    font-size: 0.95rem;
    font-weight: 600;
  }

  .header-cta {
    height: 52px;
  }
}

@media (max-width: 1024px) {
  .site-header.nav-open .header-menu .header-actions {
    padding: 10px 20px 14px;
  }

  .site-header.nav-open .header-menu .header-cta,
  .site-header.nav-open .header-menu .header-cta:link,
  .site-header.nav-open .header-menu .header-cta:visited {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 18px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border-radius: 0 !important;
  }
}