/* ==========================================================================
   Metamorph Pre School — shared inner-page components
   (page title banner, text blocks, icon lists, wave dividers)
   Breakpoints: laptop <= 1366px, tablet <= 1024px, mobile <= 767px
   ========================================================================== */

/* Inner pages space the desktop menu items 2px apart (menu wraps to two rows) */
.page-inner .main-nav__item {
	margin: 0 2px;
}

.container {
	max-width: 1260px;
	margin-right: auto;
	margin-left: auto;
}

/* ---------- Text helpers ---------- */
.section-title {
	margin: 0;
	color: #20323D;
	font-family: var(--font-display);
	font-size: 48px;
	font-weight: 800;
	line-height: 1.1em;
	letter-spacing: 3.4px;
}

.text-block {
	font-family: var(--font-text);
	font-size: 17px;
	text-align: justify;
}

.text-block p {
	margin: 0 0 5px;
}

.text-block p:last-child {
	margin-bottom: 0;
}

.text-block ul {
	margin: 0 1.5em .5em 1.5em;
	padding: 0;
	list-style: disc;
}

.text-block li p {
	margin: 0;
}

.stack {
	display: flex;
	flex-direction: column;
}

.stack > * + * {
	margin-top: 20px;
}

/* ---------- Icon list ---------- */
.icon-list {
	padding: 0;
	list-style: none;
}

.icon-list__item {
	display: flex;
	align-items: center;
	position: relative;
}

.icon-list__icon {
	display: flex;
	flex-shrink: 0;
}

.icon-list__icon svg {
	display: block;
	width: var(--icon-size, 20px);
	height: var(--icon-size, 20px);
	margin: 0 calc(var(--icon-size, 20px) * .25) 0 0;
	fill: var(--icon-color, var(--accent-1));
}

.icon-list__text {
	padding-left: 5px;
	color: var(--text-color, #20323D);
}

/* ---------- Page title banner ---------- */
.page-hero {
	position: relative;
	overflow: hidden;
	margin-top: -60px;
	padding: 100px 30px 0;
}

.page-hero__overlay {
	position: absolute;
	inset: 0;
}

.page-hero__row {
	display: flex;
	position: relative;
	min-height: 35vh;
	max-width: 1260px;
	margin: 0 auto;
}

.page-hero__col {
	display: flex;
	flex-direction: column;
	position: relative;
}

.page-hero__col--text {
	width: 40%;
	justify-content: center;
}

.page-hero__col--image {
	width: 60%;
	justify-content: flex-end;
	padding: 10px;
}

.page-hero__title {
	margin: 0 0 10px;
	font-family: var(--font-display);
	font-size: 86px;
	font-weight: 900;
	line-height: 1.1em;
	letter-spacing: 3.4px;
}

.page-hero__text {
	font-family: var(--font-text);
	font-size: 17px;
	font-weight: 400;
}

.page-hero__text p {
	margin: 0;
}

.page-hero__fox {
	margin: 0 0 -18%;
	text-align: end;
	transform-origin: center bottom;
}

.page-hero__fox img {
	width: 36%;
}

/* ---------- Wave shape dividers ---------- */
.shape {
	position: absolute;
	left: 0;
	z-index: 1;
	width: 100%;
	overflow: hidden;
	line-height: 0;
	direction: ltr;
	pointer-events: none;
}

.shape--top {
	top: -1px;
}

.shape--bottom {
	bottom: -1px;
	transform: rotate(180deg);
}

.shape svg {
	display: block;
	position: relative;
	left: 50%;
	width: calc(100% + 1.3px);
	transform: translateX(-50%);
}

.shape .shape-fill {
	fill: #FFFFFF;
}

/* ---------- Masonry gallery + lightbox (used with main.js js-masonry) ---------- */
.gallery-grid {
	--columns: 3;
	--gap: 10px;
	--radius: 0;
	display: grid;
	grid-template-columns: repeat(var(--columns), 1fr);
	gap: var(--gap);
	position: relative;
}

.gallery-grid.is-masonry {
	display: block;
}

.gallery-grid__item {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
}

.gallery-grid.is-masonry .gallery-grid__item {
	position: absolute;
}

.gallery-grid__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-grid__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0);
	transition: background-color .3s;
}

.gallery-grid__item:hover .gallery-grid__overlay,
.gallery-grid__item:focus .gallery-grid__overlay {
	background-color: rgba(0, 0, 0, .5);
}

/* ---------- Lightbox ---------- */
.lightbox {
	display: flex;
	justify-content: center;
	align-items: center;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background-color: rgba(0, 0, 0, .87);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s, visibility .3s;
}

.lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.lightbox__image {
	max-width: 85vw;
	max-height: 85vh;
	object-fit: contain;
	box-shadow: 0 0 30px rgba(0, 0, 0, .3);
}

.lightbox__button {
	display: flex;
	justify-content: center;
	align-items: center;
	position: absolute;
	padding: 0;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, .9);
	cursor: pointer;
	transition: color .3s;
}

.lightbox__button:hover {
	color: #FFFFFF;
}

.lightbox__button svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.lightbox__close {
	top: 15px;
	right: 15px;
	font-size: 24px;
}

.lightbox__prev,
.lightbox__next {
	top: 50%;
	height: 50%;
	font-size: 25px;
	transform: translateY(-50%);
	padding: 0 20px;
}

.lightbox__prev { left: 0; }
.lightbox__next { right: 0; }

.lightbox__counter {
	position: absolute;
	top: 20px;
	left: 20px;
	color: rgba(255, 255, 255, .9);
	font-size: 15px;
}

/* Gallery columns: 3 → 2 below 1024px (the original keeps 3 at exactly 1024) → 1 on mobile */
@media (max-width: 1023px) {
	.gallery-grid {
		--columns: 2;
	}
}

@media (max-width: 767px) {
	.gallery-grid {
		--columns: 1;
	}
}

/* ==========================================================================
   RESPONSIVE — LAPTOP (<= 1366px)
   ========================================================================== */
@media (max-width: 1366px) {
	.page-hero__text {
		text-align: justify;
	}
}

/* ==========================================================================
   RESPONSIVE — TABLET (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
	.container {
		max-width: 1024px;
	}

	.section-title {
		font-size: 30px;
		line-height: 1.2em;
	}

	.page-hero {
		margin-top: 0;
		padding: 100px 30px;
	}

	.page-hero__row {
		min-height: 0;
		max-width: 1024px;
	}

	.page-hero__col--text {
		width: 60%;
	}

	.page-hero__col--image {
		width: 40%;
		padding: 0;
	}

	.page-hero__title {
		font-size: 70px;
	}

	.page-hero__fox {
		margin: 0;
		text-align: center;
		transform: none !important;
	}

	.page-hero__fox img {
		width: 60%;
	}
}

/* ==========================================================================
   RESPONSIVE — MOBILE (<= 767px)
   ========================================================================== */
@media (max-width: 767px) {
	.container {
		max-width: 767px;
	}

	.section-title {
		font-size: 26px;
		line-height: 1.2em;
	}

	.stack > * + * {
		margin-top: 10px;
	}

	.page-hero {
		padding: 70px 20px;
	}

	.page-hero__col--text {
		width: 100%;
	}

	.page-hero__col--image {
		display: none;
	}
}

/* ---------- Enquiry form (used with main.js js-enquiry-form) ---------- */
.enquiry-form__fields {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -5px -10px;
}

.enquiry-form__group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	width: 100%;
	margin: 0 0 10px;
	padding: 0 5px;
}

.enquiry-form__group--half {
	width: 50%;
}

.enquiry-form__label {
	width: 100%;
	color: #000000;
	font-family: var(--font-text);
	font-size: 15px;
}

.enquiry-form__label::after {
	content: "*";
	padding-left: .2em;
	color: red;
}

.enquiry-form__input,
.enquiry-form__select select {
	width: 100%;
	min-height: 40px;
	padding: 5px 14px;
	border: 1px solid #EDEDED;
	border-radius: 4px;
	background-color: #FFFFFF;
	font-family: var(--font-text);
	outline: none;
}

.enquiry-form__input {
	color: rgba(0, 0, 0, .6);
	font-size: 15px;
	line-height: 1.4;
}

.enquiry-form__input::placeholder {
	color: rgba(0, 0, 0, .45);
}

.enquiry-form__input:focus,
.enquiry-form__select select:focus {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}

.enquiry-form__select {
	position: relative;
	width: 100%;
}

.enquiry-form__select select {
	height: 40px;
	color: var(--text);
	font-size: 18px;
	line-height: 27px;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.enquiry-form__caret {
	position: absolute;
	top: 50%;
	right: 10px;
	z-index: 1;
	font-size: 11px;
	line-height: 1;
	transform: translateY(-50%);
	pointer-events: none;
}

.enquiry-form__caret svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: var(--text);
}

.enquiry-form__group--submit {
	justify-content: center;
	align-items: flex-end;
}

.enquiry-form__button {
	min-height: 40px;
	padding: 0 24px;
	border: 0;
	border-radius: 4px;
	background-color: var(--accent-1);
	color: #FFFFFF;
	font-family: var(--font-comic);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	transition: all .3s;
}

.enquiry-form__button:hover,
.enquiry-form__button:focus {
	background-color: #0A303A;
	color: #FFFFFF;
}

.enquiry-form__message {
	width: 100%;
	margin: 10px 5px 0;
	color: #46a748;
	font-family: var(--font-text);
	font-size: 15px;
}

.enquiry-form__input.is-invalid,
.enquiry-form__select select.is-invalid {
	border-color: #D03A39;
}

/* Optional fields carry no required marker */
.enquiry-form__label--optional::after {
	content: none;
}

/* ---------- FAQ accordion (used with main.js js-accordion) ---------- */
.accordion__title {
	padding: 15px 20px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	outline: none;
}

.accordion__icon {
	float: left;
	width: 1.5em;
	text-align: left;
}

.accordion__icon svg {
	width: 1em;
	height: 1em;
	fill: #D03A39;
	vertical-align: -.125em;
}

.accordion__icon-opened,
.accordion__title.is-active .accordion__icon-closed {
	display: none;
}

.accordion__title.is-active .accordion__icon-opened {
	display: block;
}

.accordion__question {
	color: var(--text);
	font-family: var(--font-text);
	font-size: 17px;
	line-height: 1;
}

.accordion__content {
	padding: 15px 20px;
	font-family: var(--font-text);
	font-size: 17px;
	line-height: 1.7em;
}

.accordion__content p {
	margin: 0;
}

.accordion__content[hidden] {
	display: none;
}

@media (max-width: 767px) {
	.enquiry-form__group--half {
		width: 100%;
	}

	.accordion__title {
		padding: 12px 15px;
	}

	.accordion__question {
		line-height: 1.4em;
	}

	.accordion__content {
		padding: 7px 15px;
	}
}
