/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-page {
	background: #fffdf9;
	color: #252b31;
}

.contact-shell {
	width: min(1180px, calc(100% - 48px));
	margin-inline: auto;
}

.contact-hero {
	display: flex;
	min-height: 390px;
	align-items: center;
	background:
		linear-gradient(90deg, rgba(255, 253, 249, .98), rgba(255, 253, 249, .82) 36%, rgba(255, 253, 249, .08) 65%),
		url("../contact-hero.webp") center / cover no-repeat;
}

.contact-hero h1 {
	margin: .2rem 0 1rem;
	font-size: clamp(3rem, 5vw, 4.7rem);
}

.contact-hero p:last-child {
	max-width: 470px;
	font-size: 1.08rem;
}

.contact-kicker {
	color: #9a7338;
	font-size: .73rem;
	font-weight: 700;
	letter-spacing: .15em;
	text-transform: uppercase;
}

.contact-main {
	display: grid;
	grid-template-columns: minmax(0, 350px) minmax(0, 1fr);
	gap: 70px;
	align-items: start;
	padding-block: 60px 0;
}

.contact-main h2 {
	font-size: 2rem;
}

.contact-main > .wp-block-shortcode {
	display: contents !important;
}

.contact-main > .wp-block-shortcode .contact-details {
	height: 100%;
	box-sizing: border-box;
}

/* ==========================================================================
   Contact details
   ========================================================================== */

.contact-details {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
	padding-right: 45px;
	border-right: 1px solid #dedbd4;
}

.contact-detail {
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr);
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid #e7e3dc;
}

.contact-detail > span {
	grid-column: 1;
	grid-row: 1;
	align-self: start;
	color: #9a7338;
	font-size: 1.5rem;
	line-height: 1;
}

.contact-detail > p {
	grid-column: 2;
	grid-row: 1;
	align-self: start;
	min-width: 0;
	width: auto !important;
	margin: 0 !important;
	word-break: normal;
}

.contact-detail small {
	display: block;
	margin-bottom: 7px;
	color: #102b43;
	font-size: .67rem;
	font-weight: 700;
	letter-spacing: .11em;
	text-transform: uppercase;
}

.contact-detail strong {
	display: block;
}

.contact-detail strong + br {
	display: none;
}

.contact-detail a {
	overflow-wrap: anywhere;
}

.contact-detail a[href^="mailto:"] {
	display: block;
	font-size: clamp(.76rem, 1.05vw, .92rem);
	white-space: nowrap;
}

/* ==========================================================================
   Contact form
   ========================================================================== */

.contact-form-wrap {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	width: 100%;
	scroll-margin-top: calc(var(--agk-navbar-height, 88px) + 20px);
}

.contact-form-wrap > h2 {
	margin: 0 0 18px !important;
}

.contact-form-wrap > .wp-block-shortcode {
	width: 100%;
	min-width: 0;
	margin: 0 !important;
}

.contact-form {
	display: flex !important;
	width: 100% !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 12px !important;
	margin: 0 !important;
}

/*
 * WordPress may wrap shortcode form rows in paragraphs. Let those wrappers
 * participate as their children so they cannot add visual gaps.
 */
.contact-form br,
.contact-form > p:empty {
	display: none !important;
}

.contact-form > p:not(.contact-form-note) {
	display: contents !important;
}

.contact-form__identity {
	display: flex !important;
	width: 100% !important;
	flex-direction: column !important;
	gap: 12px !important;
	margin: 0 !important;
}

.contact-form .contact-field {
	display: block !important;
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0;
	margin: 0 !important;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.contact-form .agk-custom-select__button {
	box-sizing: border-box;
	width: 100% !important;
	min-height: 46px !important;
	padding: 11px 14px !important;
	border: 1px solid #d8d6d1;
	border-radius: 3px;
	background: #fff;
	color: #252b31;
	font: inherit;
}

.contact-form textarea {
	min-height: 145px !important;
	resize: vertical;
}

.contact-form button[type="submit"] {
	order: 7 !important;
	width: max-content !important;
	min-height: 0 !important;
	align-self: flex-start !important;
	margin: 0 !important;
	padding: 11px 18px !important;
	border: 0;
	border-radius: 3px;
	background: #102b43;
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .11em;
	text-transform: uppercase;
	cursor: pointer;
}

.contact-form .contact-hp {
	position: absolute !important;
	left: -9999px;
}

.contact-form-note {
	order: 6 !important;
	width: 100% !important;
	margin: -6px 0 0 !important;
	color: #666;
	font-size: .68rem !important;
	line-height: 1.35 !important;
}

.contact-notice {
	margin: 0 0 20px !important;
	padding: 12px 15px;
	border-left: 4px solid #58733f;
	background: #eef4e9;
}

.contact-notice.is-error {
	border-color: #a64b3c;
	background: #faeeeb;
}

/* ==========================================================================
   Custom subject selector
   ========================================================================== */

.contact-subject-field {
	position: relative;
	width: 100% !important;
	min-width: 0;
	margin: 0 !important;
}

.agk-custom-select {
	position: relative;
	width: 100% !important;
}

.agk-custom-select__native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

.contact-form .agk-custom-select__button {
	position: relative;
	display: block;
	height: auto;
	padding-right: 48px !important;
	font-size: inherit;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.35;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.contact-form .agk-custom-select__button::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 17px;
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	transition: transform .18s;
}

.contact-form .agk-custom-select.is-open .agk-custom-select__button::after {
	transform: translateY(-25%) rotate(225deg);
}

.contact-form .agk-custom-select__button:focus-visible {
	outline: 2px solid #17497c;
	outline-offset: 2px;
}

.agk-custom-select__options {
	position: absolute;
	z-index: 10020;
	top: calc(100% + 2px);
	left: 0;
	box-sizing: border-box;
	width: 100%;
	max-height: min(330px, 55vh);
	padding: 4px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border: 1px solid #aaa;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 5px 14px rgba(16, 43, 67, .16);
}

.agk-custom-select__options[hidden] {
	display: none !important;
}

.contact-form .agk-custom-select__option {
	display: block;
	width: 100%;
	padding: 10px 9px;
	border: 0;
	border-radius: 2px;
	background: #fff;
	color: #252b31;
	font: inherit;
	font-size: inherit;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.25;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.contact-form .agk-custom-select__option:hover,
.contact-form .agk-custom-select__option:focus-visible {
	outline: 0;
	background: #edf2f6;
	color: #102b43;
}

.contact-form .agk-custom-select__option.is-selected {
	background: #dfe3e9;
	color: #102b43;
}

/* ==========================================================================
   Contact people
   ========================================================================== */

.contact-people {
	margin-top: 0;
	padding: 28px 0 60px;
}

.contact-people > h2 {
	margin: 0 0 24px;
	font-size: 2rem;
}

.contact-people > .wp-block-shortcode {
	width: 100%;
}

.contact-people-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 280px));
	gap: 20px;
	align-items: stretch;
}

.contact-person {
	box-sizing: border-box;
	width: 100%;
	padding: 24px 22px;
	border: 1px solid #d8d6d1;
	border-radius: 10px;
	background: #fff;
}

.contact-person__inner {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.contact-person__image {
	margin: 0;
}

.contact-person__image img {
	display: block;
	width: 112px;
	height: 112px;
	margin: 0 auto;
	object-fit: cover;
	border-radius: 50%;
	background: #eef3f8;
}

.contact-person__body {
	width: 100%;
	min-width: 0;
}

.contact-person__role {
	margin: 16px 0 5px;
	color: #9a7338;
	font-size: .78rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.contact-person__name {
	margin: 0;
	font-size: 1.55rem;
	font-weight: 400;
	line-height: 1.2;
}

.contact-person__name::after {
	content: "";
	display: block;
	width: 92px;
	height: 2px;
	margin: 10px auto 6px;
	background: linear-gradient(90deg, #d8d6d1 0 38%, #a27c45 38% 62%, #d8d6d1 62%);
}

.contact-person__contacts {
	display: flex;
	width: 100%;
	margin-top: 18px;
	flex-direction: column;
	gap: 14px;
}

.contact-person__contact-row {
	margin: 0;
	padding: 0;
}

.contact-person__contact {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr);
	align-items: center;
	column-gap: 12px;
	margin: 0;
	padding: 0;
	color: #17497c;
	font-size: .92rem;
	line-height: 1.3;
	text-align: left;
	text-decoration: none;
}

.contact-person__contact:hover {
	text-decoration: underline;
}

.contact-person__contact:focus-visible {
	outline: 3px solid #a27c45;
	outline-offset: 3px;
}

.contact-person__icon {
	display: grid;
	width: 24px;
	height: 24px;
	place-items: center;
	color: #9a7338;
	font-size: 1rem;
	line-height: 1;
}

.contact-person__contact span:last-child {
	min-width: 0;
	overflow-wrap: anywhere;
}

.agk-assigned-contacts {
	margin-top: clamp(40px, 6vw, 72px) !important;
	padding-top: clamp(28px, 4vw, 44px) !important;
	border-top: 1px solid #dedbd4 !important;
}

.agk-assigned-contacts > h2 {
	margin: 0 0 24px !important;
}

/* ==========================================================================
   Help section
   ========================================================================== */

.contact-help {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin: 0 auto 65px !important;
	padding: 28px;
	border-radius: 10px;
	background: #f7f4ef;
}

.contact-help > div {
	padding: 0 34px;
	border-right: 1px solid #dedbd4;
}

.contact-help > div:last-child {
	border: 0;
}

.contact-help span {
	float: left;
	margin-right: 16px;
	color: #9a7338;
	font-size: 2rem;
}

.contact-help > div:first-child > span {
	font-size: 1.85rem;
	line-height: 1;
}

.contact-help h3 {
	margin: .2rem 0 .7rem;
	font-size: 1.3rem;
}

.contact-help p,
.contact-help a {
	margin-left: 48px;
}

.contact-help p {
	font-size: .83rem;
}

.contact-help a {
	display: inline-block;
	margin-top: 14px;
	font-size: .65rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.contact-help p > a {
	margin-left: 0;
}

.contact-map-section {
	margin-bottom: 55px !important;
}

.contact-map-section > .wp-block-shortcode {
	margin: 0;
}

/* ==========================================================================
   Address card
   ========================================================================== */

.contact-map__card {
	position: absolute;
	top: 28px;
	left: 28px;
	box-sizing: border-box;
	width: 245px;
	max-width: calc(100% - 30px);
	padding: 25px;
	border-radius: 9px;
	background: rgba(255, 255, 255, .95);
	box-shadow: 0 10px 25px rgba(16, 43, 67, .15);
}

.contact-map__card h2 {
	margin: 0 0 8px;
}

.contact-map__card address {
	margin-top: 16px;
	font-style: normal;
	line-height: 1.55;
}

.contact-map__card a {
	display: inline-block;
	margin-top: 14px;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 800px) {
	.contact-shell {
		width: min(100% - 30px, 1180px);
	}

	.contact-hero {
		background:
			linear-gradient(rgba(255, 253, 249, .85), rgba(255, 253, 249, .72)),
			url("../contact-hero.webp") 65% center / cover;
	}

	.contact-main,
	.contact-help {
		grid-template-columns: 1fr;
	}

	.contact-details {
		grid-column: 1;
		grid-row: 1;
		padding-right: 0;
		border-right: 0;
	}

	.contact-form-wrap {
		grid-column: 1;
		grid-row: 2;
	}

	.contact-help > div {
		padding: 24px 10px;
		border-right: 0;
		border-bottom: 1px solid #dedbd4;
	}

	.contact-map__card {
		top: 15px;
		left: 15px;
		width: 220px;
	}
}

@media (max-width: 620px) {
	.contact-people-grid {
		grid-template-columns: 1fr;
	}

	.contact-person {
		padding: 22px 20px;
	}
}

.contact-notice + .contact-form {
    margin-top: 18px !important;
}
