/* Refined public header: compact government utility bar and clear navigation. */
.utility-bar {
  position: relative;
  z-index: 102;
  background: linear-gradient(90deg, #043d2f, #075d43);
}

.utility-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: max(16px, calc((100vw - 1180px) / 2));
  background: #f47b20;
}

.utility-inner {
  min-height: 38px;
  justify-content: space-between;
  gap: 20px;
}

.nav-official-identity {
  display: flex;
  min-width: 0;
  flex: 0 1 410px;
  align-items: center !important;
  gap: 13px !important;
  color: #173d2f;
  line-height: 1.08;
}

.nav-official-identity > img {
  display: block;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 2px solid #e1e9e5;
  border-radius: 50%;
  object-fit: cover;
}

.nav-official-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 1px !important;
}

.nav-official-copy small,
.nav-official-copy strong { display: block; }

.nav-official-copy small {
  color: #657a70;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.nav-official-copy strong {
  margin: 3px 0;
  color: #07513b;
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -.015em;
  white-space: nowrap;
}

.nav-official-identity:hover strong,
.nav-official-identity:focus-visible strong { color: #d96516; }

.utility-location {
  min-width: 0;
  color: #fff;
  font-weight: 600;
}

.utility-location svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #ffae70;
}

.utility-location small {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  color: #bdd8cd;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.utility-location:hover small,
.utility-location:focus-visible small {
  color: #fff;
}

.utility-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 17px;
}

.utility-actions a,
.utility-actions button {
  font-size: 0.71rem;
  font-weight: 650;
}

.main-nav {
  border-bottom: 1px solid rgba(207, 222, 215, .72) !important;
  background: rgba(255, 255, 255, .82) !important;
  box-shadow: 0 5px 16px rgba(3, 46, 37, .055) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
}

.nav-inner {
  min-height: 78px;
}

.brand {
  min-width: 255px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border: 3px solid #edf3f0;
}

.brand small {
  font-size: 0.68rem;
  letter-spacing: 0.075em;
}

.brand strong {
  margin-top: 2px;
  font-size: 1.26rem;
}

.nav-links {
  margin-left: auto;
  gap: clamp(10px, 1.25vw, 19px);
  font-size: 0.75rem;
}

.nav-links > a:not(.nav-search),
.nav-dropdown-trigger {
  padding: 27px 5px 25px;
}

.nav-links > a.is-current:not(.nav-search),
.nav-dropdown.is-current .nav-dropdown-trigger {
  color: #07513b;
}

.nav-links > a.is-current:not(.nav-search)::after,
.nav-dropdown.is-current .nav-dropdown-trigger::after {
  right: 5px;
  left: 5px;
  height: 3px;
}

.nav-search {
  width: 40px;
  height: 40px;
  border: 1px solid #d6e3dd;
  background: #eff5f2;
}

.nav-search:hover,
.nav-search:focus-visible,
.nav-search.is-current {
  border-color: #07513b;
  background: #07513b;
  color: #fff;
  transform: translateY(-2px);
}

.nav-government-marks {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  margin-left: 17px;
  padding-left: 17px;
  border-left: 1px solid #d9e4df;
}

.nav-government-marks img {
  display: block;
  object-fit: contain;
}

.nav-deped-logo {
  width: 108px;
  height: auto;
}

.nav-bagong-pilipinas-logo {
  width: 45px;
  height: 51px;
}

.nav-dropdown-menu {
  width: 275px;
  padding: 8px 0;
  border-top-color: #f47b20;
  box-shadow: 0 20px 45px rgba(3, 46, 37, 0.18);
}

.nav-dropdown-menu a {
  min-height: 43px;
  padding: 10px 18px;
}

@media (max-width: 1000px) {
  .utility-bar {
    display: block;
  }

  .utility-bar::before {
    width: 5px;
  }

  .utility-inner {
    min-height: 34px;
  }

  .nav-official-identity { flex-basis: auto; }

  .nav-official-identity > img {
    width: 50px;
    height: 50px;
  }

  .nav-official-copy small { font-size: .56rem; }

  .nav-official-copy strong { font-size: clamp(.92rem, 2.5vw, 1.12rem); }

  .utility-location {
    width: 100%;
    overflow: hidden;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .utility-location span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .utility-location small,
  .utility-actions {
    display: none;
  }

  .nav-inner {
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 45px;
    height: 45px;
  }

  .nav-government-marks {
    order: 1;
    display: flex;
    gap: 7px;
    margin-left: auto;
    padding-left: 10px;
  }

  .nav-government-marks .nav-deped-logo {
    width: 82px;
  }

  .nav-government-marks .nav-bagong-pilipinas-logo {
    width: 31px;
    height: 35px;
  }

  .menu-button {
    order: 2;
    margin-left: 12px;
  }

  #primary-menu > a.is-current:not(.nav-search),
  #primary-menu > .nav-dropdown.is-current > .nav-trigger-row {
    box-shadow: inset 3px 0 #f47b20;
  }

  #primary-menu > a.is-current:not(.nav-search) {
    padding-left: 12px;
  }

  #primary-menu.nav-links {
    top: 34px;
    bottom: auto;
    width: min(86vw, 390px);
    height: calc(100dvh - 34px);
    max-height: calc(100dvh - 34px);
    padding: 0 18px 24px;
    justify-content: flex-start;
    flex: none;
  }

  .menu-button.is-active {
    top: 46px;
    right: 16px;
  }

  #primary-menu .mobile-menu-brand {
    min-height: 68px;
  }

  #primary-menu > a:not(.nav-search),
  #primary-menu .nav-trigger-row {
    min-height: 50px;
  }

  #primary-menu > a:not(.nav-search),
  #primary-menu .nav-trigger-row > .nav-dropdown-trigger {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  #primary-menu .nav-search {
    min-height: 42px;
    height: 42px;
    margin-top: 12px;
  }
}

@media (max-width: 520px) {
  .site-shell.utility-inner {
    width: calc(100% - 24px);
  }

  .nav-official-identity { gap: 9px !important; }

  .nav-official-identity > img {
    width: 44px;
    height: 44px;
  }

  .nav-official-copy small { font-size: .48rem; }

  .nav-official-copy strong { font-size: clamp(.78rem, 3.4vw, .96rem); }

  .brand small {
    font-size: 0.56rem;
  }

  .brand strong {
    font-size: 1rem;
  }

  .main-nav .brand > span {
    display: none;
  }

  .main-nav .brand {
    flex: 0 0 auto;
  }

  .nav-government-marks {
    padding-left: 8px;
  }

  #primary-menu.nav-links {
    width: min(88vw, 370px);
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 360px) {
  .nav-government-marks .nav-deped-logo {
    width: 70px;
  }

  .nav-government-marks .nav-bagong-pilipinas-logo {
    width: 27px;
    height: 31px;
  }

  .menu-button {
    width: 42px;
    height: 42px;
    margin-left: 8px;
  }
}
