/* Header sits over the hero photo (home) or the title band (every other page). */
.irir-header {
	position: absolute;
	inset: 0 0 auto;
	z-index: 20;
	padding: 18px max(20px, calc((100vw - 1200px) / 2));
}
.admin-bar .irir-header { top: var(--wp-admin--admin-bar--height, 32px); }
.irir-header .wp-block-site-logo img { height: auto; }
.irir-header .wp-block-navigation a:where(:not(.wp-element-button)) { color: #fff; }
.irir-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); text-decoration: none; }
.irir-header .wp-block-navigation__container { gap: 6px 28px; }
.irir-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: rgba(11, 11, 11, 0.92);
	border: 0;
	padding: 8px 0;
}
.irir-header .wp-block-navigation .wp-block-navigation__submenu-container a { padding: 6px 18px; }

/* Title band on inner pages. */
.irir-title-band {
	position: relative;
	padding: 170px 20px 90px;
	background: url(../images/title-band.jpg) center / cover no-repeat;
	isolation: isolate;
}
.irir-title-band:not(.wp-block-cover)::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(20, 20, 30, 0.55);
}
.irir-title-band :is(h1, .wp-block-post-title, .wp-block-query-title) {
	color: #fff;
	font-family: var(--wp--preset--font-family--open-sans);
	font-weight: 400;
	font-size: clamp(26px, 3vw, 36px);
	letter-spacing: 0.15em;
	text-transform: uppercase;
	margin: 0;
}

/* Section heading with a thin line either side. */
.wp-block-heading.is-style-lined {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	font-weight: 400;
	text-align: center;
}
.wp-block-heading.is-style-lined::before,
.wp-block-heading.is-style-lined::after {
	content: "";
	flex: 1;
	border-top: 1px solid #e5e5e5;
}

/* Home sections run edge to edge without gaps between them. */
.irir-home .wp-block-post-content > * { margin-block-start: 0; }
.irir-home .wp-block-post-content > .wp-block-heading.is-style-lined { padding-block: 70px 40px; }

/* Hero: headline lines drop in one after another, as on the old slider. */
.irir-hero .wp-block-cover__inner-container > * > * {
	animation: irir-drop 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.irir-hero .wp-block-cover__inner-container > * > :nth-child(2) { animation-delay: 0.25s; }
.irir-hero .wp-block-cover__inner-container > * > :nth-child(3) { animation-delay: 0.5s; }
.irir-hero .wp-block-cover__inner-container > * > :nth-child(4) { animation-delay: 0.75s; }
@keyframes irir-drop {
	from { opacity: 0; transform: translateY(-40px); }
}
.irir-hero__panel { max-width: 560px; margin-left: auto; }
.irir-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid #fff;
	color: #fff;
	background: transparent;
}

/* Event and news cards. */
.irir-card { background: var(--wp--preset--color--mist); padding: 28px 24px; height: 100%; }
.irir-card__title { text-transform: uppercase; font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.irir-card__title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.irir-date-tag {
	display: inline-block;
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-size: 11px;
	line-height: 1;
	padding: 5px 8px;
	margin-bottom: 0.75rem;
}
.irir-archive-tile { display: flex; flex-direction: column; justify-content: center; padding: 40px; }
.irir-archive-tile a { color: #fff; text-decoration: none; }

/* Optional slideshow style for any gallery (Styles panel: Slideshow). */
.wp-block-gallery.is-style-irir-slideshow {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}
.wp-block-gallery.is-style-irir-slideshow > .wp-block-image {
	position: absolute;
	inset: 0;
	width: 100% !important;
	margin: 0;
	opacity: 0;
	transition: opacity 1.2s ease;
}
.wp-block-gallery.is-style-irir-slideshow > .wp-block-image:first-of-type,
.wp-block-gallery.is-style-irir-slideshow > .wp-block-image.is-active { opacity: 1; }
.wp-block-gallery.is-style-irir-slideshow.is-ready > .wp-block-image:not(.is-active) { opacity: 0; }
.wp-block-gallery.is-style-irir-slideshow > .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.wp-block-gallery.is-style-irir-slideshow > .wp-block-image.is-active img { animation: irir-kenburns 7s ease-out both; }
@keyframes irir-kenburns {
	from { transform: scale(1); }
	to { transform: scale(1.08); }
}
.irir-slideshow__toggle {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 2;
	border: 1px solid #fff;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font: 600 12px/1 var(--wp--preset--font-family--montserrat);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 8px 12px;
	cursor: pointer;
}

/* Hero slideshow pattern: the gallery fills the hero behind the text. */
.irir-hero-slideshow { position: relative; min-height: 100vh; display: flex; align-items: center; isolation: isolate; }
.irir-hero-slideshow > .wp-block-gallery.is-style-irir-slideshow { position: absolute; inset: 0; z-index: -1; aspect-ratio: auto; margin: 0; }
.irir-hero-slideshow::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, 0.3); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
	.irir-hero .wp-block-cover__inner-container > * > *,
	.wp-block-gallery.is-style-irir-slideshow > .wp-block-image img { animation: none; }
}

@media (max-width: 781px) {
	.irir-header { padding: 14px 20px; }
	.irir-header .wp-block-site-logo img { width: 150px !important; }
	.irir-title-band { padding: 130px 20px 60px; }
	.irir-hero__panel { margin-left: 0; }
}

/* The header is out of flow, so the first section and the footer sit flush. */
.wp-site-blocks > .irir-header + *,
.wp-site-blocks > footer { margin-block-start: 0; }
.irir-hero .wp-block-cover__inner-container { padding-right: clamp(20px, 5vw, 80px); }
.irir-home .wp-block-columns + .wp-block-buttons { margin-block-start: 32px; }

/* Galleries keep a tidy grid: the last row does not stretch. */
.wp-block-gallery.has-nested-images figure.wp-block-image { flex-grow: 0; }

/* Embedded maps and videos never overflow their column. */
.wp-block-post-content iframe { max-width: 100%; }

/* Contact form, styled like the old site: grey panel, underlined fields, purple button. */
.wpcf7 { background: var(--wp--preset--color--mist); padding: clamp(24px, 5vw, 60px); }
.wpcf7 :is(input[type="text"], input[type="email"], input[type="tel"], textarea, select) {
	width: 100%;
	border: 0;
	border-bottom: 1px solid #c8c8c8;
	background: transparent;
	padding: 10px 0;
	font: inherit;
	color: var(--wp--preset--color--ink);
}
.wpcf7 :is(input, textarea):focus { outline: none; border-bottom-color: var(--wp--preset--color--accent); }
.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--accent);
	color: #fff;
	border: 0;
	padding: 10px 26px;
	font: 600 13px/1 var(--wp--preset--font-family--montserrat);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

/* Single post: framed photo and sidebar, as on the old site. */
.irir-framed { border: 1px solid #e5e5e5; padding: 10px; }
.irir-sidebar h3 { font-weight: 400; text-transform: uppercase; font-size: 18px; margin-block-start: 2.5rem; }
.irir-sidebar :is(.wp-block-archives, .wp-block-categories, .wp-block-latest-posts) { list-style: none; padding: 0; }
.irir-sidebar .wp-block-latest-posts__post-date { font-size: 12px; color: var(--wp--preset--color--copy); }
