/* ================================================================
   Topcityvibe Pro — Header, Ticker, Nav, Mobile Menu
================================================================ */

/* ── Search Overlay ── */
.search-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(5,46,22,.96);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-overlay__inner { width: 100%; max-width: 680px; padding: 0 24px; }
.search-overlay__hint { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--green-light); margin-bottom: 20px; opacity: .7; }
.search-overlay__form { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--green); padding-bottom: 14px; margin-bottom: 28px; }
.search-overlay__icon { color: var(--green-light); font-size: 20px; flex-shrink: 0; }
.search-overlay__input { flex: 1; background: none; border: none; outline: none; color: #fff; font-family: var(--f-disp); font-size: 28px; font-weight: 700; min-width: 0; }
.search-overlay__input::placeholder { color: rgba(255,255,255,.25); }
.search-overlay__close { position: absolute; top: 24px; right: 24px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: rgba(255,255,255,.6); font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all var(--ease); cursor: pointer; }
.search-overlay__close:hover { background: var(--green); color: #fff; border-color: var(--green); }
.search-results { display: flex; flex-direction: column; gap: 0; }
.search-result-group { margin-bottom: 18px; }
.search-result-label { font-size: 10px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--green-light); opacity: .6; margin-bottom: 10px; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); margin-bottom: 6px; cursor: pointer; transition: background var(--ease); text-decoration: none; }
.search-result-item:hover { background: rgba(22,163,74,.18); border-color: rgba(22,163,74,.3); }
.search-result-item__icon { width: 36px; height: 36px; border-radius: var(--r-sm); background: rgba(22,163,74,.2); display: flex; align-items: center; justify-content: center; color: var(--green-light); font-size: 14px; flex-shrink: 0; }
.search-result-item__title { font-size: 14px; font-weight: 600; color: #fff; }
.search-result-item__sub { font-size: 11px; color: rgba(255,255,255,.4); }
.search-esc { margin-top: 22px; font-size: 12px; color: rgba(255,255,255,.3); text-align: center; }
.search-esc kbd { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 4px; padding: 2px 7px; font-size: 11px; color: rgba(255,255,255,.5); }

/* ── Breaking News Ticker ── */
.ticker {
  background: var(--green-deep);
  height: 34px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}
.ticker__label {
  flex-shrink: 0;
  background: var(--green);
  color: #fff;
  font-family: var(--f-disp);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.ticker__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-light); animation: blink 1.4s ease infinite; }
.ticker__track { flex: 1; overflow: hidden; min-width: 0; }
.ticker__inner { display: flex; gap: 60px; white-space: nowrap; animation: scroll-t 38s linear infinite; }
.ticker__inner:hover { animation-play-state: paused; }
.ticker__item { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.72); display: inline-flex; align-items: center; gap: 10px; }
.ticker__item::before { content: '◆'; color: var(--green); font-size: 7px; }
.ticker__item a { color: rgba(255,255,255,.82); }
.ticker__item a:hover { color: var(--green-light); }

/* ── Site Header ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--sh-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}

/* ── Logo — icon + site name together ── */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 1;
  min-width: 0;
  text-decoration: none;
  overflow: hidden;
}

.logo__icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--green);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: var(--sh-g);
  flex-shrink: 0;
}

/* If custom logo image is used */
.logo img {
  height: 44px;
  width: auto;
  max-width: none;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
}

.logo__name {
  font-family: var(--f-disp);
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo__name span { color: var(--green); }

.logo__sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
}

/* ── Header Actions ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all var(--ease);
  cursor: pointer;
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--green); color: #fff; border-color: var(--green); }
.btn-icon.active { background: var(--green); color: #fff; border-color: var(--green); }

/* Dark mode toggle */
#darkToggle {
  position: relative;
  width: 52px;
  border-radius: 99px;
  padding: 0 4px;
  justify-content: flex-start;
}
#darkToggle::after {
  content: '';
  position: absolute;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform .3s ease, background .3s ease;
}
body.dark #darkToggle::after { transform: translateX(-14px); background: var(--green); border-color: var(--green); }

/* ── Hamburger ── */
.btn-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-menu span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}

/* ── Nav Bar ── */
.nav-bar {
  background: var(--white);
  border-bottom: 2px solid var(--green);
  position: sticky;
  top: 64px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 46px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-item { flex-shrink: 0; height: 100%; display: flex; align-items: center; position: relative; }
.nav-link { display: flex; align-items: center; gap: 5px; padding: 0 16px; height: 100%; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; position: relative; transition: color var(--ease); }
.nav-link::after { content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background: var(--green); transition: width var(--ease); }
.nav-link:hover { color: var(--text); }
.nav-link:hover::after, .nav-item.active .nav-link::after { width: 100%; }
.nav-item.active .nav-link { color: var(--green); font-weight: 800; }
.nav-sep { width: 1px; height: 22px; background: var(--border); flex-shrink: 0; }

/* WP nav menu */
.nav-inner .menu { display: flex; align-items: center; height: 100%; list-style: none; margin: 0; padding: 0; }
.nav-inner .menu-item { flex-shrink: 0; height: 100%; display: flex; align-items: center; }
.nav-inner .menu-item > a { display: flex; align-items: center; gap: 5px; padding: 0 16px; height: 100%; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; position: relative; transition: color var(--ease); text-decoration: none; }
.nav-inner .menu-item > a::after { content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background: var(--green); transition: width var(--ease); }
.nav-inner .menu-item > a:hover,
.nav-inner .menu-item.current-menu-item > a { color: var(--green); font-weight: 800; }
.nav-inner .menu-item > a:hover::after,
.nav-inner .menu-item.current-menu-item > a::after { width: 100%; }

/* ── Mobile Menu Drawer ── */
.mob-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 2000;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s ease;
}
.mob-menu.open { display: flex; transform: translateX(0); }

.mob-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--green-deep);
  flex-shrink: 0;
}
.mob-logo { font-family: var(--f-disp); font-size: 20px; font-weight: 800; color: #fff; }
.mob-logo span { color: var(--green-light); }

.mob-close {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.mob-nav { flex: 1; overflow-y: auto; padding: 8px 0; }

.mob-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  font-family: var(--f-disp);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border-2);
  transition: background var(--ease);
  text-decoration: none;
}
.mob-link:hover { background: var(--green-tint); color: var(--green); }
.mob-link i { width: 20px; color: var(--green); font-size: 14px; flex-shrink: 0; }

/* ================================================================
   RESPONSIVE HEADER
================================================================ */

/* Show hamburger, hide dark toggle on mobile */
@media (max-width: 768px) {
  .btn-menu { display: flex; }
  .logo__sub { display: none; }
  #darkToggle { display: none; }
}

/* Tablet */
@media (max-width: 768px) {
  .header-inner { height: 58px; gap: 8px; }
  .logo__icon { width: 40px; height: 40px; min-width: 40px; font-size: 18px; }
  .logo__name { font-size: 19px; }
  .nav-bar { top: 58px; }
  .btn-icon { width: 36px; height: 36px; font-size: 14px; }
  .btn-menu { width: 38px; height: 38px; }
}

/* Mobile */
@media (max-width: 480px) {
  .header-inner { height: 54px; padding: 0 2px; gap: 6px; }
  .logo__icon { width: 36px; height: 36px; min-width: 36px; font-size: 16px; border-radius: 8px; }
  .logo { gap: 8px; }
  .logo__name { font-size: 17px; }
  .nav-bar { top: 54px; }
  .btn-icon { width: 34px; height: 34px; font-size: 13px; }
  .btn-menu { width: 36px; height: 36px; }
  .header-actions { gap: 4px; }
  /* Show only search + hamburger on very small screens */
  .header-actions .btn-icon:not(#searchOpen):not(.btn-menu) { display: none; }
  .btn-menu { display: flex !important; }
}

/* Very small phones */
@media (max-width: 360px) {
  .header-inner { height: 50px; }
  .logo__icon { width: 32px; height: 32px; min-width: 32px; font-size: 14px; }
  .logo__name { font-size: 15px; }
  .nav-bar { top: 50px; }
}
