/* Separate pages: each top-menu item shows only its own sections (body[data-page] is set by app.js). */
#main > [data-page]:not(.page-on){display:none!important}
/* Before the script runs, show only the home page so deep links don't flash every section. */
body:not([data-page]) #main > [data-page]:not([data-page="home"]){display:none!important}
#main{min-height:calc(100svh - 220px)}
body:not([data-page="home"]) #main > .page-on{padding-top:150px}
body[data-page="gallery"] .gallery-section{min-height:calc(100svh - 220px)}
/* Certifications on bureau unit cards */
.unit-certs{margin:0 0 14px}
.unit-certs small{display:block;margin-bottom:6px;font-size:.72rem;font-weight:650;letter-spacing:.12em;text-transform:uppercase;color:var(--faint)}
.unit-certs ul{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.unit-certs li{padding:3px 10px;border-radius:999px;font-size:.8rem;font-weight:550;color:var(--gold-2);background:rgba(217,164,65,.1);box-shadow:inset 0 0 0 1px rgba(217,164,65,.28)}
/* Home page quick links */
.explore-section{background:linear-gradient(180deg,var(--navy-950),var(--navy-900))}
.explore-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:900px){.explore-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.explore-grid{grid-template-columns:1fr}body:not([data-page="home"]) #main > .page-on{padding-top:120px}}
/* Inner pages start on light or dark sections, so the header keeps its solid bar there. */
body[data-page]:not([data-page="home"]) .site-header{background:rgba(4,11,29,.95);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);box-shadow:0 1px 0 var(--line)}
/* SAHP Heads on the Organization page */
.heads-block{margin-top:38px}
.heads-block h3{margin:0 0 4px;font-family:var(--display);font-size:1.25rem;letter-spacing:.06em;text-transform:uppercase;color:var(--gold-2)}
.heads-block > p{margin:0 0 16px;color:var(--muted);font-size:.92rem}
.heads-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;padding:0;list-style:none}
.head-card{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px var(--line)}
.head-card img{flex:none;width:48px;height:48px;border-radius:50%;object-fit:cover;background:var(--navy-900);box-shadow:0 0 0 2px rgba(217,164,65,.55)}
.head-card > span{display:flex;flex-direction:column;gap:2px;min-width:0}
.head-card strong{font-size:.98rem;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.head-card small{color:var(--muted);font-size:.82rem}
.head-card small.head-time{color:var(--gold-2);font-size:.76rem;font-weight:600;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.head-call{display:inline-block;margin-right:6px;padding:0 6px;border-radius:5px;font-size:.76em;font-weight:700;color:var(--navy-950,#040b1d);background:var(--gold-2,#e7b955);vertical-align:1px}
@media (max-width:1100px){.heads-list{grid-template-columns:1fr}}
@media (max-width:900px){.heads-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:520px){.heads-list{grid-template-columns:1fr}}

/* Only a page's first section clears the fixed header. Sections after it on the same page (Organization's Command
   Staff, etc.) use normal spacing, and the first section's bottom padding is trimmed so there's no big empty band. */
body:not([data-page="home"]) #main > .page-on ~ .page-on.section { padding-top: 56px; }
body:not([data-page="home"]) #main > .page-on.section:has(~ .page-on) { padding-bottom: 64px; }
@media (max-width: 640px) {
  body:not([data-page="home"]) #main > .page-on ~ .page-on.section { padding-top: 40px; }
  body:not([data-page="home"]) #main > .page-on.section:has(~ .page-on) { padding-bottom: 48px; }
}
