/* com_schoolcontact – "school" design of the contact page (option "Design"). Loaded on top of contact.css and form.css
   and scoped to .sc-contactpage--school, so pages with the classic design are not affected. Colours, radii and shadows
   match the start page (com_schoolmainpage). Widths follow the page container (container queries), not the window:
   the template's container is narrower than the window. */

.sc-contactpage--school {
	--sc-blue: #0344be;
	--sc-blue-dark: #02358f;
	--sc-navy: #182c46;
	--sc-muted: #4a5a70;
	--sc-tint-bg: #f2f6fc;
	--sc-icon-tile: #eaf1fc;
	--sc-border: #dfe7f3;
	--sc-card-radius: 14px;
	--sc-card-shadow: 0 1px 2px rgb(24 44 70 / 6%), 0 6px 18px rgb(24 44 70 / 7%);
	--sc-overlap-eff: 0px;
	--sc-scroll-offset: 6.5rem;
	container: sc-page / inline-size;
	color: var(--sc-navy);
}

/* The few pixels of a classic scrollbar that the full-width bands would add are clipped (same as the start page). */
html:has(.sc-contactpage--school),
body:has(.sc-contactpage--school) {
	overflow-x: clip;
}

/* The hero starts directly below the header. */
body:has(.sc-contactpage--school) #sp-main-body {
	padding-top: 0;
}

.sc-contactpage--overlap {
	--sc-overlap-eff: var(--sc-overlap, 28px);
}

@media (max-width: 767.98px) {
	.sc-contactpage--overlap {
		--sc-overlap-eff: min(var(--sc-overlap, 28px), 16px);
	}
}

@media (max-width: 575.98px) {
	.sc-contactpage--overlap {
		--sc-overlap-eff: min(var(--sc-overlap, 28px), 12px);
	}
}

.sc-contactpage--school .sc-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---- title area: full window width, content aligned with the page container ---- */
.sc-contactpage--school .sc-hero {
	box-sizing: border-box;
	margin-inline: calc(50% - 50vw);
	padding-inline: calc(50vw - 50%);
	padding-block: clamp(1.75rem, 1rem + 3vw, 3rem) calc(var(--sc-overlap-eff) + clamp(1.25rem, 0.75rem + 2vw, 2.25rem));
	background: var(--sc-tint-bg);
}

.sc-contactpage--school .sc-hero__title {
	margin: 0;
	font-family: inherit;
	font-size: clamp(2rem, 1.2rem + 3vw, 3rem);
	font-weight: 700;
	line-height: 1.1;
	color: var(--sc-navy);
	text-align: start;
}

.sc-contactpage--school .sc-hero__intro {
	margin: 0.5rem 0 0;
	font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
	line-height: 1.4;
}

.sc-contactpage--school .sc-hero__action {
	margin: 0.875rem 0 0;
}

.sc-contactpage--school .sc-link-arrow {
	color: var(--sc-blue);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.sc-contactpage--school .sc-link-arrow::after {
	content: "→";
	content: "→" / "";
	display: inline-block;
	margin-inline-start: 0.35em;
	text-decoration: none;
}

.sc-contactpage--school .sc-link-arrow--down::after {
	content: "↓";
	content: "↓" / "";
}

.sc-contactpage--school .sc-link-arrow:hover {
	color: var(--sc-blue-dark);
}

/* ---- sections: spacing, anchor offset below a sticky header ---- */
.sc-contactpage--school .sc-section {
	margin-block: 0;
	padding-block: calc(var(--sc-section-gap) / 2);
	scroll-margin-top: var(--sc-scroll-offset);
}

.sc-contactpage--school .sc-section__inner {
	padding: 0;
}

.sc-contactpage--school .sc-hero + .sc-section {
	padding-top: var(--sc-section-gap);
}

.sc-contactpage--overlap .sc-hero + .sc-section--contact {
	margin-top: calc(-1 * var(--sc-overlap-eff));
	padding-top: 0;
}

.sc-contactpage--school .sc-section__title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--sc-navy);
}

/* ---- contact cards ---- */
.sc-contactpage--school .sc-contact-grid {
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
}

@container sc-page (min-width: 46rem) {
	.sc-contactpage--school .sc-contact-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.sc-contactpage--school .sc-contact-col {
	align-items: flex-start;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--sc-border);
	border-radius: var(--sc-card-radius);
	box-shadow: var(--sc-card-shadow);
	text-align: start;
}

.sc-contactpage--school .sc-icon-wrap,
.sc-contactpage--school .sc-icon-wrap--circle {
	width: 3.25rem;
	height: 3.25rem;
	margin-block-end: 1rem;
	border-radius: 0.875rem;
	background: var(--sc-icon-tile);
	color: var(--sc-blue);
}

.sc-contactpage--school .sc-icon {
	width: 1.625rem;
	height: 1.625rem;
}

.sc-contactpage--school .sc-contact-col__title {
	margin: 0 0 0.5rem;
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--sc-navy);
}

.sc-contactpage--school .sc-contact-col__body {
	font-size: 0.975rem;
	line-height: 1.55;
	color: var(--sc-muted);
}

.sc-contactpage--school .sc-contact-col__body a {
	color: var(--sc-blue);
}

.sc-contactpage--school .sc-contact-col--phone .sc-list {
	display: block;
}

/* Telephone: the number stands out, fax is quieter. The "Tel.:" label stays for screen readers only. */
.sc-contactpage--school .sc-phone--phone {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--sc-navy);
}

.sc-contactpage--school .sc-phone--phone .sc-phone__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.sc-contactpage--school .sc-phone--phone a {
	color: inherit;
	text-decoration: none;
}

.sc-contactpage--school .sc-phone--phone a:hover {
	text-decoration: underline;
}

.sc-contactpage--school .sc-phone--fax {
	margin-top: 0.25rem;
}

.sc-contactpage--school .sc-phone__label {
	min-width: 0;
	font-weight: 400;
}

.sc-contactpage--school .sc-contact-col__action {
	margin: auto 0 0;
	padding-top: 1rem;
}

/* ---- staff: compact portrait cards (the cards come from mod_staffgallery) ---- */
.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__grid {
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
}

@container sc-page (min-width: 34rem) {
	.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container sc-page (min-width: 46rem) {
	.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__card {
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--sc-border);
	border-radius: var(--sc-card-radius);
	box-shadow: var(--sc-card-shadow);
}

/* 4:3 frame; the photo is never distorted, the section keeps the faces (option "Image section of the portraits"). */
.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__frame {
	aspect-ratio: 4 / 3;
}

.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__frame .staffgallery__img {
	object-fit: cover;
	object-position: var(--sc-portrait-position, 50% 28%);
}

.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__body {
	padding: 1.25rem;
}

.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__name {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--sc-navy);
}

.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__position {
	margin-top: 0.25rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--sc-blue);
}

.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__subjects,
.sc-contactpage--school .sc-embed--staff .staffgallery .staffgallery__description {
	margin-top: 0.25rem;
	font-size: 0.875rem;
	color: var(--sc-muted);
}

/* ---- map: light blue band over the full window width, the map uses the content width ---- */
.sc-contactpage--school .sc-section--map {
	margin-inline: calc(50% - 50vw);
	padding-inline: calc(50vw - 50%);
	padding-block: var(--sc-section-gap);
	background: var(--sc-bg-map, var(--sc-tint-bg));
}

.sc-contactpage--school .sc-embed--map .mod-schoolmap {
	max-width: none;
}

.sc-contactpage--school .sc-embed--map .mod-schoolmap__map {
	height: clamp(17rem, 40vw, 23rem);
	max-height: none;
	overflow: hidden;
	border: 1px solid var(--sc-border);
	border-radius: var(--sc-card-radius);
	box-shadow: var(--sc-card-shadow);
}

/* ---- form: one white card, heading and fields on the same left edge ---- */
.sc-contactpage--school .sc-formcard {
	max-width: 50rem;
	margin-inline: auto;
	padding: clamp(1.25rem, 0.75rem + 2vw, 2rem);
	background: #fff;
	border: 1px solid var(--sc-border);
	border-radius: 16px;
	box-shadow: var(--sc-card-shadow);
}

.sc-contactpage--school .sc-formcard .sc-section__title {
	margin-bottom: 1rem;
	text-align: start;
}

.sc-contactpage--school .sc-formcard .sc-form,
.sc-contactpage--school .sc-formcard .sc-form-errors,
.sc-contactpage--school .sc-formcard .sc-form-notice {
	max-width: none;
	margin-inline: 0;
}

.sc-contactpage--school .sc-formcard .sc-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	column-gap: 1.25rem;
}

.sc-contactpage--school .sc-formcard .sc-form__hint {
	margin: 0 0 1rem;
	color: var(--sc-muted);
}

.sc-contactpage--school .sc-formcard .sc-form__field {
	margin-block-end: 1.125rem;
}

.sc-contactpage--school .sc-formcard .sc-form__field label {
	margin-block-end: 0.375rem;
	font-size: 0.95rem;
	color: var(--sc-navy);
}

.sc-contactpage--school .sc-formcard .sc-form__field .form-control {
	display: block;
	min-height: 2.875rem;
	padding: 0.625rem 0.875rem;
	font: inherit;
	color: var(--sc-navy);
	background: #fff;
	border: 1px solid #b4c2d8;
	border-radius: 0.5rem;
}

.sc-contactpage--school .sc-formcard textarea.form-control {
	min-height: 9rem;
	resize: vertical;
}

.sc-contactpage--school .sc-formcard .sc-form__field--invalid .form-control {
	border-color: #a4161a;
}

.sc-contactpage--school .sc-formcard .form-control:focus,
.sc-contactpage--school .sc-formcard .form-control:focus-visible {
	border-color: var(--sc-blue);
	outline: 3px solid var(--sc-blue);
	outline-offset: 1px;
	box-shadow: none;
}

.sc-contactpage--school .sc-formcard a:focus-visible,
.sc-contactpage--school .sc-formcard button:focus-visible {
	outline: 3px solid var(--sc-blue);
	outline-offset: 2px;
	box-shadow: none;
}

.sc-contactpage--school .sc-formcard .sc-form a {
	color: var(--sc-blue);
}

.sc-contactpage--school .sc-formcard .sc-form__privacy {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--sc-muted);
}

.sc-contactpage--school .sc-formcard .sc-form__submit {
	justify-self: start;
	min-height: 2.875rem;
	padding: 0.625rem 1.75rem;
	font-weight: 600;
	color: #fff;
	background: var(--sc-blue);
	border: 0;
	border-radius: 0.5rem;
}

.sc-contactpage--school .sc-formcard .sc-form__submit:hover {
	background: var(--sc-blue-dark);
}

@container sc-page (min-width: 40rem) {
	/* Name and e-mail side by side; the notice and the button share the last row. */
	.sc-contactpage--school .sc-formcard .sc-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sc-contactpage--school .sc-formcard .sc-form > * {
		grid-column: 1 / -1;
	}

	.sc-contactpage--school .sc-formcard .sc-form > .sc-form__field:nth-of-type(-n + 2) {
		grid-column: auto;
	}

	.sc-contactpage--school .sc-formcard .sc-form > .sc-form__privacy {
		grid-column: 1;
		align-self: center;
		margin: 0;
	}

	.sc-contactpage--school .sc-formcard .sc-form > .sc-form__submit {
		grid-column: 2;
		justify-self: end;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sc-contactpage--school * {
		scroll-behavior: auto !important;
	}
}
