/* ═══════════════════════════════════════════════════════════════
   DreamMeaning.Today — site header / nav / dropdown / search
   ═══════════════════════════════════════════════════════════════ */

.dm-hidden { display: none !important; }

/* ── Header shell ── */
.dm-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fbf7f0;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}
.dm-site-header.dm-header-scrolled {
  border-bottom-color: rgba(47,42,38,0.10);
  box-shadow: 0 2px 18px rgba(47,42,38,0.07);
}

/* ── Inner layout ── */
.dm-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Logo ── */
.dm-header-logo {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #2f2a26;
  text-decoration: none;
  white-space: nowrap;
  font-size: clamp(0.85rem, 3vw, 1.08rem);
  flex-shrink: 0;
}
.dm-header-logo:hover { color: #2f2a26; opacity: 0.85; }

/* ── Desktop nav ── */
.dm-header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 16px;
  flex: 1;
}
.dm-header-nav > a {
  color: #7a6b5d;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease;
}
.dm-header-nav > a:hover { color: #2f2a26; background: rgba(47,42,38,0.05); }
.dm-header-nav .dm-nav-journal { color: #b86b4b; font-weight: 600; }
.dm-header-nav .dm-nav-journal:hover { color: #9a5538; background: rgba(184,107,75,0.08); }

/* ── Categories dropdown ── */
.dm-dropdown { position: relative; }

.dm-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #7a6b5d;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease;
  line-height: inherit;
}
.dm-dropdown-trigger:hover,
.dm-dropdown-trigger[aria-expanded="true"] {
  color: #2f2a26;
  background: rgba(47,42,38,0.05);
}
.dm-dropdown-arrow {
  font-size: 0.65rem;
  opacity: 0.55;
  transition: transform 200ms ease;
  display: inline-block;
}
.dm-dropdown-trigger[aria-expanded="true"] .dm-dropdown-arrow {
  transform: rotate(180deg);
}

.dm-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 200px;
  background: #fffdf8;
  border: 1px solid rgba(47,42,38,0.10);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(47,42,38,0.12);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 200;
}
.dm-dropdown-panel.dm-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dm-dropdown-panel a {
  display: block;
  color: #4a3f38;
  font-size: 0.855rem;
  font-weight: 500;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 7px;
  white-space: nowrap;
  transition: background 130ms ease, color 130ms ease;
}
.dm-dropdown-panel a:hover {
  background: rgba(184,107,75,0.09);
  color: #b86b4b;
}

/* ── Right side ── */
.dm-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Search ── */
.dm-search-container {
  position: relative;
  display: flex;
  align-items: center;
}
.dm-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: #7a6b5d;
  border-radius: 7px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 150ms, background 150ms;
}
.dm-search-btn:hover { color: #2f2a26; background: rgba(47,42,38,0.06); }

.dm-search-bar-wrap {
  display: flex;
  align-items: center;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 280ms ease, opacity 220ms ease;
}
.dm-search-bar-wrap.dm-search-open {
  max-width: 230px;
  opacity: 1;
  overflow: visible;
}

.dm-search-input {
  border: 1px solid rgba(47,42,38,0.16);
  background: rgba(255,253,248,0.95);
  color: #2f2a26;
  font-family: inherit;
  font-size: 0.84rem;
  padding: 6px 13px;
  border-radius: 999px;
  width: 210px;
  outline: none;
  transition: border-color 150ms;
}
.dm-search-input:focus { border-color: rgba(184,107,75,0.5); }
.dm-search-input::placeholder { color: #a89888; }
.dm-search-input::-webkit-search-cancel-button { display: none; }

.dm-search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: #fffdf8;
  border: 1px solid rgba(47,42,38,0.10);
  border-radius: 11px;
  box-shadow: 0 8px 28px rgba(47,42,38,0.12);
  padding: 6px;
  z-index: 300;
  display: none;
}
.dm-search-suggestions.dm-sugg-open { display: block; }
.dm-search-suggestions a {
  display: block;
  color: #2f2a26;
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 11px;
  border-radius: 7px;
  transition: background 120ms, color 120ms;
}
.dm-search-suggestions a:hover { background: rgba(184,107,75,0.09); color: #b86b4b; }

/* ── Auth link ── */
.dm-auth-link {
  color: #7a6b5d;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
  white-space: nowrap;
  transition: color 150ms, background 150ms;
}
.dm-auth-link:hover { color: #2f2a26; background: rgba(47,42,38,0.05); }

/* ── Header CTA ── */
.dm-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #b86b4b;
  color: #fff !important;
  font-size: clamp(0.72rem, 2vw, 0.84rem);
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: background 150ms ease;
  flex-shrink: 0;
}
.dm-header-cta:hover { background: #9a5538; }

/* ── Mobile hamburger ── */
.dm-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: #2f2a26;
  cursor: pointer;
  border-radius: 7px;
  transition: background 150ms;
  flex-shrink: 0;
}
.dm-mobile-toggle:hover { background: rgba(47,42,38,0.06); }

/* ── Mobile menu panel ── */
.dm-mobile-menu {
  background: #fffdf8;
  border-top: 1px solid rgba(47,42,38,0.08);
  padding: 10px 20px 20px;
}
.dm-mobile-menu nav {
  display: flex;
  flex-direction: column;
}

.dm-mobile-menu nav > a,
.dm-mobile-cat-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #2f2a26;
  font-size: 0.975rem;
  font-weight: 500;
  text-decoration: none;
  padding: 13px 6px;
  border-bottom: 1px solid rgba(47,42,38,0.07);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color 150ms;
}
.dm-mobile-menu nav > a:last-of-type { border-bottom: none; }
.dm-mobile-menu nav > a:hover,
.dm-mobile-cat-toggle:hover { color: #b86b4b; }
.dm-mobile-menu .dm-mobile-journal { color: #b86b4b; font-weight: 600; }

.dm-mobile-cat-toggle {
  border-bottom: 1px solid rgba(47,42,38,0.07);
}
.dm-mobile-cat-arrow {
  font-size: 0.7rem;
  opacity: 0.55;
  transition: transform 200ms ease;
  display: inline-block;
}

.dm-mobile-cat-panel {
  padding-left: 14px;
  border-bottom: 1px solid rgba(47,42,38,0.07);
}
.dm-mobile-cat-panel a {
  display: block;
  color: #4a3f38;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 11px 6px;
  border-bottom: 1px solid rgba(47,42,38,0.05);
  transition: color 150ms;
}
.dm-mobile-cat-panel a:last-child { border-bottom: none; }
.dm-mobile-cat-panel a:hover { color: #b86b4b; }

.dm-mobile-cta {
  display: block;
  background: #b86b4b;
  color: #fff !important;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  padding: 14px;
  border-radius: 10px;
  margin-top: 14px;
  transition: background 150ms;
}
.dm-mobile-cta:hover { background: #9a5538; }

.dm-mobile-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 6px;
  border-bottom: 1px solid rgba(47,42,38,0.07);
  margin-bottom: 2px;
}
.dm-mobile-search-input {
  flex: 1;
  border: 1px solid rgba(47,42,38,0.16);
  background: rgba(255,253,248,0.95);
  color: #2f2a26;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 9px 14px;
  border-radius: 999px;
  outline: none;
}
.dm-mobile-search-input::placeholder { color: #a89888; }
.dm-mobile-search-btn {
  border: none;
  background: #b86b4b;
  color: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms;
}
.dm-mobile-search-btn:hover { background: #9a5538; }

/* ── Short/full CTA label swap ── */
.dm-cta-short { display: none; }
.dm-cta-full  { display: inline; }

/* ═══ Responsive breakpoints ═══════════════════════════════════ */
@media (max-width: 900px) {
  .dm-header-nav    { display: none; }
  .dm-auth-link     { display: none !important; }
  .dm-mobile-toggle { display: flex; }
  .dm-search-bar-wrap { display: none !important; }
  .dm-header-cta { font-size: 0.78rem; padding: 7px 11px; }
}
@media (max-width: 420px) {
  .dm-cta-full  { display: none; }
  .dm-cta-short { display: inline; }
}
