/* ================================
   Blog Goofy Sticky Header
   ================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--bg-blue);
  box-shadow: 0 8px 24px rgba(8, 21, 39, 0.18);
}

/* Top logo row */
.header-brand-row {
  background: var(--bg-blue);
  transition: all 0.25s ease;
}

.header-brand-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  transition: all 0.25s ease;
}

.site-logo img {
  display: block;
  width: 260px;
  max-height: 140px;
  object-fit: contain;
  transition: all 0.25s ease;
}

.site-tagline {
  color: var(--bg-white);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Navigation row */
.header-nav-row {
  background: var(--bg-blue-dark);
}

.header-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 58px;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.primary-nav li {
  position: relative;
}

.primary-nav a {
  display: block;
  color: var(--bg-white);
  text-decoration: none;
  font-weight: 800;
  padding: 0.85rem 1rem;
  border-radius: 999px;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: var(--bg-yellow);
  color: var(--bg-ink);
}

/* Dropdowns */
.primary-nav ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  display: none;
  flex-direction: column;
  align-items: stretch;
  background: var(--bg-white);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-bold);
}

.primary-nav ul li:hover > ul {
  display: flex;
}

.primary-nav ul ul a {
  color: var(--bg-ink);
  border-radius: var(--radius-sm);
}

.primary-nav ul ul a:hover {
  background: var(--bg-paper);
  color: var(--bg-orange);
}

/* Search */
.header-search {
  min-width: 220px;
}

.header-search form {
  display: flex;
  align-items: center;
}

.header-search input[type="search"] {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
}

.header-search input[type="submit"],
.header-search button {
  display: none;
}

/* Mobile button */
.menu-toggle {
  display: none;
  background: var(--bg-yellow);
  color: var(--bg-ink);
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
}

/* Shrunk header state */
.site-header.is-shrunk .header-brand-inner {
  padding: 0.35rem 0;
}

.site-header.is-shrunk .site-logo img {
  width: 150px;
  max-height: 60px;
}

.site-header.is-shrunk .site-tagline {
  font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 900px) {
  .header-brand-inner {
    justify-content: space-between;
  }

  .site-logo img {
    width: 190px;
    max-height: 100px;
  }

  .site-tagline {
    font-size: 0.95rem;
    text-align: right;
  }

  .header-nav-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    width: 100%;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .primary-nav a {
    border-radius: var(--radius-sm);
  }

  .primary-nav ul ul {
    position: static;
    display: none;
    box-shadow: none;
    background: rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
  }

  .primary-nav ul li:hover > ul {
    display: flex;
  }

  .primary-nav ul ul a {
    color: var(--bg-white);
  }

  .header-search {
    flex: 1;
    min-width: 180px;
  }
}

@media (max-width: 600px) {
  .header-brand-inner {
    flex-direction: column;
    gap: 0.25rem;
  }

  .site-tagline {
    text-align: center;
  }

  .header-nav-inner {
    align-items: stretch;
  }

  .header-search {
    width: 100%;
    flex: none;
  }
}