/*
Theme Name: Northvale School
Theme URI: https://example.com/northvale
Author: AI Developer
Author URI: https://example.com
Description: A mobile-first, Multisite-ready English school theme with dynamic announcements, events, unlimited footer friend links, and random hero imagery. Compatible with modern WordPress (6.0+).
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: northvale
Tags: education, custom-menu, featured-images, translation-ready, blog, one-column, two-columns, responsive-layout
*/

/* ==========================================================================
   Mobile-first base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--nv-ink: #14213d;
	--nv-muted: #5a6478;
	--nv-surface: #ffffff;
	--nv-soft: #f5f1eb;
	--nv-accent: #c45c26;
	--nv-accent-dark: #9e4518;
	--nv-line: #e6ddd2;
	--nv-radius: 10px;
	--nv-shadow: 0 10px 28px rgba(20, 33, 61, 0.1);
	--nv-container: min(1100px, calc(100% - 1.5rem));
	--nv-space: clamp(2.5rem, 6vw, 4.5rem);
	--nv-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--nv-display: Georgia, "Times New Roman", "Noto Serif", serif;
	--nv-header-h: 3.5rem;
	--nv-ease: 0.25s ease;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	font-family: var(--nv-font);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--nv-ink);
	background: var(--nv-surface);
	-webkit-font-smoothing: antialiased;
}

img,
picture,
video,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	list-style: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	border: 0;
	background: none;
}

h1,
h2,
h3,
h4 {
	font-family: var(--nv-display);
	line-height: 1.2;
	font-weight: 700;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.container {
	width: var(--nv-container);
	margin-inline: auto;
}

.section {
	padding-block: var(--nv-space);
}

.section-header {
	margin-bottom: 1.5rem;
	text-align: center;
}

.section-label {
	margin-bottom: 0.4rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nv-accent);
}

.section-title {
	font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 2.75rem;
	padding: 0.65rem 1.35rem;
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 600;
	transition: background-color var(--nv-ease), color var(--nv-ease), transform var(--nv-ease);
}

.btn--primary {
	background: var(--nv-accent);
	color: #fff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
	background: var(--nv-accent-dark);
	transform: translateY(-1px);
}

.btn--outline {
	border: 1.5px solid var(--nv-accent);
	color: var(--nv-accent);
}

.btn--outline:hover,
.btn--outline:focus-visible {
	background: var(--nv-accent);
	color: #fff;
}

/* ==========================================================================
   Site header (mobile-first)
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--nv-line);
	backdrop-filter: blur(8px);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--nv-header-h);
	gap: 1rem;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-width: 0;
}

.site-title {
	font-family: var(--nv-display);
	font-size: 1.15rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 8px;
	border: 1px solid var(--nv-line);
	color: var(--nv-ink);
}

.menu-toggle[aria-expanded="true"] {
	background: var(--nv-soft);
}

.primary-nav {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: #fff;
	border-bottom: 1px solid var(--nv-line);
	padding: 0.75rem 0 1rem;
}

.primary-nav.is-open {
	display: block;
}

.primary-menu {
	width: var(--nv-container);
	margin-inline: auto;
	display: grid;
	gap: 0.25rem;
}

.primary-menu a {
	display: block;
	padding: 0.7rem 0.85rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.95rem;
}

.primary-menu a:hover,
.primary-menu a:focus-visible,
.primary-menu .current-menu-item > a {
	background: var(--nv-soft);
	color: var(--nv-accent);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-swiper {
	width: 100%;
	height: min(78vh, 640px);
	min-height: 360px;
}

.hero-slide {
	position: relative;
	display: flex;
	align-items: flex-end;
	background: #14213d center / cover no-repeat;
}

.hero-slide__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(160deg, rgba(20, 33, 61, 0.2) 0%, rgba(20, 33, 61, 0.78) 70%);
}

.hero-slide__content {
	position: relative;
	z-index: 1;
	width: var(--nv-container);
	margin-inline: auto;
	padding: 2rem 0 3.25rem;
	color: #fff;
}

.hero-slide__brand {
	margin-bottom: 0.5rem;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	opacity: 0.9;
}

.hero-slide__title {
	max-width: 16ch;
	margin-bottom: 1.25rem;
	font-size: clamp(1.85rem, 7vw, 3.1rem);
	text-wrap: balance;
}

.hero-swiper__pagination {
	bottom: 1rem !important;
}

.hero-swiper__pagination .swiper-pagination-bullet {
	background: rgba(255, 255, 255, 0.55);
	opacity: 1;
}

.hero-swiper__pagination .swiper-pagination-bullet-active {
	background: #fff;
}

.hero-swiper__nav {
	display: none;
	color: #fff !important;
}

.hero-swiper__nav::after {
	font-size: 1.35rem !important;
}

/* ==========================================================================
   Announcements / services / teachers / events
   ========================================================================== */

.announcements {
	background: var(--nv-soft);
}

.announcement-card {
	padding: 1.35rem;
	border: 1px solid var(--nv-line);
	border-radius: var(--nv-radius);
	background: #fff;
	box-shadow: var(--nv-shadow);
	text-align: center;
}

.announcement-card__title {
	margin-top: 0.35rem;
	font-size: clamp(1.3rem, 4vw, 1.85rem);
}

.announcement-card__title a:hover {
	color: var(--nv-accent);
}

.announcement-card__excerpt {
	margin: 0.85rem auto 1.2rem;
	max-width: 48ch;
	color: var(--nv-muted);
	font-size: 0.95rem;
}

.announcement-card__excerpt p {
	margin: 0;
}

.services-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.service-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 1.35rem;
	border: 1px solid var(--nv-line);
	border-radius: var(--nv-radius);
	background: #fff;
	box-shadow: var(--nv-shadow);
}

.service-card__media {
	aspect-ratio: 16 / 10;
	margin: -1.35rem -1.35rem 1rem;
	overflow: hidden;
	border-radius: var(--nv-radius) var(--nv-radius) 0 0;
	background: #d9cfc3;
}

.service-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.service-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin-bottom: 0.85rem;
	border-radius: 50%;
	background: rgba(196, 92, 38, 0.12);
	color: var(--nv-accent);
}

.service-card__title {
	margin-bottom: 0.55rem;
	font-size: 1.15rem;
}

.service-card__text {
	flex: 1;
	margin-bottom: 1rem;
	color: var(--nv-muted);
	font-size: 0.95rem;
}

.service-card__link,
.service-card--cta > a:last-child {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: auto;
	font-weight: 600;
	color: var(--nv-accent);
}

.teachers {
	background: var(--nv-soft);
}

.teachers-swiper {
	padding-bottom: 2.5rem;
}

.teacher-card {
	overflow: hidden;
	border-radius: var(--nv-radius);
	background: #fff;
	border: 1px solid var(--nv-line);
	box-shadow: var(--nv-shadow);
	height: auto;
}

.teacher-card__media {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #d9cfc3;
}

.teacher-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.teacher-card__body {
	padding: 1rem 1rem 1.15rem;
	text-align: center;
}

.teacher-card__name {
	font-size: 1.05rem;
}

.teacher-card__subject {
	margin-top: 0.2rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--nv-accent);
}

.events-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.event-card {
	height: 100%;
	padding: 1.2rem;
	border: 1px solid var(--nv-line);
	border-top: 3px solid var(--nv-accent);
	border-radius: var(--nv-radius);
	background: #fff;
	box-shadow: var(--nv-shadow);
}

.event-card__media {
	aspect-ratio: 16 / 9;
	margin: -1.2rem -1.2rem 1rem;
	overflow: hidden;
	border-radius: var(--nv-radius) var(--nv-radius) 0 0;
	background: #d9cfc3;
}

.event-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.event-card__date {
	display: block;
	margin-bottom: 0.55rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--nv-accent);
}

.event-card__title {
	margin-bottom: 0.5rem;
	font-size: 1.05rem;
}

.event-card__title a:hover {
	color: var(--nv-accent);
}

.event-card__excerpt {
	margin-bottom: 0.85rem;
	color: var(--nv-muted);
	font-size: 0.92rem;
}

.event-card__excerpt p {
	margin: 0;
}

.event-card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--nv-accent);
}

/* ==========================================================================
   Content templates
   ========================================================================== */

.page-hero,
.content-wrap {
	padding-block: 2rem var(--nv-space);
}

.page-hero__title,
.entry-title {
	font-size: clamp(1.6rem, 4vw, 2.2rem);
	margin-bottom: 0.75rem;
}

.entry-meta {
	margin-bottom: 1.25rem;
	font-size: 0.875rem;
	color: var(--nv-muted);
}

.entry-content > * + * {
	margin-top: 1rem;
}

.entry-content a {
	color: var(--nv-accent);
	text-decoration: underline;
}

.posts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.post-card {
	overflow: hidden;
	border: 1px solid var(--nv-line);
	border-radius: var(--nv-radius);
	background: #fff;
	box-shadow: var(--nv-shadow);
}

.post-card__media {
	aspect-ratio: 16 / 10;
	background: #d9cfc3;
}

.post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card__body {
	padding: 1.1rem;
}

.post-card__title {
	font-size: 1.1rem;
	margin-bottom: 0.45rem;
}

.post-card__excerpt {
	color: var(--nv-muted);
	font-size: 0.92rem;
}

.pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.75rem;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.55rem;
	border-radius: 8px;
	border: 1px solid var(--nv-line);
	font-weight: 600;
	font-size: 0.875rem;
}

.pagination .current,
.pagination a:hover {
	background: var(--nv-accent);
	border-color: var(--nv-accent);
	color: #fff;
}

.not-found {
	text-align: center;
	padding-block: 3rem;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 420px;
	margin: 1rem auto 0;
}

.search-form input[type="search"] {
	flex: 1;
	min-height: 2.75rem;
	padding: 0.55rem 0.9rem;
	border: 1px solid var(--nv-line);
	border-radius: 999px;
	background: #fff;
}

.search-form input[type="submit"] {
	min-height: 2.75rem;
	padding: 0 1.1rem;
	border-radius: 999px;
	background: var(--nv-accent);
	color: #fff;
	font-weight: 600;
}

/* ==========================================================================
   Footer + friend links
   ========================================================================== */

.site-footer {
	padding: 2.25rem 0 1.5rem;
	background: var(--nv-ink);
	color: rgba(255, 255, 255, 0.88);
}

.site-footer a:hover,
.site-footer a:focus-visible {
	color: #fff;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.75rem;
}

.footer-title {
	margin-bottom: 0.75rem;
	font-size: 1rem;
	color: #fff;
}

.footer-text {
	font-size: 0.92rem;
	opacity: 0.85;
}

.friend-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.friend-links a {
	display: inline-flex;
	align-items: center;
	min-height: 2.1rem;
	padding: 0.35rem 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	transition: background-color var(--nv-ease), border-color var(--nv-ease);
}

.friend-links a:hover,
.friend-links a:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.45);
}

.site-info {
	margin-top: 1.75rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 0.8125rem;
	opacity: 0.75;
	text-align: center;
}

/* ==========================================================================
   Large screens
   ========================================================================== */

@media (min-width: 768px) {
	:root {
		--nv-container: min(1100px, calc(100% - 2.5rem));
		--nv-header-h: 4rem;
	}

	.menu-toggle {
		display: none;
	}

	.primary-nav {
		display: block;
		position: static;
		border: 0;
		padding: 0;
		background: transparent;
	}

	.primary-menu {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 0.15rem;
		width: auto;
		margin: 0;
	}

	.primary-menu a {
		padding: 0.45rem 0.7rem;
	}

	.hero-swiper {
		height: min(86vh, 760px);
		min-height: 480px;
	}

	.hero-slide {
		align-items: center;
	}

	.hero-slide__content {
		text-align: center;
		padding-block: 2rem 3.5rem;
	}

	.hero-slide__title {
		margin-inline: auto;
	}

	.hero-swiper__nav {
		display: flex;
	}

	.services-grid,
	.events-list,
	.posts-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.25rem;
	}

	.footer-grid {
		grid-template-columns: 1.2fr 1fr;
		gap: 2rem;
	}
}

@media (min-width: 1024px) {
	.services-grid,
	.events-list {
		grid-template-columns: repeat(3, 1fr);
	}

	.posts-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.announcement-card {
		padding: 2rem 2.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
