/* Content page — header band, governance strip, page-content wrapper, and the
   employee-fillable slot components (purpose line, framed photo, resource
   cards, callout box, people cards).

   Extracted verbatim from mock/mock-03.html "Page template view" (approved)
   and mock/components/content-page-*.html (the standalone library files).
   Class names match the mock's own flat, shared namespace so they line up
   with the header/footer/homepage translations built from the same source.
   Literal hex values (mock-03's :root tokens) — no theme.json custom
   properties, matching homepage.css's convention. Margin/weight resets that
   lived in each component file's own base <style> reset (h1-4, p) are merged
   directly into the selectors below so this file is self-contained. */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Own page-level flow spacing on both the frontend post-content wrapper and
   Gutenberg's root block list. Direct-child scoping keeps these resets out of
   resource/people grids and cards; 48px separates ordinary top-level siblings,
   while the mock's section-heading interval remains 56px. */
.entry-content.wp-block-post-content > *,
.editor-styles-wrapper .is-root-container > * {
  margin-block-start: 0;
  margin-block-end: 0;
}
.entry-content.wp-block-post-content > * + *,
.editor-styles-wrapper .is-root-container > * + * {
  margin-block-start: 48px;
}
.entry-content.wp-block-post-content > section + section,
.entry-content.wp-block-post-content > * + h2,
.editor-styles-wrapper .is-root-container > section + section,
.editor-styles-wrapper .is-root-container > * + h2 {
  margin-block-start: 56px;
}

/* The approved locked-frame sequence is intentionally flush. These more
   specific adjacency rules override the generic 48px page-level interval. */
.entry-content.wp-block-post-content > .page-header-band + .governance-strip,
.entry-content.wp-block-post-content > .governance-strip + .page-content,
.editor-styles-wrapper .is-root-container > .page-header-band + .governance-strip,
.editor-styles-wrapper .is-root-container > .governance-strip + .page-content {
  margin-block-start: 0;
}

/* Preserve the approved spacing inside the starter's .page-content group;
   these are nested blocks, so the page-level direct-child rules do not apply. */
.editor-styles-wrapper .purpose-line + .framed-photo,
.editor-styles-wrapper .resource-grid + .callout-box {
  margin-block-start: 48px;
}

/* Reusable media tint (unifies stock photography under one brand treatment).
   Self-contained here (like homepage.css) since a "page" post type never
   enqueues homepage.css, only global.css + content-page.css. */
.media-tint { position: relative; overflow: hidden; }
.media-tint img { display: block; filter: grayscale(.3) saturate(.85) contrast(1.04); }
.media-tint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(0, 93, 170, .36) 0%, rgba(0, 61, 129, .14) 55%, rgba(0, 93, 170, .28) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ---------- Header band (locked frame) ---------- */
.page-header-band {
  background: linear-gradient(115deg, #005daa 0%, #003d81 100%);
  padding: 48px 40px 40px;
}
.page-header-inner { color: #ffffff; }
.dept-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 16px;
  border-radius: 999px;
  margin: 0 0 16px;
}
.page-header-inner h1 {
  color: #ffffff;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin: 0;
  font-weight: 700;
}

/* ---------- Governance strip (locked frame) ---------- */
.governance-strip {
  background: #f3f4f4;
  border-bottom: 1px solid #dde2e5;
}
.governance-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 14px 24px;
}
/* governance-inner's children are core/group (this wrapper itself) > core/paragraph
   items now, not bare spans; zero the WP block-gap injection (is-layout-flow
   margin-block-start on non-first children) before applying the item styling. */
.governance-inner > * {
  margin-block-start: 0;
  margin-block-end: 0;
}
.governance-inner .governance-item {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: #3d5a6a;
  padding: 0 16px;
  border-left: 1px solid #dde2e5;
  margin: 0;
}
.governance-inner .governance-item:first-child { padding-left: 0; border-left: none; }

@media (max-width: 768px) {
  .governance-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .governance-inner .governance-item { border-left: none; padding-left: 0; }
}

/* ---------- Page content wrapper ---------- */
.page-content { padding: 64px 24px 96px; }
.page-content h2 {
  font-size: 26px;
  letter-spacing: -0.2px;
  margin: 0 0 24px;
  color: #0f202e;
  font-weight: 700;
}
/* .page-content section + section has no match in mock-03's actual markup
   (no <section> children exist there) — kept verbatim from mock-03 anyway;
   it is inert in both the source and here. */
.page-content section + section,
.page-content > h2 { margin-top: 56px; }

/* ---------- Purpose line (employee-fillable) ---------- */
.purpose-line {
  font-size: 19px;
  line-height: 1.6;
  color: #0f202e;
  max-width: 760px;
  margin: 0 0 48px;
}

/* ---------- Framed photo (employee-fillable, optional) ---------- */
/* mock-03 has a blanket * { box-sizing: border-box } reset, so its 720px
   max-width already includes the 8px border. This theme has no such global
   reset outside .site-header/.site-footer, so under the browser's default
   content-box the border was adding 16px on top (736px rendered, 501px
   tall vs mock's 720x491) — set border-box explicitly to match. */
.framed-photo {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  border: 8px solid #005daa;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 720 / 491;
  overflow: hidden;
  margin: 0 0 52px;
}
.framed-photo img {
  grid-column: 1;
  grid-row: 1;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  min-height: 0;
  display: block;
  aspect-ratio: auto !important;
  object-fit: cover !important;
}
.framed-photo figcaption {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 2;
  width: 100%;
  background: #0f202e;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 16px;
  margin: 0;
}
/* Keep the shared tint in the image row so it follows the fixed frame rather
   than the selected image's intrinsic dimensions; the caption remains above
   it in its own bounded row. */
.framed-photo.media-tint::after {
  position: relative;
  inset: auto;
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  width: 100%;
  height: 100%;
}

/* ---------- Resource cards (employee-fillable) ---------- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
/* WP's core/group "is-layout-flow" support injects margin-block-start on every
   child but the first (a zero-specificity :where() rule meant for vertical
   flow spacing) via a generic selector. Left alone inside a CSS grid, that
   phantom top margin eats into the stretched grid cell, making the first
   card in every row 24-36px taller than its row-mates. Neutralize it. */
.resource-grid > *,
.people-grid > * {
  margin-block-start: 0;
  margin-block-end: 0;
}
/* resource-card is now a group (heading-link + paragraph), not a single <a>,
   so the whole-card link/hover/focus behavior is rebuilt with a stretched-link:
   the heading's <a> gets a full-card ::after overlay, and :has() promotes the
   card-level hover/focus-visible styling from that nested link's state. */
.resource-card {
  position: relative;
  display: block;
  background: #ffffff;
  border: 1px solid #dde2e5;
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 1px 2px rgba(15, 32, 46, .04);
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), border-color .2s ease, box-shadow .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.resource-card:has(h3 a:hover) {
  transform: translateY(-3px);
  border-color: #0071b1;
  box-shadow: 0 10px 24px rgba(15, 32, 46, 0.10);
}
.resource-card:has(h3 a:focus-visible) {
  border-color: #0071b1;
  box-shadow: 0 0 0 3px #409ed4;
}
.resource-card h3 { margin: 0 0 9px; font-weight: 700; font-size: 17px; letter-spacing: -0.1px; line-height: 1.35; }
.resource-card h3 a {
  color: #0071b1;
  text-decoration: none;
  outline: none;
}
.resource-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}
.editor-styles-wrapper .resource-card h3 a::after {
  pointer-events: none;
}
.resource-card p { margin: 0; font-size: 14px; line-height: 1.6; color: #3d5a6a; }

@media (max-width: 768px) {
  .resource-grid { grid-template-columns: 1fr; }
}

/* ---------- Callout box (employee-fillable, optional) ---------- */
.callout-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(0, 113, 177, 0.07);
  border-left: 4px solid #0071b1;
  border-radius: 14px;
  padding: 22px 26px;
  margin-top: 48px;
}
/* Icon is a pure-CSS ::before (no markup, no asset file) so the pattern stays
   palette-only. Same glyph as the mock's inline SVG (circle + stem + dot),
   reproduced as a data-URI background; currentColor isn't usable in a
   background-image SVG so the action-blue hex is hardcoded into the URI. */
.callout-box::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071b1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cline x1='12' y1='11' x2='12' y2='16'/%3E%3Ccircle cx='12' cy='7.5' r='0.6' fill='%230071b1' stroke='none'/%3E%3C/svg%3E") no-repeat center / contain;
}
.callout-box p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  color: #0f202e;
}

/* ---------- People cards (employee-fillable) ---------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.people-card {
  background: #ffffff;
  border: 1px solid #dde2e5;
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 1px 2px rgba(15, 32, 46, .04);
}
/* The email link's wrapping <p> (core/paragraph, no distinguishing class)
   has no margin rule of its own, so WP's injected margin-block-start (see
   .entry-content.wp-block-post-content above) was the only declaration
   affecting it: 24px, collapsing with .role's own 12px bottom margin to a
   net 24px gap. mock-03 is a clean 12px — zero the injected top margin. */
.people-card > * {
  margin-block-start: 0;
  margin-block-end: 0;
}
.people-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #005daa;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 0 0 16px;
}
.people-card h3 { margin: 0 0 4px; font-weight: 700; font-size: 17px; letter-spacing: -0.1px; }
.people-card .role { margin: 0 0 12px; font-size: 13px; color: #3d5a6a; line-height: 1.4; }
.people-card a { font-size: 14px; color: #0075b8; text-decoration: none; transition: color .15s ease; }
.people-card a:hover { color: #00629b; }

@media (max-width: 1024px) {
  .people-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .people-grid { grid-template-columns: 1fr; }
}

/* ---------- Nav active-state (Facility Services department pages) ---------- */
/* header.html's nav items carry no per-department class (all are plain
   .nav-item > .nav-link, distinguished only by text); "Facility" is the 4th
   top-level item today, so nth-of-type targets it positionally from the
   dept-facility-services body class the plugin emits per page. Declarations
   copied verbatim from mock-03.html's .nav-link.nav-active (lines 238-239). */
body.dept-facility-services .main-nav .nav-item:nth-of-type(4) .nav-link {
  color: #005daa;
}
body.dept-facility-services .main-nav .nav-item:nth-of-type(4) .nav-link::after {
  transform: scaleX(1);
}
