/*
 * Oxford Homepage Hero widget. Sizes and colours copy the Elementor section it
 * replaces. Put the widget in a full-width section with no padding.
 */

/* clip, not hidden: hidden makes the hero a scroll container, and then the
   parallax timeline below follows the hero instead of the page */
.oxford-hero {
	position: relative;
	overflow: clip;
	isolation: isolate;
	padding: 0 70px 10px;
	text-align: center;
}

/* the photo layer is 20% taller than the hero so the parallax drift never shows an edge */
.oxford-hero__media {
	position: absolute;
	inset: -10% 0;
	z-index: -2;
	will-change: transform;
}

.oxford-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
}

/* white fade under the site header */
.oxford-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF00 10%);
	opacity: 0.5;
	pointer-events: none;
}

.oxford-hero__buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	justify-items: center;
	max-width: 676px;
	margin: 0 auto;
	padding: 200px 0 0;
}

.oxford-hero__button,
.oxford-hero__button:visited {
	display: inline-block;
	background-color: #FFFFFF;
	color: #000000;
	font-family: "Jost", sans-serif;
	font-size: 40px;
	font-weight: 600;
	line-height: 1;
	padding: 30px 90px;
	border: 4px solid #000000;
	border-radius: 60px;
	text-decoration: none;
	transition: all 0.3s;
}

.oxford-hero__button:hover,
.oxford-hero__button:focus {
	background-color: #990000;
	color: #FFFFFF;
}

.oxford-hero__caption {
	margin-top: 260px;
	text-align: end;
	font-size: 40px;
	font-weight: 900;
	color: #FFFFFF;
	text-shadow: 0 0 9px #000000;
}

/* parallax: the photo drifts down as the hero scrolls up, like the old
   Elementor motion effect. Older browsers without scroll timelines use oxford-hero.js */
@keyframes oxford-hero-drift {
	from {
		transform: translateY(-8%);
	}
	to {
		transform: translateY(8%);
	}
}

@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.oxford-hero__media {
			animation: oxford-hero-drift linear both;
			animation-timeline: view();
		}
	}
}

@media (max-width: 1024px) {
	.oxford-hero {
		margin-top: 1.8rem;
		padding: 0 10px 10px;
	}

	.oxford-hero__caption {
		margin-top: 160px;
	}
}

@media (max-width: 767px) {
	.oxford-hero {
		margin: 2.9rem 0;
		padding: 6rem 2rem;
	}

	.oxford-hero__media img {
		object-position: bottom center;
	}

	.oxford-hero__buttons {
		grid-template-columns: 1fr;
		padding: 20px;
	}

	.oxford-hero__button {
		display: block;
		width: 100%;
		font-size: 33px;
		padding: 10px 20px;
	}

	.oxford-hero__caption {
		display: none;
	}
}
