/**
 * Heritage page styles — timeline, stat cards, ghost numbers,
 * Vardon, MacKenzie, Unsworth Hall, editorial quote, gold dividers.
 *
 * Gold accent used heavily for heritage elements.
 * Alternating navy/cream sections with generous padding.
 * Mobile-first, BEM, theme.json custom properties only.
 *
 * @package BuryGolfClub
 * @since   1.0.0
 */

/* Heritage hero styles are now handled by the global hero-page.css component.
   The heritage page uses hero-page--bottom-left variant. */

/* ========================================================================
   Ghost Section Numbers
   ======================================================================== */

.heritage-ghost-number {
	position: absolute;
	top: var(--wp--preset--spacing--30);
	right: var(--wp--preset--spacing--30);
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(5rem, 10vw, 7.5rem);
	color: transparent;
	-webkit-text-stroke: 1px var(--wp--preset--color--gold);
	opacity: 0.3;
	line-height: 1;
	pointer-events: none;
	-webkit-user-select: none;
	user-select: none;
	z-index: 0;
}

.heritage-ghost-number--light {
	-webkit-text-stroke-color: var(--wp--preset--color--light-gold);
}

/* Position parent for ghost numbers */
.heritage-timeline,
.heritage-mackenzie,
.heritage-unsworth {
	position: relative;
	overflow: hidden;
}

/* ========================================================================
   Heritage Stat Cards
   ======================================================================== */

.heritage-stat-cards {
	padding-block: clamp(4rem, 8vw, 8rem);
}

.heritage-stat-cards__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wp--preset--spacing--20);
}

@media (min-width: 48rem) {
	.heritage-stat-cards__grid {
		grid-template-columns: repeat(4, 1fr);
		gap: var(--wp--preset--spacing--40);
	}
}

.heritage-stat-cards__card {
	text-align: center;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--20);
	border-bottom: 3px solid var(--wp--preset--color--gold);
	background-color: rgba(196, 162, 101, 0.06);
}

.heritage-stat-cards__number {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem);
	color: var(--wp--preset--color--gold);
	line-height: 1.1;
	margin-bottom: var(--wp--preset--spacing--10);
}

.heritage-stat-cards__label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--cream-dark);
	line-height: 1.4;
}

/* ========================================================================
   Gold Gradient Divider
   ======================================================================== */

.heritage-divider {
	padding-inline: var(--wp--preset--spacing--30);
	max-width: var(--wp--style--global--wide-size, 90rem);
	margin-inline: auto;
}

.heritage-divider__line {
	height: 1px;
	background: linear-gradient(
		to right,
		transparent 0%,
		var(--wp--preset--color--gold) 20%,
		var(--wp--preset--color--gold) 80%,
		transparent 100%
	);
	opacity: 0.5;
}

/* ========================================================================
   Timeline
   ======================================================================== */

.heritage-timeline__header {
	text-align: center;
	margin-inline: auto;
}

.heritage-timeline__heading {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--primary);
	line-height: 1.1;
}

.heritage-timeline__track {
	position: relative;
}

.heritage-timeline__line {
	display: none;
}

@media (min-width: 48rem) {
	.heritage-timeline__line {
		display: block;
		position: absolute;
		left: 50%;
		top: 0;
		bottom: 0;
		width: 2px;
		background: linear-gradient(
			to bottom,
			transparent 0%,
			var(--wp--preset--color--gold) 5%,
			var(--wp--preset--color--gold) 95%,
			transparent 100%
		);
		transform: translateX(-50%);
		z-index: 1;
	}
}

.heritage-timeline__items {
	list-style: none;
	padding: 0;
	margin: 0;
}

.heritage-timeline__item {
	position: relative;
	padding-bottom: var(--wp--preset--spacing--50);
}

.heritage-timeline__item:last-child {
	padding-bottom: 0;
}

/* Gold dot on timeline line */
.heritage-timeline__dot {
	display: none;
}

@media (min-width: 48rem) {
	.heritage-timeline__dot {
		display: block;
		position: absolute;
		left: 50%;
		top: 0;
		width: 18px;
		height: 18px;
		background-color: var(--wp--preset--color--gold);
		border: 3px solid var(--wp--preset--color--white);
		border-radius: 50%;
		transform: translateX(-50%);
		z-index: 2;
		box-shadow: 0 0 0 4px rgba(196, 162, 101, 0.25);
	}
}

/* Timeline content layout — mobile: gold left border */
.heritage-timeline__content {
	background-color: var(--wp--preset--color--white);
	padding: var(--wp--preset--spacing--40);
	border-left: 3px solid var(--wp--preset--color--gold);
}

/* Desktop: alternating left/right */
@media (min-width: 48rem) {
	.heritage-timeline__content {
		width: 44%;
		border-left: none;
		box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
	}

	.heritage-timeline__item:nth-child(odd) .heritage-timeline__content {
		margin-left: 0;
		margin-right: auto;
		text-align: right;
	}

	.heritage-timeline__item:nth-child(even) .heritage-timeline__content {
		margin-left: auto;
		margin-right: 0;
	}
}

.heritage-timeline__year {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--gold);
	display: block;
	margin-bottom: var(--wp--preset--spacing--10);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.heritage-timeline__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.25rem, 1vw + 1rem, 1.75rem);
	color: var(--wp--preset--color--primary);
	margin-bottom: var(--wp--preset--spacing--10);
	line-height: 1.2;
}

.heritage-timeline__text {
	color: var(--wp--preset--color--text-secondary);
	line-height: 1.7;
	font-size: var(--wp--preset--font-size--small);
}

/* ========================================================================
   Heritage Feature Section (Vardon, MacKenzie, Unsworth Hall)
   ======================================================================== */

.heritage-feature {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--40);
	align-items: center;
}

@media (min-width: 48rem) {
	.heritage-feature {
		grid-template-columns: 1fr 1fr;
		gap: var(--wp--preset--spacing--60);
	}

	.heritage-feature--reverse .heritage-feature__image {
		order: 2;
	}

	.heritage-feature--reverse .heritage-feature__content {
		order: 1;
	}
}

.heritage-feature__image {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.heritage-feature__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.heritage-feature__image:hover img {
	transform: scale(1.05);
}

/* Sepia filter for historical heritage photos */
.heritage-feature__image--sepia img {
	filter: sepia(0.08) saturate(0.95);
}

/* Gold overlay for historical photos */
.heritage-feature__image--sepia::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(196, 162, 101, 0.06);
	pointer-events: none;
}

.heritage-feature__heading {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.1;
	margin-bottom: var(--wp--preset--spacing--30);
}

/* Dark section heading colour */
.bgc-section--dark .heritage-feature__heading {
	color: var(--wp--preset--color--text-light);
}

.bgc-section--light .heritage-feature__heading,
.bgc-section--cream .heritage-feature__heading {
	color: var(--wp--preset--color--primary);
}

.heritage-feature__text {
	line-height: 1.7;
}

.bgc-section--dark .heritage-feature__text {
	color: var(--wp--preset--color--cream-dark);
}

.bgc-section--light .heritage-feature__text,
.bgc-section--cream .heritage-feature__text {
	color: var(--wp--preset--color--text-secondary);
}

.heritage-feature__text p {
	margin-bottom: var(--wp--preset--spacing--20);
}

.heritage-feature__text p:last-child {
	margin-bottom: 0;
}

.heritage-feature__cta {
	margin-top: var(--wp--preset--spacing--40);
}

/* ========================================================================
   Heritage Stat Highlight (inline with Vardon)
   ======================================================================== */

.heritage-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--wp--preset--spacing--30);
	max-width: 40rem;
	margin-top: var(--wp--preset--spacing--40);
}

@media (min-width: 48rem) {
	.heritage-stats {
		grid-template-columns: repeat(3, 1fr);
		max-width: none;
	}
}

.heritage-stat__number {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--gold);
	line-height: 1.1;
}

.heritage-stat__unit {
	font-size: 0.6em;
}

.heritage-stat__label {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: var(--wp--preset--spacing--10);
}

.bgc-section--dark .heritage-stat__label {
	color: var(--wp--preset--color--cream-dark);
}

.bgc-section--light .heritage-stat__label {
	color: var(--wp--preset--color--text-secondary);
}

/* ========================================================================
   Heritage Editorial Quote
   ======================================================================== */

.heritage-quote {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3rem, 10vw, 10rem);
}

.heritage-quote__wrap {
	position: relative;
	max-width: 50rem;
	margin-inline: auto;
	text-align: center;
}

.heritage-quote__ghost-number {
	position: absolute;
	top: -1rem;
	right: -1rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(5rem, 10vw, 7.5rem);
	color: transparent;
	-webkit-text-stroke: 1px var(--wp--preset--color--light-gold);
	opacity: 0.2;
	line-height: 1;
	pointer-events: none;
	-webkit-user-select: none;
	user-select: none;
}

.heritage-quote__mark {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(4rem, 8vw, 7.5rem);
	color: var(--wp--preset--color--gold);
	line-height: 0.8;
	opacity: 0.5;
	margin-bottom: var(--wp--preset--spacing--20);
}

.heritage-quote__blockquote {
	margin: 0;
	padding: 0;
}

.heritage-quote__text {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.25rem, 2vw + 0.5rem, 2rem);
	color: var(--wp--preset--color--cream);
	line-height: 1.4;
	font-style: italic;
	margin-bottom: var(--wp--preset--spacing--30);
}

.heritage-quote__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
}

.heritage-quote__cite {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--gold);
	font-style: normal;
}

.heritage-quote__role {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--wp--preset--color--cream-dark);
}

/* ========================================================================
   Heritage CTA Section
   ======================================================================== */

.heritage-cta {
	text-align: center;
	max-width: 40rem;
	margin-inline: auto;
}

.heritage-cta__heading {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--text-light);
	line-height: 1.1;
	margin-bottom: var(--wp--preset--spacing--20);
}

.heritage-cta__text {
	color: var(--wp--preset--color--cream-dark);
	line-height: 1.7;
	margin-bottom: var(--wp--preset--spacing--40);
}

.heritage-cta__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	justify-content: center;
}

/* ========================================================================
   Reduced Motion
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
	.heritage-feature__image img {
		transition: none;
	}

	.heritage-feature__image:hover img {
		transform: none;
	}
}
