/*
 * Contact Us Page Stylesheet
 *
 * Extends the main brand system (main.css tokens: colors, spacing, typography).
 * Self-contained — the .contact-hero component below is dedicated to this
 * page and does not share rules with any other page's hero.
 *
 * Table of contents:
 *  1.  Inner Hero
 *  2.  Content grid
 *  3.  Info cards (left column)
 *  4.  Form card (right column)
 *  5.  Form controls (incl. success/error notice banner)
 *  6.  Map section
 *  7.  Responsive
 */


/* ============================================================================
   1. Inner Hero
   ============================================================================ */

.site-main--contact {
	padding-block: 0;
}

.contact-hero {
	position: relative;
	min-height: 320px;
	display: flex;
	align-items: center;
	background-color: var(--color-brand-dark);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.contact-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.contact-hero > .container {
	position: relative;
	z-index: 2;
	padding-block: var(--space-16);
	width: 100%;
}

.contact-hero__breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
	margin-bottom: var(--space-5);
	font-size: var(--font-size-sm);
}

.contact-hero__breadcrumb a {
	color: rgba(255, 255, 255, 0.80);
	text-decoration: none;
	transition: color var(--transition-fast);
}

.contact-hero__breadcrumb a:hover {
	color: var(--color-accent);
}

.contact-hero__breadcrumb-sep {
	color: rgba(255, 255, 255, 0.35);
}

.contact-hero__breadcrumb-current {
	color: var(--color-accent);
	font-weight: var(--font-weight-medium);
}

.contact-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--color-white);
	background: rgba(85, 201, 154, 0.18);
	border: 1px solid rgba(85, 201, 154, 0.40);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	letter-spacing: 0.12em;
	padding: 6px 16px;
	border-radius: var(--radius-full);
	margin-bottom: var(--space-4);
}

.contact-hero__badge::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	flex-shrink: 0;
	border-radius: 50%;
	background-color: var(--color-accent);
}

.contact-hero__title {
	font-size: clamp(2rem, 5vw, var(--font-size-4xl));
	font-weight: 700;
	color: var(--color-white);
	line-height: 1.1;
	margin-bottom: var(--space-3);
}

.contact-hero__intro {
	color: rgba(255, 255, 255, 0.80);
	font-size: var(--font-size-lg);
	max-width: 700px;
	margin-bottom: 0;
}


/* ============================================================================
   2. Content grid
   ============================================================================ */

.contact-section {
	padding-block: var(--space-20);
	background-color: var(--color-white);
}

.contact-section__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
	gap: var(--space-12);
	align-items: start;
}

.contact-section__col--info {
	position: sticky;
	top: var(--space-8);
}


/* ============================================================================
   3. Info cards (left column)
   ============================================================================ */

/*
 * .contact-info-cards (rendered inside info.php) is the actual direct
 * parent of the .contact-info-card boxes — the gap belongs here, not on
 * .contact-section__col--info above (that wrapper only ever has this one
 * child, so a gap on it has no visible effect).
 */
.contact-info-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-6);
}

/* Address (1st card) and Office Hours (4th card) span the full width;
   Phone and Email (2nd/3rd) sit side by side in between. */
.contact-info-card:first-child,
.contact-info-card:nth-child(4) {
	grid-column: 1 / -1;
}

/* Visual order: Address, Office Hours, then Phone + Email side by side.
   DOM order (and the ACF field labels behind each card) stays Address /
   Phone / Email / Office Hours — only the on-screen order changes. */
.contact-info-card:nth-child(1) { order: 1; }
.contact-info-card:nth-child(4) { order: 2; }
.contact-info-card:nth-child(2) { order: 3; }
.contact-info-card:nth-child(3) { order: 4; }

.contact-info-card {
	background-color: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: var(--space-8);
	box-shadow: var(--shadow-sm);
	transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

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

.contact-info-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: var(--space-5);
	border-radius: 50%;
	border: 2px solid var(--color-accent);
	background: rgba(85, 201, 154, 0.06);
	color: var(--color-brand-dark);
	transition: transform var(--transition-base), background-color var(--transition-base);
}

.contact-info-card:hover .contact-info-card__icon {
	transform: scale(1.08);
	background-color: rgba(85, 201, 154, 0.14);
}

.contact-info-card__icon img {
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.contact-info-card__title {
	color: var(--color-heading);
	font-size: var(--font-size-lg);
	font-weight: var(--font-weight-bold);
	margin-bottom: var(--space-3);
}

.contact-info-card__content {
	color: var(--color-text-muted);
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
	margin-bottom: 0;
}

.contact-info-card__content a {
	color: var(--color-text-muted);
	text-decoration: none;
	transition: color var(--transition-fast);
}

.contact-info-card__content a:hover {
	color: var(--color-accent-dark);
}

/* Stack multiple phone numbers, one per line */
.contact-info-card__phones {
	display: flex;
	flex-direction: column;
}


/* ============================================================================
   4. Form card (right column)
   ============================================================================ */

.contact-form-card {
	position: relative;
	background-color: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: var(--space-10) var(--space-8);
	box-shadow: var(--shadow-md);
}

.contact-form-card__heading {
	color: var(--color-heading);
	font-size: var(--font-size-2xl);
	font-weight: var(--font-weight-bold);
	margin-bottom: var(--space-2);
}

.contact-form-card__desc {
	color: var(--color-text-muted);
	font-size: var(--font-size-base);
	margin-bottom: var(--space-8);
}


/* ============================================================================
   5. Form controls
   ============================================================================ */

.contact-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-5);
}

.contact-form__group {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	margin-bottom: var(--space-5);
}

.contact-form__group label {
	color: var(--color-heading);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-semibold);
}

.contact-form__req {
	color: var(--color-accent-dark);
}

.contact-form__group input,
.contact-form__group select,
.contact-form__group textarea {
	width: 100%;
	font-family: inherit;
	font-size: var(--font-size-base);
	color: var(--color-text);
	background-color: var(--color-bg-alt);
	border: 1.5px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: 12px 16px;
	transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.contact-form__group textarea {
	resize: vertical;
	min-height: 120px;
}

.contact-form__group input:focus-visible,
.contact-form__group select:focus-visible,
.contact-form__group textarea:focus-visible {
	outline: none;
	border-color: var(--color-accent);
	background-color: var(--color-white);
}

.contact-form__group.has-error input,
.contact-form__group.has-error select,
.contact-form__group.has-error textarea {
	border-color: #e05252;
}

.contact-form__error {
	display: none;
	color: #e05252;
	font-size: var(--font-size-xs);
}

.contact-form__group.has-error .contact-form__error {
	display: block;
}

/* Honeypot — must remain invisible to sighted users while staying in the
   tab/DOM flow so real screen readers skip it (aria-hidden) but bots that
   scrape and fill every input still fall into it. */
.contact-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contact-form__recaptcha-note {
	color: var(--color-text-muted);
	font-size: var(--font-size-xs);
	line-height: 1.5;
	margin-bottom: var(--space-4);
}

.contact-form__recaptcha-note a {
	color: var(--color-accent-dark);
}

.contact-form__submit {
	width: 100%;
	justify-content: center;
	position: relative;
}

.contact-form__spinner {
	display: none;
	width: 16px;
	height: 16px;
	margin-left: var(--space-2);
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: var(--color-white);
	border-radius: 50%;
	animation: pssp-cf-spin 0.7s linear infinite;
}

.contact-form.is-submitting .contact-form__spinner {
	display: inline-block;
}

.contact-form.is-submitting .contact-form__submit {
	opacity: 0.75;
	pointer-events: none;
}

@keyframes pssp-cf-spin {
	to {
		transform: rotate(360deg);
	}
}

.contact-form__notice {
	margin-bottom: var(--space-5);
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-md);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-medium);
}

.contact-form__notice.is-error {
	background-color: rgba(224, 82, 82, 0.10);
	color: #b83232;
	border: 1px solid rgba(224, 82, 82, 0.30);
}

.contact-form__notice.is-success {
	background-color: rgba(85, 201, 154, 0.12);
	color: #1f8a55;
	border: 1px solid rgba(85, 201, 154, 0.35);
}


/* ============================================================================
   6. Map section
   ============================================================================ */

.contact-map-section {
	padding-block: var(--space-20);
	background-color: var(--color-bg-alt);
}

.contact-map-section__heading {
	color: var(--color-heading);
	font-size: var(--font-size-2xl);
	font-weight: var(--font-weight-bold);
	text-align: center;
	margin-bottom: var(--space-8);
}

.contact-map-section__embed {
	width: 100%;
	aspect-ratio: 21 / 9;
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-md);
}

.contact-map-section__embed iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.contact-map-section__image {
	width: 100%;
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-md);
}

.contact-map-section__image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Only add a gap above the image when the embed is also shown above it. */
.contact-map-section__embed + .contact-map-section__image {
	margin-top: var(--space-8);
}


/* ============================================================================
   7. Responsive
   ============================================================================ */

/*
 * Stack info above form well before the theme's general 1023px nav
 * breakpoint — at tablet widths (e.g. iPad Pro landscape, 1024px) the
 * two-column grid has too little room per column and looks cramped, so
 * this page gets its own wider breakpoint to switch to a single column.
 */
@media screen and (max-width: 1199px) {
	.contact-section__grid {
		grid-template-columns: 1fr;
	}

	.contact-section__col--info {
		position: static;
	}

	.contact-section__col--form {
		margin-top: var(--space-10);
	}
}

@media screen and (max-width: 767px) {
	.contact-hero {
		min-height: 240px;
	}

	.contact-hero > .container {
		padding-block: var(--space-10);
	}

	.contact-hero__title {
		font-size: var(--font-size-2xl);
	}

	.contact-section {
		padding-block: var(--space-16);
	}

	.contact-form-card {
		padding: var(--space-8) var(--space-5);
	}

	.contact-form__row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.contact-map-section {
		padding-block: var(--space-16);
	}

	.contact-map-section__embed {
		aspect-ratio: 4 / 3;
	}
}

@media screen and (max-width: 479px) {
	.contact-info-cards {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.contact-hero__breadcrumb a,
	.contact-info-card,
	.contact-info-card__icon,
	.contact-form__group input,
	.contact-form__group select,
	.contact-form__group textarea {
		transition: none;
	}

	.contact-info-card:hover {
		transform: none;
	}

	.contact-info-card:hover .contact-info-card__icon {
		transform: none;
	}

	.contact-form__spinner {
		animation: none;
	}
}
