/* Homepage "Watch Campus Life" video pop-up (11-Nov-2026). Built by assets/js/video-modal.js. */
html.ews-vm-lock, html.ews-vm-lock body { overflow: hidden; }

.ews-vm {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: clamp(12px, 4vw, 48px);
	background: rgba(9, 17, 46, 0.86);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	opacity: 0; visibility: hidden;
	transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}
.ews-vm.is-open { opacity: 1; visibility: visible; transition: opacity 0.28s ease, visibility 0s; }

.ews-vm__dialog {
	--vm-ar: 1.413;
	position: relative;
	/* as wide as possible, but never taller than the screen (leaves room for the title bar) */
	width: min(1120px, 100%, calc((100vh - 150px) * var(--vm-ar)));
	width: min(1120px, 100%, calc((100dvh - 150px) * var(--vm-ar)));
	transform: translateY(18px) scale(0.96);
	transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ews-vm.is-open .ews-vm__dialog { transform: none; }

.ews-vm__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: #fff; }
.ews-vm .ews-vm__title { margin: 0; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: 0.01em; display: flex; align-items: center; gap: 10px; }
.ews-vm__title::before {
	content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none;
	background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}
.ews-vm__close {
	flex: none; width: 44px; height: 44px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.12); color: #fff;
	cursor: pointer; transition: background 0.2s ease, transform 0.2s ease;
}
.ews-vm__close:hover, .ews-vm__close:focus-visible { background: rgba(255, 255, 255, 0.26); transform: rotate(90deg); outline: none; }
.ews-vm__close svg { width: 20px; height: 20px; }

.ews-vm__frame {
	position: relative; aspect-ratio: var(--vm-ar); width: 100%;
	border-radius: 18px; overflow: hidden; background: #000;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.ews-vm__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }

.ews-vm__spinner {
	position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
	border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff;
	animation: ews-vm-spin 0.9s linear infinite; pointer-events: none;
}
.ews-vm.is-ready .ews-vm__spinner { display: none; }
@keyframes ews-vm-spin { to { transform: rotate(360deg); } }

/* Phones: edge-to-edge video, smaller title, close button stays reachable */
@media (max-width: 600px) {
	.ews-vm { padding: 12px; }
	.ews-vm__dialog { width: min(100%, calc((100dvh - 120px) * var(--vm-ar))); }
	.ews-vm .ews-vm__title { font-size: 15px; }
	.ews-vm__close { width: 40px; height: 40px; }
	.ews-vm__frame { border-radius: 12px; }
}
/* Phones turned sideways: use the full height */
@media (max-height: 500px) and (orientation: landscape) {
	.ews-vm { padding: 8px 56px; }
	.ews-vm__bar { position: absolute; top: 0; right: -50px; margin: 0; }
	.ews-vm .ews-vm__title { display: none; }
	.ews-vm__dialog { width: min(100%, calc((100dvh - 16px) * var(--vm-ar))); }
}
/* Call-to-action buttons on the end screen (shown when the video finishes) — row under the video removed 11-Nov per client */
.ews-vm__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.ews-vm .ews-vm__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 22px; border-radius: 999px;
	font-size: 15px; font-weight: 700; line-height: 1; text-decoration: none; white-space: nowrap;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.ews-vm .ews-vm__btn svg { width: 18px; height: 18px; flex: none; }
.ews-vm .ews-vm__btn:hover, .ews-vm .ews-vm__btn:focus-visible { transform: translateY(-2px); outline: none; }
.ews-vm .ews-vm__btn--light { background: #fff; color: #0d1b4c; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.ews-vm .ews-vm__btn--accent { background: #fd7a1f; color: #fff; box-shadow: 0 6px 18px rgba(253, 122, 31, 0.45); }
.ews-vm .ews-vm__btn--accent:hover { background: #f26a0c; color: #fff; }

.ews-vm__end {
	position: absolute; inset: 0; z-index: 2;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; text-align: center;
	background: rgba(9, 17, 46, 0.78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
	opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.ews-vm.is-ended.has-ctas .ews-vm__end { opacity: 1; visibility: visible; transition: opacity 0.3s ease, visibility 0s; }
.ews-vm .ews-vm__end-title { margin: 0; color: #fff; font-size: clamp(20px, 2.6vw, 30px); font-weight: 800; line-height: 1.2; }
.ews-vm__end .ews-vm__ctas { justify-content: center; }
.ews-vm__replay {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 999px;
	background: transparent; color: rgba(255, 255, 255, 0.9); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.ews-vm__replay:hover, .ews-vm__replay:focus-visible { background: rgba(255, 255, 255, 0.12); outline: none; }
.ews-vm__replay svg { width: 18px; height: 18px; }

@media (max-width: 600px) {
	.ews-vm__end { gap: 10px; padding: 12px; }
	.ews-vm .ews-vm__end-title { font-size: 17px; }
	.ews-vm__end .ews-vm__ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }   /* side by side */
	.ews-vm .ews-vm__btn { width: 100%; min-height: 40px; padding: 0 8px; gap: 6px; font-size: 13px; }
	.ews-vm .ews-vm__btn svg { width: 15px; height: 15px; }
	.ews-vm .ews-vm__btn--accent span { display: none; }   /* drop the arrow to save room */
	.ews-vm__replay { padding: 4px 10px; font-size: 13px; }
}
@media (max-height: 500px) and (orientation: landscape) {
	.ews-vm .ews-vm__btn { width: auto; min-height: 40px; padding: 0 16px; font-size: 14px; }
}

@media (max-width: 360px) {
	.ews-vm .ews-vm__btn { font-size: 13px; padding: 0 6px; }
	.ews-vm .ews-vm__btn svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ews-vm, .ews-vm__dialog, .ews-vm__close { transition: none; }
}
