.ps-global-header,
.ps-global-header * {
  box-sizing: border-box;
}

.ps-global-header {
  position: sticky;
  z-index: 13000;
  top: 0;
  width: 100%;
  max-width: 100vw;
  min-height: var(--ps-header-height);
  border-bottom: 1px solid rgba(197, 215, 234, 0.8);
  color: var(--ps-ink);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 28px rgba(6, 47, 99, 0.055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  backdrop-filter: blur(18px);
  isolation: isolate;
}

.ps-header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 40px));
  min-height: var(--ps-header-height);
  margin-inline: auto;
  gap: 24px;
}

.ps-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: var(--ps-ink);
  text-decoration: none;
}

.ps-brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 3px solid #0a4f91;
  border-right-color: var(--ps-orange);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #0b65b7, #06346c);
  box-shadow: 0 7px 18px rgba(7, 72, 139, 0.25);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.ps-brand-copy {
  display: grid;
  gap: 2px;
}

.ps-brand-copy strong {
  color: var(--ps-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.ps-brand-copy small {
  color: #6c7f96;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: 0.015em;
}

.ps-primary-nav {
  margin-left: auto;
}

.ps-nav-list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 3px;
  list-style: none;
}

.ps-nav-item {
  position: relative;
  margin: 0;
  padding: 0;
}

.ps-nav-link,
.ps-courses-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 10px;
  border: 0;
  border-radius: 9px;
  color: #344c69;
  background: transparent;
  box-shadow: none;
  font: 750 13px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
}

.ps-courses-toggle {
  gap: 5px;
}

.ps-courses-toggle > span {
  font-size: 15px;
  transition: transform 160ms ease;
}

.ps-nav-link:hover,
.ps-nav-link.is-current,
.ps-courses-toggle:hover,
.ps-courses-toggle.is-current {
  color: var(--ps-blue);
  background: #eff6ff;
}

.ps-nav-link.is-current::after,
.ps-courses-toggle.is-current::after {
  position: absolute;
  right: 11px;
  bottom: 5px;
  left: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--ps-blue);
  content: "";
}

.ps-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-left: 8px;
  padding: 11px 17px;
  border: 1px solid #1267ce;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #1374e7, #075bc1);
  box-shadow: 0 10px 22px rgba(13, 104, 216, 0.22);
  font: 800 12.5px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: 160ms ease;
}

.ps-header-cta:hover,
.ps-header-cta.is-current {
  color: #fff;
  background: linear-gradient(135deg, #075bc1, #064c9e);
  box-shadow: 0 13px 27px rgba(13, 104, 216, 0.3);
  transform: translateY(-1px);
}

.ps-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--ps-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
}

.ps-menu-toggle > span:not(.ps-visually-hidden) {
  display: block;
  width: 21px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--ps-ink);
  transition: 160ms ease;
}

.ps-menu-toggle[aria-expanded="true"] > span:nth-of-type(2) {
  transform: translateY(6px) rotate(45deg);
}

.ps-menu-toggle[aria-expanded="true"] > span:nth-of-type(3) {
  opacity: 0;
}

.ps-menu-toggle[aria-expanded="true"] > span:nth-of-type(4) {
  transform: translateY(-6px) rotate(-45deg);
}

.ps-mega-menu {
  position: fixed;
  z-index: 13020;
  top: calc(var(--ps-header-height) - 1px);
  left: 50%;
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  border: 1px solid var(--ps-line);
  border-radius: 0 0 18px 18px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(4, 31, 67, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -9px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.ps-has-mega.is-open .ps-mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.ps-has-mega.is-open .ps-courses-toggle > span {
  transform: rotate(180deg);
}

.ps-mega-intro {
  display: flex;
  flex-direction: column;
  padding: 28px 25px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(46, 151, 255, 0.38), transparent 35%),
    linear-gradient(150deg, #073f82, #052957);
}

.ps-mega-intro > span {
  margin-bottom: 8px;
  color: #9fd0ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ps-mega-intro > strong {
  max-width: 180px;
  font-size: 22px;
  line-height: 1.28;
}

.ps-mega-intro > a {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 26px;
  gap: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.ps-mega-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 25px 24px;
  gap: 20px;
}

.ps-mega-group {
  min-width: 0;
  margin: 0;
}

.ps-mega-group h2 {
  margin: 0 0 12px;
  color: var(--ps-navy);
  font: 850 12px/1.35 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.02em;
}

.ps-mega-group ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 3px;
  list-style: none;
}

.ps-mega-group li {
  margin: 0;
  padding: 0;
}

.ps-mega-group a {
  display: block;
  padding: 8px 9px;
  border-radius: 8px;
  color: #506783;
  font: 650 11.5px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
}

.ps-mega-group a:hover,
.ps-mega-group a[aria-current="page"] {
  color: var(--ps-blue);
  background: #eff6ff;
}

.ps-global-header :focus-visible {
  outline: 3px solid rgba(20, 122, 243, 0.42);
  outline-offset: 2px;
}

.ps-course-subnav {
  position: sticky;
  z-index: 9900;
  top: var(--ps-header-height);
  border-bottom: 1px solid var(--ps-line);
  background: rgba(249, 252, 255, 0.97);
  box-shadow: 0 5px 18px rgba(6, 47, 99, 0.05);
  backdrop-filter: blur(15px);
}

.ps-subnav-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1200px, calc(100% - 40px));
  min-height: 50px;
  margin-inline: auto;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ps-subnav-shell::-webkit-scrollbar {
  display: none;
}

.ps-subnav-shell a {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 8px;
  color: #5c708a;
  font: 750 12px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
}

.ps-subnav-shell a:hover,
.ps-subnav-shell a.is-active {
  color: var(--ps-blue);
  background: #e8f3ff;
}

@media (max-width: 1100px) {
  .ps-header-shell {
    width: min(100% - 30px, 1200px);
  }
  .ps-menu-toggle {
    display: block;
    margin-left: auto;
  }
  .ps-primary-nav {
    position: fixed;
    z-index: 13020;
    top: var(--ps-header-height);
    right: 0;
    bottom: 0;
    width: min(430px, 100%);
    max-width: 100vw;
    height: calc(100vh - var(--ps-header-height)); /* ADDED — explicit height taaki top+bottom se auto-stretch na hone par bhi full coverage mile */
    height: calc(100dvh - var(--ps-header-height)); /* ADDED — mobile browser address-bar safe height */
    margin: 0;
    padding: 14px 18px 30px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--ps-line);
    background: #fff;
    box-shadow: -24px 30px 60px rgba(4, 31, 67, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(18px);
    transition: 180ms ease;
  }
  .ps-primary-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }
  .ps-nav-list {
    display: grid;
    align-items: stretch;
    gap: 5px;
  }
  .ps-nav-link,
  .ps-courses-toggle {
    width: 100%;
    justify-content: space-between;
    min-height: 48px;
    padding-inline: 13px;
    font-size: 14px;
  }
  .ps-header-cta {
    width: 100%;
    min-height: 48px;
    margin: 8px 0 0;
  }
  .ps-mega-menu {
    position: static;
    display: none;
    width: auto;
    max-height: none;
    margin: 2px 0 8px;
    overflow: visible;
    border-radius: 13px;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }
  .ps-has-mega.is-open .ps-mega-menu {
    display: block;
    transform: none;
  }
  .ps-mega-intro {
    display: block;
    padding: 18px;
    border-radius: 12px 12px 0 0;
  }
  .ps-mega-intro > strong {
    display: block;
    max-width: none;
    font-size: 18px;
  }
  .ps-mega-intro > a {
    margin-top: 15px;
    padding: 0;
  }
  .ps-mega-groups {
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 5px;
  }
  .ps-mega-group {
    border-bottom: 1px solid #edf2f7;
    padding: 10px 4px;
  }
  .ps-mega-group:last-child {
    border-bottom: 0;
  }
  .ps-mega-group h2 {
    margin-left: 8px;
  }
  .ps-mega-group a {
    font-size: 12.5px;
  }
  .ps-course-subnav {
    top: var(--ps-header-height);
  }
  .ps-subnav-shell {
    justify-content: flex-start;
    width: 100%;
    padding-inline: 14px;
  }
}

@media (max-width: 600px) {
  :root {
    --ps-header-height: 68px;
  }

  .ps-header-shell {
    width: calc(100% - 24px);
  }

  .ps-brand-mark {
    width: 39px;
    height: 39px;
    font-size: 16px;
  }

  .ps-brand-copy strong {
    font-size: 14px;
  }

  .ps-brand-copy small {
    font-size: 8px;
  }

  .ps-primary-nav {
    width: 100%;
    border-left: 0;
  }

  .ps-subnav-shell {
    min-height: 46px;
  }

  .ps-subnav-shell a {
    font-size: 11.5px;
  }
}
