/* =============================================================================
   FRONT PAGE
   Homepage sections, ported from production one at a time.
   Rule order matches section order in front-page.php.
   ============================================================================= */

/* =============================================================================
   SECTION 1: HOME HERO
   Frosted glass panel over full-bleed photo; CTA bar hangs 40px out of the
   panel bottom (panel margin-bottom offsets the bar's negative margin).
   ============================================================================= */

.home-hero {
	padding-top: var(--section-y-hero);
	padding-bottom: var(--section-y-hero);
	background-image: url('../images/pleated-filter-for-commercial-buildings.webp');
	background-size: cover;
	background-repeat: no-repeat;
	border-bottom: 1px solid var(--color-border-subtle);
}

.home-hero__panel {
	max-width: 800px;
	padding: 35px 35px 0 35px;
	margin-bottom: var(--space-2xl);
	background-color: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-m);
}

.home-hero__title {
	margin-bottom: 10px;
}

p.home-hero__intro {
	margin-bottom: 20px;
	padding: var(--space-2xs) 0 var(--space-2xs) var(--space-m);
	border-left: 2px solid var(--color-border-subtle);
}

.home-hero__cta-bar {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	width: fit-content;
	gap: 20px;
	padding: var(--space-m);
	margin-bottom: -40px;
	background-color: var(--color-bg-primary);
	border: 1px solid var(--color-border-subtle);
	border-radius: var(--radius-l);
	box-shadow: var(--shadow-card);
}

.home-hero__cta-divider {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.home-hero__cta-divider-line {
	width: 1px;
	height: 15px;
	background-color: var(--color-border-subtle);
}

.home-hero__cta-divider-text {
	font-weight: var(--weight-black);
	line-height: 1;
}

.home-hero__phone {
	display: flex;
	flex-direction: column;
	align-items: center;
	font-weight: var(--weight-bold);
	line-height: 1.2;
}

.home-hero__phone-number {
	font-size: var(--text-body-large);
	font-weight: var(--weight-black);
	color: var(--color-text-primary);
}

@media ( max-width: 768px ) {

	.home-hero {
		padding-top: var(--section-y-sm);
		padding-bottom: var(--section-y-sm);
	}

	.home-hero__panel {
		padding: var(--space-xl) var(--space-l) 0 var(--space-l);
	}

	.home-hero__cta-bar {
		flex-direction: column-reverse;
		gap: 10px;
	}

	.home-hero__cta-divider {
		flex-direction: row;
		gap: var(--space-2xs);
	}

	.home-hero__cta-divider-line {
		width: 15px;
		height: 1px;
	}

}

/* =============================================================================
   SECTION 2: HOME PRODUCTS
   Sticky intro column + 2-col grid of icon cards.
   ============================================================================= */

.home-products {
	padding-top: var(--section-y);
	padding-bottom: var(--section-y);
}

.home-products .layout-section__inner {
	display: flex;
	flex-direction: row;
	align-items: flex-start; /* keeps the sticky intro from stretching to grid height */
	gap: var(--space-4xl);
}

.home-products__intro {
	flex: 0 0 400px;
	position: sticky;
	top: calc(var(--sticky-top) + var(--admin-bar-h));
}

.home-products__heading {
	margin-bottom: var(--space-2xs);
}

p.home-products__copy {
	margin-bottom: var(--space-m);
}

.home-products__grid {
	flex: 1 0 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-xl) var(--space-2xl);
}

.home-products__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.home-products__card-icon {
	width: 55px;
	height: 55px;
	margin-bottom: 10px;
}

.home-products__card-title {
	font-size: var(--text-h5);
	margin-bottom: 10px;
}

.home-products__card-link {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: var(--space-2xs);
	padding-bottom: var(--space-2xs);
	color: var(--color-text-primary);
	border-bottom: 2px solid var(--color-text-primary);
}

.home-products__card-link svg {
	width: 14px;
	height: 14px;
}

.home-products__card-link:hover {
	color: var(--color-accent);
	text-decoration: none;
}

.home-products__card-desc {
	line-height: var(--leading-slim);
}

@media ( max-width: 1200px ) {

	.home-products .layout-section__inner {
		gap: var(--space-2xl);
	}

}

@media ( max-width: 1024px ) {

	.home-products .layout-section__inner {
		flex-direction: column;
	}

	.home-products__intro {
		flex: auto;
		position: static;
	}

}

@media ( max-width: 768px ) {

	.home-products__grid {
		grid-template-columns: 1fr;
	}

}

/* =============================================================================
   SECTION 3: HOME REVIEWS
   Gray band with centered header; card grid overhangs the section's bottom
   border by 90px into the next section (margin-bottom offsets inner's
   negative margin).
   ============================================================================= */

.home-reviews {
	padding-top: 60px;
	margin-bottom: 90px;
	background-color: var(--color-bg-subtle);
	border-top: 1px solid var(--color-border-subtle);
	border-bottom: 1px solid var(--color-border-subtle);
}

.home-reviews .layout-section__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: -90px;
}

.home-reviews__heading {
	margin-bottom: var(--space-l);
	text-align: center;
}

.home-reviews__grid {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-l);
}

/* -- Review card (reusable component) ---------------------------------------- */

.review-card {
	padding: var(--space-l);
	background-color: var(--color-bg-primary);
	border: 1px solid var(--color-border-subtle);
	border-radius: var(--radius-m);
	box-shadow: var(--shadow-card);
}

.review-card__header {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.review-card__avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	font-size: var(--text-body-large);
	font-weight: var(--weight-black);
	background-color: var(--color-bg-subtle);
	border: 1px solid var(--color-border-subtle);
	border-radius: var(--radius-max);
}

.review-card__stars {
	display: flex;
	flex-direction: row;
}

.review-card__stars svg {
	width: 20px;
	height: 20px;
	color: var(--color-accent);
}

.review-card__quote {
	line-height: var(--leading-slim);
}

@media ( max-width: 768px ) {

	.home-reviews__grid {
		grid-template-columns: 1fr;
	}

}

/* =============================================================================
   SECTION 4: HOME SERVICES
   Image (40%) + content (60%) split; copy sits in a left-bordered body block.
   ============================================================================= */

.home-services {
	padding-top: var(--section-y);
	padding-bottom: var(--section-y);
}

.home-services .layout-section__inner {
	display: flex;
	flex-direction: row;
	align-items: center;
}

.home-services__media {
	width: 40%;
}

.home-services__media img {
	width: 350px;
	margin: auto;
}

.home-services__content {
	width: 60%;
}

.home-services__heading {
	margin-bottom: 20px;
}

.home-services__body {
	padding: 10px 0 10px var(--space-l);
	border-left: 3px solid var(--color-border-subtle);
}

.home-services__body p {
	margin-bottom: var(--space-m);
}

/* =============================================================================
   SECTION 5: HOME CLEANROOMS
   Full-bleed cleanroom photo; eyebrow + heading float on the image, content
   sits in a centered frosted glass panel with three circular icon features.
   ============================================================================= */

.home-cleanrooms {
	padding-top: 80px;
	padding-bottom: 80px;
	background-image: url('../images/new-cleanroom-environment.webp');
	background-size: cover;
	background-position: 50%;
	background-repeat: no-repeat;
	border-top: 1px solid var(--color-border-subtle);
	border-bottom: 1px solid var(--color-border-subtle);
}

.home-cleanrooms .layout-section__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.home-cleanrooms__heading {
	margin-bottom: 20px;
	max-width: 500px;
}

.home-cleanrooms__panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 1000px;
	padding: 35px;
	background-color: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-m);
}

.home-cleanrooms__features {
	display: flex;
	flex-direction: row;
	gap: var(--space-xl);
	margin-bottom: var(--space-m);
}

.home-cleanrooms__feature-icon {
	width: 90px;
	height: 90px;
	padding: var(--space-m);
	margin: 0 auto var(--space-xs) auto;
	background-color: var(--color-bg-primary);
	border: 1px solid var(--color-border-subtle);
	border-radius: var(--radius-max);
}

.home-cleanrooms__feature-title {
	font-size: var(--text-h5);
	font-weight: var(--weight-black);
	line-height: 1.2;
}

p.home-cleanrooms__copy {
	margin-bottom: var(--space-m);
}

/* =============================================================================
   SECTION 6: HOME NEWSLETTER
   Slim gray band: heading + copy left, signup form right (placeholder for now).
   ============================================================================= */

.home-newsletter {
	padding-top: var(--space-xl);
	padding-bottom: var(--space-xl);
	background-color: var(--color-bg-subtle);
	border-bottom: 1px solid var(--color-border-subtle);
}

.home-newsletter .layout-section__inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: var(--space-4xl);
}

.home-newsletter__text {
	flex: 1 0 0;
}

.home-newsletter__accent {
	color: var(--color-accent);
}

.home-newsletter__copy {
	line-height: var(--leading-slim);
}

.home-newsletter__form {
	flex: 0 0 500px;
}

/* =============================================================================
   SECTION 7: HOME BLOG
   Sticky intro column + 2-col grid of the four latest posts.
   ============================================================================= */

.home-blog {
	padding-top: var(--section-y);
	padding-bottom: var(--section-y);
}

.home-blog .layout-section__inner {
	display: flex;
	flex-direction: row;
	align-items: flex-start; /* keeps the sticky intro from stretching to grid height */
	gap: var(--space-4xl);
}

.home-blog__intro {
	flex: 0 0 400px;
	position: sticky;
	top: calc(var(--sticky-top) + var(--admin-bar-h));
}

.home-blog__heading {
	margin-bottom: var(--space-2xs);
}

p.home-blog__copy {
	margin-bottom: var(--space-m);
}

.home-blog__grid {
	flex: 1 0 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-l);
}

/* -- Post card (reusable component) ------------------------------------------ */

.post-card__link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	color: var(--color-text-primary);
}

.post-card__link:hover {
	text-decoration: none;
}

.post-card__link:hover .post-card__image {
	box-shadow: var(--shadow-card);
}

.post-card__link:hover .post-card__title {
	text-decoration: underline;
}

.post-card__image {
	margin-bottom: var(--space-m);
	border: 1px solid var(--color-border-subtle);
	border-radius: var(--radius-m);
	transition: box-shadow var(--duration-fast) ease;
}

.post-card__title {
	font-size: var(--text-h5);
	margin-bottom: var(--space-2xs);
}

.post-card__excerpt {
	line-height: var(--leading-slim);
}

/* =============================================================================
   SECTIONS 4-7: MEDIA QUERIES
   ============================================================================= */

@media ( max-width: 1024px ) {

	.home-services .layout-section__inner {
		flex-direction: column;
		gap: var(--space-l);
	}

	.home-services__media {
		width: 300px;
		max-width: 100%;
	}

	.home-services__content {
		width: 100%;
	}

	.home-newsletter .layout-section__inner {
		flex-direction: column;
		gap: var(--space-l);
	}

	.home-newsletter__form {
		flex: auto;
		width: 100%;
	}

	.home-blog .layout-section__inner {
		flex-direction: column;
		gap: var(--space-xl);
	}

	.home-blog__intro {
		flex: auto;
		position: static;
	}

}

@media ( max-width: 768px ) {

	.home-cleanrooms__features {
		flex-direction: column;
		gap: var(--space-l);
	}

	.home-blog__grid {
		grid-template-columns: 1fr;
	}

}

/* =============================================================================
   NEWSLETTER SIGNUP
   One row on desktop: the field grows, the button holds its width. Stacks at
   the tablet breakpoint, where the whole band is already stacked.
   ============================================================================= */

/* This row is the exception: [data-fss-form-body] stacks its fields in a
   column (global.css), and the newsletter is a single field beside its
   button, so the direction is restated here rather than inherited. */
.newsletter-form__row {
	display:        flex;
	flex-direction: row;
	align-items:    stretch;
	gap:            var(--field-gap);
}

.newsletter-form__field {
	display:        flex;
	flex-direction: column;
	flex:           1 1 auto;
	min-width:      0;
}

/* The email label floats inside the field (global.css); nothing to add. */

/* The email input is .field (global.css); nothing here deviates. */

.newsletter-form__submit {
	flex: 0 0 auto;
}

@media ( max-width: 768px ) {

	.newsletter-form__row {
		flex-direction: column;
		align-items:    stretch;
	}

}
