/*
Theme Name: Mackenzie Seniors
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mackenzie-seniors
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts margin-block-start: var(--wp--style--block-gap) between the
   template's top-level sections (header part, main, footer part) — a gap that
   exists even when no markup asks for it. Zero it so sections butt edge-to-edge
   and own their vertical rhythm via padding; this does not affect block gaps
   inside nested layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* === base === */
/* Flex items (columns, buttons rows) default to min-width/min-height:auto,
   which lets long unbreakable text or an oversized image force the item
   wider/taller than its flex-basis — overflowing into siblings or getting
   visually clipped by the container. Zeroing this lets wrapping and
   object-fit actually take effect instead of being silently overridden. */
.wp-block-columns > .wp-block-column,
.wp-block-buttons > .wp-block-button {
	min-width: 0;
}

img {
	max-width: 100%;
	height: auto;
}

p, li, h1, h2, h3, h4, h5, h6 {
	overflow-wrap: break-word;
}
.page-title-band {
	background-color: var(--wp--preset--color--surface-alt);
	padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.page-title-band h1 {
	margin: 0;
	font-size: clamp(2rem, 4vw, 2.75rem);
}
:root {
	--radius-card: 28px;
	--radius-pill: 999px;
	--border-soft: 2px solid var(--wp--preset--color--border);
}

body {
	background-color: var(--wp--preset--color--base);
}

::selection {
	background-color: var(--wp--preset--color--accent-pink);
	color: var(--wp--preset--color--navy-text);
}

::-moz-selection {
	background-color: var(--wp--preset--color--accent-pink);
	color: var(--wp--preset--color--navy-text);
}

/* === typography === */
h1, h2, h3, h4 {
	letter-spacing: -0.01em;
}

p {
	color: var(--wp--preset--color--muted);
}

.has-contrast-color p,
p.has-contrast-color {
	color: var(--wp--preset--color--contrast);
}

.eyebrow {
	font-family: var(--wp--preset--font-family--body);
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 1rem;
	font-weight: 700;
	color: #0d7d72;
}
/* === header === */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--wp--preset--color--base);
}

.site-header-brand {
	padding-block: 0.65rem;
}

.site-header-logo.wp-block-site-logo {
	margin: 0;
}

.site-header-logo img {
	border-radius: 50%;
}

.site-header-navbar {
	background-color: var(--wp--preset--color--contrast);
}

.site-header-nav {
	font-size: 1.1rem;
	column-gap: 0.25rem !important;
	row-gap: 0.25rem !important;
	padding-block: 0.4rem;
}

.site-header-nav a,
.site-header-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--navy-text) !important;
	text-decoration: none;
	font-weight: 700;
	font-size: 1.1rem;
	padding: 0.75em 1.1em;
	border-radius: var(--radius-pill);
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.site-header-nav a:hover,
.site-header-nav .wp-block-navigation-item__content:hover {
	background-color: rgba(255, 251, 243, 0.22);
	color: var(--wp--preset--color--navy-text) !important;
}

.site-header-nav .wp-block-navigation__responsive-container-open svg,
.site-header-nav .wp-block-navigation__responsive-container-close svg {
	stroke: var(--wp--preset--color--navy-text);
}

.site-header-nav .wp-block-navigation__responsive-container-open {
	padding: 0.6em;
}

.site-header-nav .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--contrast);
}

@media (prefers-reduced-motion: reduce) {
	.site-header-nav a {
		transition: none;
	}
}
/* === buttons === */
.wp-element-button,
.wp-block-button__link {
	padding: 0.9em 1.9em;
	border-radius: var(--radius-pill);
	font-size: 1.1rem;
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	border: 2px solid var(--wp--preset--color--accent-indigo);
	color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--accent-indigo);
	color: var(--wp--preset--color--navy-text);
}

.wp-block-button.is-style-teal .wp-block-button__link {
	background-color: var(--wp--preset--color--accent-teal);
	color: var(--wp--preset--color--navy-text);
}

.wp-block-button.is-style-pink .wp-block-button__link {
	background-color: var(--wp--preset--color--accent-pink);
	color: var(--wp--preset--color--navy-text);
}

@media (prefers-reduced-motion: reduce) {
	.wp-element-button,
	.wp-block-button__link {
		transition: none;
	}
	.wp-element-button:hover,
	.wp-block-button__link:hover {
		transform: none;
	}
}
/* === hero === */
.hero {
	position: relative;
	background-color: var(--wp--preset--color--surface-alt);
	padding-block: clamp(3rem, 6vw, 6rem);
	overflow: clip;
}

.hero-grid.wp-block-columns {
	align-items: center;
	gap: clamp(2rem, 5vw, 4rem);
}

.hero-eyebrow-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	list-style: none;
	padding: 0;
	margin: 0 0 1rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
}

.hero-eyebrow-list li {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--wp--preset--color--accent-teal);
}

.hero-eyebrow-list li:not(:last-child)::after {
	content: "\2022";
	margin-left: 0.6rem;
	color: var(--wp--preset--color--muted);
}

.hero-media {
	border-radius: var(--radius-card);
	overflow: hidden;
}

.hero-media img {
	aspect-ratio: 4 / 3;
}

.hero-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* === sections === */
.section {
	padding-block: clamp(3rem, 6vw, 5rem);
}

.section-alt {
	background-color: var(--wp--preset--color--surface);
}

.section-activities .card-row {
	margin-top: 2rem;
}

.activity-detail {
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--radius-card);
	padding: 2rem;
	margin-block: 1.25rem;
	box-shadow: 0 12px 30px -12px rgba(30, 34, 69, 0.18);
}

.activity-detail .hero-media {
	border-radius: calc(var(--radius-card) - 10px);
}

/* === cards === */
.program-card h3 {
	font-size: 1.35rem !important;
	line-height: 1.25;
}
.program-card {
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--radius-card);
	padding: 1.5rem;
	box-shadow: 0 12px 30px -12px rgba(30, 34, 69, 0.18);
}

.program-card-image {
	margin: -1.5rem -1.5rem 1rem;
	border-radius: var(--radius-card) var(--radius-card) 0 0;
	overflow: hidden;
}

.program-card-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	height: auto;
	object-fit: cover;
}

.involve-card h3 {
	font-size: 1.35rem !important;
	line-height: 1.25;
}

.involve-card {
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--radius-card);
	padding: 1.75rem;
	box-shadow: 0 12px 30px -12px rgba(30, 34, 69, 0.18);
}

:is(.contact-strip) :where(h1, h2, h3, h4, h5, h6, p, li, a, span) {
	color: var(--wp--preset--color--navy-text);
}

:is(.contact-strip) a:not(.wp-element-button) {
	text-decoration: underline;
}

:is(.contact-strip) a:not(.wp-element-button):hover {
	opacity: 0.8;
}

.involve-card .wp-block-button__link,
.program-card .wp-block-button__link {
	padding-inline: 1.15em;
	font-size: 1rem;
	white-space: normal;
}

.involve-card p {
	font-size: 1.05rem;
}

.involve-card .wp-block-buttons,
.program-card .wp-block-buttons {
	width: 100%;
}

.involve-card .wp-block-button__link {
	background-color: var(--wp--preset--color--accent-indigo);
	color: #ffffff;
}

.involve-teal .wp-block-button__link {
	background-color: var(--wp--preset--color--accent-teal);
	color: #ffffff;
}

.involve-pink .wp-block-button__link {
	background-color: var(--wp--preset--color--accent-pink);
	color: #ffffff;
}
/* === events === */
.event-card {
	margin-top: 2rem;
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--radius-card);
	padding: 2rem;
	gap: 1.5rem;
	box-shadow: 0 12px 30px -12px rgba(30, 34, 69, 0.18);
}

.event-meta {
	color: var(--wp--preset--color--accent-indigo);
	font-weight: 700;
}

.contact-strip {
	background-color: var(--wp--preset--color--contrast);
}

.contact-strip .wp-block-button__link {
	background-color: var(--wp--preset--color--navy-text);
	color: var(--wp--preset--color--contrast);
}
/* === team === */
.staff-portrait img {
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
}

.director-card {
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--radius-card);
	padding: 2rem 1.75rem 1.75rem;
	box-shadow: 0 12px 30px -12px rgba(30, 34, 69, 0.18);
	text-align: center;
}

.director-card::before {
	content: "";
	display: block;
	width: 84px;
	height: 84px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 40px 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 12c2.7 0 4.9-2.2 4.9-4.9S14.7 2.2 12 2.2 7.1 4.4 7.1 7.1 9.3 12 12 12zm0 2.5c-3.3 0-9.8 1.6-9.8 4.9v2.4h19.6v-2.4c0-3.3-6.5-4.9-9.8-4.9z'/%3E%3C/svg%3E");
}

.director-card h3 {
	color: var(--wp--preset--color--contrast);
}

.director-card h3 a {
	color: inherit;
}

.director-teal::before { background-color: var(--wp--preset--color--accent-teal); }
.director-indigo::before { background-color: var(--wp--preset--color--accent-indigo); }
.director-pink::before { background-color: var(--wp--preset--color--accent-pink); }
/* === resources === */
.steps-list {
	padding-left: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	margin: 1.5rem 0;
}

.steps-list li {
	padding-left: 1.8rem;
	position: relative;
}

.steps-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--accent-teal);
}
/* === contact === */
/* === gallery === */
/* Photos keep their natural, uncropped aspect ratio; the gallery block's
   own flex layout handles row sizing for us. */
.wp-block-gallery .wp-block-image img {
	border-radius: 0.5rem;
}

.wp-block-gallery.home-gallery {
	margin-bottom: 1.5rem;
}
/* === footer === */
.site-footer {
	background-color: var(--wp--preset--color--contrast);
	padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
}

.footer-title a,
.footer-title {
	font-family: var(--wp--preset--font-family--heading);
	color: #ffffff;
	font-size: 1.4rem;
}

.footer-tagline {
	color: var(--wp--preset--color--accent-teal);
	font-weight: 700;
	margin-top: 0.4rem;
}

.footer-heading {
	color: #ffffff;
	font-size: 1.05rem;
	margin-bottom: 0.75rem;
}

.footer-columns .wp-block-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.footer-columns a {
	color: #c7cdec;
	text-decoration: none;
	overflow-wrap: anywhere;
	word-break: normal;
	font-size: 1.05rem;
}

.footer-columns a:hover {
	color: #ffffff;
}

.footer-bottom {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom p {
	font-size: 0.9rem;
	margin: 0;
	color: #c7cdec;
}
/* === anchors === */
/* Sections targeted by in-page nav links need breathing room above them so
   the sticky two-row header doesn't cover their heading when jumped to. */
[id] {
	scroll-margin-top: 150px;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* === responsive === */
@media (max-width: 782px) {
	.hero-grid.wp-block-columns,
	.card-row.wp-block-columns {
		flex-wrap: wrap;
	}
	.hero-grid > .wp-block-column,
	.card-row > .wp-block-column {
		flex-basis: 100% !important;
	}
	.footer-columns.wp-block-columns {
		flex-wrap: wrap;
	}
}
