/* ==========================================================================
   PVSC header — self-contained; everything is scoped to #pv-header
   so the legacy theme's #header rules and plugins don't touch it.
   ========================================================================== */

#pv-header {
  --pv-navy: #0a2540;
  --pv-navy-2: #0f3b66;
  --pv-blue: #1f74d4;
  --pv-blue-2: #2b8ff0;
  --pv-sun: #f6c343;
  --pv-ink: #142033;
  --pv-muted: #5b6b80;
  --pv-line: #e5eaf1;
  --pv-soft: #f2f6fb;
  --pv-topbar-h: 40px;
  --pv-bar-h: 78px;

  position: sticky;
  top: calc(var(--pv-topbar-h) * -1);
  z-index: 1000;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#pv-header *,
#pv-header *::before,
#pv-header *::after { box-sizing: border-box; }

#pv-header ul { list-style: none; margin: 0; padding: 0; }
#pv-header a { text-decoration: none; }
#pv-header button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
#pv-header svg { display: block; flex: none; }

.pv-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

/* ---------- Utility bar ---------- */
.pv-topbar {
  height: var(--pv-topbar-h);
  background: linear-gradient(90deg, var(--pv-navy) 0%, var(--pv-navy-2) 100%);
  color: rgba(255, 255, 255, .82);
  font-size: 12.5px;
  letter-spacing: .02em;
}
.pv-topbar .pv-container { height: 100%; justify-content: space-between; gap: 16px; }
.pv-meta { display: flex; align-items: center; gap: 18px; min-width: 0; white-space: nowrap; overflow: hidden; }
.pv-meta span { display: inline-flex; align-items: center; gap: 7px; }
.pv-meta svg { color: var(--pv-sun); }
.pv-meta .pv-meta-name { color: #fff; font-weight: 500; }
.pv-utility { display: flex; align-items: center; gap: 4px; }
#pv-header .pv-utility a {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  color: rgba(255, 255, 255, .82);
  padding: 6px 10px; border-radius: 6px;
  transition: color .15s, background-color .15s;
}
#pv-header .pv-utility a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.pv-utility .pv-sep { width: 1px; height: 16px; background: rgba(255, 255, 255, .2); margin: 0 6px; }

/* ---------- Main bar ---------- */
.pv-mainbar {
  position: relative;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--pv-line);
  transition: box-shadow .25s;
}
#pv-header.is-scrolled .pv-mainbar { box-shadow: 0 8px 24px -12px rgba(10, 37, 64, .28); }
.pv-mainbar > .pv-container { height: var(--pv-bar-h); gap: 20px; }

#pv-header .pv-brand { display: flex; align-items: center; gap: 12px; margin-right: auto; flex: none; white-space: nowrap; color: var(--pv-ink); }
.pv-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.pv-brand-title { font-size: 20px; font-weight: 600; color: var(--pv-navy); letter-spacing: -.01em; }
.pv-brand-title b { color: var(--pv-blue); font-weight: 600; }
.pv-brand-sub { font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--pv-muted); margin-top: 3px; }

/* ---------- Primary nav (desktop) ---------- */
.pv-nav { align-self: stretch; display: flex; }
.pv-menu { display: flex; align-items: stretch; gap: 2px; }
.pv-item { display: flex; align-items: center; }

#pv-header .pv-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--pv-ink);
  white-space: nowrap;
  transition: color .15s, background-color .15s;
}
#pv-header .pv-link svg { color: var(--pv-muted); transition: transform .2s, color .15s; }
#pv-header .pv-item:hover > .pv-link,
#pv-header .pv-item.is-open > .pv-link,
#pv-header .pv-link:focus-visible { color: var(--pv-blue); background: var(--pv-soft); }
#pv-header .pv-item:hover > .pv-link svg,
#pv-header .pv-item.is-open > .pv-link svg { color: var(--pv-blue); transform: rotate(180deg); }
#pv-header .pv-link.is-active { color: var(--pv-blue); }
#pv-header .pv-link.is-active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: calc((var(--pv-bar-h) - 38px) / -2);
  height: 3px; border-radius: 3px 3px 0 0; background: var(--pv-blue);
}
#pv-header .pv-link:focus-visible { outline: 2px solid var(--pv-blue); outline-offset: 2px; }

/* Mega panel: hangs from the full-width main bar */
.pv-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff;
  border-top: 1px solid var(--pv-line);
  box-shadow: 0 24px 40px -18px rgba(10, 37, 64, .3);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.pv-item:hover > .pv-panel,
.pv-item.is-open > .pv-panel,
.pv-item:focus-within > .pv-panel {
  opacity: 1; visibility: visible; transform: none;
  transition-delay: 0s;
}
.pv-panel-inner {
  max-width: 1280px; margin: 0 auto; padding: 28px 24px 32px;
  display: grid; grid-template-columns: 300px repeat(auto-fill, minmax(220px, 270px)); gap: 28px 40px;
}

#pv-header .pv-feature {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 6px;
  align-self: start;
  padding: 22px;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(246, 195, 67, .35) 0%, rgba(246, 195, 67, 0) 55%),
    linear-gradient(140deg, var(--pv-navy-2) 0%, var(--pv-blue) 100%);
  transition: transform .2s, box-shadow .2s;
}
#pv-header .pv-feature:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(31, 116, 212, .7); }
.pv-feature-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pv-sun); }
.pv-feature-title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.pv-feature-text { font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .82); }
.pv-feature-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; }
#pv-header .pv-feature:hover .pv-feature-cta svg { transform: translateX(3px); }
.pv-feature-cta svg { transition: transform .2s; }

.pv-col-title {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--pv-muted);
  padding-bottom: 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--pv-line);
}
#pv-header .pv-col a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; margin: 0 -10px;
  border-radius: 8px;
  font-size: 14px; color: var(--pv-ink);
  transition: color .15s, background-color .15s;
}
#pv-header .pv-col a svg { color: var(--pv-blue); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
#pv-header .pv-col a:hover { background: var(--pv-soft); color: var(--pv-blue); }
#pv-header .pv-col a:hover svg { opacity: 1; transform: none; }
.pv-tag {
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--pv-blue); background: #e7f0fc; padding: 2px 6px; border-radius: 4px;
}

/* ---------- Actions ---------- */
.pv-actions { display: flex; align-items: center; gap: 10px; }
#pv-header .pv-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--pv-blue-2) 0%, var(--pv-blue) 100%);
  box-shadow: 0 6px 16px -6px rgba(31, 116, 212, .65);
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}
#pv-header .pv-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(31, 116, 212, .75); color: #fff; }

#pv-header .pv-burger {
  display: none;
  width: 44px; height: 44px; border-radius: 10px;
  align-items: center; justify-content: center;
  color: var(--pv-navy);
  border: 1px solid var(--pv-line);
}
#pv-header .pv-burger .pv-icon-close { display: none; }
#pv-header.nav-open .pv-burger .pv-icon-open { display: none; }
#pv-header.nav-open .pv-burger .pv-icon-close { display: block; }

/* ---------- Tablet / mobile ---------- */
/* Step 1 on narrower desktops: shorten "Exhibit & Sponsor" to "Exhibit". */
@media (min-width: 780px) and (max-width: 1199px) {
  #pv-header .pv-label-long { display: none; }
}

/* Narrower desktops: keep the full menu as long as possible.
   Step 2: drop the Submit Abstract button. Step 3: drop the Awards item. */
@media (min-width: 780px) and (max-width: 1089px) {
  #pv-header .pv-actions .pv-cta { display: none; }
}
@media (min-width: 780px) and (max-width: 909px) {
  .pv-item-awards { display: none !important; }
  #pv-header .pv-link { padding: 9px 8px; }
  .pv-mainbar > .pv-container { gap: 14px; }
}

/* Small screens: collapse into the menu button */
@media (max-width: 779px) {
  #pv-header { --pv-bar-h: 70px; }
  #pv-header .pv-burger { display: inline-flex; }

  .pv-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    max-height: calc(100vh - var(--pv-bar-h));
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid var(--pv-line);
    box-shadow: 0 24px 40px -18px rgba(10, 37, 64, .35);
  }
  #pv-header.nav-open .pv-nav { display: block; }
  #pv-header .pv-menu { flex-direction: column; padding: 4px 20px 20px; gap: 0; }
  .pv-item { display: block; border-bottom: 1px solid var(--pv-line); }
  #pv-header .pv-link { width: 100%; justify-content: space-between; padding: 15px 4px; font-size: 16px; border-radius: 0; }
  #pv-header .pv-item:hover > .pv-link { background: none; color: var(--pv-ink); }
  #pv-header .pv-item:hover > .pv-link svg { transform: none; color: var(--pv-muted); }
  #pv-header .pv-item.is-open > .pv-link { background: none; color: var(--pv-blue); }
  #pv-header .pv-item.is-open > .pv-link svg { transform: rotate(180deg); color: var(--pv-blue); }
  #pv-header .pv-link.is-active::after { display: none; }

  .pv-panel,
  .pv-item:hover > .pv-panel,
  .pv-item:focus-within > .pv-panel {
    position: static; display: none;
    opacity: 1; visibility: visible; transform: none; transition: none;
    border: 0; box-shadow: none; background: none;
  }
  .pv-item.is-open > .pv-panel { display: block; }
  .pv-panel-inner { display: block; padding: 0 0 12px; }
  #pv-header .pv-feature { display: none; }
  .pv-col + .pv-col { margin-top: 14px; }
  .pv-col-title { border: 0; padding-bottom: 2px; margin-bottom: 2px; }
  #pv-header .pv-col a { margin: 0; padding: 9px 6px; }
}

@media (max-width: 991px) {
  .pv-meta .pv-meta-name { display: none; }
}

@media (max-width: 767px) {
  #pv-header { --pv-topbar-h: 36px; }
  .pv-meta .pv-meta-hide-sm,
  .pv-utility .pv-label-hide-sm,
  .pv-utility .pv-sep { display: none; }
  .pv-container { padding: 0 16px; }
  .pv-brand-title { font-size: 17px; }
  .pv-brand-sub { display: none; }
  #pv-header .pv-cta { padding: 9px 14px; font-size: 13px; }
}

@media (max-width: 420px) {
  #pv-header .pv-cta .pv-cta-long { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #pv-header *, #pv-header *::before, #pv-header *::after { transition: none !important; }
}
