/*
Theme Name: Glinstedt Vereinsmagazin
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: glinstedt-vereinsmagazin
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--lg);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* === design tokens === */
:root {
	--ink: var(--wp--preset--color--text);
	--cream: var(--wp--preset--color--background);
	--moss: var(--wp--preset--color--primary);
	--hairline: var(--wp--preset--color--border);
}

/* === masthead === */
.masthead-crest-img img {
	width: 118px;
	height: auto;
	max-width: 100%;
}
.masthead-title {
	font-family: var(--wp--preset--font-family--cormorant-garamond);
	font-size: clamp(2.3rem, 6.4vw, 4.4rem);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin-block: 0;
}
.masthead-title a {
	color: var(--ink);
	text-decoration: none;
}
.masthead-title a:hover {
	color: var(--moss);
}
.masthead-rule {
	border-top: 1px solid var(--hairline);
	border-bottom: 1px solid var(--hairline);
}
.masthead-rule .wp-block-navigation {
	flex-wrap: wrap;
	gap: clamp(14px, 3vw, 28px);
}
.masthead-rule .wp-block-navigation .wp-block-navigation-item__content {
	color: var(--ink);
	text-decoration: none;
}
.masthead-rule .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--moss);
}
.masthead-rule .current-menu-item > .wp-block-navigation-item__content {
	color: var(--moss);
}
.masthead-descriptor {
	margin: 0;
	letter-spacing: 0.18em;
}

/* === footer === */
.site-footer {
	border-top: 1px solid var(--hairline);
}
.footer-copy {
	margin: 0;
}
.footer-links {
	gap: clamp(16px, 3vw, 32px);
}
.footer-link {
	margin: 0;
}
.footer-link a {
	color: var(--moss);
	text-decoration: none;
}
.footer-link a:hover {
	text-decoration: underline;
}

/* === editorial photography treatment (never the crest) === */
.wp-block-image.photo img {
	filter: sepia(0.08) contrast(1.02);
}

/* === lead reading columns === */
.reading-cols {
	column-count: 3;
	column-gap: 2.5rem;
	column-rule: 1px solid var(--hairline);
}
.reading-cols > * {
	break-inside: avoid;
}

/* === section rules === */
.ruled-top {
	border-top: 1px solid var(--hairline);
}
.editorial-content .ruled-top {
	padding-block-start: var(--wp--preset--spacing--md);
}
.section-label {
	margin: 0;
	letter-spacing: 0.18em;
	color: var(--moss);
}
.section-title {
	font-family: var(--wp--preset--font-family--cormorant-garamond);
	font-size: clamp(1.9rem, 4vw, 2.6rem);
	font-weight: 400;
	line-height: 1.1;
	margin: 0;
}

/* === companions (calendar + news) === */
.companion-head {
	border-top: 1px solid var(--hairline);
	padding-top: 16px;
}
.companion .wp-block-list,
.companion p {
	font-size: 15px;
	line-height: 1.55;
}
.companion a {
	color: var(--moss);
}

/* === club grid === */
.club-cell {
	border-top: 1px solid var(--hairline);
	padding-top: 16px;
}

/* === lead === */
.home-lead {
	padding-block: var(--wp--preset--spacing--lg) var(--wp--preset--spacing--md);
}
.lead-h1 {
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	max-width: 22ch !important;
	margin-bottom: var(--wp--preset--spacing--md);
}
.home-lead-photo img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 7;
	object-fit: cover;
}
.home-lead .reading-cols {
	margin-top: var(--wp--preset--spacing--md);
}
.reading-cols p {
	margin-top: 0;
}

/* === directions: plugin-managed consent, in the editorial palette === */
.home-directions .embed-privacy-container {
	border: 1px solid var(--hairline);
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--md);
}
.home-directions .embed-privacy-container:not(.is-disabled) {
	padding: 0;
}
.home-directions .embed-privacy-container .embed-privacy-overlay,
.home-directions .embed-privacy-container .embed-privacy-overlay:hover {
	background: var(--cream);
	color: var(--ink);
	min-height: 240px;
	padding: var(--wp--preset--spacing--md) 0 0;
}
.home-directions .embed-privacy-container .embed-privacy-inner,
.home-directions .embed-privacy-container .embed-privacy-inner p,
.home-directions .embed-privacy-container .embed-privacy-inner label {
	color: var(--ink);
}
.home-directions .embed-privacy-container .embed-privacy-overlay a {
	color: var(--moss);
}
.home-directions .embed-privacy-logo {
	display: none;
}
.home-directions .embed-privacy-container.is-disabled > .embed-privacy-enable {
	position: relative;
	inset: auto;
	width: auto;
	height: auto;
	margin: 0;
	clip: auto;
	clip-path: none;
	overflow: visible;
	padding: 15px 28px;
	border: 0;
	border-radius: 2px;
	background: var(--moss);
	color: var(--cream);
	font: inherit;
	cursor: pointer;
}
.home-directions iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	border: 0;
}

/* === home sections === */
.home-section {
	padding-block: var(--wp--preset--spacing--lg);
	border-top: 1px solid var(--hairline);
}
.entry-content > .home-section,
.entry-content > .home-lead {
	margin-block-start: 0;
}
.vsel-no-events {
	font-size: 15px;
	color: var(--moss);
	margin: 0;
}
.home-section .section-label {
	margin-bottom: var(--wp--preset--spacing--md);
}
.companions {
	gap: clamp(32px, 6vw, 96px) !important;
}
.section-title {
	margin-bottom: var(--wp--preset--spacing--md) !important;
}
.news-list .wp-block-post-template {
	list-style: none;
	padding: 0;
	margin: 0;
}
.news-list .wp-block-post-template > li {
	border-top: 1px solid var(--hairline);
	padding-block: 14px;
	margin: 0;
}
.news-date {
	font-variant-numeric: tabular-nums;
	color: var(--moss);
	letter-spacing: 0.08em;
}
.news-title {
	font-size: 1.35rem;
	margin: 4px 0 0;
}
.news-title a,
.club-cell h3 a {
	color: var(--ink);
	text-decoration: none;
}
.news-title a:hover,
.club-cell h3 a:hover {
	color: var(--moss);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.club-cell h3 {
	font-size: 1.9rem;
	margin: 0 0 8px;
}
.album-spread img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}
.album-spread .wp-block-column:first-child img {
	aspect-ratio: 8 / 5;
}
.album-spread figcaption {
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: left;
	color: var(--moss);
}
.home-closing p {
	font-size: 1.15rem;
}

/* === editorial subpages === */
.edition-heading {
	border-bottom: 1px solid var(--hairline);
	padding-bottom: var(--wp--preset--spacing--md);
	margin-bottom: var(--wp--preset--spacing--lg);
}
.edition-title { margin-block: 16px 24px; overflow-wrap: anywhere; }
.edition-heading .section-label { font-weight: 500; }
.article-date { color: var(--moss); font-size: 14px; font-variant-numeric: tabular-nums; }
.editorial-content { line-height: 1.75; overflow-wrap: anywhere; }
.editorial-content h2,
.editorial-content h3,
.editorial-content h4 { margin-top: 40px; margin-bottom: 16px; }
.editorial-content img { max-width: 100%; height: auto; }
.editorial-content li { margin-bottom: 12px; }
.editorial-content ul,
.editorial-content ol { padding-left: 26px; }
.editorial-content table { width: 100%; border-collapse: collapse; }
.editorial-content td,
.editorial-content th { padding: 12px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
.editorial-content .wp-block-table { overflow-x: auto; }
.article-photo img { height: auto; max-width: 100%; }
.edition-bottom {
	border-top: 1px solid var(--hairline);
	padding-top: var(--wp--preset--spacing--md);
	margin-top: var(--wp--preset--spacing--lg);
}
.article-navigation { margin-top: 24px; gap: 32px; }
.article-navigation > * { flex-basis: 45%; overflow-wrap: anywhere; }
.edition-archive .wp-block-post-template { list-style: none; padding: 0; margin: 0; }
.edition-archive .wp-block-post-template > li { margin-block-start: 0; }
.archive-entry { padding-block: 32px; border-bottom: 1px solid var(--hairline); }
.archive-entry:first-child { padding-top: 24px; }
.archive-title { margin-block: 8px 16px; }
.archive-title a { color: var(--ink); text-decoration: none; }
.archive-excerpt { line-height: 1.7; }
.edition-archive .wp-block-query-pagination { margin-top: 32px; padding-block: 16px; }
.calendar-list h2,
.event-history h2 { margin-top: 0; }
.event-history { padding-top: 32px; margin-top: 48px; border-top: 1px solid var(--hairline); }
/* Event Organiser: functional month grid within the editorial palette. */
.calendar-page .eo-fullcalendar {
	font-family: var(--wp--preset--font-family--source-sans-3);
	font-variant-numeric: tabular-nums;
	font-size: 16px;
	margin-block: 32px 24px;
}
.calendar-page .eo-fullcalendar .fc-toolbar { margin-bottom: 16px; }
.calendar-page .eo-fullcalendar .fc-toolbar h2 {
	font-family: var(--wp--preset--font-family--cormorant-garamond);
	font-size: 32px;
	line-height: 44px;
	color: var(--ink);
}
.calendar-page .eo-fullcalendar .fc-button {
	min-width: 44px;
	height: 44px;
	padding-inline: 16px;
	font-family: inherit;
	font-size: 16px;
	background: var(--cream);
	color: var(--ink);
	border: 1px solid var(--hairline);
	border-radius: 0;
	box-shadow: none;
	text-shadow: none;
}
.calendar-page .eo-fullcalendar .fc-button:focus-visible {
	outline: 2px solid var(--moss);
	outline-offset: 3px;
}
.calendar-page .eo-fullcalendar .fc-state-disabled { opacity: .6; }
.calendar-page .eo-fullcalendar .fc-widget-header,
.calendar-page .eo-fullcalendar .fc-widget-content,
.calendar-page .eo-fullcalendar td,
.calendar-page .eo-fullcalendar th { border-color: var(--hairline); }
.calendar-page .eo-fullcalendar .fc-widget-header,
.calendar-page .eo-fullcalendar .fc-widget-content,
.calendar-page .eo-fullcalendar .fc-agendaDayList-view td { background: var(--cream); }
.calendar-page .eo-fullcalendar th { padding-block: 10px; font-weight: 600; }
.calendar-page .eo-fullcalendar .fc-day-number { padding: 8px; }
.calendar-page .eo-fullcalendar.fc-unthemed td.fc-today { background: #e4e8dd; }
.calendar-page .eo-fullcalendar-loading {
	position: relative;
	background: var(--cream);
	font-size: 15px;
	margin-block: 12px;
}
.calendar-page .eo-fullcalendar .fc-event {
	background: var(--moss);
	border-color: var(--moss);
	color: var(--cream);
	border-radius: 0;
	padding: 4px;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
}
.calendar-page .calendar-help { font-size: 15px; }
.calendar-page .eo-events,
.home-events .eo-events { list-style: none; padding: 0; margin: 24px 0; }
.calendar-page .eo-events li,
.home-events .eo-events li { padding-block: 16px; border-bottom: 1px solid var(--hairline); }
.calendar-page .eo-events .eo-no-events,
.home-events .eo-events .eo-no-events { padding-top: 0; border-bottom: none; }
.legacy-event-query .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.legacy-event-query .archive-entry { padding-block: 24px; }
.legacy-event-query .wp-block-post-title { margin-block: 0 16px; font-size: 28px; }
.legacy-event-query .wp-block-query-pagination { margin-top: 24px; padding-block: 16px; }
.legacy-event-details { font-size: 16px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.legacy-event-details p { margin-block: 0 12px; }
@media (max-width: 514px) {
	.calendar-page .eo-fullcalendar .fc-toolbar h2 { font-size: 28px; }
	.calendar-page .eo-fullcalendar .fc-agendaDayList-view td { padding: 8px; }
}
.year-gallery { border-top: 1px solid var(--hairline); padding-top: 24px; margin-top: 48px; }
.year-gallery h2 { font-variant-numeric: tabular-nums; margin: 0 0 24px; }
.photo-archive .gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.photo-archive .gallery.gallery-columns-1 { grid-template-columns: minmax(0,1fr); }
.photo-archive .gallery-item { float: none; width: auto; margin: 0; }
.photo-archive .gallery-icon img { width: 100%; height: auto; border: none; }
.photo-archive .gallery br { display: none; }
.photo-archive .gallery-caption { text-align: left; font-size: 14px; margin-top: 8px; }
.photo-archive .gallery a { display: block; }
.site-footer { padding-block: 24px; }
.footer-links { flex-wrap: wrap !important; }
@media (max-width: 781px) {
	.wp-site-blocks main.editorial-page { padding-block: 32px 48px; }
	.edition-heading { margin-bottom: 32px; }
	.article-navigation > * { flex-basis: 100%; }
	.photo-archive .gallery { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
	.editorial-content td,
	.editorial-content th {
		padding: 8px;
		font-size: 15px;
		line-height: 1.5;
		hyphens: auto;
	}
}
/* Keep legacy youth slideshow controls visible rather than hover-only. */
#metaslider_container_658 .nivo-controlNav {
	position: static;
	background: none;
	opacity: 1 !important;
	height: auto;
	padding-block: 12px;
	border-top: 1px solid var(--hairline);
	text-align: center;
}
#metaslider_container_658 .nivo-controlNav a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 4px;
	padding: 0;
	background: var(--cream);
	border: 1px solid var(--hairline);
	color: var(--ink);
	text-indent: 0;
	font-size: 17px;
	font-weight: 400;
}
#metaslider_container_658 .nivo-controlNav a.active {
	background: var(--moss);
	color: var(--cream);
}
/* === responsive === */
@media (max-width: 781px) {
	.album-spread img {
		aspect-ratio: 4 / 3;
	}
	.home-section {
		padding-block: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
	}
	.reading-cols {
		column-count: 1;
		column-rule: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
