/*
Theme Name: Sunny School
Theme URI: https://www.olc.cz/
Author: OLC systems
Author URI: https://www.olc.cz/
Description: A bright, friendly and responsive theme for small schools. Logo, search and menu over a large photo with a blue name card and handwritten slogan, pastel news cards with pictures, a welcome section with a photo, icon tiles for class boards and a navy footer.
Version: 1.15.0
Requires at least: 6.0
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: sunny-school
Tags: education, blog, custom-header, custom-logo, custom-menu, featured-images, responsive-layout, translation-ready
*/

/* ---------- Design tokens ---------- */
:root {
	--navy: #17325c;
	--navy-dark: #132a4f;
	--blue: #1f6fd1;
	--blue-dark: #1758ab;
	--yellow: #f5b821;
	--text: #2a3446;
	--text-soft: #5b6578;
	--bg: #fdfaf4;
	--bg-soft: #f6f0e4;
	--border: #ebe3d4;

	/* Pastel tiles */
	--p-pink: #fbd3e0;
	--p-green: #dcefc9;
	--p-yellow: #fde3a3;
	--p-blue: #d3e5fb;
	--p-lilac: #ddd4f5;
	--p-mint: #cbeee0;
	--p-peach: #fdd9c4;
	--p-sky: #cdedf6;
	/* Darker partner colours (icons, dates, links) */
	--d-pink: #b8336a;
	--d-green: #3f7d1e;
	--d-yellow: #a86a00;
	--d-blue: #1f5fae;
	--d-lilac: #5b45a8;
	--d-mint: #1d7a5a;
	--d-peach: #b0521c;
	--d-sky: #16708a;

	--radius: 18px;
	--radius-sm: 12px;
	--shadow: 0 8px 24px rgba(23, 50, 92, 0.10);
	--shadow-strong: 0 14px 34px rgba(23, 50, 92, 0.16);
	--container: 1200px;
	--font: "Open Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
	--font-head: "Nunito", "Open Sans", "Segoe UI", system-ui, sans-serif;
	--font-script: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.7;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--blue-dark); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 800; line-height: 1.2; color: var(--navy); margin: 1.5em 0 0.55em; }
h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto;
	top: 8px; left: 8px; z-index: 1000; padding: 0.75rem 1rem;
	background: #fff; color: var(--navy); border-radius: 8px; box-shadow: var(--shadow);
}

/* Underline bar used under headings */
.section-title, .page-title, .entry-header .entry-title, .welcome .entry-content h2:first-child { position: relative; }
.section-title::after,
.page-title::after,
.entry-header .entry-title::after,
.welcome .entry-content h2:first-child::after {
	content: "";
	display: block;
	width: 76px;
	height: 5px;
	margin-top: 0.55rem;
	border-radius: 3px;
	background: var(--yellow);
}

.button, input[type="submit"] {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	background: var(--blue);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 0.75rem 1.5rem;
	font-family: var(--font-head);
	font-size: 1rem;
	font-weight: 800;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(31, 111, 209, 0.28);
	transition: background 0.2s, transform 0.2s;
}
.button:hover, .button:focus, input[type="submit"]:hover { background: var(--blue-dark); color: #fff; transform: translateY(-2px); }
.button .arrow { width: 18px; height: 18px; transition: transform 0.2s; }
.button:hover .arrow { transform: translateX(3px); }

/* ---------- Search form ---------- */
.search-form {
	display: flex;
	align-items: center;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 4px 16px rgba(23, 50, 92, 0.12);
	padding: 4px 4px 4px 0;
	max-width: 100%;
}
.search-form:focus-within { outline: 3px solid rgba(31, 111, 209, 0.45); }
.search-field {
	border: 0;
	background: transparent;
	font: inherit;
	color: var(--text);
	padding: 0.5rem 1.1rem;
	min-width: 0;
	flex: 1;
}
.search-field:focus { outline: none; }
.search-submit {
	flex: none;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: var(--blue);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.search-submit:hover, .search-submit:focus { background: var(--blue-dark); }
.search-submit svg { width: 19px; height: 19px; }
.page-content .search-form, .no-results .search-form, .error-404 .search-form { max-width: 520px; border: 1px solid var(--border); }

/* ---------- Hero with header on top ---------- */
.hero {
	position: relative;
	/* no overflow:hidden here – the mobile menu panel must be able to extend below the photo */
	background: linear-gradient(180deg, #bfe0fb 0%, #e9f5ff 45%, #cfe9c4 100%);
	color: var(--navy);
}
.hero-slides { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 100%; display: block; }
.hero::before {
	/* light veil behind the logo and menu */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 180px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
	z-index: 1;
	pointer-events: none;
}

.site-header { position: relative; z-index: 20; }
.header-top {
	display: flex;
	align-items: center;
	gap: 12px 20px;
	padding-top: 14px;
	padding-bottom: 12px;
}
.site-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--navy);
	margin-right: auto;
	min-width: 0;
}
.site-logo:hover { color: var(--navy); }
.default-logo { width: 72px; height: auto; flex: none; }
.site-logo .custom-logo { max-height: 64px; width: auto; display: block; }
.site-logo-text { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--font-head); min-width: 0; }
.site-logo-small { font-size: 0.82rem; font-weight: 800; }
.site-logo-name { font-size: 1.55rem; font-weight: 800; }
.site-logo-district { font-size: 0.78rem; font-weight: 700; color: var(--text-soft); margin-top: 0.15rem; }
.header-search { display: none; }

.menu-toggle {
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 0;
	background: var(--blue);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(31, 111, 209, 0.3);
}
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.nav-open .menu-toggle .icon-open { display: none; }
.nav-open .menu-toggle .icon-close { display: block; }

@media (max-width: 380px) {
	.site-logo { gap: 8px; }
	.site-logo .custom-logo { max-height: 50px; }
	.site-logo-small { font-size: 0.72rem; }
	.site-logo-name { font-size: 1.35rem; }
}
@media (min-width: 640px) {
	.header-search { display: block; flex: 0 1 260px; }
	.default-logo { width: 86px; }
	.site-logo-small { font-size: 0.95rem; }
	.site-logo-name { font-size: 1.9rem; }
}

/* ---------- Main navigation ---------- */
.main-navigation ul { list-style: none; margin: 0; padding: 0; }
.main-navigation a { text-decoration: none; color: var(--navy); }

/* Mobile: white panel under the header */
.main-navigation {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 30;
}
.main-navigation .container {
	background: #fff;
	border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: var(--shadow-strong);
	padding: 0.6rem;
	max-height: calc(100vh - 110px);
	max-height: calc(100dvh - 110px);
	overflow-y: auto;
	width: calc(100% - 32px);
}
.nav-open .main-navigation, .no-js .main-navigation { display: block; }
.main-navigation .menu { display: flex; flex-direction: column; gap: 2px; }
.main-navigation li { position: relative; display: flex; flex-wrap: wrap; align-items: center; }
.main-navigation .menu > li > a { flex: 1; padding: 0.7rem 1rem; font-family: var(--font-head); font-weight: 800; border-radius: 999px; }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { background: var(--blue); color: #fff; }
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_ancestor > a { color: var(--blue); }

.submenu-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var(--navy);
	cursor: pointer;
}
.submenu-toggle:hover { background: var(--bg-soft); }
.submenu-toggle span {
	display: block;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.2s;
}
.submenu-open > .submenu-toggle span { transform: translateY(2px) rotate(-135deg); }

.main-navigation .sub-menu,
.main-navigation .children { display: none; width: 100%; padding: 0.2rem 0 0.4rem 0.8rem; }
.main-navigation .submenu-open > .sub-menu,
.main-navigation .submenu-open > .children { display: block; }
.main-navigation .sub-menu a,
.main-navigation .children a { flex: 1; display: block; padding: 0.5rem 1rem; border-radius: 10px; font-size: 0.95rem; }
.main-navigation .sub-menu a:hover,
.main-navigation .children a:hover,
.main-navigation .sub-menu a:focus,
.main-navigation .children a:focus { background: var(--p-blue); }
.main-navigation .sub-menu .current-menu-item > a,
.main-navigation .children .current_page_item > a { background: var(--p-blue); color: var(--navy); }

/* Desktop: translucent white bar with pill items */
@media (min-width: 1000px) {
	.menu-toggle { display: none; }
	.header-search { flex-basis: 250px; }
	.main-navigation {
		display: block;
		position: static;
		background: rgba(255, 255, 255, 0.82);
		backdrop-filter: blur(6px);
		-webkit-backdrop-filter: blur(6px);
		box-shadow: 0 2px 12px rgba(23, 50, 92, 0.08);
	}
	.main-navigation .container {
		background: transparent;
		box-shadow: none;
		border-radius: 0;
		padding: 7px 16px;
		max-height: none;
		overflow: visible;
		width: 100%;
	}
	.main-navigation .menu { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
	.main-navigation .menu > li { flex-wrap: nowrap; }
	.main-navigation .menu > li > a { padding: 0.45rem 0.85rem; font-size: 0.95rem; white-space: nowrap; }
	.main-navigation .menu > li:hover > a { color: var(--blue); }
	.main-navigation .menu > li.current-menu-item:hover > a,
	.main-navigation .menu > li.current_page_item:hover > a { color: #fff; }
	.main-navigation .menu > li > .submenu-toggle { width: 1.6rem; height: 2rem; }
	.main-navigation .submenu-toggle span { width: 6px; height: 6px; }

	.main-navigation .sub-menu,
	.main-navigation .children {
		display: block;
		position: absolute;
		top: calc(100% + 8px);
		left: 0;
		width: auto;
		min-width: 240px;
		padding: 0.5rem;
		background: #fff;
		border-radius: var(--radius-sm);
		box-shadow: var(--shadow-strong);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
		z-index: 10;
	}
	.main-navigation .menu > li > .sub-menu::before,
	.main-navigation .menu > li > .children::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
	.main-navigation li:hover > .sub-menu,
	.main-navigation li:hover > .children,
	.main-navigation li:focus-within > .sub-menu,
	.main-navigation li:focus-within > .children,
	.main-navigation li.submenu-open > .sub-menu,
	.main-navigation li.submenu-open > .children { opacity: 1; visibility: visible; transform: none; }
	.main-navigation .sub-menu li,
	.main-navigation .children li { flex-wrap: nowrap; }
	.main-navigation .sub-menu .submenu-toggle,
	.main-navigation .children .submenu-toggle { width: 2rem; height: 2rem; }
	.main-navigation .sub-menu .submenu-toggle span,
	.main-navigation .children .submenu-toggle span { transform: rotate(-45deg); }
	.main-navigation .sub-menu .sub-menu,
	.main-navigation .children .children { top: -0.5rem; left: 100%; }
	.main-navigation .menu > li:nth-last-child(-n+3) .sub-menu .sub-menu,
	.main-navigation .menu > li:nth-last-child(-n+3) .children .children { left: auto; right: 100%; }
	.main-navigation .menu > li:nth-last-child(-n+2) > .sub-menu,
	.main-navigation .menu > li:nth-last-child(-n+2) > .children { left: auto; right: 0; }
}

/* Hero card */
/* Photo-only header (no text card): height of the photo area below the logo and menu */
.hero-spacer { height: clamp(200px, 58vw, 420px); }
.hero--compact .hero-spacer { height: clamp(110px, 26vw, 220px); }
.hero-inner { position: relative; z-index: 5; }
.hero-card {
	display: inline-block;
	max-width: 100%;
	padding: 1.4rem 1.6rem 1.5rem;
	border-radius: var(--radius);
	background: rgba(23, 76, 150, 0.82);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	color: #fff;
	box-shadow: 0 16px 40px rgba(10, 30, 70, 0.28);
}
.hero-tagline { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(1.1rem, 2.6vw, 1.75rem); line-height: 1.2; }
.hero-title { margin: 0.1rem 0 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(2.6rem, 8vw, 4.4rem); line-height: 1.02; color: #fff; }
.hero-district { margin: 0.25rem 0 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(1rem, 2.2vw, 1.3rem); opacity: 0.92; }
.hero-slogan {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0.5rem 0 0;
	font-family: var(--font-script);
	font-weight: 600;
	font-size: clamp(1.7rem, 4vw, 2.5rem);
	line-height: 1.1;
}
.hero-slogan .heart, .footer-slogan .heart { width: 1.1em; height: 1em; flex: none; }
.hero--compact .hero-card { padding: 1rem 1.3rem; }
.hero--compact .hero-title { font-size: clamp(2rem, 5vw, 2.8rem); }
.hero--compact .hero-tagline { font-size: clamp(1rem, 2vw, 1.25rem); }
@media (min-width: 1000px) {
	.hero--front .hero-spacer { height: min(36vw, 760px); }
	.hero--compact .hero-spacer { height: min(16vw, 300px); }
	.hero-card { padding: 1.8rem 2.2rem 1.9rem; }
}

.hero-arch { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 8px; color: var(--bg); z-index: 4; }
@media (min-width: 640px) { .hero-arch { height: 12px; } }
@media (min-width: 1000px) { .hero-arch { height: 16px; } }
.hero-dots { position: absolute; z-index: 6; left: 50%; bottom: 40px; transform: translateX(-50%); display: flex; gap: 10px; }
.hero-dot { width: 13px; height: 13px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, 0.7); cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.hero-dot.is-active { background: var(--yellow); transform: scale(1.3); }

/* ---------- Sections ---------- */
.section { padding: 2.6rem 0; }
.section-title { text-align: center; margin: 0 0 2rem; font-size: clamp(2rem, 4.5vw, 2.7rem); }
.section-title::after { margin-left: auto; margin-right: auto; width: 90px; }
.section-actions { text-align: center; margin-top: 2rem; }
.front-news { padding-top: 1rem; }

/* News tiles */
.cards-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.news-tile {
	--tile: var(--p-green);
	--tile-dark: var(--d-green);
	position: relative;
	display: flex;
	min-height: 220px;
	background: var(--tile);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: transform 0.2s, box-shadow 0.2s;
}
.news-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-strong); }
.cards-grid > .news-tile:nth-child(3n+2) { --tile: var(--p-yellow); --tile-dark: var(--d-yellow); }
.cards-grid > .news-tile:nth-child(3n+3) { --tile: var(--p-pink); --tile-dark: var(--d-pink); }
.news-tile-image { position: absolute; top: 0; right: 0; bottom: 0; width: 42%; }
.news-tile-image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.news-tile-image::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--tile) 0%, rgba(255, 255, 255, 0) 60%);
	z-index: 1;
}
.news-tile-body { position: relative; z-index: 2; display: flex; flex-direction: column; padding: 1.2rem 1.3rem 1.3rem; width: 100%; }
.news-tile.has-image .news-tile-body { width: 64%; }
.news-tile-date { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--text); }
.news-tile-date svg { width: 20px; height: 20px; color: var(--tile-dark); }
.news-tile-title { margin: 0.5rem 0 0.5rem; font-size: 1.25rem; line-height: 1.25; }
.news-tile-title a { color: var(--navy); text-decoration: none; }
.news-tile-title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.news-tile-excerpt { font-size: 0.88rem; color: var(--text); flex: 1; }
.news-tile-excerpt p { margin: 0 0 0.8rem; }
.news-tile-more { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 0.88rem; color: var(--tile-dark); text-decoration: underline; text-underline-offset: 3px; }
.news-tile-more .arrow { width: 16px; height: 16px; }

/* Welcome */
.welcome-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .welcome-grid { grid-template-columns: 1.15fr 1fr; gap: 3rem; } }
.welcome .entry-content > h2:first-child { margin-top: 0; font-size: clamp(2rem, 4.5vw, 2.8rem); }
.welcome .entry-content { font-size: 1.05rem; }
.welcome-text .button { margin-top: 0.6rem; }
.welcome-grid--centered { grid-template-columns: 1fr !important; max-width: 860px; text-align: center; }
.welcome-grid--centered .entry-content h2:first-child::after { margin-left: auto; margin-right: auto; }
.welcome-photo img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-strong); }

/* Icon tiles (class boards) */
.tiles-section { padding-top: 0.5rem; padding-bottom: 3.5rem; }
.home-tiles {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.home-tiles > li:nth-child(8n+1) { --tile: var(--p-pink); --tile-dark: var(--d-pink); }
.home-tiles > li:nth-child(8n+2) { --tile: var(--p-green); --tile-dark: var(--d-green); }
.home-tiles > li:nth-child(8n+3) { --tile: var(--p-yellow); --tile-dark: var(--d-yellow); }
.home-tiles > li:nth-child(8n+4) { --tile: var(--p-blue); --tile-dark: var(--d-blue); }
.home-tiles > li:nth-child(8n+5) { --tile: var(--p-lilac); --tile-dark: var(--d-lilac); }
.home-tiles > li:nth-child(8n+6) { --tile: var(--p-mint); --tile-dark: var(--d-mint); }
.home-tiles > li:nth-child(8n+7) { --tile: var(--p-peach); --tile-dark: var(--d-peach); }
.home-tiles > li:nth-child(8n+8) { --tile: var(--p-sky); --tile-dark: var(--d-sky); }
.home-tiles a {
	display: flex;
	align-items: center;
	gap: 1rem;
	height: 100%;
	min-height: 84px;
	padding: 0.9rem 1.1rem;
	background: var(--tile);
	border-radius: var(--radius-sm);
	box-shadow: 0 4px 12px rgba(23, 50, 92, 0.08);
	color: var(--navy);
	text-decoration: none;
	font-family: var(--font-head);
	font-weight: 800;
	font-size: 1.15rem;
	line-height: 1.2;
	transition: transform 0.2s, box-shadow 0.2s;
}
.home-tiles a:hover, .home-tiles a:focus { transform: translateY(-3px); box-shadow: var(--shadow-strong); color: var(--navy); }
.tile-icon { flex: none; width: 52px; height: 52px; color: var(--navy); }
.tile-icon svg { width: 100%; height: 100%; }
.tile-text { flex: 1; }
.tile-text small { display: block; font-family: var(--font); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tile-dark); margin-bottom: 0.15rem; }
.home-tiles .chevron { flex: none; width: 20px; height: 20px; color: var(--navy); transition: transform 0.2s; }
.home-tiles a:hover .chevron { transform: translateX(3px); }

/* Child page tiles + link-grid lists in content */
.link-grid {
	list-style: none;
	margin: 1.6rem 0;
	padding: 0 !important;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}
.link-grid > li { margin: 0; }
.link-grid > li:nth-child(8n+1) { --tile: var(--p-pink); }
.link-grid > li:nth-child(8n+2) { --tile: var(--p-green); }
.link-grid > li:nth-child(8n+3) { --tile: var(--p-yellow); }
.link-grid > li:nth-child(8n+4) { --tile: var(--p-blue); }
.link-grid > li:nth-child(8n+5) { --tile: var(--p-lilac); }
.link-grid > li:nth-child(8n+6) { --tile: var(--p-mint); }
.link-grid > li:nth-child(8n+7) { --tile: var(--p-peach); }
.link-grid > li:nth-child(8n+8) { --tile: var(--p-sky); }
.link-grid a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	height: 100%;
	min-height: 70px;
	padding: 0.9rem 1.1rem;
	background: var(--tile, var(--p-blue));
	color: var(--navy);
	border-radius: var(--radius-sm);
	font-family: var(--font-head);
	font-weight: 800;
	line-height: 1.25;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(23, 50, 92, 0.08);
	transition: transform 0.2s, box-shadow 0.2s;
}
.link-grid a::after { content: "\203A"; font-size: 1.6rem; line-height: 1; }
.link-grid a:hover, .link-grid a:focus { transform: translateY(-3px); box-shadow: var(--shadow-strong); color: var(--navy); }
.link-grid small { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; }

/* ---------- Inner pages ---------- */
.site-content { padding: 1.5rem 0 4rem; }
.front-page-content { padding: 0; }
.content-area.has-sidebar { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .content-area.has-sidebar { grid-template-columns: minmax(0, 1fr) 300px; } }
.page-header { margin-bottom: 2rem; }
.page-title { margin-top: 0; }
.archive-description { color: var(--text-soft); }
.error-404 .page-title::after, .no-results .page-title::after { margin-left: auto; margin-right: auto; }

.entry-header .entry-title { margin-top: 0; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.9rem; color: var(--text-soft); margin-bottom: 1.2rem; align-items: center; }
.entry-thumbnail { margin: 0 0 1.6rem; }
.entry-thumbnail img { display: block; width: auto; max-width: 100%; max-height: 720px; margin: 0 auto; border-radius: var(--radius); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content ul { padding-left: 1.3rem; }
.entry-content li { margin-bottom: 0.25rem; }
.entry-content blockquote { margin: 1.5rem 0; padding: 1rem 1.4rem; border-left: 6px solid var(--yellow); border-radius: 0 12px 12px 0; background: var(--bg-soft); }
.entry-content table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--border); padding: 0.6rem 0.85rem; text-align: left; }
.entry-content tr:last-child th, .entry-content tr:last-child td { border-bottom: 0; }
.entry-content thead th { background: var(--p-blue); color: var(--navy); }
.entry-content tbody th { background: var(--bg-soft); color: var(--navy); width: 38%; vertical-align: top; }
.entry-footer { margin-top: 2rem; font-size: 0.92rem; }

.tag-links a, .cat-pill {
	display: inline-block;
	background: var(--p-blue);
	color: var(--navy);
	padding: 0.15rem 0.75rem;
	border-radius: 999px;
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 700;
	margin: 0 0.25rem 0.25rem 0;
}
.tag-links a:hover, .cat-pill:hover { background: var(--p-yellow); color: var(--navy); }
.alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 0.88rem; color: var(--text-soft); text-align: center; }

/* News list (archive) cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.news-card {
	--card: var(--p-green);
	--card-dark: var(--d-green);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: transform 0.2s, box-shadow 0.2s;
}
.news-grid > .news-card:nth-child(3n+2) { --card: var(--p-yellow); --card-dark: var(--d-yellow); }
.news-grid > .news-card:nth-child(3n+3) { --card: var(--p-pink); --card-dark: var(--d-pink); }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-strong); }
.news-card-thumb { display: block; aspect-ratio: 16 / 10; background: var(--card); }
.news-card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.news-card-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.6rem; color: var(--card-dark); opacity: 0.5; }
.news-card-body { padding: 1.1rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; background: linear-gradient(180deg, var(--card) 0, #fff 6px); }
.news-card-date { font-size: 0.82rem; font-weight: 700; color: var(--card-dark); }
.news-card-title { font-size: 1.2rem; margin: 0.3rem 0 0.5rem; }
.news-card-title a { color: var(--navy); text-decoration: none; }
.news-card-title a:hover { color: var(--blue); }
.news-card-excerpt { color: var(--text-soft); font-size: 0.95rem; flex: 1; }
.news-card-excerpt p { margin: 0 0 0.8rem; }
.read-more { font-weight: 700; text-decoration: underline; font-size: 0.9rem; color: var(--card-dark); }
.read-more::after { content: " \2192"; }

/* Pagination & post navigation */
.pagination, .post-navigation { margin-top: 2.5rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 2.6rem; height: 2.6rem; padding: 0 0.8rem; border-radius: 999px;
	background: var(--bg-soft); color: var(--navy); text-decoration: none; font-weight: 700;
}
.page-numbers.current { background: var(--blue); color: #fff; }
a.page-numbers:hover { background: var(--p-blue); color: var(--navy); }
.post-navigation .nav-links { justify-content: space-between; gap: 1rem; }
.post-navigation a { display: block; background: var(--bg-soft); padding: 0.8rem 1.1rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--navy); font-weight: 700; }
.post-navigation a:hover { background: var(--p-blue); }
.post-navigation .meta-nav { display: block; font-size: 0.8rem; font-weight: 400; color: var(--text-soft); }

/* Sidebar */
.widget-area .widget { background: var(--bg-soft); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.6rem; }
.widget-title, .widget h2 { font-size: 1.15rem; margin: 0 0 0.8rem; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 0.35rem 0; border-bottom: 1px dashed var(--border); }
.widget li:last-child { border-bottom: 0; }

/* Comments */
.comments-area { margin-top: 2.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { background: var(--bg-soft); padding: 1rem 1.2rem; margin-bottom: 1rem; border-radius: var(--radius-sm); }
.comment-meta { font-size: 0.88rem; color: var(--text-soft); }
.comment-author .avatar { border-radius: 50%; vertical-align: middle; margin-right: 0.5rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 0.6rem 0.8rem; border: 2px solid var(--border); border-radius: 10px; font: inherit;
}

/* ---------- Footer ---------- */
.site-footer { position: relative; background: #1b3160; color: #e7ecf6; margin-top: 3rem; }
.site-footer a { color: #fff; }
.footer-wave { position: absolute; left: 0; right: 0; top: -40px; width: 100%; height: 41px; color: #1b3160; }
.footer-main { display: grid; gap: 2rem; padding-top: 2.4rem; padding-bottom: 2rem; }
@media (min-width: 800px) {
	.footer-main { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0; }
	.footer-col { padding: 0 2rem; border-left: 1px solid rgba(255, 255, 255, 0.22); }
	.footer-col:first-child { padding-left: 0; border-left: 0; }
	.footer-col--search { flex: 1.3; }
	.footer-main:has(.footer-col:nth-child(3)) { grid-template-columns: 1fr 0.7fr 1.3fr; }
	.footer-main:not(:has(.footer-col:nth-child(3))) { grid-template-columns: 1fr 1.3fr; }
}
.footer-heading { color: #fff; font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; margin: 0 0 1rem; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; }
.contact-list svg { flex: none; width: 20px; height: 20px; color: #fff; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.footer-extra { font-size: 0.9rem; margin-top: 0.8rem; color: #c9d3e6; }
.footer-extra p { margin: 0; }
.footer-bottom-wrap { background: #162a54; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; font-size: 0.88rem; }
.footer-bottom-left { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0; }
.footer-menu li + li::before { content: "|"; margin: 0 0.75rem; color: rgba(255, 255, 255, 0.4); }
.footer-slogan {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-family: var(--font-script);
	font-weight: 600;
	font-size: 1.9rem;
	line-height: 1;
	color: #fff;
	transform: rotate(-4deg);
	padding-bottom: 0.3rem;
}
.footer-slogan::after { content: ""; position: absolute; left: 0; right: 1.2em; bottom: -0.15rem; height: 4px; border-radius: 4px; background: var(--yellow); transform: rotate(-2deg); }

.footer-marks { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-top: 1.4rem; }
.footer-social, .footer-badge { display: inline-flex; color: #fff; opacity: 0.35; transition: opacity 0.2s; }
.footer-social svg { width: 40px; height: 40px; }
.footer-badge img { display: block; width: 62px; height: auto; }
a.footer-social:hover, a.footer-social:focus, a.footer-badge:hover, a.footer-badge:focus { opacity: 0.7; color: #fff; }

/* ---------- 404 / no results ---------- */
.error-404, .no-results { text-align: center; padding: 1rem 0; }
.error-404 .search-form, .no-results .search-form { margin: 1.5rem auto; }
.error-404 .big-number { font-family: var(--font-head); font-size: clamp(4rem, 15vw, 8rem); font-weight: 800; line-height: 1; color: var(--blue); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}
