/**
 * Contact Page Styles — Warm, Editorial Design.
 *
 * Implements the approved mockup:
 *  - Cream/off-white background (#FAF8F5).
 *  - Charcoal typography (#1F1B16), muted body (#6F6A5E), terracotta accents (#B85D36).
 *  - Refined serif headings (Playfair Display / Georgia), clean form fields, rounded content cards (border-radius: 18px).
 *  - Kitchen cabinetry hero with feathered gradient edge.
 *  - Responsive 3-panel layout: Contact Information, Message Form, Design Consultation.
 *
 * @package Room_And_Hearth
 */

article.contact-page,
.contact-page {
	display: block !important;
	grid-template-columns: none !important;
	gap: 0 !important;
	background-color: #FAF8F5 !important;
	color: #1F1B16;
	min-height: 100vh;
	overflow-x: hidden;
}

.contact-page .page-width {
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(16px, 3vw, 32px);
	padding-right: clamp(16px, 3vw, 32px);
}

#contact-form {
	scroll-margin-top: 100px;
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */

.contact-hero {
	background-color: #FAF8F5;
	padding-top: clamp(24px, 3.5vw, 44px);
	padding-bottom: clamp(16px, 2.5vw, 28px);
	position: relative;
	overflow: hidden;
}

.contact-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(24px, 3.5vw, 48px);
}

.contact-hero__text {
	max-width: 600px;
	z-index: 2;
}

.contact-hero__eyebrow {
	color: #B85D36;
	font-family: var(--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0 0 12px;
	display: block;
}

.contact-hero__title {
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important;
	font-size: clamp(30px, 3.8vw, 48px);
	color: #1F1B16;
	font-weight: 600 !important;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 14px;
	word-break: break-word;
}

.contact-hero__copy {
	color: #5F5B53;
	font-family: var(--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	font-size: clamp(15px, 1.2vw, 17px);
	line-height: 1.58;
	margin: 0;
	max-width: 520px;
}

.contact-hero__media {
	position: relative;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	height: 250px;
	overflow: hidden;
}

.contact-hero__img {
	width: 100%;
	max-width: 560px;
	height: 100%;
	object-fit: cover;
	object-position: right center;
	display: block;
	/* Smooth feathered fade into the cream background on the left */
	-webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 12%, rgba(0, 0, 0, 1) 32%);
	mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 12%, rgba(0, 0, 0, 1) 32%);
}

/* ==========================================================================
   2. MAIN 3-PANEL GRID
   ========================================================================== */

.contact-main {
	background-color: #FAF8F5;
	padding-top: 10px;
	padding-bottom: clamp(48px, 6vw, 80px);
}

.contact-panels {
	display: grid;
	grid-template-columns: minmax(315px, 1.05fr) minmax(360px, 1.25fr) minmax(280px, 0.95fr);
	gap: clamp(16px, 1.8vw, 24px);
	align-items: stretch;
}

/* Shared Card Styles */
.contact-card {
	background: #FFFFFF;
	border: 1px solid #ECE7DF;
	border-radius: 18px;
	box-shadow: 0 4px 18px rgba(31, 27, 22, 0.035);
	padding: clamp(24px, 2.2vw, 32px) clamp(20px, 1.8vw, 26px);
	display: flex;
	flex-direction: column;
	position: relative;
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.contact-card:hover {
	box-shadow: 0 8px 24px rgba(31, 27, 22, 0.06);
	border-color: #DFD8CD;
}

.contact-card__heading {
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important;
	font-size: clamp(22px, 1.8vw, 26px);
	color: #1F1B16;
	font-weight: 500 !important;
	line-height: 1.25;
	margin: 0 0 10px;
}

.contact-card__sub {
	color: #6F6A5E;
	font-family: var(--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	font-size: 14px;
	line-height: 1.55;
	margin: 0 0 24px;
}

.contact-card__eyebrow {
	color: #B85D36;
	font-family: var(--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin: 0 0 10px;
	display: block;
}

/* ==========================================================================
   PANEL 1: CONTACT INFORMATION
   ========================================================================== */

.contact-card--info {
	justify-content: flex-start;
}

.contact-details {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.contact-detail-item {
	display: flex;
	align-items: flex-start;
	gap: 15px;
}

.contact-detail-item__icon {
	background-color: #FAF0E8;
	color: #B85D36;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-top: 2px;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-detail-item:hover .contact-detail-item__icon {
	background-color: #F7E4D8;
	transform: scale(1.04);
}

.contact-detail-item__content {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.contact-detail-item__label {
	color: #B85D36;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	margin-bottom: 3px;
	display: block;
}

.contact-detail-item__value {
	color: #1F1B16;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.4;
	transition: color 0.2s ease;
	word-break: normal;
	overflow-wrap: break-word;
}

a.contact-detail-item__value:hover,
a.contact-detail-item__value:focus-visible {
	color: #B85D36;
	text-decoration: underline;
	text-underline-offset: 3px;
	outline: none;
}

/* ==========================================================================
   PANEL 2: SEND US A MESSAGE FORM
   ========================================================================== */

.contact-card--form {
	padding: clamp(24px, 2.4vw, 32px) clamp(22px, 2.2vw, 30px);
}

.contact-form__notice {
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.5;
	margin: 0 0 18px;
	padding: 11px 15px;
}

.contact-form__notice--success {
	background-color: #edf7ee;
	border: 1px solid #b7e1bd;
	color: #1f6b28;
}

.contact-form__notice--error {
	background-color: #fdf2f0;
	border: 1px solid #f2c2ba;
	color: #a83827;
}

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 13px;
}

.contact-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.contact-form__group {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.contact-form__group--full {
	width: 100%;
}

.contact-form__group label {
	color: #1F1B16;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.contact-form__group input,
.contact-form__group textarea {
	background-color: #FFFFFF;
	border: 1px solid #DCD7CE;
	border-radius: 7px;
	color: #1F1B16;
	font-family: inherit;
	font-size: 13.5px;
	line-height: 1.45;
	padding: 9px 13px;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	outline: none;
}

.contact-form__group input::placeholder,
.contact-form__group textarea::placeholder {
	color: #A6A097;
	font-size: 13px;
}

.contact-form__group input:hover,
.contact-form__group textarea:hover {
	border-color: #BEB7AA;
}

.contact-form__group input:focus,
.contact-form__group textarea:focus {
	border-color: #B85D36;
	box-shadow: 0 0 0 3px rgba(184, 93, 54, 0.15);
}

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

.contact-form__submit {
	background-color: #B85D36;
	color: #FFFFFF;
	border: none;
	border-radius: 7px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	width: 100%;
	height: 46px;
	padding: 0 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	margin-top: 3px;
	box-shadow: 0 2px 6px rgba(184, 93, 54, 0.2);
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.contact-form__submit:hover,
.contact-form__submit:focus-visible {
	background-color: #9E4D29;
	box-shadow: 0 4px 12px rgba(184, 93, 54, 0.3);
	transform: translateY(-1px);
	outline: none;
}

.contact-form__submit:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(184, 93, 54, 0.2);
}

.contact-form__privacy {
	color: #7F7B73;
	font-size: 11px;
	line-height: 1.45;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	margin: 6px 0 0;
	text-align: center;
}

.contact-form__privacy svg {
	flex-shrink: 0;
	color: #9E9991;
}

/* ==========================================================================
   PANEL 3: DESIGN CONSULTATION
   ========================================================================== */

.contact-card--consult {
	padding: clamp(24px, 2.2vw, 32px) clamp(20px, 1.8vw, 26px) 0;
	overflow: hidden;
	justify-content: space-between;
}

.contact-card--consult__body {
	display: flex;
	flex-direction: column;
}

.contact-consult__btn {
	background-color: #1F1B16;
	color: #FFFFFF;
	border: none;
	border-radius: 7px;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	width: 100%;
	padding: 13px 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	text-align: center;
	line-height: 1.35;
	box-shadow: 0 2px 6px rgba(31, 27, 22, 0.15);
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.contact-consult__btn:hover,
.contact-consult__btn:focus-visible {
	background-color: #332D26;
	color: #FFFFFF;
	box-shadow: 0 4px 12px rgba(31, 27, 22, 0.25);
	transform: translateY(-1px);
	outline: none;
}

.contact-consult__btn:active {
	transform: translateY(0);
}

.contact-card--consult__media {
	margin-top: 18px;
	margin-left: calc(-1 * clamp(20px, 1.8vw, 26px));
	margin-right: calc(-1 * clamp(20px, 1.8vw, 26px));
	margin-bottom: 0;
	overflow: hidden;
	border-radius: 0 0 17px 17px;
	display: flex;
}

.contact-consult__img {
	width: 100%;
	height: 145px;
	display: block;
	object-fit: cover;
	object-position: center;
}

/* ==========================================================================
   4. RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet & Smaller Desktops (961px - 1160px) */
@media (max-width: 1160px) {
	.contact-panels {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
		gap: 16px;
	}

	.contact-card {
		padding: 24px 18px;
	}

	.contact-card--consult {
		padding: 24px 18px 0;
	}

	.contact-card--consult__media {
		margin-left: -18px;
		margin-right: -18px;
	}

	.contact-consult__btn {
		font-size: 11px;
		padding: 12px 14px;
	}
}

/* Medium Tablets & Stack Breakpoint (<= 960px) */
@media (max-width: 960px) {
	.contact-hero__inner {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.contact-hero__media {
		display: none; /* Keep hero clean and focused on mobile/tablet */
	}

	.contact-hero__title {
		font-size: clamp(28px, 5.5vw, 40px);
	}

	.contact-panels {
		grid-template-columns: 1fr;
		gap: 20px;
		max-width: 640px;
		margin-left: auto;
		margin-right: auto;
	}

	/* Explicit order: Contact Info (1) -> Message Form (2) -> Design Consultation (3) */
	.contact-card--info {
		order: 1;
	}

	.contact-card--form {
		order: 2;
	}

	.contact-card--consult {
		order: 3;
	}

	.contact-consult__img {
		height: 160px;
	}
}

/* Mobile Screens (<= 580px) */
@media (max-width: 580px) {
	.contact-hero {
		padding-top: 20px;
		padding-bottom: 14px;
	}

	.contact-hero__title {
		font-size: clamp(26px, 7.5vw, 34px);
		line-height: 1.18;
	}

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

	.contact-card {
		border-radius: 14px;
		padding: 22px 16px;
	}

	.contact-card--consult {
		padding: 22px 16px 0;
	}

	.contact-card--consult__media {
		margin-left: -16px;
		margin-right: -16px;
		border-radius: 0 0 13px 13px;
	}

	.contact-card__heading {
		font-size: 21px;
	}

	.contact-consult__btn {
		font-size: 11px;
		padding: 13px 14px;
	}
}

/* Very Narrow Mobile (<= 360px) */
@media (max-width: 360px) {
	.contact-card {
		padding: 18px 14px;
	}

	.contact-card--consult {
		padding: 18px 14px 0;
	}

	.contact-card--consult__media {
		margin-left: -14px;
		margin-right: -14px;
	}

	.contact-detail-item {
		gap: 12px;
	}

	.contact-detail-item__icon {
		width: 38px;
		height: 38px;
	}

	.contact-detail-item__value {
		font-size: 13.5px;
	}
}
