/*
Theme Name: St. Johann Bees
Theme URI: https://hcs-handball.de/
Author: HC St. Johann
Description: Schlankes Block-Theme für die Website des HC St. Johann im Bees-Branding. Farben, Schriften und Abstände zentral in theme.json, Inhalte vollständig im Block-Editor pflegbar.
Version: 1.0.4
Requires at least: 6.6
Tested up to: 6.7
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: bees
*/

/* ---------- Grundlagen ---------- */
:where(body) { -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--wp--preset--color--rot); outline-offset: 2px; }
img { height: auto; }

/* Wabenmuster als Hintergrund (Klasse „has-wabe“ an einer Gruppe) */
.has-wabe { position: relative; isolation: isolate; }
.has-wabe::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .09;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
	background-size: 56px 100px;
}
.has-wabe.is-wabe-stark::before { opacity: .13; }

/* Kleine Überzeile in Rot/Versalien */
.bees-eyebrow {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700; font-size: 1rem; letter-spacing: .22em; text-transform: uppercase;
}

/* ---------- Kopfbereich ---------- */
.bees-header { position: relative; z-index: 20; }
.bees-header .bees-brand { text-decoration: none; color: inherit; }
.bees-header .bees-brand img { display: block; width: auto; }
.bees-header .bees-logo-hcs { height: 50px; }
.bees-header .bees-logo-biene { height: 58px; }
.bees-header .bees-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.bees-header .bees-brand-title {
	font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 800; font-size: 1.75rem;
	text-transform: uppercase; letter-spacing: .02em;
}
.bees-header .bees-brand-sub {
	font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 600; font-size: .8rem;
	letter-spacing: .2em; text-transform: uppercase; color: #FF5A55;
}
.bees-header .bees-divider { width: 1px; align-self: stretch; background: #3A3634; margin: 4px 2px; }
.bees-header .wp-block-navigation a:hover { color: #FF5A55; }
.bees-header .wp-block-navigation .current-menu-item > a,
.bees-header .wp-block-navigation a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--wp--preset--color--rot); }
.bees-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--schwarz) !important; color: #fff !important; padding: 2rem;
}
@media (max-width: 600px) {
	.bees-header .bees-logo-hcs { height: 40px; }
	.bees-header .bees-logo-biene, .bees-header .bees-divider { display: none; }
	.bees-header .bees-brand-title { font-size: 1.4rem; }
}

/* Hinweisleiste über dem Kopf */
.bees-notice a { color: inherit; }

/* ---------- Karten ---------- */
.is-style-bees-karte {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--wp--preset--color--linie);
	border-radius: 6px;
}
.is-style-bees-karte-rot { border-top: 5px solid var(--wp--preset--color--rot) !important; }
.is-style-bees-karte.is-akzent { border-top: 5px solid var(--wp--preset--color--rot); }
.bees-platzhalter {
	border: 1.5px dashed #BDB6AF; border-radius: 4px; padding: 1rem;
	color: var(--wp--preset--color--grau); font-size: var(--wp--preset--font-size--klein);
}

/* Überlappende Karten unter dem Startseiten-Hero */
.bees-overlap { margin-top: -3rem !important; position: relative; z-index: 2; }
.bees-overlap .is-style-bees-karte { box-shadow: 0 8px 24px rgba(20, 18, 18, .08); }

/* News-Karten */
.bees-news .wp-block-post { background: #fff; border: 1px solid var(--wp--preset--color--linie); border-radius: 6px; overflow: hidden; }
.bees-news .wp-block-post-featured-image { margin: 0; }
.bees-news .wp-block-post-featured-image img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.bees-news .bees-news-body { padding: 1.1rem 1.3rem 1.4rem; }
.bees-news .bees-news-nobild { aspect-ratio: 16 / 10; }

/* Team-Kacheln */
.bees-team-kachel a {
	display: flex; align-items: center; gap: .9rem; min-height: 76px; padding: .85rem 1.1rem;
	background: #fff; border: 1px solid var(--wp--preset--color--linie); border-radius: 6px;
	color: var(--wp--preset--color--schwarz); text-decoration: none;
}
.bees-team-kachel a:hover { border-color: var(--wp--preset--color--schwarz); }
.bees-team-kachel .kuerzel {
	flex: none; width: 52px; height: 52px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
	background: var(--wp--preset--color--schwarz); color: #fff;
	font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 800; font-size: 1.3rem;
}
.bees-team-kachel.is-nachwuchs .kuerzel { background: var(--wp--preset--color--rot); }
.bees-team-kachel .name { display: block; font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.bees-team-kachel .liga { display: block; font-size: .95rem; color: var(--wp--preset--color--grau); }

/* Nummerierte Schritte im roten Block */
.bees-schritte { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .75rem; }
.bees-schritte li { display: flex; gap: .9rem; align-items: center; background: rgba(0,0,0,.18); border-radius: 6px; padding: .85rem 1.1rem; font-weight: 600; }
.bees-schritte li::before {
	counter-increment: schritt; content: counter(schritt);
	font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 800; font-size: 2.1rem; line-height: 1;
}
.bees-schritte { counter-reset: schritt; }

/* Sponsoren als Textkacheln */
ul.bees-sponsoren { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
ul.bees-sponsoren li {
	min-height: 64px; padding: .6rem .9rem; background: #fff; border: 1px solid var(--wp--preset--color--linie); border-radius: 4px;
	display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 600; font-size: .95rem; color: #3E3A37;
}

/* FAQ (Details-Block) */
.wp-block-details.is-style-bees-faq { background: #fff; border: 1px solid var(--wp--preset--color--linie); border-radius: 6px; padding: 0 1.25rem; }
.wp-block-details.is-style-bees-faq summary { min-height: 56px; display: flex; align-items: center; font-weight: 700; font-size: 1.1rem; cursor: pointer; }
.wp-block-details.is-style-bees-faq[open] { padding-bottom: 1rem; }

/* Seitentitel-Band */
.bees-titelband h1 { margin: 0; }

/* ---------- Trainingszeiten (wird per JS aus der Tabelle aufgebaut) ---------- */
.bees-training.is-enhanced { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bees-tz-steuerung { display: flex; flex-wrap: wrap; gap: .9rem 1.5rem; align-items: center; background: #fff; border: 1px solid var(--wp--preset--color--linie); border-radius: 6px; padding: .85rem 1.1rem; margin-bottom: 1.5rem; }
.bees-tz-seg { display: inline-flex; border: 1.5px solid var(--wp--preset--color--schwarz); border-radius: 4px; overflow: hidden; }
.bees-tz-seg button { border: 0; min-height: 44px; padding: 0 1.1rem; font: inherit; font-weight: 700; cursor: pointer; background: #fff; color: var(--wp--preset--color--schwarz); }
.bees-tz-seg button[aria-pressed="true"] { background: var(--wp--preset--color--schwarz); color: #fff; }
.bees-tz-filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.bees-tz-filter button { min-height: 44px; padding: 0 1rem; border-radius: 22px; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; border: 1.5px solid #BDB6AF; background: #fff; color: var(--wp--preset--color--schwarz); }
.bees-tz-filter button[aria-pressed="true"] { background: var(--wp--preset--color--rot); border-color: var(--wp--preset--color--rot); color: #fff; }
.bees-tz-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.bees-tz-karte { background: #fff; border: 1px solid var(--wp--preset--color--linie); border-top: 5px solid var(--akzent, #141212); border-radius: 6px; padding: 1.1rem 1.3rem 1rem; display: flex; flex-direction: column; gap: .7rem; }
.bees-tz-karte h3 { margin: 0; font-size: 1.55rem; text-transform: none; font-weight: 700; }
.bees-tz-kopf { display: flex; gap: .85rem; align-items: center; }
.bees-tz-kuerzel { flex: none; width: 52px; height: 52px; border-radius: 4px; background: var(--wp--preset--color--schwarz); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 800; font-size: 1.3rem; }
.bees-tz-meta { font-size: .95rem; color: var(--wp--preset--color--grau); }
.bees-tz-zeilen { border-top: 1px solid var(--wp--preset--color--flaeche); }
.bees-tz-zeile { display: grid; grid-template-columns: 44px 118px minmax(0, 1fr); gap: .6rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid var(--wp--preset--color--flaeche); }
.bees-tz-zeile b, .bees-tz-zeit { font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 700; font-size: 1.3rem; }
.bees-tz-zeile b { text-transform: uppercase; }
.bees-tz-halle { font-weight: 600; font-size: 1rem; }
.bees-tz-trainer { font-size: .95rem; color: #3E3A37; }
.bees-tz-woche-wrap { overflow-x: auto; }
.bees-tz-woche { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: .75rem; min-width: 980px; }
.bees-tz-tag { background: #fff; border: 1px solid var(--wp--preset--color--linie); border-radius: 6px; overflow: hidden; }
.bees-tz-tag h3 { margin: 0; padding: .7rem 1rem; background: var(--wp--preset--color--schwarz); color: #fff; font-size: 1.5rem; }
.bees-tz-tag ul { list-style: none; margin: 0; padding: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.bees-tz-tag li { border-left: 4px solid var(--akzent, #141212); background: #F8F6F4; border-radius: 3px; padding: .5rem .65rem; display: flex; flex-direction: column; line-height: 1.3; }
.bees-tz-tag li .bees-tz-zeit { font-size: 1.15rem; }
.bees-tz-tag li strong { font-size: 1rem; }
.bees-tz-tag li span:last-child { font-size: .9rem; color: var(--wp--preset--color--grau); }
.bees-tz-leer { color: var(--wp--preset--color--grau); padding: .5rem .25rem; }
.bees-tz-legende { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1rem; font-size: .95rem; color: #3E3A37; }
.bees-tz-legende span { display: inline-flex; align-items: center; gap: .5rem; }
.bees-tz-legende i { width: 14px; height: 14px; border-radius: 2px; background: var(--akzent); display: inline-block; }

/* Tabelle ohne JS / im Editor lesbar */
.bees-training table { background: #fff; }
.bees-training thead { background: var(--wp--preset--color--schwarz); color: #fff; }

/* ---------- Footer ---------- */
.bees-footer a { color: #fff; }
.bees-footer a:hover { color: #FF5A55; }

/* Deutsche Silbentrennung für lange Wörter in Überschriften */
h1, h2, h3, .wp-block-post-title { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }

/* Mobil: Kopf kompakt, Biene im Einstieg kleiner */
@media (max-width: 600px) {
	.bees-header .alignwide { flex-wrap: nowrap !important; }
	.bees-header .wp-block-buttons, .bees-header .bees-brand-sub { display: none; }
	.bees-hero-biene img { width: 200px !important; }
}

/* ---------- Übergang: alte WPBakery-/Porto-Inhalte im Bees-Look ---------- */
.wp-block-post-content > .wpb-content-wrapper { max-width: var(--wp--style--global--wide-size) !important; }
a.porto-btn { display: inline-flex !important; align-items: center; min-height: 44px; padding: .6rem 1.2rem !important; border-radius: 4px; font-weight: 700; text-decoration: none !important; background: #D81210 !important; color: #fff !important; margin: 0 .5rem .5rem 0; }
a.porto-btn:hover { background: #A30D0B !important; }
.porto-btn-hover { display: none !important; }
.wpb_content_element img { height: auto; max-width: 100%; }
.vc_custom_heading { font-family: var(--wp--preset--font-family--barlow-condensed) !important; text-transform: uppercase; }

/* ---------- Sponsoren-Logos ---------- */
.bees-logos figure { margin: 0; background: #fff; border: 1px solid var(--wp--preset--color--linie); border-radius: 6px; aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; padding: .9rem; }
.bees-logos figure a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.bees-logos img { max-width: 100%; max-height: 100%; width: auto !important; height: auto; object-fit: contain; }
.bees-logos figure:hover { border-color: var(--wp--preset--color--schwarz); }

/* ---------- Interner Bereich ---------- */
.bees-intern-docs { display: flex; flex-direction: column; gap: 2rem; }
.bees-intern-docs h3 { margin: 0 0 .75rem; }
.bees-intern-docs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: .75rem; }
.bees-intern-docs li a { display: flex; gap: .9rem; align-items: center; padding: .9rem 1.1rem; background: #fff; border: 1px solid var(--wp--preset--color--linie); border-radius: 6px; color: var(--wp--preset--color--schwarz); text-decoration: none; min-height: 72px; }
.bees-intern-docs li a:hover { border-color: var(--wp--preset--color--schwarz); }
.bees-intern-docs .typ { flex: none; width: 46px; height: 46px; border-radius: 4px; background: var(--wp--preset--color--rot); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 800; font-size: .95rem; text-transform: uppercase; }
.bees-intern-docs .titel { display: block; font-weight: 700; line-height: 1.25; }
.bees-intern-docs .meta { display: block; font-size: .9rem; color: var(--wp--preset--color--grau); }
.bees-intern-box { background: var(--wp--preset--color--schwarz); color: #fff; border-radius: 8px; padding: 1.75rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.bees-intern-box h2 { margin: 0 0 .25rem; font-size: var(--wp--preset--font-size--titel-s); }
.bees-intern-box p { margin: 0; color: var(--wp--preset--color--linie); }
.bees-intern-box a.wp-element-button { background: #fff; color: var(--wp--preset--color--schwarz); text-decoration: none; }
