/*
Theme Name: Bühler Boule-Club
Theme URI: https://buehler-boule-club.de/
Author: Bühler Boule-Club e.V.
Description: Block-Theme für den Bühler Boule-Club e.V. – blau, klar, mobil. Startseite aus bearbeitbaren Mustern: Spruch, Aufstiegs-Banner, Auf einen Blick, Neu beim Boule, Aktuelles (automatisch die neuesten Beiträge), Turniere, Event-Location.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.5.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bbc-boule
*/

/* ---------- Grundlagen ---------- */
:root {
	--bbc-radius: 16px;
}

a { text-underline-offset: 3px; }

/* Abschnitte */
.bbc-section {
	padding-top: clamp(48px, 7vw, 80px) !important;
	padding-bottom: clamp(48px, 7vw, 80px) !important;
}
.bbc-section h2.wp-block-heading { margin-top: 0; }

/* ---------- Kopfbereich ---------- */
.bbc-header {
	border-bottom: 1px solid var(--wp--preset--color--linie);
	background: var(--wp--preset--color--weiss);
}
.bbc-header .wp-block-site-title { margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 20px; line-height: 1.1; }
.bbc-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--navy); }
.bbc-header .wp-block-site-tagline { margin: 0; font-size: 13px; color: var(--wp--preset--color--grau); }
.bbc-header .wp-block-navigation { font-weight: 600; font-size: 16px; }
.bbc-header .wp-block-navigation a { text-decoration: none; }
.bbc-header .wp-block-navigation a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.wp-block-button__link { border-radius: 999px; font-weight: 600; padding: 13px 24px; }
.wp-block-button.is-style-outline .wp-block-button__link { border: 1px solid currentColor; background: transparent; }
.bbc-hero .wp-block-button.is-style-outline .wp-block-button__link { color: var(--wp--preset--color--weiss); border-color: var(--wp--preset--color--hellblau); }
.bbc-btn-hell .wp-block-button__link { background: var(--wp--preset--color--weiss) !important; color: var(--wp--preset--color--navy) !important; }
.bbc-btn-dunkel .wp-block-button__link { background: var(--wp--preset--color--navy) !important; color: var(--wp--preset--color--weiss) !important; }

/* ---------- Hero mit Spruch ---------- */
.bbc-hero { background: var(--wp--preset--color--navy); color: var(--wp--preset--color--weiss); }
.bbc-hero .bbc-eyebrow {
	font-family: var(--wp--preset--font-family--text);
	font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
	color: var(--wp--preset--color--hellblau); margin: 0 0 20px;
}
.bbc-spruch { border: 0 !important; padding: 0 !important; margin: 0; }
.bbc-spruch p {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800; font-size: clamp(28px, 3.6vw, 46px); line-height: 1.12; letter-spacing: -.015em;
	color: var(--wp--preset--color--weiss); margin: 0;
}
.bbc-spruch cite {
	display: block; margin-top: 14px; font-size: 18px; font-style: italic; text-align: right;
	color: var(--wp--preset--color--hellblau);
}
.bbc-hero .bbc-lead { font-size: 19px; color: var(--wp--preset--color--hellblau-text); max-width: 540px; }
.bbc-foto img { border-radius: 20px; width: 100%; height: 400px; object-fit: cover; display: block; }

/* ---------- Bildwechsel (Galerie mit CSS-Klasse bbc-slideshow) ---------- */
.wp-block-gallery.bbc-slideshow {
	position: relative;
	display: block !important;
	height: 400px;
	margin: 0;
	border-radius: 20px;
	overflow: hidden;
	background: var(--wp--preset--color--hell);
}
.wp-block-gallery.bbc-slideshow > figure.wp-block-image {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100%;
	margin: 0 !important;
	opacity: 0;
	transition: opacity 1.2s ease;
}
.wp-block-gallery.bbc-slideshow > figure.wp-block-image:first-of-type,
.wp-block-gallery.bbc-slideshow.is-running > figure.wp-block-image.is-active { opacity: 1; }
.wp-block-gallery.bbc-slideshow.is-running > figure.wp-block-image:not(.is-active) { opacity: 0; }
.wp-block-gallery.bbc-slideshow > figure.wp-block-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
}
.wp-block-gallery.bbc-slideshow figcaption {
	position: absolute; left: 16px; bottom: 16px; right: auto; width: auto; max-width: calc(100% - 96px);
	background: rgba(18, 31, 74, .75); color: #fff; font-size: 14px; padding: 6px 12px; border-radius: 999px;
}
.bbc-slideshow-pause {
	position: absolute; right: 14px; bottom: 14px; z-index: 2;
	width: 44px; height: 44px; border: 0; border-radius: 50%;
	background: rgba(18, 31, 74, .75); color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center; padding: 0;
}
.bbc-slideshow-pause:hover { background: var(--wp--preset--color--navy); }
.bbc-slideshow-pause:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.bbc-slideshow-pause svg { width: 18px; height: 18px; }

/* Im Editor alle Bilder nebeneinander zeigen, damit man sie bearbeiten kann */
.editor-styles-wrapper .wp-block-gallery.bbc-slideshow { display: flex !important; height: auto; overflow: visible; }
.editor-styles-wrapper .wp-block-gallery.bbc-slideshow > figure.wp-block-image { position: relative !important; opacity: 1; height: 160px; width: calc(33.33% - 8px) !important; }

@media (max-width: 781px) {
	.wp-block-gallery.bbc-slideshow { height: 260px; }
}

/* ---------- Banner ---------- */
.bbc-banner { background: var(--wp--preset--color--blau); color: var(--wp--preset--color--weiss); }
.bbc-banner p { margin: 0; }
.bbc-banner .bbc-banner-text { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 21px; line-height: 1.25; }
.bbc-banner .bbc-banner-text::before {
	content: ""; display: inline-block; width: 30px; height: 30px; margin-right: 14px; vertical-align: -7px;
	background: currentColor;
	-webkit-mask: var(--bbc-icon-pokal) center / contain no-repeat; mask: var(--bbc-icon-pokal) center / contain no-repeat;
}
.bbc-banner a { color: var(--wp--preset--color--weiss); font-weight: 600; }

/* ---------- Karten ---------- */
.bbc-hell { background: var(--wp--preset--color--hell); }
.bbc-karte {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--wp--preset--color--linie);
	border-radius: var(--bbc-radius);
	padding: 28px !important;
	height: 100%;
	box-sizing: border-box;
}
.bbc-karte h3 { margin-top: 0; font-size: 22px; }
.bbc-chip {
	display: inline-block; margin: 6px 0 4px !important;
	background: var(--wp--preset--color--blau); color: var(--wp--preset--color--weiss);
	font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	padding: 3px 10px; border-radius: 999px;
}
.bbc-label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--grau); margin-bottom: 4px !important; }

/* Icons vor Kartenüberschriften */
.bbc-icon::before {
	content: ""; display: inline-block; width: 24px; height: 24px; margin-right: 10px; vertical-align: -4px;
	background: var(--wp--preset--color--navy);
	-webkit-mask: var(--bbc-icon) center / contain no-repeat; mask: var(--bbc-icon) center / contain no-repeat;
}
:root {
	--bbc-icon-uhr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
	--bbc-icon-ort: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E");
	--bbc-icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
	--bbc-icon-pokal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8M12 17v4M7 4h10v5a5 5 0 0 1-10 0V4z'/%3E%3Cpath d='M17 5h3v2a3 3 0 0 1-3 3M7 5H4v2a3 3 0 0 0 3 3'/%3E%3C/svg%3E");
}
.bbc-icon-uhr { --bbc-icon: var(--bbc-icon-uhr); }
.bbc-icon-ort { --bbc-icon: var(--bbc-icon-ort); }
.bbc-icon-mail { --bbc-icon: var(--bbc-icon-mail); }

/* ---------- Neu beim Boule ---------- */
.bbc-schritt { border-top: 3px solid var(--wp--preset--color--navy); padding-top: 18px; }
.bbc-nummer { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--wp--preset--color--blau); margin: 0 !important; }
.bbc-schritt h3 { font-size: 20px; margin: 12px 0 6px; }

/* ---------- Aktuelles (Query Loop) ---------- */
.bbc-news .wp-block-post-template { gap: 24px; }
.bbc-news .wp-block-post { margin: 0; }
.bbc-news .bbc-karte { padding: 0 !important; overflow: hidden; display: flex; flex-direction: column; }
.bbc-news .wp-block-post-featured-image { margin: 0; }
.bbc-news .wp-block-post-featured-image img { width: 100%; height: 190px; object-fit: cover; display: block; }
.bbc-news .bbc-karte-inhalt { padding: 22px !important; }
.bbc-news .wp-block-post-date { font-size: 14px; color: var(--wp--preset--color--grau); margin-bottom: 8px; }
.bbc-news .wp-block-post-title { font-size: 21px; line-height: 1.25; margin: 0; }
.bbc-news .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--text); }
.bbc-news .wp-block-post-title a:hover { color: var(--wp--preset--color--blau); }

/* ---------- Laufschrift (Gruppe mit CSS-Klasse bbc-laufschrift) ---------- */
.bbc-laufschrift {
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--color--blau);
	color: var(--wp--preset--color--weiss);
	padding: 0 56px 0 0 !important;
	margin: 0 !important;
	white-space: nowrap;
	font-size: 18px;
}
.bbc-laufschrift p { margin: 0; padding: 0; }
.bbc-laufschrift a { color: var(--wp--preset--color--weiss); font-weight: 600; text-decoration: underline; }
.bbc-laufschrift-spur {
	display: flex;
	width: max-content;
	animation: bbc-lauf 30s linear infinite;
}
.bbc-laufschrift-teil { display: flex; gap: 0; padding: 14px 0; }
.bbc-laufschrift .bbc-laufschrift-teil > * { padding-right: 32px; }
.bbc-laufschrift .bbc-laufschrift-teil > *::after { content: "•"; margin-left: 32px; opacity: .6; }
.bbc-laufschrift:hover .bbc-laufschrift-spur,
.bbc-laufschrift:focus-within .bbc-laufschrift-spur,
.bbc-laufschrift.is-paused .bbc-laufschrift-spur { animation-play-state: paused; }
@keyframes bbc-lauf { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Ohne JavaScript oder bei „Bewegung reduzieren“: stehender, umbrechender Text */
.bbc-laufschrift:not(.is-running) { white-space: normal; padding: 14px 24px !important; text-align: center; }

.bbc-laufschrift-pause {
	position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
	width: 40px; height: 40px; border: 0; border-radius: 50%;
	background: var(--wp--preset--color--navy); color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center; padding: 0;
}
.bbc-laufschrift > .bbc-laufschrift-spur,
.bbc-laufschrift > .bbc-laufschrift-pause { margin: 0 !important; }
.bbc-laufschrift-pause:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.bbc-laufschrift-pause svg { width: 16px; height: 16px; }

/* Im Editor nicht laufen lassen, damit man den Text bearbeiten kann */
.editor-styles-wrapper .bbc-laufschrift { white-space: normal; padding: 14px 24px !important; }

/* ---------- Turniere ---------- */
.bbc-termine { border-top: 1px solid var(--wp--preset--color--linie); }
.bbc-termin { border-bottom: 1px solid var(--wp--preset--color--linie); padding: 22px 0 !important; gap: 12px 32px !important; }
.bbc-termin .bbc-monat { flex: 0 0 140px; margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 700; color: var(--wp--preset--color--blau); }
.bbc-termin .bbc-termin-text { flex: 1 1 320px; min-width: 0; }
.bbc-termin h3 { margin: 0; font-size: 20px; }
.bbc-termin p { margin: 2px 0 0; color: var(--wp--preset--color--grau); }

/* ---------- Event-Location ---------- */
.bbc-event {
	background: var(--wp--preset--color--navy); color: var(--wp--preset--color--weiss);
	border-radius: 24px; overflow: hidden; gap: 0 !important;
}
.bbc-event > .wp-block-column:first-child { min-height: 300px; }
.bbc-event .wp-block-image, .bbc-event .wp-block-image img { margin: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bbc-event .bbc-event-text { padding: clamp(28px, 4vw, 48px) !important; }
.bbc-event .bbc-eyebrow { font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--hellblau); margin: 0 0 12px; }
.bbc-event h2 { color: var(--wp--preset--color--weiss); font-size: clamp(28px, 3vw, 36px); line-height: 1.1; }
.bbc-event p { color: var(--wp--preset--color--hellblau-text); }

/* ---------- Fußbereich ---------- */
.bbc-footer { background: var(--wp--preset--color--navy-dunkel); color: var(--wp--preset--color--hellblau-text); }
.bbc-footer a { color: var(--wp--preset--color--hellblau-text); }
.bbc-footer a:hover { color: var(--wp--preset--color--weiss); }
.bbc-footer h2, .bbc-footer h3 { color: var(--wp--preset--color--weiss); font-size: 17px; margin: 0 0 10px; font-family: var(--wp--preset--font-family--text); font-weight: 600; }
.bbc-footer .bbc-footer-name { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 20px; }
.bbc-footer p { line-height: 1.9; }
.bbc-footer-unten { border-top: 1px solid #2C3B70; padding-top: 20px !important; margin-top: 40px !important; font-size: 15px; }
.bbc-footer-unten p { margin: 0; }

/* ---------- Mobil ---------- */
@media (max-width: 781px) {
	.bbc-foto img { height: 260px; }
	.bbc-termin .bbc-monat { flex-basis: 100%; }
}
