:root {
  --blue: #ffd400;
  --blue-dark: #3f3100;
  --gold: #ffea61;
  --red: #b52d32;
  --green: #1f7a50;
  --ink: #17212e;
  --muted: #617082;
  --line: #d9e0e8;
  --surface: #f5f7fa;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(10, 34, 60, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  line-height: 1.55;
  background: var(--white);
}

body[data-page-mode="section"] main > section:not(.is-page-active),
body[data-page-mode="section"] > .contact:not(.is-page-active) {
  display: none;
}

body[data-page-mode="section"] main {
  min-height: 58vh;
}

body:not([data-page-mode="section"]) #about,
body:not([data-page-mode="section"]) #services,
body:not([data-page-mode="section"]) #officials,
body:not([data-page-mode="section"]) #archive,
body:not([data-page-mode="section"]) #transparency,
body:not([data-page-mode="section"]) #tourism,
body:not([data-page-mode="section"]) #contact {
  display: none;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.gov-bar {
  background: var(--blue-dark);
  color: var(--white);
  font-size: 0.86rem;
}

.gov-bar__inner,
.masthead,
.primary-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.gov-bar nav {
  display: flex;
  gap: 18px;
}

.gov-bar__right {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.site-clock {
  white-space: nowrap;
  color: var(--gold);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.gov-bar a,
.primary-nav a {
  text-decoration: none;
}

.gov-bar a.is-active,
.primary-nav a.is-active {
  color: var(--gold);
}

.masthead {
  min-height: 92px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand strong {
  display: block;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.site-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--white);
  border: 4px solid #fff;
  outline: 2px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.menu-button {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  min-height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  font-weight: 700;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-nav {
  background: var(--blue);
  color: var(--blue-dark);
  border-bottom: 4px solid var(--blue-dark);
}

.primary-nav__inner {
  justify-content: flex-start;
  overflow-x: auto;
}

.primary-nav a {
  padding: 15px 0;
  font-weight: 700;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a:focus {
  color: var(--red);
}

.hero {
  position: relative;
  aspect-ratio: 1888 / 787;
  min-height: 420px;
  max-height: 787px;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
}

.hero-slides,
.hero-slide,
.hero-slide-bg {
  position: absolute;
  inset: 0;
}

.hero-slides {
  z-index: -2;
  background: #07101d;
}

.hero-slide-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.12);
  filter: blur(18px);
  transition: opacity 1200ms ease-in-out, transform 1800ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.hero-slide {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(1.045);
  transition: opacity 1200ms ease-in-out, transform 1800ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.hero-slide-bg.is-active {
  opacity: 0.9;
  transform: scale(1.08);
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue-dark);
  font: inherit;
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.hero-arrow:hover,
.hero-arrow:focus-visible {
  background: var(--blue);
  color: var(--blue-dark);
  transform: translateY(-50%) scale(1.06);
}

.hero-arrow--prev {
  left: clamp(16px, 3vw, 42px);
}

.hero-arrow--next {
  right: clamp(16px, 3vw, 42px);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  color: var(--white);
  background: transparent;
}

.hero__content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: inherit;
  padding: clamp(4px, 1vw, 14px) 0 118px;
}

.hero-wordmark {
  display: block;
  width: min(96vw, 1480px);
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.38));
  opacity: 1;
  transform: translateY(0);
  transition: opacity 650ms ease, transform 650ms ease;
}

.hero:not([data-active-slide="0"]) .hero-wordmark {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.hero-wordmark img {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(130px, 30vw, 360px);
  object-fit: contain;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 9px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 660px;
  font-size: clamp(1rem, 2vw, 1.24rem);
  margin: 22px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.button--primary {
  color: var(--blue-dark);
  background: var(--gold);
}

.button--light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
}

.quick-panel {
  margin-top: -55px;
  position: relative;
  z-index: 3;
}

.quick-panel--services {
  margin-top: 0;
  margin-bottom: 26px;
}

.quick-panel--services .quick-grid {
  grid-template-columns: repeat(3, 1fr);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

.quick-grid a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 110px;
  padding: 22px;
  text-decoration: none;
  border-right: 1px solid var(--line);
  font-weight: 800;
}

.quick-grid a:last-child {
  border-right: 0;
}

.quick-grid svg {
  color: var(--blue);
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
}

.section {
  padding: 82px 0;
}

.section--band {
  background: var(--surface);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4vw, 3.05rem);
  line-height: 1.05;
  color: var(--blue-dark);
}

h3 {
  margin: 0 0 8px;
  color: var(--blue-dark);
}

.two-column,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 48px;
  align-items: start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.stats article,
.profile-card,
.service-grid article,
.news-grid article,
.official-list article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats article {
  padding: 18px;
}

.stats strong {
  display: block;
  color: var(--blue);
  font-size: 1.6rem;
  line-height: 1;
}

.stats span,
.official-list span,
.governance-card span,
.site-footer span,
.document-list small {
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-card {
  padding: 26px;
  box-shadow: var(--shadow);
}

.profile-card dl {
  margin: 0;
}

.profile-card div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.profile-card div:last-child {
  border-bottom: 0;
}

.profile-card dt {
  color: var(--muted);
  font-weight: 700;
}

.profile-card dd {
  margin: 0;
  font-weight: 800;
}

.service-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service-grid article,
.news-grid article {
  padding: 24px;
}

.service-grid a,
.news-grid a,
.document-list a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.hearts-section {
  background: #f7f4ee;
}

.hearts-content {
  max-width: 760px;
  margin-bottom: 24px;
}

.hearts-story {
  padding: 42px 42px 48px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f9f1df, #c8b99a);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mayor-message {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 34px;
  align-items: center;
  margin-top: 44px;
  padding: 34px;
  border: 1px solid rgba(63, 49, 0, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 234, 97, 0.34), rgba(255, 255, 255, 0.92) 42%, rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 24px 60px rgba(63, 49, 0, 0.13);
}

.mayor-message__photo {
  position: relative;
  min-height: 430px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--blue-dark);
  box-shadow: 0 20px 42px rgba(23, 33, 46, 0.18);
}

.mayor-message__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(63, 49, 0, 0), rgba(63, 49, 0, 0.18));
  pointer-events: none;
}

.mayor-message__photo img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  object-position: center top;
}

.mayor-message__content {
  display: grid;
  align-content: center;
}

.mayor-message__brand {
  width: min(100%, 460px);
  margin-bottom: 22px;
}

.mayor-message h3 {
  margin: 0 0 18px;
  color: var(--blue-dark);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.mayor-message blockquote {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 22px 0 22px 24px;
  border-left: 5px solid var(--blue);
  color: var(--ink);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 800;
}

.mayor-message blockquote p {
  margin: 0;
}

.mayor-message__note {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hearts-carousel {
  display: grid;
  grid-template-columns: 0.82fr 0.96fr 1.68fr 0.96fr 0.82fr;
  gap: 20px;
  align-items: center;
  min-width: 1120px;
  transition: opacity 820ms ease, transform 980ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hearts-carousel.is-changing {
  opacity: 0.55;
  transform: translateY(12px) scale(0.985);
}

.hearts-card {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 290px;
  padding: 0;
  border: 0;
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  background: #ffffff;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transform: translateY(0) scale(1);
  transition:
    transform 1300ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 980ms ease,
    filter 980ms ease,
    box-shadow 1300ms cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 980ms ease;
  will-change: transform, opacity, filter;
}

.hearts-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  background: #ffffff;
  transform: scale(1);
  transition: transform 1300ms cubic-bezier(0.16, 1, 0.3, 1), filter 980ms ease;
}

.hearts-card--side {
  filter: grayscale(1);
  opacity: 0.68;
}

.hearts-card--side:hover,
.hearts-card--side:focus {
  filter: grayscale(0.35);
  opacity: 0.88;
  outline: none;
  transform: translateY(-14px) scale(1.035);
  box-shadow: 0 18px 32px rgba(63, 49, 0, 0.16);
}

.hearts-card--side:hover img,
.hearts-card--side:focus img {
  transform: scale(1.06);
}

.hearts-card--main {
  min-height: 430px;
  border-radius: 28px;
  filter: none;
  opacity: 1;
  cursor: default;
  box-shadow: 0 24px 48px rgba(63, 49, 0, 0.22);
  overflow: visible;
}

.hearts-card--main::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 3px solid var(--blue);
  border-radius: 34px;
  pointer-events: none;
}

.hearts-card--main img {
  border-radius: 28px;
}

.hearts-card > span {
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--blue-dark);
  background: var(--blue);
  font-weight: 900;
}

.hearts-card > strong {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 11px 12px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 1.28rem;
  line-height: 1.15;
}

.hearts-bottom-caption {
  max-width: 1040px;
  margin: 44px auto 0;
  color: #0e0f13;
  font-size: clamp(1.35rem, 2.8vw, 2.25rem);
  line-height: 1.45;
  text-align: center;
  font-weight: 800;
  animation: heartsCaptionSlideIn 900ms cubic-bezier(0.16, 1, 0.3, 1);
}


@keyframes heartsCaptionSlideIn {
  from {
    transform: translateX(28px);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes heartsFeaturedIn {
  from {
    transform: translateY(12px) scale(0.96);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

::view-transition-group(hearts-h),
::view-transition-group(hearts-e),
::view-transition-group(hearts-a),
::view-transition-group(hearts-r),
::view-transition-group(hearts-t),
::view-transition-group(hearts-s) {
  animation-duration: 1400ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

::view-transition-old(hearts-h),
::view-transition-old(hearts-e),
::view-transition-old(hearts-a),
::view-transition-old(hearts-r),
::view-transition-old(hearts-t),
::view-transition-old(hearts-s),
::view-transition-new(hearts-h),
::view-transition-new(hearts-e),
::view-transition-new(hearts-a),
::view-transition-new(hearts-r),
::view-transition-new(hearts-t),
::view-transition-new(hearts-s) {
  animation-duration: 1400ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  mix-blend-mode: normal;
}

.icon-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  margin-bottom: 20px;
  color: var(--blue);
  background: #fff6bd;
}

.official-list {
  display: grid;
  gap: 12px;
}

.official-list article {
  padding: 18px;
}

.official-list strong,
.governance-card strong {
  display: block;
  font-size: 1.1rem;
}

.governance-accordion {
  display: grid;
  gap: 12px;
}

#officials {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

body[data-page-mode="section"] main > #officials:not(.is-page-active) {
  display: none;
}

#officials .governance-accordion {
  width: min(100%, 560px);
}

#officials .governance-subsections {
  width: 100%;
}

.governance-subsection-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(10, 34, 60, 0.09);
}

.governance-subsection-nav button {
  flex: 1 1 190px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 15px;
  background: transparent;
  color: var(--blue-dark);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.governance-subsection-nav button:hover,
.governance-subsection-nav button:focus-visible,
.governance-subsection-nav button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
  outline: none;
  transform: translateY(-1px);
}

.governance-subsection-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(10, 34, 60, 0.08);
  animation: governancePanelReveal 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.governance-subsection-panel[hidden] {
  display: none;
}

.governance-subsection-panel__heading {
  padding: 20px 22px 0;
}

.governance-subsection-panel__heading h3 {
  margin: 4px 0 18px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

@media (max-width: 760px) {
  .governance-subsection-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .governance-subsection-nav button {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .governance-subsection-nav {
    grid-template-columns: 1fr;
  }
}
.governance-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(10, 34, 60, 0.08);
  overflow: hidden;
}

.governance-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 18px 20px;
  color: var(--blue-dark);
  background: #fff8cf;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.governance-panel summary::-webkit-details-marker {
  display: none;
}

.governance-panel summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--blue-dark);
  font-size: 1.2rem;
  line-height: 1;
}

.governance-panel[open] summary::after {
  content: "-";
}

.governance-card {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.department-heads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.department-heads .governance-card:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.committee-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  background: #f7fbff;
}

.committee-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(12, 58, 102, 0.08);
}

.committee-gallery__featured {
  grid-column: 1 / -1;
}

.committee-gallery a,
.committee-gallery img {
  display: block;
  width: 100%;
}

.committee-gallery img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 180ms ease;
}

.committee-gallery a:hover img,
.committee-gallery a:focus-visible img {
  transform: scale(1.015);
}

.department-head-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: #f7fbff;
}

.department-head-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.department-head-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
}

.department-head-gallery figcaption {
  padding: 12px 10px 14px;
  color: var(--blue-dark);
  font-weight: 900;
  text-align: center;
}

.council-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 18px;
  font-weight: 800;
  color: var(--blue-dark);
}

.governance-subsection-panel .council-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.governance-subsection-panel .council-list li {
  min-width: 0;
}

.governance-card > .official-static-card {
  width: min(100%, 340px);
}

.official-static-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(10, 34, 60, 0.09);
}

[data-governance-panel="mayor"] .governance-card {
  padding: clamp(20px, 4vw, 36px);
}

[data-governance-panel="mayor"] .governance-card > .official-static-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  align-items: stretch;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

[data-governance-panel="mayor"] .official-static-card__photo {
  min-height: 480px;
}

[data-governance-panel="mayor"] .official-static-card__photo img {
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  background: #fff8cf;
}

[data-governance-panel="mayor"] .official-static-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
}

[data-governance-panel="mayor"] .official-static-card__content h4 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08;
}

[data-governance-panel="mayor"] .official-static-card__position {
  margin-top: 12px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

[data-governance-panel="mayor"] .official-static-card__details {
  gap: 14px;
  margin-top: 24px;
  padding-top: 22px;
}

[data-governance-panel="mayor"] .official-static-card__details dt {
  font-size: 0.82rem;
}

[data-governance-panel="mayor"] .official-static-card__biography {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.official-static-card__biography h5 {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 1.08rem;
}

.official-static-card__biography ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.55;
}
.official-static-card__details dd {
  font-size: 1.02rem;
}

@media (max-width: 760px) {
  [data-governance-panel="mayor"] .governance-card > .official-static-card {
    grid-template-columns: 1fr;
  }

  [data-governance-panel="mayor"] .official-static-card__photo {
    min-height: 380px;
  }

  [data-governance-panel="mayor"] .official-static-card__content {
    padding: 24px;
  }
}
.official-static-card__photo {
  min-height: 260px;
  overflow: hidden;
  background: #fff8cf;
}

.official-static-card__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.official-static-card__photo .profile-placeholder {
  min-height: 260px;
}

.official-static-card__content {
  padding: 17px;
}

.official-static-card__content h4 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.08rem;
  line-height: 1.3;
}

.official-static-card__position {
  margin: 7px 0 0;
  color: var(--red);
  font-weight: 800;
  line-height: 1.4;
}

.official-static-card__details {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.official-static-card__details div {
  display: grid;
  gap: 2px;
}

.official-static-card__details dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.official-static-card__biography {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.official-static-card__biography h5 {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 1.08rem;
}

.official-static-card__biography ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.55;
}
.official-static-card__details dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
}
.official-profile-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(255, 212, 0, 0.85);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.official-profile-link:hover,
.official-profile-link:focus-visible {
  color: var(--red);
  outline: none;
}

.official-profile-link.is-active {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.official-profile-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(22px, 4vw, 42px);
  margin-top: 26px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 16px 40px rgba(10, 34, 60, 0.12);
  scroll-margin-top: 24px;
  animation: governancePanelReveal 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.official-profile-panel[hidden] {
  display: none;
}

.official-profile-panel__photo {
  min-height: 320px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff8cf;
}

.official-profile-panel__photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
}

.official-profile-panel__content h3 {
  margin: 0 0 18px;
  color: var(--blue-dark);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

@media (max-width: 720px) {
  .official-profile-panel {
    grid-template-columns: 1fr;
  }

  .official-profile-panel__photo {
    min-height: 280px;
  }
}
body.is-modal-open {
  overflow: hidden;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.profile-modal.is-open {
  display: block;
}

.profile-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 15, 24, 0.62);
}

.profile-modal__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  width: min(880px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: 24px auto;
  padding: 24px;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.profile-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: var(--blue-dark);
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
}

.profile-modal__photo {
  min-height: 320px;
  border-radius: 8px;
  background: #fff8cf;
  overflow: hidden;
}

.profile-modal__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-placeholder {
  display: grid;
  place-items: center;
  min-height: 320px;
  color: var(--blue-dark);
  background: linear-gradient(135deg, #fff8cf, #ffffff);
  font-size: 5rem;
  font-weight: 900;
}

.profile-modal__content h3 {
  margin: 0 0 18px;
  color: var(--blue-dark);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.profile-data {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.profile-data div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.profile-data dt {
  color: var(--muted);
  font-weight: 800;
}

.profile-data dd {
  margin: 0;
  font-weight: 900;
  color: var(--ink);
}

.news-grid {
  grid-template-columns: repeat(3, 1fr);
}

.news-grid time {
  color: var(--red);
  font-weight: 800;
  font-size: 0.86rem;
}

.facebook-updates {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.facebook-updates h3 {
  margin: 4px 0 10px;
  color: var(--blue-dark);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.facebook-updates p {
  max-width: 560px;
  margin-bottom: 18px;
  color: var(--muted);
}

.facebook-updates a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.facebook-updates iframe {
  width: 100%;
  max-width: 500px;
  min-height: 620px;
  justify-self: end;
  border-radius: 8px;
  background: var(--surface);
}

.news-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 16px;
  background: var(--surface);
}

.meta-row,
.content-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.content-note {
  max-width: 760px;
  padding: 12px 14px;
  margin: -12px 0 24px;
  border-left: 4px solid var(--gold);
  background: var(--surface);
}

.tourism {
  background: var(--blue-dark);
  color: var(--white);
}

.tourism h2,
.tourism h3 {
  color: var(--white);
}

.tourism-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tourism-grid figure {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.tourism-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tourism-grid figcaption {
  padding: 15px;
  font-weight: 800;
}

.barangay-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.barangay-list a,
.barangay-list .barangay-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--white);
  color: var(--blue-dark);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.barangay-list a:hover,
.barangay-list a:focus-visible,
.barangay-list .barangay-button:hover,
.barangay-list .barangay-button:focus-visible,
.barangay-list .barangay-button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(12, 58, 102, 0.18);
  outline: none;
  transform: translateY(-2px);
}

.barangay-list a:active,
.barangay-list .barangay-button:active {
  transform: translateY(0) scale(0.98);
}

.barangay-profile[hidden] {
  display: none;
}
.barangay-profile {
  margin-top: 28px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 18px 45px rgba(12, 58, 102, 0.1);
}

.barangay-profile__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.barangay-profile__heading h3 {
  margin: 4px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.barangay-profile__content {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: stretch;
}

.barangay-map {
  min-height: 430px;
  overflow: hidden;
  border-radius: 14px;
  background: #e8edf2;
}

.barangay-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
}

.barangay-officials {
  padding: 24px;
  border-radius: 14px;
  background: var(--cream);
}

.barangay-officials dl,
.barangay-officials dd {
  margin: 0;
}

.barangay-officials dl > div + div {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(12, 58, 102, 0.14);
}

.barangay-officials dt {
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.barangay-officials__leader dd {
  color: var(--blue-dark);
  font-size: 1.22rem;
  font-weight: 800;
}

.barangay-officials ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 800px) {
  .barangay-profile__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .barangay-profile__content {
    grid-template-columns: 1fr;
  }

  .barangay-map,
  .barangay-map iframe {
    min-height: 330px;
  }
}

.document-list {
  display: grid;
  gap: 12px;
}

.document-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.archive-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  margin-bottom: 22px;
}

.archive-tools label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.archive-tools span {
  color: var(--muted);
  font-size: 0.9rem;
}

.archive-tools input,
.archive-tools select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  background: var(--white);
}

.archive-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: 20px;
  align-items: start;
}

.archive-list,
.archive-detail {
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.archive-list {
  display: grid;
}

.archive-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  background: var(--white);
  cursor: pointer;
}

.archive-item:hover,
.archive-item:focus {
  background: #edf4fb;
  color: var(--blue-dark);
  outline: none;
}

.archive-item span {
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.archive-item strong {
  color: var(--blue-dark);
}

.archive-item small,
.archive-meta {
  color: var(--muted);
}

.archive-detail {
  padding: 24px;
}

.archive-detail h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.archive-detail a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.archive-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.archive-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.empty-state {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

.contact {
  background: var(--surface);
}

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1fr);
  gap: 46px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  font: inherit;
  background: var(--white);
}

.site-footer {
  padding: 36px 0;
  background: var(--blue-dark);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  justify-items: center;
  text-align: center;
}

.site-footer p {
  margin: 8px 0 0;
  color: #d7e2ec;
}

.hotline-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.hotline-list li {
  display: grid;
  gap: 2px;
  justify-items: center;
}

.hotline-list strong {
  color: var(--white);
}

.hotline-list span {
  color: #d7e2ec;
}

.hotline-list a {
  color: var(--gold);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 920px) {
  .menu-button {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav__inner {
    display: grid;
    padding: 8px 0;
  }

  .primary-nav a {
    padding: 12px 0;
  }

  .quick-grid,
  .service-grid,
  .news-grid,
  .tourism-grid,
  .stats,
  .footer-grid,
  .two-column,
  .split,
  .contact__inner,
  .archive-layout,
  .facebook-updates {
    grid-template-columns: 1fr 1fr;
  }

  .service-grid {
    gap: 14px;
  }

  .hearts-story {
    overflow-x: auto;
  }

  .mayor-message {
    grid-template-columns: 1fr;
  }

  .mayor-message__photo {
    min-height: 520px;
  }

  .mayor-message__photo img {
    min-height: 520px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - 24px, 1180px);
  }

  .gov-bar__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
  }

  .gov-bar__right {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    margin-left: 0;
  }

  .masthead {
    min-height: 78px;
  }

  .brand {
    min-width: 0;
  }

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

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

  .site-logo {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  .hero {
    min-height: clamp(320px, 58vw, 460px);
  }

  .hero__overlay {
    align-items: flex-end;
    background: transparent;
  }

  .hero-arrow {
    top: auto;
    bottom: 28px;
    width: 46px;
    height: 46px;
    font-size: 1.9rem;
    transform: none;
  }

  .hero-arrow:hover,
  .hero-arrow:focus-visible {
    transform: scale(1.05);
  }

  .hero__content {
    padding: 8px 0 96px;
  }

  .hero-wordmark {
    width: min(96vw, 720px);
  }

  .hero-wordmark img {
    max-height: clamp(92px, 32vw, 180px);
  }

  .quick-panel {
    margin-top: 0;
  }

  .quick-grid,
  .service-grid,
  .news-grid,
  .tourism-grid,
  .stats,
  .footer-grid,
  .two-column,
  .split,
  .contact__inner,
  .archive-layout,
  .archive-tools,
  .facebook-updates {
    grid-template-columns: 1fr;
  }

  .department-heads {
    grid-template-columns: 1fr;
  }

  .department-heads .governance-card:nth-child(odd) {
    border-right: 0;
  }

  .department-head-gallery {
    grid-template-columns: 1fr;
  }

  .profile-modal__dialog {
    grid-template-columns: 1fr;
  }

  .profile-modal__photo,
  .profile-placeholder {
    min-height: 240px;
  }

  .profile-data div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .facebook-updates {
    padding: 18px;
  }

  .facebook-updates iframe {
    justify-self: stretch;
    min-height: 560px;
  }

  .hearts-story {
    padding: 22px 22px 34px;
    overflow-x: auto;
  }

  .mayor-message {
    gap: 22px;
    margin-top: 30px;
    padding: 18px;
  }

  .mayor-message__photo,
  .mayor-message__photo img {
    min-height: 390px;
  }

  .mayor-message__brand {
    margin-bottom: 16px;
  }

  .mayor-message blockquote {
    padding-left: 16px;
  }

  .hearts-carousel {
    min-width: 960px;
    gap: 12px;
  }

  .hearts-card {
    min-height: 230px;
  }

  .hearts-card--main {
    min-height: 360px;
  }

  .hearts-bottom-caption {
    min-width: 860px;
    margin-top: 38px;
    padding: 0 12px;
  }

  .archive-list,
  .archive-detail {
    max-height: none;
  }

  .archive-images {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-grid {
    border-radius: 0;
    width: 100%;
  }

  .quick-grid a {
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section {
    padding: 58px 0;
  }

  .contact-form {
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .committee-gallery {
    grid-template-columns: 1fr;
  }
}

/* Unified transitions for interactive navigation and governance controls */
[data-page],
.governance-panel summary,
.official-profile-link,
.committee-gallery a {
  transition:
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    opacity 220ms ease,
    transform 220ms ease;
}

[data-page]:active,
.official-profile-link:active {
  transform: translateY(1px) scale(0.985);
}

.governance-panel summary:hover,
.governance-panel summary:focus-visible {
  background: #f2f8ff;
  color: var(--blue);
}

.governance-panel summary::after {
  transition: color 220ms ease, background-color 220ms ease, transform 280ms ease;
}

.governance-panel[open] summary::after {
  transform: rotate(180deg);
}

.governance-panel[open] > :not(summary) {
  animation: governancePanelReveal 360ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top;
}

body[data-page-mode="section"] .is-page-active {
  animation: pageSectionReveal 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-modal.is-open .profile-modal__backdrop {
  animation: modalBackdropReveal 240ms ease both;
}

.profile-modal.is-open .profile-modal__dialog {
  animation: modalDialogReveal 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes governancePanelReveal {
  from { opacity: 0; transform: translateY(-10px) scaleY(0.96); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes pageSectionReveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalBackdropReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalDialogReveal {
  from { opacity: 0; transform: translateY(18px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive hardening for desktop, laptop, tablet, and phone layouts */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

main,
main > section,
.wrap,
.governance-accordion,
.governance-panel,
.governance-card,
.profile-modal__content,
.archive-detail,
.contact-form {
  min-width: 0;
}

p,
li,
dd,
figcaption,
.official-profile-link,
.governance-panel summary,
.barangay-list a {
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  .wrap {
    width: min(100% - 28px, 1180px);
  }

  .gov-bar__inner,
  .gov-bar__right,
  .gov-bar nav {
    flex-wrap: wrap;
  }

  #officials .governance-accordion {
    width: 100%;
  }

  .committee-gallery {
    gap: 10px;
    padding: 12px;
  }
}

@media (max-width: 760px) {
  .gov-bar__inner {
    align-items: flex-start;
  }

  .gov-bar__right {
    width: 100%;
    margin-left: 0;
  }

  .gov-bar nav {
    gap: 8px 14px;
  }

  .primary-nav__inner {
    max-height: min(70vh, 520px);
    overflow-y: auto;
  }

  .section-heading h2,
  .section h2 {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
    line-height: 1.08;
  }

  .governance-panel summary {
    min-height: 56px;
    padding: 13px 15px;
  }

  .governance-card {
    padding: 15px;
  }

  .council-list {
    padding-left: 16px;
  }

  .profile-modal__dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    margin: 10px auto;
    gap: 16px;
    padding: 16px;
  }

  .profile-modal__content h3 {
    padding-right: 36px;
    font-size: clamp(1.55rem, 8vw, 2.25rem);
  }

  .barangay-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .barangay-list a {
    justify-content: center;
    min-height: 44px;
    text-align: center;
  }

  .archive-tools,
  .archive-layout,
  .contact__inner {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: min(100% - 20px, 1180px);
  }

  .gov-bar {
    font-size: 0.76rem;
  }

  .site-clock {
    white-space: normal;
  }

  .masthead {
    gap: 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand span {
    min-width: 0;
  }

  .brand strong,
  .brand small {
    overflow-wrap: normal;
  }

  .menu-button {
    flex: 0 0 auto;
    padding: 0 10px;
  }

  .menu-button span {
    display: none;
  }

  .hero-arrow {
    bottom: 18px;
  }

  .hero-arrow--prev {
    left: 12px;
  }

  .hero-arrow--next {
    right: 12px;
  }

  .section {
    padding: 44px 0;
  }

  .barangay-list {
    grid-template-columns: 1fr;
  }

  .committee-gallery {
    padding: 8px;
  }

  .profile-modal__photo,
  .profile-placeholder {
    min-height: 200px;
    max-height: 42vh;
  }

  .contact-form {
    padding: 14px;
  }

  .archive-images {
    grid-template-columns: 1fr;
  }
}

/* Responsive Main Cover and HEARTS Program */
@media (max-width: 920px) {
  .hero {
    aspect-ratio: 16 / 9;
    min-height: 0;
    max-height: none;
  }

  .hero-slide,
  .hero-slide-bg {
    object-position: center center;
  }

  .hearts-story {
    overflow: visible;
  }

  .hearts-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
  }

  .hearts-card {
    min-height: clamp(190px, 35vw, 280px);
    border-radius: 20px;
  }

  .hearts-card--main {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: clamp(300px, 58vw, 440px);
    border-radius: 24px;
  }

  .hearts-card--main::after {
    inset: -6px;
    border-radius: 28px;
  }

  .hearts-bottom-caption {
    min-width: 0;
    margin-top: 28px;
    padding: 0;
  }
}

@media (max-width: 640px) {
  .hero {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .hero-slide {
    object-fit: contain;
  }

  .hearts-story {
    padding: 16px 8px 26px;
  }

  .hearts-carousel {
    min-width: 0;
    gap: 10px;
  }

  .hearts-card {
    min-height: clamp(150px, 48vw, 220px);
    border-radius: 16px;
  }

  .hearts-card--main {
    min-height: clamp(250px, 82vw, 390px);
    border-radius: 20px;
  }

  .hearts-card > span {
    left: 9px;
    top: 9px;
    width: 36px;
    height: 36px;
  }

  .hearts-card > strong {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 8px;
    font-size: clamp(0.78rem, 3.5vw, 1rem);
  }

  .hearts-bottom-caption {
    min-width: 0;
    margin-top: 22px;
    font-size: clamp(1rem, 5vw, 1.35rem);
  }
}

/* About Pagbilao page-style topic navigation */
.about-section {
  display: block;
}

.about-section__heading {
  margin-bottom: 18px;
}

.about-section__heading h2 {
  margin: 4px 0 0;
}

.about-topic-nav {
  position: sticky;
  top: var(--header-height, 0);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(10, 34, 60, 0.09);
  backdrop-filter: blur(10px);
}

.about-topic-nav button {
  flex: 1 1 180px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 15px;
  background: transparent;
  color: var(--blue-dark);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.about-topic-nav button:hover,
.about-topic-nav button:focus-visible,
.about-topic-nav button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
  outline: none;
  transform: translateY(-1px);
}
.about-topic-panels {
  margin-top: 30px;
}

.about-topic-panel {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(10, 34, 60, 0.09);
  animation: aboutTopicReveal 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.about-topic-panel[hidden] {
  display: none;
}

.about-topic-panel h3 {
  margin: 5px 0 12px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.about-history__content {
  max-width: 84ch;
}

.about-history__content p {
  line-height: 1.8;
  text-align: justify;
  text-wrap: pretty;
}

.about-history__content p + p {
  margin-top: 1.15em;
}
.about-topic-panel p:last-child {
  margin-bottom: 0;
}

.about-topic-panel--former-mayors {
  padding-left: clamp(18px, 3vw, 32px);
  padding-right: clamp(18px, 3vw, 32px);
}

.former-mayors__intro {
  margin-bottom: 24px;
}

.former-mayors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(18px, 2.5vw, 28px);
}

.former-mayor-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(10, 34, 60, 0.09);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.former-mayor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(10, 34, 60, 0.15);
}

.former-mayor-card img {
  display: block;
  width: 100%;
  aspect-ratio: 487 / 567;
  object-fit: contain;
  background: #f3f1ec;
}

.former-mayor-card figcaption {
  display: grid;
  gap: 6px;
  min-height: 94px;
  padding: 16px 17px 18px;
  border-top: 1px solid var(--line);
}

.former-mayor-card strong {
  color: var(--blue-dark);
  font-size: 1.05rem;
  line-height: 1.25;
}

.former-mayor-card span {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.45;
}
@keyframes aboutTopicReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .about-topic-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-topic-nav button {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .about-topic-nav {
    grid-template-columns: 1fr;
  }
}
