/* ==========================================
   HEADER STYLES - WITHOUT LOGO
   Royal Bronze Theme
   ========================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1),
    background 0.2s ease,
    backdrop-filter 0.2s ease,
    border-color 0.2s ease;
  will-change: transform;
}

.site-header.is-scrolled {
  background: rgba(250, 248, 245, 0.7);
  border-bottom: 1px solid rgba(176, 141, 87, 0.15);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px 0 200px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.brand { display: none !important; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

/* ── Search ── */
.search-wrapper { flex: 1; max-width: 420px; min-width: 0; }

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 10px 0 16px;
  gap: 10px;
  background: rgba(44, 62, 80, 0.06);
  border: 1px solid rgba(176, 141, 87, 0.15);
  border-radius: 18px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.search-form:hover {
  background: rgba(44, 62, 80, 0.08);
  border-color: rgba(176, 141, 87, 0.25);
}

.search-form:focus-within {
  background: rgba(176, 141, 87, 0.08);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
  border-color: #B08D57;
}

/* Input — Inter */
.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0; outline: 0;
  background: transparent;
  color: #2C3E50;
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: var(--weight-body);
}

.search-input::placeholder {
  color: rgba(44, 62, 80, 0.5);
}

.search-btn {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #2C3E50;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.search-btn:hover {
  background: rgba(176, 141, 87, 0.1);
  color: #B08D57;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  max-height: 400px;
  overflow-y: auto;
  background: rgba(250, 248, 245, 0.95);
  border: 1px solid rgba(176, 141, 87, 0.2);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(44, 62, 80, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px;
  display: none;
}

.search-dropdown.is-open { display: block; }

/* Result items — Inter */
.search-result {
  display: block;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  font-family: var(--font-body);
  color: #2C3E50;
  transition: background 0.15s ease;
}

.search-result:hover { background: rgba(176, 141, 87, 0.1); }

.search-result-title {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--weight-button);
  margin-bottom: 4px;
  color: #2C3E50;
}

.search-result-excerpt {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: var(--weight-body);
  color: rgba(44, 62, 80, 0.7);
  line-height: 1.5;
  max-height: 3em;
  overflow: hidden;
}

/* ── Theme Toggle ── */
.theme-toggle {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(176, 141, 87, 0.2);
  background: rgba(176, 141, 87, 0.08);
  border-radius: 14px;
  cursor: pointer;
  font-size: 18px;
  color: #B08D57;
  transition: transform 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover { transform: translateY(-1px); background: rgba(176, 141, 87, 0.15); }

.theme-icon      { display: none; }
.theme-icon-moon { display: block; }

html[data-theme="dim"] .theme-icon-moon { display: none; }
html[data-theme="dim"] .theme-icon-sun  { display: block; }

/* ── Language Switcher — Inter ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: var(--weight-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lang-link {
  font-family: var(--font-body);
  color: #2C3E50;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.lang-link:hover   { opacity: 1; color: #B08D57; }
.lang-link.is-active { opacity: 1; color: #B08D57; }
.lang-sep            { opacity: 0.3; color: #2C3E50; }

/* ── Mobile menu button ── */
.menu-toggle {
  width: 42px; height: 42px;
  display: flex;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.menu-icon {
  width: 22px; height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-icon span {
  display: block;
  height: 2px;
  background: #2C3E50;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ── Mobile Menu ── */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 62, 80, 0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  transition: opacity 0.25s ease;
}

.menu-overlay.is-open { opacity: 1; pointer-events: auto; }

.menu-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(380px, 90vw);
  background: rgba(250, 248, 245, 0.95);
  border-left: 1px solid rgba(176, 141, 87, 0.2);
  box-shadow: -16px 0 60px rgba(44, 62, 80, 0.2);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  padding: 20px;
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.12, 1);
}

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

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* Drawer title — Cormorant Garamond */
.drawer-title {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-h3);
  font-style: normal;
  color: #2C3E50;
}

.drawer-close {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(176, 141, 87, 0.2);
  background: rgba(176, 141, 87, 0.1);
  border-radius: 14px;
  cursor: pointer;
  font-size: 20px;
  color: #B08D57;
  transition: background 0.15s ease;
}

.drawer-close:hover { background: rgba(176, 141, 87, 0.2); }

.drawer-nav { display: flex; flex-direction: column; gap: 6px; }

/* Drawer links — Inter */
.drawer-link {
  display: block;
  padding: 14px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-button);
  color: #2C3E50;
  transition: background 0.15s ease, color 0.15s ease;
}

.drawer-link:hover { background: rgba(176, 141, 87, 0.1); color: #B08D57; }
.drawer-link.is-active { color: #B08D57; }

/* ── Search badges — Inter ── */
.sh-match  { color: #B08D57; font-style: normal; font-weight: var(--weight-button); }

.sr-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: var(--weight-label);
  padding: 2px 7px;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: 6px;
}

.sr-badge--blog {
  background: rgba(176, 141, 87, 0.15);
  border: 1px solid rgba(176, 141, 87, 0.3);
  color: #8a6d3f;
}

.sr-badge--section {
  background: rgba(44, 62, 80, 0.08);
  border: 1px solid rgba(44, 62, 80, 0.15);
  color: rgba(44, 62, 80, 0.7);
}

.sr-meta-date {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: var(--weight-body);
  color: rgba(44, 62, 80, 0.5);
}

.search-result.is-focused { background: rgba(176, 141, 87, 0.12); outline: none; }
.search-no-result         { cursor: default; pointer-events: none; }

.search-no-result .search-result-title {
  color: rgba(44, 62, 80, 0.6);
  font-weight: var(--weight-body);
}

/* ── Dark Mode ── */
html[data-theme="dim"] .site-header.is-scrolled {
  background: rgba(44, 62, 80, 0.85);
  border-bottom: 1px solid rgba(176, 141, 87, 0.2);
}

html[data-theme="dim"] .search-form         { background: rgba(176, 141, 87, 0.1); border-color: rgba(176, 141, 87, 0.25); }
html[data-theme="dim"] .search-form:hover   { background: rgba(176, 141, 87, 0.15); border-color: rgba(176, 141, 87, 0.35); }
html[data-theme="dim"] .search-form:focus-within { background: rgba(176, 141, 87, 0.15); border-color: #B08D57; }
html[data-theme="dim"] .search-input        { color: #f5f2ed; }
html[data-theme="dim"] .search-input::placeholder { color: rgba(245, 242, 237, 0.5); }
html[data-theme="dim"] .search-btn          { color: #B08D57; }
html[data-theme="dim"] .search-btn:hover    { background: rgba(176, 141, 87, 0.2); color: #d4b07a; }
html[data-theme="dim"] .search-dropdown     { background: rgba(44, 62, 80, 0.95); border-color: rgba(176, 141, 87, 0.25); }
html[data-theme="dim"] .search-result       { color: #f5f2ed; }
html[data-theme="dim"] .search-result:hover { background: rgba(176, 141, 87, 0.15); }
html[data-theme="dim"] .search-result-title  { color: #B08D57; }
html[data-theme="dim"] .search-result-excerpt { color: rgba(245, 242, 237, 0.6); }
html[data-theme="dim"] .search-result.is-focused { background: rgba(176, 141, 87, 0.2); }
html[data-theme="dim"] .search-no-result .search-result-title { color: rgba(245, 242, 237, 0.5); }
html[data-theme="dim"] .sr-meta-date        { color: rgba(245, 242, 237, 0.45); }
html[data-theme="dim"] .sr-badge--blog      { background: rgba(176, 141, 87, 0.2); border-color: rgba(176, 141, 87, 0.4); color: #B08D57; }
html[data-theme="dim"] .sr-badge--section   { background: rgba(245, 242, 237, 0.08); border-color: rgba(245, 242, 237, 0.15); color: rgba(245, 242, 237, 0.6); }

html[data-theme="dim"] .theme-toggle        { background: rgba(176, 141, 87, 0.15); border-color: rgba(176, 141, 87, 0.3); color: #B08D57; }
html[data-theme="dim"] .theme-toggle:hover  { background: rgba(176, 141, 87, 0.25); }
html[data-theme="dim"] .lang-link           { color: #f5f2ed; }
html[data-theme="dim"] .lang-link:hover,
html[data-theme="dim"] .lang-link.is-active { color: #B08D57; }
html[data-theme="dim"] .lang-sep            { color: rgba(245, 242, 237, 0.3); }
html[data-theme="dim"] .menu-icon span      { background: #B08D57; }
html[data-theme="dim"] .menu-drawer         { background: rgba(44, 62, 80, 0.95); border-left-color: rgba(176, 141, 87, 0.25); }
html[data-theme="dim"] .drawer-title        { color: #B08D57; }
html[data-theme="dim"] .drawer-close        { background: rgba(176, 141, 87, 0.15); border-color: rgba(176, 141, 87, 0.3); color: #B08D57; }
html[data-theme="dim"] .drawer-close:hover  { background: rgba(176, 141, 87, 0.25); }
html[data-theme="dim"] .drawer-link         { color: #f5f2ed; }
html[data-theme="dim"] .drawer-link:hover   { background: rgba(176, 141, 87, 0.15); color: #B08D57; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header    { height: 60px; }
  .header-inner   { padding: 0 16px 0 60px; }
  .search-wrapper { max-width: 280px; }
  .search-form    { height: 40px; }
  .theme-toggle   { width: 38px; height: 38px; }
  .lang-switcher  { display: none; }
}

@media (max-width: 520px) {
  .site-header    { height: 56px; }
  .header-inner   { gap: 8px; padding: 0 16px 0 60px; }
  .search-wrapper { flex: 1; max-width: none; }
  .search-form    { height: 36px; padding: 0 8px 0 12px; }
  .search-input   { font-size: 13px; }
  .theme-toggle   { width: 36px; height: 36px; }
  .menu-toggle    { width: 36px; height: 36px; }
}

/* ── Disabled nav link (coming soon) ── */
.drawer-link--disabled {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
  color: inherit;
}

.drawer-link-soon {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(176, 141, 87, 0.15);
  color: #B08D57;
}