/**
 * Allied Community Hub — frontend styles.
 *
 * Everything is scoped under .allied-community with ach- prefixed classes so
 * the plugin never collides with theme styles. Colors, spacing and radii are
 * exposed as CSS variables; override them from your theme, e.g.:
 *
 *   .allied-community { --ach-primary-color: #0a6e5c; }
 */

.allied-community {
	/* Brand palette (Allied Veterinary Care) */
	--ach-primary-color: #d81213;
	--ach-primary-dark: #a50d0e;
	--ach-secondary-color: #1b365d;
	--ach-secondary-dark: #122640;
	--ach-text-color: #333333;
	--ach-muted-color: #5c6570;
	--ach-background-color: #ffffff;
	--ach-surface-color: #f6f7f9;
	--ach-border-color: #e3e6ea;
	--ach-badge-bg: #fdecec;
	--ach-badge-text: #a50d0e;

	/* Layout */
	--ach-card-radius: 12px;
	--ach-content-width: 1200px;
	--ach-grid-gap: 24px;
	--ach-font-heading: inherit;

	box-sizing: border-box;
	color: var(--ach-text-color);
	font-family: inherit;
	line-height: 1.6;
	overflow-wrap: break-word;
}

.allied-community *,
.allied-community *::before,
.allied-community *::after {
	box-sizing: border-box;
}

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

/* ---------------------------------------------------------------------
 * Utilities
 * ------------------------------------------------------------------ */

.ach-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.allied-community a:focus-visible,
.allied-community button:focus-visible {
	outline: 2px solid var(--ach-primary-color);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Buttons */
.allied-community .ach-btn {
	display: inline-block;
	padding: 0.6em 1.4em;
	border: 2px solid var(--ach-primary-color);
	border-radius: 999px;
	background: var(--ach-primary-color);
	color: #ffffff;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.allied-community .ach-btn:hover,
.allied-community .ach-btn:focus {
	background: var(--ach-primary-dark);
	border-color: var(--ach-primary-dark);
	color: #ffffff;
	text-decoration: none;
}

.allied-community .ach-btn--outline {
	background: transparent;
	border-color: var(--ach-secondary-color);
	color: var(--ach-secondary-color);
}

.allied-community .ach-btn--outline:hover,
.allied-community .ach-btn--outline:focus {
	background: var(--ach-secondary-color);
	border-color: var(--ach-secondary-color);
	color: #ffffff;
}

.allied-community .ach-btn--ghost {
	background: transparent;
	border-color: currentColor;
	color: inherit;
}

.allied-community .ach-btn--ghost:hover,
.allied-community .ach-btn--ghost:focus {
	background: rgba(255, 255, 255, 0.15);
	border-color: currentColor;
	color: inherit;
}

/* Category badges */
.allied-community .ach-badge {
	display: inline-block;
	padding: 0.2em 0.85em;
	border-radius: 999px;
	background: var(--ach-badge-bg);
	color: var(--ach-badge-text);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	text-transform: uppercase;
}

.allied-community a.ach-badge:hover,
.allied-community a.ach-badge:focus {
	background: var(--ach-badge-text);
	color: #ffffff;
}

/* Status chips */
.allied-community .ach-chip {
	display: inline-block;
	padding: 0.15em 0.8em;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	background: var(--ach-surface-color);
	color: var(--ach-muted-color);
}

.allied-community .ach-chip--upcoming {
	background: #e7f5ea;
	color: #14682c;
}

.allied-community .ach-chip--ongoing {
	background: #fff2d9;
	color: #7a5200;
}

.allied-community .ach-chip--completed {
	background: #eef0f3;
	color: #47525e;
}

.allied-community .ach-chip--cancelled {
	background: #fdecec;
	color: #a50d0e;
	text-decoration: line-through;
}

.allied-community .ach-chip--pet {
	background: #fdecec;
	color: #a50d0e;
}

/* Inline icons (mask technique so they inherit text color) */
.allied-community .ach-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 0.35em;
	vertical-align: -0.12em;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.allied-community .ach-icon--calendar {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v3M17 2v3M4 7h16M6 4h12a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v3M17 2v3M4 7h16M6 4h12a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.allied-community .ach-icon--pin {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7-5.1-7-11a7 7 0 0114 0c0 5.9-7 11-7 11z' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='10' r='2.6' fill='black'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7-5.1-7-11a7 7 0 0114 0c0 5.9-7 11-7 11z' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='10' r='2.6' fill='black'/%3E%3C/svg%3E");
}

.allied-community .ach-icon--paw {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='black'%3E%3Cellipse cx='20' cy='21' rx='6.5' ry='8.5'/%3E%3Cellipse cx='44' cy='21' rx='6.5' ry='8.5'/%3E%3Cellipse cx='8.5' cy='34' rx='5.5' ry='7'/%3E%3Cellipse cx='55.5' cy='34' rx='5.5' ry='7'/%3E%3Cpath d='M32 30c-8.5 0-16 8.4-16 16.2 0 4.7 3.4 7.8 8 7.8 3 0 5.4-1.4 8-1.4s5 1.4 8 1.4c4.6 0 8-3.1 8-7.8C48 38.4 40.5 30 32 30z'/%3E%3C/g%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='black'%3E%3Cellipse cx='20' cy='21' rx='6.5' ry='8.5'/%3E%3Cellipse cx='44' cy='21' rx='6.5' ry='8.5'/%3E%3Cellipse cx='8.5' cy='34' rx='5.5' ry='7'/%3E%3Cellipse cx='55.5' cy='34' rx='5.5' ry='7'/%3E%3Cpath d='M32 30c-8.5 0-16 8.4-16 16.2 0 4.7 3.4 7.8 8 7.8 3 0 5.4-1.4 8-1.4s5 1.4 8 1.4c4.6 0 8-3.1 8-7.8C48 38.4 40.5 30 32 30z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------
 * Listing shell
 * ------------------------------------------------------------------ */

.ach-listing {
	margin: 0 auto;
	max-width: var(--ach-content-width);
}

.ach-listing__header {
	margin-bottom: 1.5rem;
	text-align: center;
}

.ach-listing__heading {
	margin: 0 0 0.5rem;
	color: var(--ach-secondary-color);
	font-family: var(--ach-font-heading);
	font-size: clamp(1.6rem, 3.5vw, 2.2rem);
	line-height: 1.2;
}

.ach-listing__intro {
	margin: 0 auto;
	max-width: 46em;
	color: var(--ach-muted-color);
}

.ach-listing__body {
	position: relative;
	transition: opacity 0.2s ease;
}

.ach-listing__body.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

/* ---------------------------------------------------------------------
 * Filters
 * ------------------------------------------------------------------ */

.ach-filters {
	margin: 0 0 1.75rem;
}

.ach-filters__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.allied-community .ach-filter {
	display: inline-block;
	padding: 0.45em 1.1em;
	border: 1.5px solid var(--ach-border-color);
	border-radius: 999px;
	background: var(--ach-background-color);
	color: var(--ach-text-color);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.allied-community .ach-filter:hover,
.allied-community .ach-filter:focus {
	border-color: var(--ach-secondary-color);
	color: var(--ach-secondary-color);
}

.allied-community .ach-filter.is-active,
.allied-community .ach-filter[aria-current] {
	border-color: var(--ach-secondary-color);
	background: var(--ach-secondary-color);
	color: #ffffff;
}

/* Active state is also marked with a check, not color alone. */
.allied-community .ach-filter[aria-current]::before {
	content: "✓";
	margin-right: 0.45em;
	font-weight: 700;
}

/* ---------------------------------------------------------------------
 * Grid
 * ------------------------------------------------------------------ */

.ach-grid {
	display: grid;
	gap: var(--ach-grid-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: 1fr;
}

@media (min-width: 600px) {
	.ach-grid.ach-cols-2,
	.ach-grid.ach-cols-3,
	.ach-grid.ach-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 992px) {
	.ach-grid.ach-cols-3,
	.ach-grid.ach-cols-4 {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1200px) {
	.ach-grid.ach-cols-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ---------------------------------------------------------------------
 * Cards
 * ------------------------------------------------------------------ */

.ach-card {
	margin: 0;
	padding: 0;
}

.ach-card__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--ach-border-color);
	border-radius: var(--ach-card-radius);
	background: var(--ach-background-color);
	box-shadow: 0 1px 2px rgba(18, 38, 63, 0.06);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ach-card__inner:hover {
	box-shadow: 0 10px 24px rgba(18, 38, 63, 0.12);
	transform: translateY(-2px);
}

.ach-card__media {
	position: relative;
	display: block;
	background: var(--ach-surface-color);
	overflow: hidden;
}

.ach-ratio-landscape .ach-card__media { aspect-ratio: 3 / 2; }
.ach-ratio-portrait .ach-card__media { aspect-ratio: 3 / 4; }
.ach-ratio-square .ach-card__media { aspect-ratio: 1 / 1; }
.ach-ratio-wide .ach-card__media { aspect-ratio: 16 / 9; }

.ach-card__media img,
.ach-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ach-card__inner:hover .ach-card__media img {
	transform: scale(1.04);
}

.ach-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 140px;
	background: linear-gradient(135deg, var(--ach-surface-color), #eceff3);
	color: #c3cbd6;
}

.ach-card__placeholder svg {
	width: 30%;
	max-width: 96px;
	height: auto;
}

/* Media overlays */
.ach-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 58px;
	height: 58px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(18, 38, 63, 0.72);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.ach-card__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent #ffffff;
}

.ach-card__inner:hover .ach-card__play {
	background: var(--ach-primary-color);
	transform: translate(-50%, -50%) scale(1.07);
}

.ach-card__count {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 0.25em 0.8em;
	border-radius: 999px;
	background: rgba(18, 38, 63, 0.82);
	color: #ffffff;
	font-size: 0.78rem;
	font-weight: 600;
}

.ach-card__datebadge {
	position: absolute;
	top: 10px;
	left: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 52px;
	padding: 0.35em 0.5em;
	border-radius: 10px;
	background: var(--ach-secondary-color);
	color: #ffffff;
	line-height: 1.15;
	text-align: center;
}

.ach-card__datebadge-month {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ach-card__datebadge-day {
	font-size: 1.25rem;
	font-weight: 800;
}

/* Card content */
.ach-card__content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	gap: 0.55rem;
	padding: 1.1rem 1.2rem 1.3rem;
}

.ach-card__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

.ach-card__title {
	margin: 0;
	font-family: var(--ach-font-heading);
	font-size: 1.15rem;
	line-height: 1.35;
}

.ach-card__title a {
	color: var(--ach-secondary-color);
	text-decoration: none;
}

.ach-card__title a:hover,
.ach-card__title a:focus {
	color: var(--ach-primary-color);
	text-decoration: underline;
}

.ach-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em 1em;
	margin: 0;
	color: var(--ach-muted-color);
	font-size: 0.85rem;
}

.ach-card__event {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0;
	padding: 0.65rem 0.85rem;
	border-radius: 8px;
	background: var(--ach-surface-color);
	font-size: 0.88rem;
}

.ach-card__event .ach-chip {
	align-self: flex-start;
}

.ach-card__event-detail {
	display: flex;
	align-items: baseline;
	color: var(--ach-text-color);
}

.ach-card__pet {
	margin: 0;
	color: var(--ach-badge-text);
	font-size: 0.9rem;
	font-weight: 700;
}

.ach-card__excerpt {
	margin: 0;
	color: var(--ach-muted-color);
	font-size: 0.93rem;
}

.ach-card__action {
	margin: auto 0 0;
	padding-top: 0.35rem;
}

.allied-community .ach-btn--card {
	padding: 0.5em 1.25em;
	font-size: 0.88rem;
}

/* Featured flag accent */
.ach-card--featured .ach-card__inner {
	border-top: 4px solid var(--ach-primary-color);
}

/* ---------------------------------------------------------------------
 * List view
 * ------------------------------------------------------------------ */

.ach-grid--listmode {
	grid-template-columns: 1fr;
}

.ach-grid--listmode .ach-card__inner {
	display: grid;
	grid-template-columns: minmax(220px, 320px) 1fr;
}

.ach-grid--listmode .ach-card__media {
	height: 100%;
	min-height: 200px;
	aspect-ratio: auto;
}

@media (max-width: 700px) {
	.ach-grid--listmode .ach-card__inner {
		grid-template-columns: 1fr;
	}

	.ach-grid--listmode .ach-card__media {
		aspect-ratio: 3 / 2;
		min-height: 0;
	}
}

/* ---------------------------------------------------------------------
 * Featured view
 * ------------------------------------------------------------------ */

.ach-featured__hero {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	gap: clamp(1.25rem, 3vw, 2.5rem);
	align-items: center;
	margin-bottom: calc(var(--ach-grid-gap) * 1.5);
	border: 1px solid var(--ach-border-color);
	border-radius: var(--ach-card-radius);
	background: var(--ach-surface-color);
	overflow: hidden;
}

.ach-featured__media {
	display: block;
	height: 100%;
	min-height: 300px;
	background: #eceff3;
}

.ach-featured__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ach-featured__content {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	padding: 1.5rem 1.75rem 1.5rem 0;
}

.ach-featured__title {
	margin: 0;
	font-family: var(--ach-font-heading);
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	line-height: 1.25;
}

.ach-featured__title a {
	color: var(--ach-secondary-color);
	text-decoration: none;
}

.ach-featured__title a:hover,
.ach-featured__title a:focus {
	color: var(--ach-primary-color);
	text-decoration: underline;
}

.ach-featured__excerpt {
	margin: 0;
	color: var(--ach-muted-color);
}

@media (max-width: 860px) {
	.ach-featured__hero {
		grid-template-columns: 1fr;
	}

	.ach-featured__media {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}

	.ach-featured__content {
		padding: 0 1.5rem 1.5rem;
	}
}

/* ---------------------------------------------------------------------
 * Pagination & Load More
 * ------------------------------------------------------------------ */

.ach-pagination {
	margin-top: calc(var(--ach-grid-gap) * 1.25);
}

.ach-pagination__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.allied-community .ach-pagination .page-numbers {
	display: inline-block;
	min-width: 2.5em;
	padding: 0.45em 0.8em;
	border: 1.5px solid var(--ach-border-color);
	border-radius: 8px;
	background: var(--ach-background-color);
	color: var(--ach-text-color);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
}

.allied-community .ach-pagination a.page-numbers:hover,
.allied-community .ach-pagination a.page-numbers:focus {
	border-color: var(--ach-secondary-color);
	color: var(--ach-secondary-color);
}

.allied-community .ach-pagination .page-numbers.current {
	border-color: var(--ach-secondary-color);
	background: var(--ach-secondary-color);
	color: #ffffff;
}

.allied-community .ach-pagination .page-numbers.dots {
	border-color: transparent;
}

.ach-loadmore {
	margin-top: calc(var(--ach-grid-gap) * 1.25);
	text-align: center;
}

.ach-loadmore__btn[aria-busy="true"] {
	opacity: 0.6;
	pointer-events: none;
}

/* ---------------------------------------------------------------------
 * Empty state
 * ------------------------------------------------------------------ */

.ach-empty {
	max-width: 34em;
	margin: 0 auto;
	padding: 3rem 1.5rem;
	text-align: center;
	color: var(--ach-muted-color);
}

.ach-empty .ach-card__placeholder {
	width: 110px;
	height: 110px;
	min-height: 0;
	margin: 0 auto 1rem;
	border-radius: 50%;
}

.ach-empty__title {
	margin: 0 0 0.4rem;
	color: var(--ach-secondary-color);
	font-size: 1.25rem;
	font-weight: 700;
}

.ach-empty__text {
	margin: 0 0 1.25rem;
}

/* ---------------------------------------------------------------------
 * Video embeds
 * ------------------------------------------------------------------ */

.ach-video__frame {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--ach-card-radius);
	background: #0f1722;
	overflow: hidden;
}

.ach-video__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ach-video__frame--oembed {
	aspect-ratio: auto;
}

.ach-video__frame--oembed iframe {
	position: static;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
}

.ach-video__facade .ach-video__thumb,
.ach-video__facade img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.92;
	transition: opacity 0.2s ease, transform 0.3s ease;
}

.ach-video__facade:hover img {
	opacity: 1;
	transform: scale(1.02);
}

.ach-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 74px;
	height: 74px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(18, 38, 63, 0.78);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.ach-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 14px 0 14px 23px;
	border-color: transparent transparent transparent #ffffff;
}

.ach-video__facade:hover .ach-play,
.ach-video__facade:focus .ach-play {
	background: var(--ach-primary-color);
	transform: translate(-50%, -50%) scale(1.08);
}

.ach-video__description {
	color: var(--ach-muted-color);
}

/* ---------------------------------------------------------------------
 * Single post
 * ------------------------------------------------------------------ */

.ach-single {
	padding: clamp(1.5rem, 4vw, 3rem) 1rem 3rem;
}

.ach-single__container {
	max-width: var(--ach-content-width);
	margin: 0 auto;
}

.ach-breadcrumbs {
	margin-bottom: 1.25rem;
	font-size: 0.9rem;
	color: var(--ach-muted-color);
}

.ach-breadcrumbs a {
	color: var(--ach-muted-color);
	text-decoration: none;
}

.ach-breadcrumbs a:hover,
.ach-breadcrumbs a:focus {
	color: var(--ach-primary-color);
	text-decoration: underline;
}

.ach-single__header {
	max-width: 820px;
	margin: 0 auto 1.75rem;
	text-align: center;
}

.ach-single__header .ach-card__categories {
	justify-content: center;
	margin-bottom: 0.85rem;
}

.ach-single__title {
	margin: 0 0 0.75rem;
	color: var(--ach-secondary-color);
	font-family: var(--ach-font-heading);
	font-size: clamp(1.8rem, 4.5vw, 2.6rem);
	line-height: 1.18;
}

.ach-single__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.4em 1.1em;
	margin: 0;
	color: var(--ach-muted-color);
	font-size: 0.92rem;
}

.ach-single__hero {
	max-width: 980px;
	margin: 0 auto 2rem;
}

.ach-single__hero img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ach-card-radius);
}

.ach-eventbox {
	max-width: 760px;
	margin: 0 auto 2rem;
	padding: 1.4rem 1.6rem;
	border: 1px solid var(--ach-border-color);
	border-left: 5px solid var(--ach-primary-color);
	border-radius: var(--ach-card-radius);
	background: var(--ach-surface-color);
}

.ach-eventbox__heading {
	margin: 0 0 0.9rem;
	color: var(--ach-secondary-color);
	font-size: 1.15rem;
}

.ach-eventbox__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem 1.5rem;
	margin: 0;
}

.ach-eventbox__row dt {
	margin: 0;
	color: var(--ach-muted-color);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ach-eventbox__row dd {
	margin: 0.15rem 0 0;
	font-weight: 600;
}

.ach-eventbox__action {
	margin: 1.1rem 0 0;
}

.ach-single__content {
	max-width: 760px;
	margin: 0 auto;
	font-size: 1.05rem;
}

.ach-single__content > * + * {
	margin-top: 1em;
}

.ach-single__content img {
	border-radius: 8px;
}

.ach-single__section {
	max-width: 980px;
	margin: 2.5rem auto 0;
}

.ach-single__section-heading,
.ach-related__heading {
	margin: 0 0 1rem;
	color: var(--ach-secondary-color);
	font-family: var(--ach-font-heading);
	font-size: clamp(1.3rem, 2.5vw, 1.65rem);
	line-height: 1.25;
}

/* Gallery */
.ach-gallery__intro {
	margin: 0 0 1.25rem;
	color: var(--ach-muted-color);
}

.ach-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ach-gallery__item figure {
	margin: 0;
}

.ach-gallery__link {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	background: var(--ach-surface-color);
}

.ach-gallery__link img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ach-gallery__link:hover img,
.ach-gallery__link:focus img {
	transform: scale(1.05);
}

.ach-gallery__caption {
	margin-top: 0.4rem;
	color: var(--ach-muted-color);
	font-size: 0.85rem;
}

/* CTA */
.ach-cta {
	display: grid;
	max-width: 980px;
	margin: 2.5rem auto 0;
	border-radius: var(--ach-card-radius);
	overflow: hidden;
}

.ach-cta--has-image {
	grid-template-columns: minmax(240px, 2fr) 3fr;
}

.ach-cta__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ach-cta__content {
	padding: clamp(1.5rem, 4vw, 2.5rem);
}

.ach-cta--brand {
	background: var(--ach-secondary-color);
	color: #ffffff;
}

.ach-cta--dark {
	background: #20242b;
	color: #ffffff;
}

.ach-cta--light {
	background: var(--ach-surface-color);
	color: var(--ach-text-color);
	border: 1px solid var(--ach-border-color);
}

.ach-cta__heading {
	margin: 0 0 0.6rem;
	color: inherit;
	font-family: var(--ach-font-heading);
	font-size: clamp(1.3rem, 2.8vw, 1.7rem);
	line-height: 1.25;
}

.ach-cta__text {
	margin-bottom: 1.1rem;
	opacity: 0.92;
}

.ach-cta__text a {
	color: inherit;
}

.ach-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

.ach-cta--brand .ach-btn--solid,
.ach-cta--dark .ach-btn--solid {
	background: #ffffff;
	border-color: #ffffff;
	color: var(--ach-secondary-color);
}

.ach-cta--brand .ach-btn--solid:hover,
.ach-cta--brand .ach-btn--solid:focus,
.ach-cta--dark .ach-btn--solid:hover,
.ach-cta--dark .ach-btn--solid:focus {
	background: var(--ach-badge-bg);
	border-color: var(--ach-badge-bg);
	color: var(--ach-primary-dark);
}

@media (max-width: 760px) {
	.ach-cta--has-image {
		grid-template-columns: 1fr;
	}

	.ach-cta__media img {
		aspect-ratio: 16 / 9;
	}
}

/* Related */
.ach-related {
	max-width: var(--ach-content-width);
	margin: 3rem auto 0;
	padding-top: 2rem;
	border-top: 1px solid var(--ach-border-color);
}

/* ---------------------------------------------------------------------
 * Homepage updates section
 * ------------------------------------------------------------------ */

.ach-updates {
	max-width: var(--ach-content-width);
	margin: 0 auto;
}

.ach-updates__viewall {
	margin: calc(var(--ach-grid-gap) * 1.25) 0 0;
	text-align: center;
}

/* ---------------------------------------------------------------------
 * Aggregated gallery wall ({{community_gallery}} template token)
 * ------------------------------------------------------------------ */

.ach-galwall {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ach-galtile {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	background: var(--ach-surface-color, #f6f7f9);
}

.ach-galtile img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ach-galtile:hover img,
.ach-galtile:focus img {
	transform: scale(1.05);
}

.ach-galtile.is-hidden {
	display: none;
}

.ach-galwall__empty {
	margin: 0;
	padding: 1.5rem 0;
	color: var(--ach-muted-color, #5c6570);
	text-align: center;
}

@media (max-width: 992px) {
	.ach-galwall { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
	.ach-galwall { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.ach-galtile:hover img,
	.ach-galtile:focus img { transform: none; }
}

/* ---------------------------------------------------------------------
 * Lightbox
 * ------------------------------------------------------------------ */

.ach-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3.5rem 1rem 2rem;
	background: rgba(10, 16, 26, 0.93);
}

.ach-lightbox[hidden] {
	display: none;
}

.ach-lightbox__img {
	max-width: min(92vw, 1400px);
	max-height: 76vh;
	border-radius: 6px;
	box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
}

.ach-lightbox__caption {
	margin-top: 0.9rem;
	max-width: 70ch;
	color: #d7dde6;
	font-size: 0.95rem;
	text-align: center;
}

.ach-lightbox__counter {
	margin-top: 0.35rem;
	color: #8d97a5;
	font-size: 0.85rem;
}

.ach-lightbox__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 2px solid transparent;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.ach-lightbox__btn:hover,
.ach-lightbox__btn:focus {
	background: rgba(255, 255, 255, 0.28);
}

.ach-lightbox__btn:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.ach-lightbox__close {
	top: 16px;
	right: 16px;
}

.ach-lightbox__prev {
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
}

.ach-lightbox__next {
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
}

@media (max-width: 600px) {
	.ach-lightbox {
		padding: 4.25rem 0.5rem 1.25rem;
	}

	.ach-lightbox__prev {
		left: 6px;
	}

	.ach-lightbox__next {
		right: 6px;
	}
}

/* ---------------------------------------------------------------------
 * Motion preferences
 * ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.allied-community *,
	.allied-community *::before,
	.allied-community *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	.ach-card__inner:hover {
		transform: none;
	}

	.ach-card__inner:hover .ach-card__media img,
	.ach-gallery__link:hover img {
		transform: none;
	}
}
