/* =========================================================
   Animations
   ========================================================= */
@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideInLeft {
	from {
		opacity: 0;
		transform: translateX(-30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes scaleIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero__content {
	animation: slideInLeft 0.8s ease-out;
}

.stat-item {
	animation: scaleIn 0.6s ease-out;
}

.stat-item:nth-child(1) { animation-delay: 0s; }
.stat-item:nth-child(2) { animation-delay: 0.1s; }
.stat-item:nth-child(3) { animation-delay: 0.2s; }
.stat-item:nth-child(4) { animation-delay: 0.3s; }

.intro-grid__text {
	animation: slideInLeft 0.8s ease-out;
}

.intro-grid__image-item {
	animation: fadeIn 0.8s ease-out;
}

.intro-grid__image-item:nth-child(1) { animation-delay: 0.2s; }
.intro-grid__image-item:nth-child(2) { animation-delay: 0.3s; }
.intro-grid__image-item:nth-child(3) { animation-delay: 0.4s; }
.intro-grid__image-item:nth-child(4) { animation-delay: 0.5s; }

.product-card {
	animation: scaleIn 0.6s ease-out;
}

.products-grid > .product-card:nth-child(1) { animation-delay: 0s; }
.products-grid > .product-card:nth-child(2) { animation-delay: 0.1s; }
.products-grid > .product-card:nth-child(3) { animation-delay: 0.2s; }
.products-grid > .product-card:nth-child(4) { animation-delay: 0.3s; }
.products-grid > .product-card:nth-child(5) { animation-delay: 0.4s; }
.products-grid > .product-card:nth-child(6) { animation-delay: 0.5s; }

/* =========================================================
   Container
   ========================================================= */
.container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
	box-sizing: border-box;
}

/* =========================================================
   Section Spacing
   ========================================================= */
.section-gap {
	padding-block: clamp(3rem, 6vw, 5rem);
}

.section--dark {
	background: var(--color-surface);
	color: var(--color-text-inv);
}

.section--light-bg {
	background: var(--color-light-2);
}

/* =========================================================
   Section Header (title + view-all link row)
   ========================================================= */
.section-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: .5rem 1rem;
	margin-bottom: 2rem;
}

.section-header .section-title {
	margin-bottom: 0;
}

.section-link {
	font-size: .9375rem;
	font-weight: 600;
	color: var(--color-primary);
	text-decoration: none;
	white-space: nowrap;
}

.section-link:hover {
	text-decoration: underline;
}

/* =========================================================
   Section Featured Products
   ========================================================= */
.section-featured-products {
	background: #f4f4f2;
}

.section-title {
	font-size: clamp(1.75rem, 3vw, 2rem);
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 2rem;
}

.section-title--light {
	color: var(--color-text-inv);
}

/* =========================================================
   Products Grid
   ========================================================= */
.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 2rem;
}

@media (min-width: 768px) {
	.products-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* =========================================================
   Generic Posts Grid
   ========================================================= */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 2rem;
}

/* =========================================================
   Page Hero (non-fullscreen, text-only)
   ========================================================= */
.page-hero {
	background: var(--color-surface);
	color: var(--color-text-inv);
	padding-block: clamp(3rem, 6vw, 4.5rem);
}

.page-hero__title {
	color: var(--color-text-inv);
	margin-bottom: 0;
	padding-bottom: 0;
}

.page-hero__subtitle {
	color: rgba(255,255,255,.75);
	font-size: 1.125rem;
	margin-top: 0;
	animation: fadeIn 0.6s ease-out 0.25s both;
}

.page-hero__title {
	animation: fadeInDown 0.8s ease-out;
}

.page-content__featured-image {
	animation: fadeIn 0.8s ease-out;
	margin-bottom: 2rem;
}

.page-content {
	animation: fadeInUp 0.8s ease-out 0.2s both;
}

.entry-content {
	animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* =========================================================
   Intro Section (2-column with image grid)
   ========================================================= */
.section-intro {
	background: #fff;
}

.intro-grid {
	display: grid;
	gap: 3rem;
	align-items: center;
}

@media (min-width: 768px) {
	.intro-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.intro-grid__title {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 700;
	margin-bottom: 1.5rem;
	color: var(--color-text);
}

.intro-grid__lead {
	font-size: 1.0625rem;
	color: var(--color-text);
	margin-bottom: 1.5rem;
	line-height: 1.8;
}

.intro-grid__features {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.intro-grid__features li {
	padding-left: 1.5rem;
	position: relative;
	color: var(--color-text);
}

.intro-grid__features li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--color-primary);
}

.intro-grid__additional {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e0e0de;
	font-size: 1rem;
	color: var(--color-text);
	line-height: 1.8;
}

.intro-grid__images {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.intro-grid__image-item--large {
	grid-column: auto;
}

@media (min-width: 768px) {
	.intro-grid__images {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
	}

	.intro-grid__image-item--large {
		grid-column: 1 / 2;
		grid-row: 1 / 3;
	}
}

.intro-grid__image {
	aspect-ratio: 1;
	border-radius: var(--radius-lg);
	overflow: hidden;
}

/* =========================================================
   Stats
   ========================================================= */
.section-stats {
	background: var(--color-primary);
	padding-block: 2.5rem;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
	text-align: center;
}

@media (min-width: 768px) {
	.stats-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 3rem;
	}
}

.stat-item__number {
	display: inline;
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 700;
	color: var(--color-text-inv);
	line-height: 0.9rem;
}

.stat-item__plus {
	display: inline;
	font-size: 2rem;
	color: var(--color-text-inv);
	margin-left: 0.15em;
	line-height: 0.9rem;
	vertical-align: baseline;
}

.stat-item__label {
	display: block;
	font-size: .875rem;
	color: rgba(255,255,255,.8);
	margin-top: .25rem;
	text-transform: uppercase;
	letter-spacing: .06em;
}

/* =========================================================
   Value Props Grid
   ========================================================= */
.values-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	gap: 2rem;
}

.value-card {
	text-align: center;
	padding: 1.5rem;
}

.value-card__icon {
	color: var(--color-secondary);
	margin-bottom: 1rem;
	display: flex;
	justify-content: center;
}

.value-card__title {
	font-size: 1.125rem;
	color: var(--color-text-inv);
	margin-bottom: .5rem;
}

.value-card__text {
	color: rgba(255,255,255,.7);
	font-size: .9375rem;
}

/* =========================================================
   About Page Layout
   ========================================================= */
.about-story {
	display: grid;
	gap: 3rem;
}

@media (min-width: 768px) {
	.about-story {
		grid-template-columns: 1fr 1fr;
		align-items: center;
	}
}

.about-story__image {
	overflow: hidden;
	border-radius: var(--radius-lg);
	aspect-ratio: 1;
}

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

.about-story__image-placeholder {
	width: 100%;
	height: 100%;
}

.about-story__image img {
	border-radius: var(--radius-lg);
	width: 100%;
	object-fit: cover;
}

/* =========================================================
   Standard Page Layout (text left, image right)
   ========================================================= */
.page-story {
	display: grid;
	gap: 3rem;
}

@media ( min-width: 768px ) {
	.page-story {
		grid-template-columns: 1fr 1fr;
		align-items: center;
	}
}

.page-story--full {
	grid-template-columns: 1fr !important;
}

.page-story__content {
	order: 1;
}

.page-story__image {
	order: 2;
	overflow: hidden;
	border-radius: var( --radius-lg );
	aspect-ratio: 1;
}

.page-story__image-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: var( --radius-lg );
}

/* =========================================================
   Team Grid
   ========================================================= */
.team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	gap: 2rem;
}

.team-card {
	text-align: center;
	padding: 1.5rem;
	background: #fff;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.team-card__avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-display);
	font-size: 2rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1rem;
}

.team-card__name {
	font-size: 1.125rem;
	margin-bottom: .25rem;
}

.team-card__role {
	color: var(--color-primary);
	font-size: .875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	margin-bottom: .75rem;
}

.team-card__bio {
	color: var(--color-muted);
	font-size: .9rem;
}

/* =========================================================
   Service Area Section
   ========================================================= */
.service-area-section {
	background: linear-gradient(135deg, rgba(249, 154, 54, 0.03) 0%, rgba(249, 154, 54, 0.05) 100%);
}

.service-area-header {
	margin-bottom: 3rem;
}

.service-area-desc {
	font-size: 1.0625rem;
	color: var(--color-text);
	line-height: 1.8;
	max-width: 700px;
	margin-top: 1rem;
}

.counties-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.counties-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 2rem;
	}
}

.county-card {
	background: #fff;
	border-radius: var(--radius-lg);
	padding: 1.75rem;
	text-align: center;
	box-shadow: var(--shadow-sm);
	transition: all var(--transition);
	border: 2px solid transparent;
}

.county-card:hover {
	box-shadow: var(--shadow-md);
	border-color: var(--color-primary);
	transform: translateY(-4px);
}

.county-card__icon {
	font-size: 2.5rem;
	margin-bottom: 1rem;
	display: block;
}

.county-card__title {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 0.5rem;
}

.county-card__text {
	font-size: 0.9375rem;
	color: var(--color-muted);
	line-height: 1.6;
	margin: 0;
}

/* =========================================================
   Error 404
   ========================================================= */
.error-404 {
	text-align: center;
	animation: fadeIn 0.8s ease-out;
}

.error-404__content {
	max-width: 560px;
	margin: 0 auto;
	animation: slideInDown 0.8s ease-out 0.2s both;
}

.error-404__code {
	font-family: var(--font-display);
	font-size: clamp(5rem, 12vw, 9rem);
	font-weight: 700;
	color: var(--color-primary);
	opacity: .15;
	line-height: 1;
	margin-bottom: -.5em;
}

.error-404__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin-bottom: 1rem;
}

.error-404__text {
	color: var(--color-muted);
	margin-bottom: 2rem;
}

.error-404__actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 2rem;
}

.error-404__search {
	margin-top: 2rem;
}

/* =========================================================
   Search
   ========================================================= */
.search-form-wrapper {
	margin-bottom: 2.5rem;
}

.no-results {
	text-align: center;
	padding: 3rem 1rem;
	animation: fadeIn 0.8s ease-out;
}

.no-results p {
	color: var(--color-muted);
	margin-bottom: 1.5rem;
	animation: slideInDown 0.8s ease-out 0.1s both;
}

.search-form-wrapper {
	animation: slideInDown 0.8s ease-out;
}

/* =========================================================
   About Page Animations
   ========================================================= */
.about-story__image {
	animation: fadeIn 0.8s ease-out;
}

.about-story__content {
	animation: slideInLeft 0.8s ease-out 0.2s both;
}

.county-card {
	animation: scaleIn 0.6s ease-out;
}

.counties-grid > .county-card:nth-child(1) { animation-delay: 0s; }
.counties-grid > .county-card:nth-child(2) { animation-delay: 0.1s; }
.counties-grid > .county-card:nth-child(3) { animation-delay: 0.2s; }
.counties-grid > .county-card:nth-child(4) { animation-delay: 0.3s; }
.counties-grid > .county-card:nth-child(5) { animation-delay: 0.4s; }
.counties-grid > .county-card:nth-child(6) { animation-delay: 0.5s; }

.value-card {
	animation: scaleIn 0.6s ease-out;
}

.values-grid > .value-card:nth-child(1) { animation-delay: 0s; }
.values-grid > .value-card:nth-child(2) { animation-delay: 0.1s; }
.values-grid > .value-card:nth-child(3) { animation-delay: 0.2s; }
.values-grid > .value-card:nth-child(4) { animation-delay: 0.3s; }
