/**
 * Contacts page — see inc/WDM/contacts-page.php.
 *
 * The page is built from Woodmart blocks in the editor; every block carries a
 * wdm-contacts-* class and is styled here, so texts, icons and links can be
 * changed in the editor without touching this file. The tabs, icon rows and
 * company details panel are shared with the footer: contact-blocks.css.
 */

.wdm-contacts {
	color: var(--wdm-c-text);
}

/* The last section's own bottom padding is the gap to the footer in the design,
   so drop the theme's 40px under the content on this page. */
.wd-content-layout:has(.wdm-contacts) {
	padding-bottom: 0;
}

/* Woodmart caps containers at the site width minus 30px; this one is the page. */
.wdm-contacts.wp-block-wd-container.wp-block-wd-container {
	max-width: none;
	gap: 0;
}

.wdm-contacts .wp-block-wd-container.wp-block-wd-container {
	max-width: none;
}

.wdm-contacts p {
	margin: 0;
}

/* Hero */

.wdm-contacts .wdm-contacts-hero {
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 72px;
	padding: 8px 0 48px;
}

.wdm-contacts .wdm-contacts-hero-photo {
	flex: 0 1 500px;
	height: 340px;
	overflow: hidden;
	border-radius: 5px;
}

.wdm-contacts .wdm-contacts-hero-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wdm-contacts .wdm-contacts-hero-inner {
	flex: 0 1 620px;
	align-items: flex-start;
	gap: 24px;
	min-width: 0;
}

.wdm-contacts .wp-block-wd-title.wdm-contacts-hero-title {
	margin: 0;
	color: var(--wdm-c-text);
	font-weight: 700;
	font-size: 48px;
	line-height: 56px;
	letter-spacing: -0.5px;
	text-transform: uppercase;
}

.wdm-contacts .wdm-contacts-hero-lead {
	font-size: 18px;
	line-height: 28px;
}

.wdm-contacts .wdm-contacts-hero-ctas {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 16px;
}

.wdm-contacts .wdm-contacts-btn {
	gap: 10px;
	min-height: 0;
	padding: 16px 28px;
	border: 1.5px solid;
	border-radius: 5px;
	font-weight: 600;
	font-size: 15px;
	line-height: 20px;
	text-transform: none;
	white-space: nowrap;
	transition: opacity .2s, border-color .2s;
}

.wdm-contacts .wdm-contacts-btn::before {
	content: "";
	display: block;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	background: center / contain no-repeat;
}

.wdm-contacts .wdm-contacts-btn-phone {
	border-color: var(--wdm-c-green);
	background: var(--wdm-c-green);
	color: #fff;
}

.wdm-contacts .wdm-contacts-btn-phone::before {
	background-image: url(../images/contacts/hero-phone.png);
}

.wdm-contacts .wdm-contacts-btn-phone:hover {
	opacity: .85;
	border-color: var(--wdm-c-green);
	background: var(--wdm-c-green);
	color: #fff;
}

.wdm-contacts .wdm-contacts-btn-mail {
	border-color: #e7e9e6;
	background: #fff;
	color: var(--wdm-c-dark);
}

.wdm-contacts .wdm-contacts-btn-mail::before {
	width: 22.5px;
	background-image: url(../images/contacts/hero-mail.png);
}

.wdm-contacts .wdm-contacts-btn-mail:hover {
	border-color: var(--wdm-c-green);
	background: #fff;
	color: var(--wdm-c-dark);
}

/* Form + map */

.wdm-contacts .wdm-contacts-split {
	flex-direction: row;
	align-items: stretch;
	gap: 72px;
	padding-bottom: 96px;
}

.wdm-contacts .wdm-contacts-form-card {
	flex: 0 1 620px;
	align-items: stretch;
	gap: 0;
	min-width: 0;
	padding: 48px;
	border-radius: 5px;
	background: var(--wdm-c-panel);
}

.wdm-contacts .wp-block-wd-title.wdm-contacts-form-title {
	margin: 0;
	padding-bottom: 8px;
	color: var(--wdm-c-text);
	font-weight: 700;
	font-size: 30px;
	line-height: 42px;
	text-transform: none;
}

.wdm-contacts .wdm-contacts-form-lead {
	padding-bottom: 32px;
	font-size: 16px;
	line-height: 24px;
}

/* The CF7 template: .wdm-cf > .wdm-cf-row > .wdm-cf-field */

.wdm-contacts .wdm-cf {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wdm-contacts .wdm-cf-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.wdm-contacts .wdm-cf-field label {
	display: block;
	margin: 0;
	padding-bottom: 5px;
	color: var(--wdm-c-label);
	font-weight: 500;
	font-size: 16px;
	line-height: 25.6px;
}

.wdm-contacts .wdm-cf-field .red-asterisk {
	color: red;
}

.wdm-contacts .wdm-cf input:not([type="submit"]),
.wdm-contacts .wdm-cf textarea {
	width: 100%;
	height: 42px;
	padding: 0 15px;
	border: 1px solid transparent;
	border-radius: 5px;
	background: #fff;
	box-shadow: none;
	color: var(--wdm-c-text);
	font-size: 14px;
}

.wdm-contacts .wdm-cf textarea {
	display: block;
	height: 124px;
	min-height: 124px;
	padding: 11.5px 15px;
	resize: vertical;
}

.wdm-contacts .wdm-cf input::placeholder,
.wdm-contacts .wdm-cf textarea::placeholder {
	color: var(--wdm-c-text);
	opacity: 1;
}

.wdm-contacts .wdm-cf input:not([type="submit"]):focus,
.wdm-contacts .wdm-cf textarea:focus {
	border-color: var(--wdm-c-green);
}

.wdm-contacts .wdm-cf input[type="submit"] {
	min-height: 42px;
	padding: 11px 28px;
	border: 0;
	border-radius: 5px;
	background: var(--wdm-c-green);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	line-height: 20px;
	text-transform: uppercase;
}

.wdm-contacts .wdm-cf input[type="submit"]:hover {
	opacity: .85;
}

.wdm-contacts .wpcf7-not-valid-tip {
	margin-top: 4px;
	font-size: 13px;
}

.wdm-contacts .wpcf7 form .wpcf7-response-output {
	margin: 20px 0 0;
}

.wdm-contacts .wdm-contacts-media {
	flex: 0 1 500px;
	align-items: stretch;
	gap: 24px;
	min-width: 0;
}

/* Address & hours card — a Woodmart list with 45px icons; the bold first line
   of each item is the green label. */

.wdm-contacts .wdm-contacts-info {
	--li-mb: 32px;
	gap: 32px;
	margin: 0;
	padding: 40px;
	border-radius: 5px;
	background: var(--wdm-c-panel);
}

.wdm-contacts .wdm-contacts-info li {
	align-items: flex-start;
	gap: 20px;
	margin: 0;
	color: var(--wdm-c-dark);
	font-size: 13px;
	line-height: 20px;
}

.wdm-contacts .wdm-contacts-info .wd-icon {
	flex: 0 0 45px;
	width: 45px;
	height: 45px;
	margin: 0;
}

.wdm-contacts .wdm-contacts-info .wd-icon img {
	width: 45px;
	height: 45px;
	object-fit: contain;
}

.wdm-contacts .wdm-contacts-info strong {
	display: block;
	margin-bottom: 4px;
	color: var(--wdm-c-green);
	font-weight: 700;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.wdm-contacts .wdm-contacts-info strong + br {
	display: none;
}

.wdm-contacts .wdm-contacts-map {
	position: relative;
	gap: 0;
	overflow: hidden;
	border-radius: 5px;
}

.wdm-contacts .wdm-contacts-map .wd-map-container {
	width: 100%;
	margin: 0;
}

.wdm-contacts .wdm-contacts-map .wd-map-wrapper {
	height: 296px;
}

.wdm-contacts .wdm-contacts-waze {
	position: absolute;
	bottom: 21px;
	left: 20px;
	z-index: 500;
	gap: 8px;
	min-height: 0;
	padding: 12px 18px;
	border-radius: 5px;
	background: #fff;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
	color: var(--wdm-c-dark);
	font-weight: 600;
	font-size: 13px;
	line-height: 18px;
	text-transform: none;
}

.wdm-contacts .wdm-contacts-waze::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wdm-c-green);
}

.wdm-contacts .wdm-contacts-waze:hover {
	background: #fff;
	color: var(--wdm-c-green);
}

/* Offices */

.wdm-contacts .wdm-contacts-offices {
	align-items: stretch;
	gap: 0;
	padding-bottom: 80px;
}

.wdm-contacts .wdm-contacts-offices-kicker {
	padding-bottom: 10px;
	color: var(--wdm-c-blue);
	font-weight: 700;
	font-size: 13px;
	line-height: 16px;
	letter-spacing: 3px;
	text-transform: uppercase;
}

.wdm-contacts .wp-block-wd-title.wdm-contacts-offices-title {
	margin: 0;
	padding-bottom: 32px;
	color: var(--wdm-c-text);
	font-weight: 700;
	font-size: 30px;
	line-height: 42px;
	text-transform: none;
}

.wdm-contacts .wdm-contacts-office {
	flex-direction: row;
	align-items: flex-start;
	gap: 56px;
	padding: 36px 40px;
	border: 1px solid var(--wdm-c-line);
	border-radius: 5px;
	background: #fff;
}


.wdm-contacts .wdm-contacts-details {
	flex: 0 0 300px;
}

/* Tablet */

@media (max-width: 1024px) {
	.wdm-contacts .wdm-contacts-hero,
	.wdm-contacts .wdm-contacts-split {
		gap: 40px;
	}

	.wdm-contacts .wp-block-wd-title.wdm-contacts-hero-title {
		font-size: 38px;
		line-height: 46px;
	}

	.wdm-contacts .wdm-contacts-form-card,
	.wdm-contacts .wdm-contacts-info {
		padding: 32px;
	}

	.wdm-contacts .wdm-contacts-office {
		gap: 32px;
	}
}

/* Small tablets: side by side the form and the photo get too narrow, so stack
   them as on phones, keeping the larger tablet type. */
@media (min-width: 768.99px) and (max-width: 900px) {
	.wdm-contacts .wdm-contacts-hero.wd-dir-row,
	.wdm-contacts .wdm-contacts-split.wd-dir-row {
		flex-direction: column;
		align-items: stretch;
	}

	.wdm-contacts .wdm-contacts-hero-photo,
	.wdm-contacts .wdm-contacts-hero-inner,
	.wdm-contacts .wdm-contacts-form-card,
	.wdm-contacts .wdm-contacts-media {
		flex: none;
		width: 100%;
	}

	.wdm-contacts .wdm-contacts-hero {
		padding-top: 0;
	}
}

/* Mobile — the "Contact_Atjaunots_MOB" frame */

/* The mobile frame has 20px side margins; the site container gives 16px on
   phones (32px from 768px, left as is). */
@media (max-width: 767.98px) {
	.wdm-contacts.wp-block-wd-container.wp-block-wd-container {
		padding-inline: 4px;
	}
}

/* Mobile layout from Woodmart's own phone breakpoint (768.98px), where the
   blocks' "mobile" direction settings switch the rows to columns. */
@media (max-width: 768.98px) {

	.wdm-contacts .wdm-contacts-hero {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
		padding: 0 0 20px;
	}

	.wdm-contacts .wdm-contacts-hero-photo,
	.wdm-contacts .wdm-contacts-hero-inner {
		flex: none;
	}

	.wdm-contacts .wdm-contacts-hero-inner {
		align-items: stretch;
		gap: 20px;
	}

	.wdm-contacts .wp-block-wd-title.wdm-contacts-hero-title {
		font-size: 30px;
		line-height: 36px;
		letter-spacing: 0;
	}

	.wdm-contacts .wdm-contacts-hero-lead {
		font-size: 15px;
		line-height: 22px;
	}

	.wdm-contacts .wdm-contacts-hero-ctas {
		flex-direction: column;
		gap: 8px;
	}

	.wdm-contacts .wdm-contacts-hero-ctas {
		align-items: stretch;
	}

	.wdm-contacts .wdm-contacts-hero-ctas > .btn.wdm-contacts-btn {
		--wd-width: 100%;
		width: 100%;
	}

	.wdm-contacts .wdm-contacts-btn::before {
		width: 16px;
		height: 16px;
	}

	.wdm-contacts .wdm-contacts-btn-mail::before {
		width: 18px;
	}

	.wdm-contacts .wdm-contacts-split {
		flex-direction: column;
		gap: 32px;
		padding: 20px 0 40px;
	}

	.wdm-contacts .wdm-contacts-form-card,
	.wdm-contacts .wdm-contacts-media {
		flex: none;
	}

	.wdm-contacts .wdm-contacts-form-card {
		padding: 24px;
	}

	.wdm-contacts .wp-block-wd-title.wdm-contacts-form-title {
		font-size: 24px;
		line-height: 32px;
	}

	.wdm-contacts .wdm-contacts-form-lead {
		font-size: 14px;
		line-height: 20px;
	}

	.wdm-contacts .wdm-cf-row {
		grid-template-columns: minmax(0, 1fr);
	}

	/* The mobile frame drops the address / hours card — both are repeated in
	   the office card right below. */
	.wdm-contacts .wdm-contacts-info {
		display: none;
	}

	.wdm-contacts .wdm-contacts-map .wd-map-wrapper {
		height: 220px;
	}

	.wdm-contacts .wdm-contacts-offices {
		padding: 0 0 32px;
	}

	.wdm-contacts .wdm-contacts-offices-kicker {
		padding-bottom: 20px;
		color: var(--wdm-c-green);
		font-size: 12px;
		line-height: 15px;
		letter-spacing: 1.5px;
	}

	.wdm-contacts .wp-block-wd-title.wdm-contacts-offices-title {
		padding-bottom: 20px;
		color: var(--wdm-c-dark);
		font-weight: 800;
		font-size: 22px;
		line-height: 28px;
		letter-spacing: -0.2px;
	}

	.wdm-contacts .wdm-contacts-tabs .wd-tabs-header {
		margin-bottom: 20px;
	}

	.wdm-contacts .wdm-contacts-tabs .wd-nav-tabs {
		width: 100%;
	}

	.wdm-contacts .wdm-contacts-office {
		flex-direction: column;
		align-items: stretch;
		gap: 22px;
		padding: 24px 22px;
	}

	.wdm-contacts .wdm-contacts-rows {
		--li-mb: 22px;
		flex: none;
	}

	.wdm-contacts .wdm-contacts-rows li {
		gap: 10px;
		font-size: 13px;
		line-height: 19px;
	}

	.wdm-contacts .wdm-contacts-details {
		flex: none;
		gap: 8px;
		padding: 18px;
		border-radius: 14px;
	}

	.wdm-contacts .wdm-contacts-details .wdm-contacts-details-title {
		font-size: 11px;
		line-height: 15px;
	}

	.wdm-contacts .wdm-contacts-details p {
		font-size: 12px;
		line-height: 18px;
	}
}
