/*
Theme Name: École de l'Abbaye
Theme URI: https://www.ecole-abbaye-saumur.org/
Description: Child theme of Twenty Twenty-Five carrying the school's identity — the layout, palette and typography of the previous Jimdo site, measured from the live pages.
Author: École de l'Abbaye
Template: twentytwentyfive
Version: 2.1.4
Requires at least: 6.5
Tested up to: 6.8
License: GPL-2.0-or-later
Text Domain: eas
*/

/* ---------------------------------------------------------------------------
   Page frame — measured on the Jimdo site: a photograph fixed behind
   everything, a sage strip across the top, and a white 960px column carrying
   banner, menu and content.
   ------------------------------------------------------------------------ */
body {
	background: #454545;
}
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background: url("assets/background.jpg") center / cover no-repeat;
}
.wp-site-blocks {
	border-top: 25px solid rgba(156, 199, 161, 0.9);
}
.wp-site-blocks > * {
	margin-block-start: 0;
}
.eas-banner,
.eas-menu,
.eas-card {
	max-width: 960px;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
}
.eas-banner {
	padding: 30px 5px 20px;
	margin-bottom: 0;
	text-align: center;
}
.eas-banner .wp-block-image {
	margin: 0;
	background: #fff;
}
.eas-banner img {
	display: block;
	width: 100%;
	height: auto;
}
.eas-menu {
	background: #fff;
	padding: 0 22px;
}
.eas-menu .wp-block-navigation {
	border-bottom: 1px solid rgba(156, 199, 161, 0.9);
	gap: 0;
}
.eas-card {
	background: #fff;
	padding: 20px 25px 25px;
	margin-bottom: 60px !important;
	min-height: 40vh;
}
.eas-card > .wp-block-post-content > * {
	margin-block-start: 1rem;
	margin-block-end: 0;
}
.eas-card h1,
.eas-card h2,
.eas-card h3 {
	padding-top: 0.5em;
}
.eas-card::after {
	content: "";
	display: block;
	clear: both;
}
.wp-block-separator {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--primary);
}

/* ---------------------------------------------------------------------------
   Menu: Verdana 19px, centred, the current entry in sage, sage drop-downs.
   ------------------------------------------------------------------------ */
.eas-menu .wp-block-navigation__container {
	justify-content: center;
	gap: 0;
}
.eas-menu .wp-block-navigation-item__content {
	padding: 15px !important;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast);
}
.eas-menu .wp-block-navigation-item__content:hover,
.eas-menu .current-menu-item > .wp-block-navigation-item__content,
.eas-menu .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary);
}
.eas-menu .wp-block-navigation__submenu-icon {
	display: none;
}
.eas-menu .wp-block-navigation .wp-block-navigation__submenu-container {
	background: rgba(156, 199, 161, 0.95);
	border: 0;
	border-radius: 4px;
	min-width: 250px;
	padding: 4px 0;
}
.eas-menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: #fff !important;
	padding: 5px 10px !important;
	font-size: 18px;
}
.eas-menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--contrast) !important;
}

/* ---------------------------------------------------------------------------
   Footer: dark band across the full width, everything centred, in white.
   ------------------------------------------------------------------------ */
.eas-footer {
	background: #454545;
	color: #fff;
	font-family: var(--wp--preset--font-family--ui);
	text-align: center;
	padding: 25px 20px 30px;
}
.eas-footer a {
	color: #fff;
	text-decoration: none;
}
.eas-footer .wp-block-social-links {
	justify-content: center;
}
.eas-footer .eas-partners {
	justify-content: center;
	align-items: center;
	gap: 30px;
	margin: 20px 0 40px;
}
.eas-footer .eas-partners .wp-block-column {
	flex: 0 0 auto;
}
.eas-footer .eas-partners img {
	max-height: 110px;
	width: auto;
}
.eas-footer .eas-partners {
	flex-wrap: wrap !important;
}
.eas-footer .eas-legal {
	max-width: 910px;
	margin: 30px auto 0;
	text-align: left;
	font-family: var(--wp--preset--font-family--body);
}
.eas-footer .eas-legal a {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Content
   ------------------------------------------------------------------------ */
/* The parent theme resets bold to normal weight; a third of the school's
   emphasis is bold. */
strong,
b {
	font-weight: 700;
}

/* As in Jimdo's editor, consecutive lines of text sit tight; the gaps between
   sections are the spacers and blank lines the school put there. */
.wp-block-post-content p {
	margin-block-start: 0 !important;
	margin-block-end: 0;
}
.wp-block-post-content .wp-block-spacer,
.wp-block-post-content .wp-block-spacer + * {
	margin-block-start: 0 !important;
}

.wp-block-image img {
	height: auto;
	max-width: 100%;
}
.wp-block-image figcaption {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
}
.wp-block-image.alignleft {
	margin: 0.3em 1.5em 1em 0;
}

/* Nothing pasted into a page — a hot-linked picture, an old embed — may be
   wider than the screen it is read on. !important: pasted text carries its
   own inline max-width. */
.wp-block-post-content img,
.wp-block-post-content video,
.wp-block-post-content iframe {
	max-width: 100% !important;
}
.wp-block-post-content img {
	height: auto;
}
.wp-block-group iframe {
	border-radius: 4px;
}

/* Jimdo's slideshow galleries: one photograph at a time, swiped or stepped
   with the arrows that slider.js adds. */
.wp-block-gallery.eas-slider {
	position: relative;
	display: flex;
	flex-wrap: nowrap !important;
	gap: 0 !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}
.wp-block-gallery.eas-slider > figure.wp-block-image {
	flex: 0 0 100% !important;
	width: 100% !important;
	scroll-snap-align: center;
	margin: 0 !important;
}
.wp-block-gallery.eas-slider > figure.wp-block-image {
	height: 100%;
	align-self: stretch;
}
.wp-block-gallery.eas-slider > figure.wp-block-image img {
	width: 100%;
	height: 100% !important;
	max-height: 640px;
	object-fit: contain !important;
}
.eas-slider-wrap {
	position: relative;
}
.eas-slider-wrap > button {
	position: absolute;
	top: calc(50% - 27px);
	transform: translateY(-50%);
	z-index: 2;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.7);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.eas-slider-thumbs {
	display: flex;
	gap: 4px;
	margin-top: 4px;
	overflow-x: auto;
	scrollbar-width: thin;
}
.eas-slider-thumbs button {
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	opacity: 0.55;
}
.eas-slider-thumbs button[aria-current="true"],
.eas-slider-thumbs button:hover {
	opacity: 1;
}
.eas-slider-thumbs img {
	display: block;
	height: 50px;
	width: auto;
}
.eas-slider-wrap > button.prev { left: 8px; }
.eas-slider-wrap > button.next { right: 8px; }

/* ---------------------------------------------------------------------------
   Phones: the white column takes the full width, columns stack.
   ------------------------------------------------------------------------ */
@media (max-width: 781px) {
	.eas-banner {
		padding: 20px 40px;
	}
	.eas-menu {
		padding: 6px 15px;
	}
	.eas-menu .wp-block-navigation {
		border-bottom: 0;
		justify-content: flex-end;
	}
	/* The opened menu is a white sheet: the white-on-sage drop-down colours
	   would leave every sub-entry invisible on it. */
	.eas-menu .is-menu-open .wp-block-navigation-item__content {
		padding: 8px 15px !important;
	}
	.eas-menu .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		font-weight: 700;
	}
	.eas-menu .wp-block-navigation .is-menu-open .wp-block-navigation__submenu-container {
		background: transparent;
		min-width: 0;
		padding: 0 0 8px;
	}
	.eas-menu .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		color: var(--wp--preset--color--contrast) !important;
		padding: 4px 15px !important;
		font-size: 16px;
	}
	.eas-menu .is-menu-open .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content {
		color: var(--wp--preset--color--primary-dark) !important;
	}
	.eas-card {
		padding: 15px 15px 25px;
		margin-bottom: 0 !important;
	}
	.eas-footer .eas-partners img {
		max-height: 70px;
	}
	.eas-card h1 {
		font-size: 30px;
	}
	.eas-card h2 {
		font-size: 26px;
	}
	.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
		flex-basis: 100% !important;
	}
	.wp-block-image.alignleft {
		float: none;
		margin: 0 auto 1em;
	}
}
