/* ─── Site Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 80px;
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 32px;
}

/* ─── Logo ─── */
.header-logo { display: flex; align-items: center; flex-shrink: 0; align-self: center; text-decoration: none; }
.logo-img {
  height: 16px;
  width: auto;
  display: block;
  transition: opacity var(--transition);
}
.header-logo:hover .logo-img { opacity: 0.85; }

/* ─── Search pill ─── */
.header-search { flex: 1; display: flex; justify-content: center; }

.search-pill {
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0 8px 0 16px;
  gap: 0;
  cursor: pointer;
  transition: box-shadow var(--transition);
  background: #fff;
  font-size: 14px;
}
.search-pill:hover { box-shadow: var(--shadow-md); }

.search-pill__item {
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
}
.search-pill__item--muted { color: var(--color-text-secondary); font-weight: 400; }

.search-pill__divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
  flex-shrink: 0;
}

.search-pill__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 8px;
}
.search-pill__icon svg {
  width: 14px;
  height: 14px;
  fill: #fff;
}

/* ─── Nav ─── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header-nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: background var(--transition);
}
.header-nav__link:hover { background: var(--color-bg-light); color: var(--color-text); }

.header-nav__globe {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: background var(--transition);
}
.header-nav__globe:hover { background: var(--color-bg-light); }
.header-nav__globe svg { width: 16px; height: 16px; fill: currentColor; }

/* ─── User menu ─── */
.header-nav__user-menu { position: relative; }

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 5px 5px 5px 12px;
  transition: box-shadow var(--transition);
  background: #fff;
}
.user-menu-btn:hover { box-shadow: var(--shadow-md); }

.user-menu-btn__hamburger svg { width: 16px; height: 16px; fill: var(--color-text); }

.user-menu-btn__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.user-menu-btn__avatar svg { width: 32px; height: 32px; fill: #fff; }

/* ─── Dropdown ─── */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  z-index: 200;
  animation: fadeInDown 0.15s ease;
}
.user-dropdown.open { display: block; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-dropdown__item {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition);
}
.user-dropdown__item:hover { background: var(--color-bg-light); }
.user-dropdown__item--bold { font-weight: 600; }

.user-dropdown__divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 4px 0;
}

/* ─── Header nav (sticky bar) ─── */
.sticky-bar__inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: 100%;
}

.sticky-bar__nav {
  display: flex;
  gap: 32px;
  align-self: stretch;
  height: 100%;
}

.sticky-bar__link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  box-sizing: border-box;
  transition: color var(--transition), border-color var(--transition);
}
.sticky-bar__link:hover,
.sticky-bar__link.active {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

.btn-reserve-sticky {
  padding: 10px 20px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: background var(--transition), box-shadow var(--transition);
}
.btn-reserve-sticky:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 4px 12px rgba(124, 151, 82, 0.3);
}

.header-menu-btn { display: none; }

.header-mobile-nav { display: none; }

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    gap: 12px;
    align-items: center;
  }

  .header-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--color-text);
    flex-shrink: 0;
    order: 2;
    margin-left: auto;
  }
  .header-menu-btn svg { width: 18px; height: 18px; fill: currentColor; }

  .sticky-bar__inner {
    flex: 0 0 auto;
    order: 3;
    height: auto;
  }

  .sticky-bar__nav { display: none; }

  .sticky-bar__actions { display: flex; }

  .btn-reserve-sticky {
    padding: 8px 14px;
    font-size: 13px;
  }

  .header-mobile-nav {
    display: none;
    flex-direction: column;
    padding: 8px 16px 16px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
  }
  .header-mobile-nav.open { display: flex; }

  .header-mobile-nav__link {
    padding: 14px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
  }
  .header-mobile-nav__link:last-child { border-bottom: none; }
  .header-mobile-nav__link.active { font-weight: 700; }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: none;
  }

  .site-header.scrolled,
  .site-header.menu-open {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
  }

  .site-header.over-gallery:not(.menu-open):not(.scrolled) {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.55) 55%, transparent 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
