/* ==============================================
   Pachavega — Custom Header + Mega Menu
   ============================================== */

:root {
  --pvh-maroon:  #6d3b36;
  --pvh-clay:    #ac675a;
  --pvh-sage:    #709970;
  --pvh-cream:   #e8e5d9;
  --pvh-ink:     #363035;
  --pvh-white:   #ffffff;
  --pvh-h:       72px;
  --pvh-trans:   0.22s ease;
  --pvh-shadow:  0 6px 28px rgba(54,48,53,.12);
  --pvh-radius:  10px;
}

/* ── Reset for header elements ── */
#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-family: inherit; }

/* ── Wrapper ── */
#pv-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  height: var(--pvh-h);
  background: var(--pvh-white);
  border-bottom: 1px solid rgba(109,59,54,.10);
  transition: box-shadow var(--pvh-trans);
  display: flex;
  align-items: center;
}
.admin-bar #pv-header              { top: 32px; }
@media screen and (max-width:782px){
  .admin-bar #pv-header            { top: 46px; }
}
#pv-header.is-scrolled {
  box-shadow: var(--pvh-shadow);
}

/* ── Inner container ── */
.pvh-container {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Logo ── */
.pvh-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.pvh-logo img {
  height: 46px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ─────────────────────────────────────────
   DESKTOP NAV
───────────────────────────────────────── */
.pvh-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.pvh-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.pvh-nav__item {
  position: relative;
}

/* Nav link */
.pvh-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--pvh-ink);
  border-radius: 7px;
  white-space: nowrap;
  transition: color var(--pvh-trans), background var(--pvh-trans);
  position: relative;
}
.pvh-nav__link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--pvh-maroon);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s ease;
}
.pvh-nav__item:hover .pvh-nav__link,
.pvh-nav__item:focus-within .pvh-nav__link {
  color: var(--pvh-maroon);
  background: rgba(109,59,54,.05);
}
.pvh-nav__item:hover .pvh-nav__link::after,
.pvh-nav__item:focus-within .pvh-nav__link::after {
  transform: scaleX(1);
}

/* Chevron */
.pvh-chevron {
  width: 10px;
  height: 10px;
  transition: transform var(--pvh-trans);
  flex-shrink: 0;
  stroke: currentColor;
}
.pvh-nav__item:hover .pvh-chevron,
.pvh-nav__item:focus-within .pvh-chevron {
  transform: rotate(180deg);
}

/* ─────────────────────────────────────────
   DROPDOWN (small: About, Media)
───────────────────────────────────────── */
.pvh-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 230px;
  background: var(--pvh-white);
  border: 1px solid rgba(109,59,54,.12);
  border-radius: var(--pvh-radius);
  box-shadow: 0 16px 48px rgba(54,48,53,.14);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--pvh-trans), transform var(--pvh-trans), visibility var(--pvh-trans);
  z-index: 200;
}
/* Arrow */
.pvh-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 6px;
  background: var(--pvh-white);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.pvh-nav__item--drop:hover .pvh-dropdown,
.pvh-nav__item--drop:focus-within .pvh-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.pvh-dropdown li a {
  display: block;
  padding: 9px 14px;
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pvh-ink);
  border-radius: 7px;
  transition: background var(--pvh-trans), color var(--pvh-trans);
}
.pvh-dropdown li a:hover {
  background: rgba(109,59,54,.06);
  color: var(--pvh-maroon);
}

/* ─────────────────────────────────────────
   MEGA MENU
───────────────────────────────────────── */
.pvh-nav__item--mega {
  position: static;
}
.pvh-mega {
  position: absolute;
  top: calc(var(--pvh-h) - 4px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--pvh-white);
  border: 1px solid rgba(109,59,54,.12);
  border-radius: var(--pvh-radius);
  box-shadow: 0 20px 60px rgba(54,48,53,.16);
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--pvh-trans), transform var(--pvh-trans), visibility var(--pvh-trans);
  z-index: 200;
}
.pvh-nav__item--mega:hover .pvh-mega,
.pvh-nav__item--mega:focus-within .pvh-mega {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Courses: 2-column mega */
.pvh-mega--courses { width: 620px; }
/* Retreats: 1-column mega */
.pvh-mega--retreats { width: 360px; }

.pvh-mega__grid {
  display: grid;
  gap: 28px;
}
.pvh-mega--courses .pvh-mega__grid  { grid-template-columns: 1fr 1fr; }
.pvh-mega--retreats .pvh-mega__grid { grid-template-columns: 1fr; }

/* Column heading */
.pvh-mega__col-title {
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pvh-maroon);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(109,59,54,.12);
}

/* Mega link */
.pvh-mega__col ul li a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pvh-ink);
  border-radius: 7px;
  transition: background var(--pvh-trans), color var(--pvh-trans);
  line-height: 1.3;
}
.pvh-mega__col ul li a:hover {
  background: rgba(109,59,54,.06);
  color: var(--pvh-maroon);
}

/* Tag badge */
.pvh-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(112,153,112,.18);
  color: #4d7a4d;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

/* "View all" pill */
.pvh-mega__viewall {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  padding: 7px 14px;
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pvh-maroon);
  border: 1px solid rgba(109,59,54,.22);
  border-radius: 99px;
  transition: background var(--pvh-trans), color var(--pvh-trans), border-color var(--pvh-trans);
}
.pvh-mega__viewall:hover {
  background: var(--pvh-maroon);
  color: var(--pvh-white);
  border-color: var(--pvh-maroon);
}

/* Divider between mega columns */
.pvh-mega--courses .pvh-mega__grid > * + * {
  border-left: 1px solid rgba(109,59,54,.10);
  padding-left: 28px;
}

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

/* Student Login button */
.pvh-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--pvh-white);
  background: linear-gradient(135deg, var(--pvh-sage) 0%, var(--pvh-clay) 58%, var(--pvh-maroon) 100%);
  border-radius: 99px;
  box-shadow: 0 4px 14px rgba(109,59,54,.22);
  white-space: nowrap;
  transition: opacity var(--pvh-trans), box-shadow var(--pvh-trans), transform var(--pvh-trans);
}
.pvh-login-btn:hover {
  opacity: .90;
  box-shadow: 0 6px 22px rgba(109,59,54,.32);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────
   HAMBURGER
───────────────────────────────────────── */
.pvh-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(109,59,54,.18);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background var(--pvh-trans), border-color var(--pvh-trans);
}
.pvh-hamburger:hover {
  background: rgba(109,59,54,.06);
  border-color: rgba(109,59,54,.30);
}
.pvh-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pvh-ink);
  border-radius: 2px;
  transition: transform .26s ease, opacity .26s ease, width .26s ease;
}
.pvh-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pvh-hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.pvh-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────────────────────────────
   MOBILE OVERLAY
───────────────────────────────────────── */
#pvh-overlay {
  position: fixed;
  inset: 0;
  background: rgba(54,48,53,.52);
  z-index: 8998;
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity .30s ease, visibility .30s ease;
}
#pvh-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ─────────────────────────────────────────
   MOBILE DRAWER
───────────────────────────────────────── */
#pvh-mobile {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 94vw);
  background: var(--pvh-white);
  z-index: 8999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(54,48,53,.12);
}
#pvh-mobile.is-open { transform: translateX(0); }

/* Admin bar offset for mobile drawer */
.admin-bar #pvh-mobile { top: 32px; }
@media screen and (max-width:782px){
  .admin-bar #pvh-mobile { top: 46px; }
}

/* Drawer header */
.pvh-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(109,59,54,.10);
  flex-shrink: 0;
}
.pvh-mobile-head img { height: 36px; width: auto; object-fit: contain; }
.pvh-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(109,59,54,.18);
  border-radius: 8px;
  background: transparent;
  color: var(--pvh-ink);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  transition: background var(--pvh-trans);
}
.pvh-close-btn:hover { background: rgba(109,59,54,.06); }

/* Drawer body */
.pvh-mobile-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 32px;
}

/* Mobile nav list */
.pvh-mobile-list {
  display: flex;
  flex-direction: column;
}
.pvh-mobile-list > li {
  border-bottom: 1px solid rgba(109,59,54,.07);
}
.pvh-mobile-list > li > a,
.pvh-mobile-acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 10px;
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--pvh-ink);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
  transition: color var(--pvh-trans), background var(--pvh-trans);
  text-decoration: none;
}
.pvh-mobile-list > li > a:hover,
.pvh-mobile-acc-btn:hover {
  color: var(--pvh-maroon);
  background: rgba(109,59,54,.04);
}
.pvh-mobile-acc-btn svg {
  flex-shrink: 0;
  transition: transform .24s ease;
}
.pvh-mobile-acc-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Mobile sub-list */
.pvh-mobile-sub {
  padding: 2px 0 8px 16px;
  border-left: 2px solid rgba(109,59,54,.14);
  margin-left: 12px;
}
.pvh-mobile-sub li a {
  display: block;
  padding: 9px 12px;
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(54,48,53,.76);
  border-radius: 6px;
  transition: color var(--pvh-trans), background var(--pvh-trans);
  text-decoration: none;
}
.pvh-mobile-sub li a:hover {
  color: var(--pvh-maroon);
  background: rgba(109,59,54,.04);
}

/* Mobile login CTA */
.pvh-mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 10px 4px;
  padding: 14px;
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--pvh-white) !important;
  background: linear-gradient(135deg, var(--pvh-sage) 0%, var(--pvh-clay) 58%, var(--pvh-maroon) 100%);
  border-radius: 99px;
  text-decoration: none;
  text-align: center;
}

/* ─────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
───────────────────────────────────────── */
@media (max-width: 1080px) {
  .pvh-nav { display: none; }
  .pvh-login-btn { display: none; }
  .pvh-hamburger { display: flex; }
}

@media (max-width: 480px) {
  .pvh-container { padding: 0 16px; }
  .pvh-logo img  { height: 38px; }
}

/* ─────────────────────────────────────────
   ACCESSIBILITY
───────────────────────────────────────── */
.pvh-nav__link:focus-visible,
.pvh-dropdown li a:focus-visible,
.pvh-mega__col ul li a:focus-visible,
.pvh-mega__viewall:focus-visible,
.pvh-login-btn:focus-visible,
.pvh-hamburger:focus-visible,
.pvh-close-btn:focus-visible {
  outline: 2px solid var(--pvh-maroon);
  outline-offset: 2px;
}
