/*
Theme Name: Vallensbæk Badminton
Theme URI: https://www.vallensbaek-badminton.dk/
Author: Vallensbæk Badminton
Description: A lightweight block child theme for Vallensbæk Badminton, based on Twenty Twenty-Five.
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
Version: 0.1.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vallensbaek-badminton
Template: twentytwentyfive
*/

/*
 * Keep this file small and theme-focused. Global design tokens belong in
 * theme.json; these rules cover responsive behavior and details that the
 * block design tools cannot express clearly.
 */

html {
	scroll-behavior: smooth;
}

body {
	text-wrap: pretty;
}

a {
	transition: color 160ms ease, background-color 160ms ease;
}

.club-site-header {
	position: relative;
	z-index: 20;
	box-shadow: 0 1px 0 rgb(17 17 17 / 8%);
}

.club-site-logo {
	flex: 0 1 250px;
	margin: 0;
}

.club-site-logo img {
	display: block;
	height: auto;
	max-width: min(250px, 52vw);
	width: 100%;
}

.club-site-header .wp-block-navigation-item__content {
	text-underline-offset: 0.35em;
}

.club-home-hero {
	min-height: clamp(280px, 38vw, 520px);
}

.club-home-hero .wp-block-cover__image-background {
	object-position: center;
}

.club-home-hero__title {
	max-width: 13ch;
	text-wrap: balance;
}

.club-news .wp-block-post-template {
	display: grid;
	grid-auto-columns: minmax(16rem, 82vw);
	grid-auto-flow: column;
	grid-template-columns: none !important;
	overflow-x: auto;
	padding: 0 0 0.75rem;
	scroll-snap-type: inline mandatory;
	scrollbar-color: var(--wp--preset--color--club-blue) transparent;
}

/* Keep the off-screen cards inside their own horizontal scroll container. */
.club-news {
	overflow-x: clip;
}

.club-news .wp-block-post {
	height: 100%;
	scroll-snap-align: start;
}

.club-news-card {
	box-sizing: border-box;
	height: 100%;
}

.club-section-label {
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.club-footer-heading {
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

.club-site-footer a {
	color: inherit;
	overflow-wrap: anywhere;
}

.club-site-footer .wp-block-column,
.club-site-footer .wp-block-navigation {
	min-width: 0;
}

.club-site-footer .wp-block-navigation-item__content::after {
	color: var(--wp--preset--color--club-mint);
	content: " ›";
}

.club-site-footer__partner img {
	height: auto;
	max-width: 240px;
}

.club-iframe-frame iframe {
	border: 0;
	display: block;
	max-width: 100%;
	width: 100%;
}

/* Older posts contain long URLs and decorative character runs. */
.wp-block-post-content {
	overflow-wrap: anywhere;
}

/* Preserve the readable success-state color from the previous theme. */
.es_subscription_message.success {
	color: var(--wp--preset--color--body-text);
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
}

@media (min-width: 1100px) {
	.club-news .wp-block-post-template {
		grid-auto-flow: row;
		grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
		overflow: visible;
	}
}

@media (max-width: 781px) {
	.club-site-header {
		position: sticky;
		top: 0;
	}

	.admin-bar .club-site-header {
		top: var(--wp-admin--admin-bar--height, 0);
	}

	.club-footer-heading {
		font-size: 1.35rem !important;
	}

	.club-site-footer .wp-block-navigation__container {
		align-items: flex-start;
		flex-wrap: wrap;
	}
}

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

	a {
		transition: none;
	}
}
