/* Shared school map. Keep all overrides inside the map component. */
.lidery-home-map {
	--map-height: 800px;
	--map-cover: 150px;
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-rows: var(--map-height);
	overflow: clip;
	/* Separate the map from the footer logos without enlarging the widget cover. */
	margin: 0 0 64px;
	background: #e9ecf0;
	text-align: left;
	font-family: Roboto, Arial, sans-serif;
}
.lidery-home-map, .lidery-home-map * { box-sizing: border-box; }
.page-main .lidery-home-map { margin-inline: calc(50% - 50vw); }

.lidery-home-map .map__frame {
	display: block;
	grid-row: 1;
	width: 100%;
	/* The last 150px of the widget are outside the visible grid row. */
	height: calc(var(--map-height) + var(--map-cover));
	clip-path: inset(0 0 var(--map-cover));
	border: 0;
	pointer-events: none;
}
.lidery-home-map.map--interactive .map__frame { pointer-events: auto; }
.lidery-home-map .map__gate {
	position: absolute;
	inset: 0 0 auto;
	z-index: 3;
	width: 100%;
	height: var(--map-height);
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.lidery-home-map .map__gate:focus-visible { outline: 3px solid #e95a0c; outline-offset: -3px; }
.lidery-home-map.map--interactive .map__gate { display: none; }
.lidery-home-map > .wave,
.lidery-home-map > .wave-height { display: none; }
.lidery-home-map::before {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	top: 0;
	height: 150px;
	z-index: 2;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 150' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 50 C150 150 328 -57 500 50 V0 H0 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* Match the feedback section above the map on the front page only. */
.home .lidery-home-map::before {
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 150' preserveAspectRatio='none'%3E%3Cpath fill='%23f4f4f4' d='M0 50 C150 150 328 -57 500 50 V0 H0 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.lidery-home-map .home-map-card {
	position: absolute;
	/* Account for the white wave above the card. */
	top: calc(50% + 12px);
	right: max(64px, calc((100vw - 1200px) / 2 + 32px));
	z-index: 5;
	width: min(420px, calc(100% - 64px));
	margin: 0;
	padding: 10px 34px;
	transform: translateY(-50%);
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 20px;
	color: #fff;
	background-color: #454b64;
	background-image: url("../images/feedback/mark-left-main.svg"), url("../images/feedback/mark-left-ring.svg"),
		url("../images/feedback/mark-right-main.svg"), url("../images/feedback/mark-right-ring.svg");
	background-position: left -54px top -40px, left -95px top -68px, right -112px bottom -42px, right -94px bottom -6px;
	background-size: 260px auto, 276px auto, 188px auto, 199px auto;
	background-repeat: no-repeat;
	box-shadow: 0 10px 28px rgba(29, 34, 54, .18);
}
/* The circle belongs to the backdrop, never to the image: rounded img clips its content. */
.lidery-home-map .block-map__brand { position: relative; display: flex; justify-content: center; padding: 10px 0 6px; }
.lidery-home-map .block-map__brand::before { content: ""; position: absolute; top: 10px; left: 50%; width: 96px; height: 96px; transform: translateX(-50%); border-radius: 50%; background: #fff; pointer-events: none; }
.lidery-home-map .block-map__logo { display: block; width: 96px; height: 96px; margin: 0; box-sizing: border-box; padding: 14px; position: relative; z-index: 1; border-radius: 0; background: transparent; object-fit: contain; }
.lidery-home-map .contact { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, .22); }
.lidery-home-map .contact:last-child { border-bottom: none; }
.lidery-home-map .contact > div:last-child { min-width: 0; }
.lidery-home-map .contact__icon { display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .12); }
.lidery-home-map .contact__icon img { display: block; width: 22px; height: 22px; margin: 0; object-fit: contain; filter: brightness(0) invert(1); }
.lidery-home-map .contact__label { display: block; color: #fff; font-size: 16px; font-weight: 700; }
.lidery-home-map .contact__value { display: block; margin-top: 3px; color: #f5f5f5; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.lidery-home-map .contact__value a {
	margin: 0;
	color: #fff;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	transition: color .18s ease;
}
.lidery-home-map .contact__value a::after {
	content: "";
	display: inline-block;
	width: .4em;
	height: .4em;
	margin-inline-start: .45em;
	border: solid currentColor;
	border-width: 1.5px 1.5px 0 0;
	transform: translateY(-.12em) rotate(45deg);
}
.lidery-home-map .contact__value a:hover,
.lidery-home-map .contact__value a:focus-visible { color: #ffa16b; }
.lidery-home-map .home-map-card a:focus-visible { outline: 2px solid #ffa780; outline-offset: 3px; }

.lidery-home-map .block-map-icon {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 14px 60px;
}
.lidery-home-map .block-map-icon a {
	display: grid;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 12px;
	background: rgba(255, 255, 255, .1);
	text-decoration: none;
	transition: background-color .18s ease, border-color .18s ease;
}

@media (prefers-reduced-motion: reduce) {
	.lidery-home-map a { transition: none; }
}
.lidery-home-map .block-map-icon img {
	display: block;
	width: 28px;
	height: 28px;
	margin: 0;
	object-fit: contain;
	filter: brightness(0) invert(1);
}
.lidery-home-map .block-map-icon a:hover,
.lidery-home-map .block-map-icon a:focus-visible {
	background: rgba(255, 161, 107, .2);
	border-color: #ffa16b;
}

@media (max-width: 1000px) {
	.lidery-home-map .home-map-card { right: 24px; width: min(390px, calc(100% - 48px)); }
}

@media (max-width: 1000px) {
	.lidery-home-map { --map-height: 430px; grid-template-rows: var(--map-height) auto; background: #fff; margin-bottom: 0; }
	.lidery-home-map::before { display: none; }
	.lidery-home-map .home-map-card {
		position: relative;
		grid-row: 2;
		top: auto;
		right: auto;
		width: calc(100% - 24px);
		margin: -30px auto 32px;
		padding: 4px 18px;
		transform: none;
	}
	.lidery-home-map .contact { gap: 12px; padding: 16px 0; }
	.lidery-home-map .contact__icon { width: 40px; height: 40px; }
	.lidery-home-map .block-map__brand::before { width: 84px; height: 84px; }
	.lidery-home-map .block-map__logo { width: 84px; height: 84px; padding: 13px; }
	.lidery-home-map .contact__label { font-size: 15px; }
	.lidery-home-map .contact__value { font-size: 14px; }
	.lidery-home-map .block-map-icon { margin-left: 52px; }
}
