/* Campus additions.
 *
 * Written for the product, not ported from the live site. The skin assumed
 * page markup that set its own grid columns inline; a theme cannot assume that,
 * so the column counts become real classes that patterns and editors can use.
 *
 * Keep this file small. Anything that belongs to the design system proper goes
 * into assets/css/skin/ so it stays with its section.
 */

.campus .grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.campus .grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.campus .grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}

@media (max-width:1040px){
	.campus .grid--3,.campus .grid--4{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:720px){
	.campus .grid--2,.campus .grid--3,.campus .grid--4{grid-template-columns:minmax(0,1fr)}
}

/* A pattern ships without photographs, so its figures need to read as
   deliberate placeholders rather than as something broken. */
.campus .hero-figure:not(:has(img[src])),
.campus .is-placeholder:not(:has(img[src])){
	background:linear-gradient(130deg,var(--blue-800,#002463),var(--blue-400,#416AB1));
	min-height:clamp(220px,32vw,420px);
}
.campus .is-placeholder img:not([src]){display:none}

/* ------------------------------------------------------------------
   Core blocks, wearing the skin.

   The skin was written against hand-made markup: `.nav > li > a`, a
   `.srch` form, a `.brand` anchor. WordPress emits its own structure for
   navigation, search and site title. Rather than rewrite the skin — which
   would mean re-doing this work every time the live site changes — these
   rules map the skin's appearance onto what core actually renders.

   The pay-off: menus, the logo and the site title are edited in WordPress
   by the institution, not in HTML by us.
   ------------------------------------------------------------------ */

/* --- top utility bar --- */
.campus .util .wp-block-navigation__container{gap:28px}
.campus .util .wp-block-navigation-item__content{color:#C9D6EA;text-decoration:none;font-size:13px}
.campus .util .wp-block-navigation-item__content:hover{color:#fff;text-decoration:underline}
.campus .util .wp-block-search__inside-wrapper{border:0;background:transparent}
.campus .util .wp-block-search__input{
	background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.18);border-radius:999px;
	color:#fff;font-size:13px;padding:5px 12px;min-width:170px
}
.campus .util .wp-block-search__input::placeholder{color:#9FB4D4}
.campus .util .wp-block-search__button{background:transparent;border:0;color:#C9D6EA;padding:0 6px}

/* --- the sticky bar --- */
.campus .bar .brand{gap:12px}
.campus .bar .wp-block-site-logo img{max-height:46px;width:auto}
.campus .bar .brand-name a,.campus .bar .brand-name{
	font-family:var(--k-display);font-weight:600;font-size:20px;color:var(--blue-950);text-decoration:none;letter-spacing:-.01em
}

/* Core renders nav > ul > li; the skin styled .nav > li. Match both. */
.campus .bar .wp-block-navigation__container{gap:28px;align-items:center}
.campus .bar .wp-block-navigation-item__content{
	font-family:var(--k-body);font-weight:600;font-size:16px;color:var(--text-primary);
	text-decoration:none;padding-block:6px;position:relative
}
.campus .bar .wp-block-navigation-item__content::after{
	content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--brand-primary);
	transform:scaleX(0);transform-origin:left;transition:transform var(--k-fast) var(--k-ease)
}
.campus .bar .wp-block-navigation-item__content:hover::after,
.campus .bar .current-menu-item .wp-block-navigation-item__content::after{transform:scaleX(1)}
.campus .bar .wp-block-navigation__submenu-container{
	border:1px solid var(--border-default);border-radius:var(--k-radius-sm);box-shadow:var(--k-lift);padding:8px 0
}
.campus .bar-cta .wp-block-button__link{white-space:nowrap}

/* The mobile overlay is core's, so it is accessible out of the box. */
.campus .wp-block-navigation__responsive-container.is-menu-open{background:var(--blue-950);color:#fff;padding:28px}
.campus .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content{color:#fff;font-size:20px}

/* --- footer --- */
.campus .foot .wp-block-navigation__container{gap:10px}
.campus .foot .wp-block-navigation-item__content{color:#C9D6EA;text-decoration:none;font-size:15px}
.campus .foot .wp-block-navigation-item__content:hover{color:#fff;text-decoration:underline}
.campus .foot .foot-name a,.campus .foot .foot-name{color:#fff;text-decoration:none}
.campus .foot .wp-block-site-tagline{margin:0}
.campus .foot-social .wp-block-social-links{gap:10px;margin-top:4px}
.campus .foot-legal .wp-block-navigation__container{gap:6px 18px}

/* The live site's search collapsed to an icon until clicked. Core's search
   block has no such behaviour, so the skin's collapsed state would simply
   hide the field. Keep it visible. */
.campus .util .wp-block-search__input{display:block !important;opacity:1 !important;width:auto !important}

/* Buttons are buttons, not underlined links. */
.campus .wp-block-button__link{text-decoration:none}
.campus .wp-block-button__link:hover{text-decoration:none}

/* The footer's link columns stack; the legal strip runs across. Stated here so
   the layout holds even if the block's own layout attribute is edited away. */
.campus .foot-grid .wp-block-navigation__container{flex-direction:column}
.campus .foot-legal .wp-block-navigation__container{flex-direction:row;flex-wrap:wrap}

/* Core's own stylesheet carries this, but a site that dequeues the block
   library leaves search and comment labels on show in the middle of the
   header. Stating it here costs four lines and removes the question. */
.campus .screen-reader-text{position:absolute;width:1px;height:1px;margin:-1px;padding:0;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);border:0;white-space:nowrap}
.campus .screen-reader-text:focus{position:static;width:auto;height:auto;margin:0;
  overflow:visible;clip:auto;clip-path:none;white-space:normal}

/* The header's Apply button. Core's button block brings its own padding and
   line height, which on top of the skin's pill made a lozenge taller than the
   bar it sits in. These put it back to the skin's own metrics. */
.campus .bar .wp-block-buttons{margin:0}
.campus .bar-cta .wp-block-button__link{display:inline-flex;align-items:center;
  min-height:48px;padding:0 28px;line-height:1;border-radius:999px;font-size:16.5px}

/* A page's content is laid out by the skin's own sections, so WordPress's
   constrained layout is switched off in the templates. These keep ordinary
   blocks — a paragraph someone adds straight to a page — inside the container
   rather than running them edge to edge. */
.campus main > p,
.campus main > h1,
.campus main > h2,
.campus main > h3,
.campus main > ul,
.campus main > ol,
.campus main > figure,
.campus main > .wp-block-image{max-width:var(--k-container);margin-inline:auto;
  padding-inline:var(--k-margin)}

/* The post row keeps a column for a photograph. Core's featured-image block
   renders nothing at all when a post has none, which left the text in the
   narrow column meant for the picture. */
.campus .post:not(:has(img)){grid-template-columns:1fr}
