body {
	--dark-blue: #2b669e;
	--middle-blue: #25a8e0;
	--light-blue: #7ac7e1;
}

p {
	text-wrap: pretty;
}

body {
	font-family: Arial, sans-serif;
	margin: 0 0 calc(100vh - min(200px, 30vh)) 0;
	padding: 0;
}

header {
	background-color: white;
	color: black;
	padding: 10px 0;
}

nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 20px;
}

.menu {
	list-style: none;
	display: flex;
	margin: 0;
	padding: 0;
}

.menu li {
	margin: 0 15px;
	line-height: 24px;
}

.menu a {
	color: black;
	text-decoration: none;
}

.menu-icon {
	display: none;
	font-size: 24px;
	cursor: pointer;
}

.hero {
	position: relative;
	text-align: center;
	color: white;
	min-height: min(30vh, 35vw, 600px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.hero img.hero-bg,
.hero video.hero-bg {
	object-fit: cover;
	top: 0;
	bottom: 0;
	position: absolute;
	height: 100%;
	width: 100%;
}

.hero img.hero-bg {
	display: none;
}

@media screen and (prefers-reduced-motion: reduce) {
	.hero img.hero-bg {
		display: block;
	}

	.hero video.hero-bg {
		display: none;
	}
}

.hero-text {
	box-sizing: border-box;
	-webkit-text-stroke: 2px #0069A3;
	text-stroke: 2px #0069A3;
	text-shadow: 2px 3px 0px var(--middle-blue);
	font-size: 24pt;
	line-height: 1.2;
	display: flex;
	text-align: center;
	align-items: center;
	justify-content: center;
}

@media (max-width: 800px) {
	.hero-text {
		font-size: 18pt;
	}
}

.hero-text h1 {
	backdrop-filter: blur(8px);
	border-radius: 8px;
	max-width: 600px;
}

#what-is-isr {
	padding: 20px;
	text-align: center;
}

#links {
	display: flex;
	justify-content: space-around;
	padding: 20px;
}

.link-item {
	text-align: center;
}

.link-item img {
	width: 200px;
	height: 200px;
	object-fit: cover;
}

.link-item a {
	display: block;
	margin: 10px 0;
	font-size: 18px;
	color: #333;
	text-decoration: none;
}

.link-item p {
	font-size: 16px;
	color: #666;
}

#testimonials {
	display: flex;
	justify-content: space-around;
	margin: 20px;
	gap: 8px;
}

.testimonial {
	background-color: var(--dark-blue);
	color: white;
	padding: 20px;
	border-radius: 8px;
	width: 30%;
	text-align: center;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#contact-info {
	text-align: left;
	padding: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.contact-item {
	margin-bottom: 10px;
}

.contact-item a {
	color: #333;
	text-decoration: none;
}

.contact-image {
	width: 173px;
	height: 173px;
	object-fit: cover;
	margin-right: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-form button[type="submit"] {
	margin: auto;
	text-align: center;
	padding: 10px;
	border-radius: 8px;
	font-size: 16px;

	background: var(--dark-blue);
	color: white;
	border: none;
	cursor: pointer;
	transition: background 0.3s ease;
}

.contact-form button[type="submit"]:hover {
	background: #023e8a;
}

.overlay {
	display: none;
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 1000;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.overlay.active {
	display: flex;
}

.overlay-content {
	display: flex;
	flex-direction: column;
}

.overlay-content a {
	color: white;
	font-size: 24px;
	text-decoration: none;
	margin: 10px 0;
}

.logo {
	height: 100px;
}

.contact-form {
	padding: 4px 20px;
	max-width: 800px;
	margin: 24px auto;
	background: #fbfdff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	font-size: 18px;
	line-height: 1.2;
}

.contact-intro,
.contact-footer {
	font-size: 24px;
	margin-bottom: 40px;
}

.hero-more-text.contact-header {
	font-family: Papyrus, fantasy;
	text-align: center;
	font-size: 48px;
}

.form-group {
	display: flex;
}

.form-input {
	flex: 1;
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 15px;
	align-items: center;
}

.form-input label {
	flex: 1 1 90%;
}

.form-input label.bold {
	font-weight: bold;
}

.form-input input[type="text"],
.form-input input[type="email"],
.form-input input[type="date"],
.form-input select,
.form-input textarea {
	flex: 1 1 45%;
	padding: 10px;
	margin-top: 5px;
	margin-right: 10px;
	margin-bottom: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.form-input input[type="checkbox"] {
	margin-right: 10px;
}

.form-input:has(input[type="checkbox"]) {
	margin-bottom: 25px;
}

@media (max-width: 576px) {
	.form-input .long-label {
		font-size: 10pt;
	}
}

.add-child {
	display: block;
	margin: 10px 0 30px;
	color: blue;
	text-decoration: underline;
	cursor: pointer;
}

textarea {
	flex: 1 1 100%;
	height: 100px;
}

.divider-quote {
	font-size: clamp(16pt, 7vw, 32pt);
	text-align: center;
	color: var(--middle-blue);
	-webkit-text-stroke: 1px black;
	text-stroke: 1px black;
}

.about-content {
	display: flex;
	align-items: center;
	margin: 0 auto;
	gap: 8px;
}

.about-image {
	height: auto;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.about-text {
	margin-bottom: 16px;
}

.about-text p:first-of-type {
	margin-top: 0
}

.about-text p:last-of-type {
	margin-bottom: 0
}

.scholarship-logos {
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
}

.scholarship-logos img {
	width: 100px;
	height: 100px;
	border-radius: 8px;
}

.lessons-intro {
	background-image: url(water.jpg);
}

.hero-more-video,
.lessons-intro-video {
	width: calc(min((80vw - 40px), (80vh - 40px) * 16 / 9));
	height: calc(min((80vh - 40px), (80vw - 40px) * 9 / 16));
	margin: auto;
	display: block;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-more-video video,
.lessons-intro-video video {
	width: 100%;
	border-radius: 8px;
}

.lessons-intro-text {
	padding: 20px;
}

.lessons-intro-glass {
	padding-top: 8px;
}

.hero-more {
	padding: 20px;
}

.hero-more-text,
.lessons-intro-text {
	width: calc(100vw - 40px);
	font-size: 1.6rem;
	margin: auto;
	color: white;
	text-shadow:
		3px 3px 0 var(--dark-blue),
		-1px -1px 0 var(--dark-blue),
		1px -1px 0 var(--dark-blue),
		-1px 1px 0 var(--dark-blue),
		1px 1px 0 var(--dark-blue);
	backdrop-filter: brightness(95%);
	border-radius: 8px;
}

.hero-more-video {
	margin-bottom: 36px;
}

.hero-more-text {
	padding: 8px 0;
}

.hero-more-text p:first-child {
	margin-top: 0;
}

.hero-more-text p:last-child {
	margin-bottom: 0;
}

.hero-more-glass,
.lessons-intro-glass {
	backdrop-filter: blur(8px);
	width: 100%;
	height: 100%;
	margin: 48px 0;
}

.hero-text {
	margin: .67em 0;
}

.hero-text:has(+ .hero-more) {
	margin-bottom: 0;
}

.hero-text h1 {
	margin: 0;
}

@media (min-width: 800px) {

	.hero-more-text,
	.lessons-intro-text {
		width: calc(min((80vw - 40px), (80vh - 40px) * 16 / 9));
		font-size: 1.8rem;
	}
}

.lessons-content {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	padding: 20px;
	margin: auto;
	border-bottom: 1px solid grey;
	text-wrap: pretty;
}


:nth-last-child(1 of .lessons-content) {
	border-bottom: none;
}

:nth-child(odd of .lessons-content) .video-block {
	order: 2;
}

.lessons-content .video-block {
	border-radius: 8px;
	display: flex;
	min-height: calc(min(100vh - 40px, 252px));
	min-width: calc(min(100vw - 40px, 448px));
}

.lessons-content .video-block * {
	border-radius: 8px;
	margin: auto;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	min-height: calc(min(100vh - 40px, 252px));
	min-width: calc(min(100vw - 40px, 448px));
}

.lessons-content h4 {
	font-size: 1.5rem;
	margin: 8px 0;
}

.lessons-content h6 {
	font-size: 0.8rem;
	margin: 8px 0;
	font-weight: normal;
	font-style: italic;
}

.lessons-content .text-holder {
	max-width: 600px;
}

.focus-video {
	width: calc(min((100vw - 40px), (100vh - 40px) * 16 / 9));
	height: calc(min((100vh - 40px), (100vw - 40px) * 9 / 16));
	margin: 8px auto 32px;
	display: flex;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.focus-video video,
.focus-video iframe {
	flex: 1;
	border-radius: 8px;
}

.hero-video {
	display: flex;
	width: 100vw;
	height: calc(100vw * 9 / 16);
	border-radius: 0;
	margin: 0;
}

.hero-video iframe {
	flex: 1;
}

.video-block {
	width: 100%;
	max-width: 400px;
	margin-right: 20px;
}

.text-holder {
	flex: 1;
}

.signature {
	font-size: 24px;
	font-family: 'Bradley Hand', cursive;
}

#flipbookFrame {
	width: calc(100% - 16px);
	border: 1px solid gray;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	margin: 8px;
	text-align: center;
}

#flipbookFrame h3 {
	text-align: center;
	font-weight: normal;
	font-size: 16pt;
}

#flipbookContainer canvas {
	border-radius: 8px;
}

#nonflipbookPDFLink,
#nonflipbookDivider {
	display: none;
}

#flipbookPDFLink {
	display: block;
	margin-bottom: 20px;
}

@media (max-width: 1024px) {
	#flipbookFrame {
		display: none;
	}

	#nonflipbookPDFLink {
		display: block;
		margin-bottom: 20px;
		text-align: center;
	}

	#nonflipbookDivider {
		display: block;
		width: 100%;
		margin-bottom: 20px;
	}
}

#passwordPrompt {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.5);
	position: fixed;
	width: 100%;
	top: 0;
	left: 0;
	z-index: 1000;
}

#passwordPrompt input {
	margin-right: 10px;
}

@media (max-width: 768px) {
	.menu {
		display: none;
		flex-direction: column;
	}

	.menu-icon {
		display: block;
	}

	.menu.active {
		display: flex;
	}

	#links {
		flex-direction: column;
	}

	.link-item {
		margin-bottom: 20px;
	}

	#testimonials {
		flex-direction: column;
		margin: 0;
	}

	.testimonial {
		width: 100%;
		margin-left: 0;
		margin-bottom: 20px;
		box-sizing: border-box;
	}

	#contact-info {
		flex-direction: column;
	}

	.contact-image {
		margin-bottom: 20px;
	}

	.about-content {
		display: block;
		text-align: center;
		margin-bottom: 16px;
	}

	.about-content .about-text {
		text-align: left;
	}


	.lessons-content {
		flex-direction: column;
	}

	.video-block {
		margin-right: 0;
		margin-bottom: 20px;
		order: 2;
	}

	.logo {
		height: 60px;
	}
}

/* inspired by https://maxl.us/hide-related */
.yt-video {
	/* display: inline-block; */
	position: relative
}

.yt-video.ended::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	cursor: pointer;
	background-color: black;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 64px 64px;
	border-radius: 8px;
	background-image: url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiB2aWV3Qm94PSIwIDAgNTEwIDUxMCI+PHBhdGggZD0iTTI1NSAxMDJWMEwxMjcuNSAxMjcuNSAyNTUgMjU1VjE1M2M4NC4xNSAwIDE1MyA2OC44NSAxNTMgMTUzcy02OC44NSAxNTMtMTUzIDE1My0xNTMtNjguODUtMTUzLTE1M0g1MWMwIDExMi4yIDkxLjggMjA0IDIwNCAyMDRzMjA0LTkxLjggMjA0LTIwNC05MS44LTIwNC0yMDQtMjA0eiIgZmlsbD0iI0ZGRiIvPjwvc3ZnPg==);
}

.yt-video.paused::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	cursor: pointer;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 40px 40px;
	background-image: url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSIxNzA2LjY2NyIgaGVpZ2h0PSIxNzA2LjY2NyIgdmlld0JveD0iMCAwIDEyODAgMTI4MCI+PHBhdGggZD0iTTE1Ny42MzUgMi45ODRMMTI2MC45NzkgNjQwIDE1Ny42MzUgMTI3Ny4wMTZ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+);
	border-radius: 8px;
	backdrop-filter: blur(8px);
}


/* --- About Page Enhancements --- */
.about-hero-img {
	width: calc(100% - 40px);
	border-radius: 18px;
	box-shadow: 0 6px 32px #0002;
	display: block;
	margin: 16px auto;
	object-fit: cover;
}

.about-section {
	background: #f8fcff;
	border-radius: 18px;
	box-shadow: 0 2px 16px #0077b610;
	padding: 32px 24px 24px 24px;
	margin: 32px auto 32px auto;
	max-width: 900px;
}

.about-section h1,
.about-section h2,
.about-section h3 {
	color: var(--dark-blue);
	margin-top: 0;
}

.about-section ul {
	margin-left: 1.5em;
	margin-bottom: 1.5em;
	padding-inline-start: 0;
}

.about-section li {
	margin-bottom: 0.7em;
	font-size: 1.08em;
}

.about-section p {
	font-size: 1.08em;
	line-height: 1.7;
}

.about-section hr {
	border: none;
	border-top: 1.5px solid #bde0fe;
	margin: 32px 0;
}

.contact-image {
	width: 120px;
	border-radius: 12px;
	margin-right: 24px;
	box-shadow: 0 2px 12px #0001;
	float: left;
}

.contact-item {
	margin-left: 150px;
	min-height: 120px;
}

@media (max-width: 600px) {
	.about-section {
		padding: 16px 6vw 16px 6vw;
	}

	.about-hero-img {
		max-width: 98vw;
		margin: 18px auto 16px auto;
	}

	.contact-image {
		float: none;
		display: block;
		margin: 0 auto 18px auto;
	}

	.contact-item {
		margin-left: 0;
		min-height: 0;
	}
}

.lesson-locations {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5em;
	margin: 2em 0 0 0;
	text-align: center;
}

.lesson-location-box {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
	padding: 1em;
	min-width: 220px;
	flex: 1 1 220px;
	margin-bottom: 1em;
}

.lesson-location-box img.pool {
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	max-width: 100%;
	max-height: 240px;
	margin: 16px 0;
}

.lesson-locations h3 {
	margin-bottom: 0;
	font-size: 32px;
}

@media (max-width: 800px) {
	.lesson-locations {
		flex-direction: column;
		align-items: center;
	}

	.lesson-location-box {
		width: 95vw;
	}
}

.mapouter {
	position: relative;
	text-align: right;
	width: 100%;
	height: 400px;
}

.gmap_canvas {
	overflow: hidden;
	background: none !important;
	width: 100%;
	height: 400px;
}

.gmap_iframe {
	height: 400px !important;
}

.copyright {
	margin-top: 16px;
	text-align: center;
}

.footer-items {
	display: flex;
	max-width: 900px;
	margin: auto;
	text-align: center;
}

.footer-item {
	flex: 1;
}

.footer-item .item-name {
	font-size: 18px;
	font-weight: bold;
	color: var(--dark-blue);
	margin-bottom: 8px;
}

.footer-item .contact {
	display: flex;
	gap: 16px;
	justify-content: center;
	align-items: center;
}

.footer-item .links {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.footer-item .links a {
	text-decoration: none;
	color: black;
}

.footer-item .links a:hover {
	color: var(--dark-blue);
	text-decoration: underline;
}

.footer-item .locations {
	white-space: nowrap;
}


.email-signup {
	display: flex;
	align-items: center;
	margin: 8px 0;
	padding: 0 8px;
}

.email-signup input[type=email] {
	height: 24px;
	border-radius: 8px 0 0 8px;
	border: 1px solid black;
	border-right: none;
	flex: 1 1 auto;
	min-width: 0;
}

.email-signup input[type=email]:focus-visible {
	outline: 1px solid var(--dark-blue);
}

.email-signup input[type=email]:focus-visible + button {
	outline: 1px solid var(--dark-blue);
}


.email-signup button {
	background: var(--dark-blue);
	color: white;
	border: none;
	border-radius: 0 8px 8px 0;
	padding: 0 12px 0 8px;
	height: 28px;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.3s;
	white-space: nowrap;
}

.email-signup button:hover {
	background: #023e8a;
}

@media (max-width: 800px) {
	.footer-items {
		flex-direction: column;
		gap: 24px;
		margin: 24px 0;
	}
}

.modal-backdrop {
	position:fixed;
	top:0;
	left:0;
	width:100vw;
	height:100vh;
	background:#0008;
	z-index:10000;
}
.modal {
	position:fixed;
	top:50%;
	left:50%;
	transform:translate(-50%,-50%);
	background:#fff;
	border-radius:14px;
	box-shadow:0 8px 32px #0003;
	z-index:10001;
	width:95vw;
	max-width:420px;
	padding:32px 22px 22px 22px;
}
.modal .cancel {
	background:#eee;
	color:#333;
	border:none;
	padding:8px 18px;
	border-radius:6px;
	cursor:pointer;
}
.modal .send {
	background:#0077b6;
	color:#fff;
	border:none;
	padding:8px 18px;
	border-radius:6px;
	font-weight:600;
	cursor:pointer;
}
.modal .button-row {
	display:flex;
	gap:12px;
	justify-content:flex-end;
	align-items:center;
}
.modal .status {
	margin-top:10px;
	font-size:1rem;
}
.modal h3 {
	margin-top:0;
	margin-bottom:18px;
	color:#0077b6;
	text-align:center;
}
.modal label {
	font-weight:600;
}
.modal input {
	 width:100%;
	 margin-bottom:12px;
	 padding:8px 6px;
	 border-radius:6px;
	 border:1px solid #bbb;
}
.modal textarea {
	width:100%;
	margin-bottom:12px;
	padding:8px 6px;
	border-radius:6px;
	border:1px solid #bbb;
	min-height:60px;
}
