/*
Theme Name: Aligned (Twenty Twenty-Five)
Author: Reachable
Author URI: https://reachable.tech
Description: Custom block theme for Aligned. A child/extension of the Twenty Twenty-Five theme.
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfive
Text Domain: aligned-twenty-twenty-five
*/

/* =========================================================
   Site-wide
   ========================================================= */

/* Remove focus outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
details summary:focus:not(:focus-visible) {
	outline: none;
}

/* Sticky footer */
.wp-site-blocks {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.wp-site-blocks > main {
	flex: 1 0 auto;
}
.wp-site-blocks > footer,
.wp-site-blocks > footer.wp-block-template-part {
	margin-top: auto;
}

footer {
	margin-top: 0;
}

/* Tablet nav: 2×2 grid when items wrap */
@media (min-width: 600px) and (max-width: 1024px) {
	header ul.wp-block-navigation {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.25rem 1rem;
	}
	header ul.wp-block-navigation .wp-block-navigation-item {
		margin-top: 0.6rem;
		margin-bottom: 0.6rem;
	}
}

/* =========================================================
   Buttons
   ========================================================= */

.wp-block-button.is-style-fill a {
	color: #fff !important;
	background-color: #000 !important;
}
.wp-block-button.is-style-fill a:hover {
	background-color: #333 !important;
}
.wp-block-button.is-style-fill div:hover {
	color: #fff !important;
	background-color: #333 !important;
}

.wp-block-button.is-style-outline a {
	color: #fff !important;
	background-color: rgba(168, 170, 175, 0) !important;
}
.wp-block-button.is-style-outline a:hover {
	background-color: rgba(168, 170, 175, 0.25) !important;
}
.wp-block-button.is-style-outline div:hover {
	color: #fff !important;
	background-color: rgba(168, 170, 175, 0.25) !important;
}

.wp-block-button a.has-custom-aligned-yellow-background-color {
	color: #fff !important;
	background-color: var(--wp--preset--color--custom-aligned-yellow) !important;
}
.wp-block-button a.has-custom-aligned-yellow-background-color:hover {
	background-color: #FDB71B !important;
}

/* =========================================================
   Decorative utilities
   ========================================================= */

.double-dots::before {
	content: "······";
}

.yellow-bottom-border {
	border-bottom: 0.3rem solid var(--wp--preset--color--custom-aligned-yellow);
}
.yellow-top-border {
	border-top: 0.3rem solid var(--wp--preset--color--custom-aligned-yellow);
}
.yellow-vertical {
	background: linear-gradient(to right, var(--wp--preset--color--custom-aligned-yellow), var(--wp--preset--color--custom-aligned-yellow))
		center / 3px 100% no-repeat;
}

.outline-and-shadow {
	box-shadow: 7px 9px var(--wp--preset--color--custom-aqua);
	border: 2px solid var(--wp--preset--color--custom-medium-gray) !important;
}

/* =========================================================
   Responsive utilities
   ========================================================= */

@media (max-width: 781px) {
	.hide-on-mobile {
		display: none !important;
	}
}
@media (max-width: 600px) {
	.one-column-on-mobile {
		grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
	}
}

/* =========================================================
   Pills
   ========================================================= */

.aligned-pills-list {
	list-style: none;
	padding-left: 0;
	margin: 0.75rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}
.aligned-pills-list li {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 0.85em;
	line-height: 1;
	letter-spacing: 0.02em;
	opacity: 0.9;
	white-space: nowrap;
}

/* =========================================================
   Partner logo grid
   ========================================================= */

.logo-grid .wp-block-image {
	margin: auto;
}
.logo-grid img {
	max-height: 7rem;
	width: auto;
	padding: 1rem;
	box-sizing: border-box;
	border-bottom: 0px solid var(--wp--preset--color--custom-aqua);
	transition: border 0.15s ease;
}
.logo-grid img:hover {
	border-bottom: 3px solid var(--wp--preset--color--custom-aqua);
}

/* =========================================================
   Constant Contact forms
   ========================================================= */

.ctct-inline-form * {
	font-family: var(--wp--preset--font-family--bitter) !important;
}
.ctct-inline-form > div > div {
	padding: 0 !important;
}
.ctct-inline-form button {
	color: #000 !important;
	background-color: var(--wp--preset--color--custom-aligned-yellow) !important;
	font-weight: bold !important;
	border: 1px solid var(--wp--preset--color--custom-dark-gray) !important;
}
.ctct-inline-form button:hover {
	background-color: #FDB71B !important;
}

/* Homepage variant */
.page-id-1404 .ctct-inline-form *:not(input, button) {
	color: #fff !important;
}
.page-id-1404 .ctct-inline-form > div > div {
	background: none !important;
}

/* =========================================================
   Person bios & previews
   ========================================================= */

.person-preview {
	height: 100%;
	box-shadow: 7px 9px var(--wp--preset--color--custom-aqua);
	width: fit-content;
}

.wp-block-aligned-person-photo {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 20px;
}
.wp-block-aligned-person-photo img {
	object-fit: cover;
	object-position: center;
	width: 100%;
	height: 100%;
}

.person-preview .wp-block-aligned-person-email a {
	font-family: var(--wp--preset--font-family--montserrat) !important;
}

.aligned-person-icon-field {
	display: inline-flex;
	align-items: center;
	gap: 1em;
}
.aligned-person-icon {
	flex-shrink: 0;
	width: 1.6em;
	height: 1.6em;
}

/* Contact Us page: smaller icons */
.page-id-74 .aligned-person-icon-field { gap: 0.5em; }
.page-id-74 .aligned-person-icon { width: 1.3em; height: 1.3em; }

@media (min-width: 1101px) {
	.person-loop .people_group-board-of-trustees div {
		min-height: 180px;
	}
}
@media (max-width: 1100px) {
	.person-loop ul {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
@media (max-width: 750px) {
	.person-loop ul {
		grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
	}
}

/* =========================================================
   Post cards — clickable-card pattern
   Base class: .post-card
   ========================================================= */

.post-card {
	position: relative;
	border: 1px solid var(--wp--preset--color--custom-medium-gray);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover {
	cursor: pointer;
	border-color: var(--wp--preset--color--custom-dark-gray);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.post-card:focus-within {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* Overlay the "Read more" link across the full card */
.post-card .wp-block-post-excerpt__more-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 10;
}
/* Keep other links clickable above the overlay */
.post-card a:not(.wp-block-post-excerpt__more-link) {
	position: relative;
	z-index: 11;
}

.post-card .wp-block-post-excerpt {
	margin-top: 8px;
	line-height: 1.55;
}
.post-card .wp-block-post-excerpt__more-text {
	margin-top: var(--wp--preset--spacing--20);
}

/* =========================================================
   Post cards — resources hub context
   ========================================================= */

.resources-loop .post-card {
	padding: 20px 22px;
	margin-bottom: 20px;
	background: #fff;
	border-radius: 14px;
}
.resources-loop .post-card .wp-block-post-title {
	margin-bottom: 6px;
}
.resources-loop .post-card .wp-block-post-title a {
	text-decoration: none;
}
.resources-loop .post-card .wp-block-post-title a:hover {
	text-decoration: underline;
}
.resources-loop .post-card .wp-block-post-excerpt {
	color: #555;
}
.resources-loop .post-card .wp-block-post-terms,
.resources-loop .post-card .wp-block-post-date {
	font-size: 0.875rem;
	color: #6b7280;
}

/* Prevent featured images from overflowing card width */
.post-card .wp-block-group.is-layout-flex {
	min-width: 0;
}
.post-card .wp-block-post-featured-image {
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}
.post-card .wp-block-post-featured-image img {
	max-width: 100%;
}

/* =========================================================
   Resources hub layout
   ========================================================= */

.resources-hub-header {
	max-width: 900px !important;
	margin-left: auto;
	margin-right: auto;
}
.resources-loop {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}
@media (max-width: 1100px) {
	.resources-loop ul {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (max-width: 800px) {
	.resources-loop ul, .homepage-loop ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* =========================================================
   Filter Everything (Resources Hub filters)
   ========================================================= */

.widget_wpc_filters_widget {
	font-family: var(--wp--preset--font-family--montserrat) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	line-height: 1.35;
	padding: 2rem;
	background: #f7f8fa;
	border: 1px solid var(--wp--preset--color--custom-medium-gray) !important;
	border-radius: 15px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.widget_wpc_filters_widget a:where(:not(.wp-element-button)) {
	font-family: inherit !important;
}

.wpc-filter-post_tag {
	display: none;
}
.wpc-filter-layout-search-field {
	width: 100% !important;
	max-width: 100% !important;
}
.wpc-filters-section {
	margin-bottom: 0 !important;
}
.wpc-filter-chips-list {
	margin: 1rem !important;
	overflow: visible !important;
}
.wpc-empty-chips-container {
	margin: 0 !important;
}

@media (max-width: 600px) {
	.widget_wpc_filters_widget {
		padding: 1.25rem;
	}
}
@media (max-width: 550px) {
	.wpc-filters-section {
		width: 100% !important;
		max-width: 100% !important;
	}
}

/* Details/summary disclosure arrows */
details > summary {
	list-style: none;
	cursor: pointer;
}
details > summary::-webkit-details-marker {
	display: none;
}
details > summary::marker {
	content: "";
}
details > summary::before {
	content: "▸";
	display: inline-block;
	margin-right: 0.5rem;
	transition: transform 0.15s ease;
}
details[open] > summary::before {
	transform: rotate(90deg);
}