/*
Theme Name: Lisbon Historical
Theme URI: https://lisbonhistoricalsociety.com
Description: Heritage archive design for the Lisbon Historical Society. Child theme of Twenty Twenty-Five.
Author: Lisbon Historical Society
Template: twentytwentyfive
Version: 1.2.1
Text Domain: lisbon-historical
*/

/* Heritage archive enhancements beyond theme.json */

:root {
	--lhs-brass: #b08d3e;
	--lhs-burgundy: #7a2e2e;
	--lhs-ink: #2b2118;
	--lhs-parchment: #f7f2e7;
	--lhs-sage: #e8ede4;
	--lhs-footer: #1f1812;
	--lhs-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--lhs-shadow-sm: 0 4px 14px rgba(43, 33, 24, 0.06);
	--lhs-shadow-md: 0 10px 28px rgba(43, 33, 24, 0.1);
	--lhs-shadow-lg: 0 18px 40px rgba(43, 33, 24, 0.14);
}

body {
	background-color: var(--lhs-parchment);
}

/* Site header */
.lhs-site-header {
	border-bottom: 1px solid color-mix(in srgb, var(--lhs-brass) 35%, transparent);
	background: linear-gradient(180deg, #fffdf8 0%, var(--lhs-parchment) 100%);
	transition: box-shadow 0.3s var(--lhs-ease);
}

.lhs-site-title a {
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: color 0.25s var(--lhs-ease);
}

.lhs-site-title a:hover {
	color: var(--lhs-burgundy);
}

/* Navigation */
.lhs-site-header .wp-block-navigation-item__content {
	position: relative;
	transition: color 0.25s var(--lhs-ease);
}

.lhs-site-header .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 100%;
	height: 2px;
	background: var(--lhs-brass);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s var(--lhs-ease);
}

.lhs-site-header .wp-block-navigation-item__content:hover::after,
.lhs-site-header .wp-block-navigation-item__content:focus-visible::after {
	transform: scaleX(1);
}

.lhs-site-header .wp-block-navigation-item__content:hover {
	color: var(--lhs-burgundy);
}

/* Cards */
.lhs-card {
	background: #fffdf8;
	border: 1px solid color-mix(in srgb, var(--lhs-brass) 25%, transparent);
	border-radius: 6px;
	box-shadow: var(--lhs-shadow-sm);
	padding: var(--wp--preset--spacing--40);
	height: 100%;
	transition:
		transform 0.35s var(--lhs-ease),
		box-shadow 0.35s var(--lhs-ease),
		border-color 0.35s var(--lhs-ease);
	will-change: transform;
}

.lhs-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--lhs-shadow-lg);
	border-color: color-mix(in srgb, var(--lhs-brass) 55%, transparent);
}

.lhs-card .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: 4px;
}

.lhs-card .wp-block-post-featured-image img {
	border-radius: 4px;
	filter: sepia(0.12) contrast(1.02);
	transition:
		transform 0.5s var(--lhs-ease),
		filter 0.4s var(--lhs-ease);
}

.lhs-card:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
	filter: sepia(0.06) contrast(1.05);
}

.lhs-card .wp-block-post-title a {
	text-decoration: none;
	transition: color 0.25s var(--lhs-ease);
}

.lhs-card .wp-block-post-title a:hover {
	color: var(--lhs-burgundy);
}

.lhs-card .wp-block-post-excerpt a {
	transition: color 0.25s var(--lhs-ease);
}

.lhs-card .wp-block-post-excerpt a:hover {
	color: var(--lhs-burgundy);
}

/* Meta field labels */
.wp-block-mfb-meta-field-block .prefix {
	font-family: var(--wp--preset--font-family--lora);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lhs-brass);
}

.wp-block-mfb-meta-field-block .value {
	font-family: var(--wp--preset--font-family--lora);
	color: var(--lhs-ink);
}

.wp-block-mfb-meta-field-block.is-display-inline-block > * {
	display: block;
}

.wp-block-mfb-meta-field-block.is-display-inline-block .prefix {
	margin-bottom: 0.25rem;
}

/* Section headings */
.lhs-section-heading {
	border-bottom: 2px solid color-mix(in srgb, var(--lhs-brass) 40%, transparent);
	padding-bottom: 0.5rem;
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Hero */
.lhs-hero {
	background: linear-gradient(135deg, #fffdf8 0%, var(--lhs-sage) 55%, var(--lhs-parchment) 100%);
	border: 1px solid color-mix(in srgb, var(--lhs-brass) 20%, transparent);
	border-radius: 8px;
	padding: clamp(2rem, 6vw, 4.5rem);
	transition:
		box-shadow 0.4s var(--lhs-ease),
		border-color 0.4s var(--lhs-ease);
}

.lhs-hero:hover {
	box-shadow: var(--lhs-shadow-md);
	border-color: color-mix(in srgb, var(--lhs-brass) 35%, transparent);
}

.lhs-hero-tagline {
	font-size: 1.125rem;
	line-height: 1.7;
	max-width: 42rem;
	color: color-mix(in srgb, var(--lhs-ink) 80%, transparent);
}

/* Buttons */
.wp-block-button__link,
.wp-element-button {
	position: relative;
	display: inline-block;
	border-radius: 4px !important;
	box-shadow: 0 2px 8px rgba(122, 46, 46, 0.2);
	transition:
		background-color 0.3s var(--lhs-ease),
		color 0.3s var(--lhs-ease),
		transform 0.3s var(--lhs-ease),
		box-shadow 0.3s var(--lhs-ease),
		border-color 0.3s var(--lhs-ease);
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(122, 46, 46, 0.28);
}

.wp-block-button__link:active,
.wp-element-button:active {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(122, 46, 46, 0.22);
	transition-duration: 0.1s;
}

.wp-block-button__link:focus-visible,
.wp-element-button:focus-visible {
	outline: 2px solid var(--lhs-brass);
	outline-offset: 3px;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 2px solid var(--lhs-burgundy) !important;
	color: var(--lhs-burgundy) !important;
	box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--lhs-burgundy) !important;
	color: #fffdf8 !important;
	box-shadow: 0 8px 20px rgba(122, 46, 46, 0.25);
}

/* Button groups: slight stagger feel on hover */
.wp-block-buttons .wp-block-button {
	transition: transform 0.3s var(--lhs-ease);
}

.wp-block-buttons:hover .wp-block-button {
	transform: translateY(0);
}

/* Volunteer hub dashboard */
.lhs-dashboard-grid,
.lhs-dashboard-grid.wp-block-group,
.lhs-dashboard-grid.is-layout-flow,
.lhs-dashboard-grid.is-layout-grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 1.5rem !important;
	align-items: stretch !important;
}

.lhs-dashboard-card,
.lhs-dashboard-card.wp-block-group,
.lhs-dashboard-card.is-layout-constrained {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: none !important;
	min-height: 11.5rem !important;
	height: 100% !important;
	padding: 1.5rem !important;
	margin: 0 !important;
	text-align: center;
	background: #fffdf8;
	border: 1px solid color-mix(in srgb, var(--lhs-brass) 25%, transparent);
	border-radius: 6px;
	box-shadow: none;
	transition:
		box-shadow 0.35s var(--lhs-ease),
		border-color 0.35s var(--lhs-ease);
}

.lhs-dashboard-card > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

.lhs-dashboard-card h3 {
	margin-bottom: 0.5rem !important;
	flex-shrink: 0;
}

.lhs-dashboard-card p {
	flex: 1 1 auto !important;
	margin-bottom: 1rem !important;
	font-size: 0.875rem !important;
	line-height: 1.5 !important;
}

.lhs-dashboard-card:hover {
	box-shadow: var(--lhs-shadow-sm);
	border-color: color-mix(in srgb, var(--lhs-brass) 50%, transparent);
}

.lhs-dashboard-card .wp-block-buttons {
	width: 100% !important;
	margin-top: auto !important;
	flex-shrink: 0;
}

.lhs-dashboard-card .wp-block-button {
	width: 100% !important;
	margin: 0 !important;
}

/* Force identical button sizing — overrides theme.json and WP outline variants */
.lhs-dashboard-card .wp-block-button .wp-block-button__link,
.lhs-dashboard-card .wp-block-button.is-style-outline .wp-block-button__link {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 2.75rem !important;
	height: 2.75rem !important;
	padding: 0 1rem !important;
	font-size: 0.8rem !important;
	line-height: 1.2 !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
	border: 2px solid var(--lhs-burgundy) !important;
	border-radius: 4px !important;
	background: var(--lhs-burgundy) !important;
	color: #fffdf8 !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	white-space: nowrap !important;
}

.lhs-dashboard-card .wp-block-button .wp-block-button__link:hover,
.lhs-dashboard-card .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: color-mix(in srgb, var(--lhs-burgundy) 85%, #000) !important;
	color: #fffdf8 !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(122, 46, 46, 0.18) !important;
}

@media (max-width: 640px) {
	.lhs-dashboard-grid,
	.lhs-dashboard-grid.wp-block-group,
	.lhs-dashboard-grid.is-layout-flow,
	.lhs-dashboard-grid.is-layout-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Form pages */
.lhs-form-shell {
	background: #fffdf8;
	border: 1px solid color-mix(in srgb, var(--lhs-brass) 20%, transparent);
	border-radius: 8px;
	padding: clamp(1.5rem, 4vw, 3rem);
	box-shadow: var(--lhs-shadow-sm);
	transition: box-shadow 0.35s var(--lhs-ease);
}

.lhs-form-shell:focus-within {
	box-shadow: var(--lhs-shadow-md);
	border-color: color-mix(in srgb, var(--lhs-brass) 40%, transparent);
}

/* Fluent Forms + ACF Frontend forms */
.fluentform,
.fea-form,
.frontend-form {
	font-family: var(--wp--preset--font-family--lora);
}

.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform input[type="tel"],
.fluentform textarea,
.fea-form input[type="text"],
.fea-form input[type="email"],
.fea-form textarea,
.fea-form select,
.acf-field input,
.acf-field textarea,
.acf-field select {
	border: 1px solid color-mix(in srgb, var(--lhs-brass) 35%, transparent) !important;
	border-radius: 4px !important;
	background: #fffdf8 !important;
	color: var(--lhs-ink) !important;
	transition:
		border-color 0.25s var(--lhs-ease),
		box-shadow 0.25s var(--lhs-ease);
}

.fluentform input:focus,
.fluentform textarea:focus,
.fea-form input:focus,
.fea-form textarea:focus,
.fea-form select:focus,
.acf-field input:focus,
.acf-field textarea:focus,
.acf-field select:focus {
	border-color: var(--lhs-brass) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--lhs-brass) 25%, transparent) !important;
	outline: none !important;
}

.fluentform .ff-btn-submit,
.fea-form button[type="submit"],
.acf-form .acf-button {
	background: var(--lhs-burgundy) !important;
	border: none !important;
	border-radius: 4px !important;
	color: #fffdf8 !important;
	font-family: var(--wp--preset--font-family--lora) !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 0.85rem !important;
	padding: 0.75rem 1.5rem !important;
	box-shadow: 0 2px 8px rgba(122, 46, 46, 0.2);
	transition:
		background-color 0.3s var(--lhs-ease),
		transform 0.3s var(--lhs-ease),
		box-shadow 0.3s var(--lhs-ease) !important;
}

.fluentform .ff-btn-submit:hover,
.fea-form button[type="submit"]:hover,
.acf-form .acf-button:hover {
	background: color-mix(in srgb, var(--lhs-burgundy) 85%, #000) !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(122, 46, 46, 0.28) !important;
}

.fluentform .ff-btn-submit:active,
.fea-form button[type="submit"]:active,
.acf-form .acf-button:active {
	transform: translateY(0) !important;
}

/* Single item featured image frame */
.lhs-featured-frame img {
	border: 1px solid color-mix(in srgb, var(--lhs-brass) 30%, transparent);
	border-radius: 6px;
	box-shadow: var(--lhs-shadow-md);
	filter: sepia(0.08);
	transition:
		transform 0.5s var(--lhs-ease),
		box-shadow 0.4s var(--lhs-ease);
}

.lhs-featured-frame:hover img {
	transform: scale(1.01);
	box-shadow: var(--lhs-shadow-lg);
}

/* About pull quote */
.lhs-pull-quote {
	border-left: 4px solid var(--lhs-brass);
	padding-left: var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--playfair-display);
	font-size: 1.35rem;
	font-style: italic;
	color: var(--lhs-burgundy);
	margin: 0;
}

/* Footer */
.lhs-site-footer {
	background: var(--lhs-footer);
	color: #e8e0d4;
	margin-top: var(--wp--preset--spacing--60);
}

.lhs-site-footer a {
	color: #e8e0d4;
	text-decoration: none;
	transition: color 0.25s var(--lhs-ease);
}

.lhs-site-footer a:hover {
	color: var(--lhs-brass);
}

/* Edit button from snippet */
.wp-element-button {
	background: var(--lhs-burgundy);
	color: #fffdf8;
	border-radius: 4px;
	padding: 0.6rem 1.2rem;
	text-decoration: none;
	display: inline-block;
	margin-bottom: 1.5rem;
}

.wp-element-button:hover {
	background: color-mix(in srgb, var(--lhs-burgundy) 85%, #000);
	color: #fffdf8;
}

/* Archive grid spacing */
.lhs-archive-grid .wp-block-post-template {
	gap: var(--wp--preset--spacing--40);
}

/* Visit band */
.lhs-visit-band {
	background: var(--lhs-sage);
	border-radius: 8px;
	padding: var(--wp--preset--spacing--50);
	text-align: center;
	transition:
		box-shadow 0.35s var(--lhs-ease),
		transform 0.35s var(--lhs-ease);
}

.lhs-visit-band:hover {
	box-shadow: var(--lhs-shadow-sm);
	transform: translateY(-2px);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.lhs-card:hover,
	.lhs-visit-band:hover,
	.wp-block-button__link:hover,
	.wp-element-button:hover {
		transform: none;
	}
}
