/* ===========================================================
   BTB News & Termine - Frontend Styles
   =========================================================== */
.btb-news-grid, .btb-calendar, .btb-event-list {
	--btb-radius: 14px; --btb-shadow: 0 6px 22px rgba(15,23,42,.08); --btb-border: #e6e9ef;
	--btb-text: #1f2937; --btb-muted: #64748b; --btb-accent: #0b5cab;
	font-family: inherit; color: var(--btb-text);
}
/* News-Kacheln */
.btb-news-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.btb-news-grid.btb-cols-1 { grid-template-columns: 1fr; }
.btb-news-grid.btb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.btb-news-grid.btb-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .btb-news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .btb-news-grid { grid-template-columns: 1fr; } }
.btb-card { background:#fff; border:1px solid var(--btb-border); border-radius:var(--btb-radius); overflow:hidden; display:flex; flex-direction:column; transition:transform .18s ease, box-shadow .18s ease; }
.btb-card:hover { transform: translateY(-4px); box-shadow: var(--btb-shadow); }
.btb-card-media { position:relative; display:block; aspect-ratio:16/9; background-size:cover; background-position:center; background-color:#eef2f7; }
.btb-badge { position:absolute; left:12px; top:12px; color:#fff; font-size:12px; font-weight:700; padding:4px 10px; border-radius:999px; box-shadow:0 2px 6px rgba(0,0,0,.15); }
.btb-card-body { padding:16px 18px 20px; display:flex; flex-direction:column; gap:8px; flex:1; }
.btb-card-date { color:var(--btb-muted); font-size:13px; }
.btb-card-title { margin:0; font-size:19px; line-height:1.3; }
.btb-card-title a { color:var(--btb-text); text-decoration:none; }
.btb-card-title a:hover { color:var(--btb-accent); }
.btb-card-excerpt { margin:0; color:var(--btb-muted); font-size:15px; line-height:1.5; flex:1; }
.btb-card-more { color:var(--btb-accent); font-weight:600; text-decoration:none; font-size:15px; }
/* Kalender */
.btb-calendar { width:100%; background:#fff; border:1px solid var(--btb-border); border-radius:var(--btb-radius); padding:18px; box-sizing:border-box; }
.btb-cal-toolbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:14px; }
.btb-cal-nav { display:flex; align-items:center; gap:14px; }
.btb-cal-title { font-size:22px; margin:0; min-width:200px; text-align:center; }
.btb-cal-prev, .btb-cal-next { border:1px solid var(--btb-border); background:#fff; border-radius:10px; width:40px; height:40px; font-size:22px; line-height:1; cursor:pointer; color:var(--btb-text); }
.btb-cal-prev:hover, .btb-cal-next:hover { background:#f1f5f9; }
.btb-cal-views { display:flex; align-items:center; gap:8px; }
.btb-cal-view { border:1px solid var(--btb-border); background:#fff; padding:8px 14px; border-radius:10px; cursor:pointer; font-size:14px; }
.btb-cal-view.is-active { background:var(--btb-accent); color:#fff; border-color:var(--btb-accent); }
.btb-cal-ical { margin-left:6px; font-size:14px; color:var(--btb-accent); text-decoration:none; align-self:center; }
.btb-cal-legend { display:flex; flex-wrap:wrap; gap:10px 16px; margin-bottom:14px; }
.btb-legend-item { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--btb-muted); cursor:pointer; user-select:none; }
.btb-legend-item .dot { width:12px; height:12px; border-radius:3px; }
.btb-legend-item.is-off { opacity:.35; text-decoration:line-through; }
.btb-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); border:1px solid var(--btb-border); border-radius:12px; overflow:hidden; }
.btb-cal-dow { background:#f8fafc; text-align:center; font-size:12px; font-weight:700; text-transform:uppercase; color:var(--btb-muted); padding:10px 0; border-bottom:1px solid var(--btb-border); }
.btb-cal-cell { height:118px; box-sizing:border-box; border-top:1px solid var(--btb-border); border-left:1px solid var(--btb-border); padding:6px; position:relative; background:#fff; cursor:pointer; overflow:hidden; transition:background .12s ease; }
.btb-cal-cell:nth-child(7n+1) { border-left:none; }
.btb-cal-cell:hover { background:#f8fbff; }
.btb-cal-cell.is-other { background:#fafbfc; color:#b8c0cc; }
.btb-cal-cell.is-selected { background:#eaf3fd; box-shadow:inset 0 0 0 2px var(--btb-accent); }
.btb-cal-cell.is-today .btb-cal-num { background:var(--btb-accent); color:#fff; }
.btb-cal-num { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; font-size:13px; font-weight:600; }
.btb-cal-events { display:flex; flex-direction:column; gap:3px; margin-top:4px; }
.btb-cal-ev { display:block; font-size:12px; line-height:1.25; color:#fff; padding:3px 6px; border-radius:6px; text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.btb-cal-ev:hover { filter:brightness(.94); }
.btb-cal-more { font-size:11px; color:var(--btb-muted); margin-top:2px; }
.btb-cal-dots { display:none; gap:4px; flex-wrap:wrap; margin-top:4px; }
.btb-cal-dots span { width:8px; height:8px; border-radius:50%; }
.btb-cal-daydetail { margin-top:16px; }
.btb-cal-daydetail h3 { font-size:16px; margin:0 0 10px; color:var(--btb-text); }
.btb-cal-daylist { display:flex; flex-direction:column; gap:8px; }
.btb-cal-dayitem { display:flex; gap:12px; align-items:flex-start; padding:10px 12px; border:1px solid var(--btb-border); border-left:5px solid var(--btb-accent); border-radius:10px; }
.btb-cal-dayitem .tm { min-width:62px; font-weight:700; font-size:14px; color:var(--btb-text); }
.btb-cal-dayitem a.tt { font-weight:600; text-decoration:none; color:var(--btb-text); }
.btb-cal-dayitem .mt { font-size:13px; color:var(--btb-muted); margin-top:2px; }
.btb-cal-dayempty { color:var(--btb-muted); font-style:italic; padding:6px 2px; }
@media (max-width:720px) {
	.btb-cal-cell { height:62px; padding:4px; }
	.btb-cal-events, .btb-cal-more { display:none; }
	.btb-cal-dots { display:flex; }
	.btb-cal-num { width:22px; height:22px; font-size:12px; }
}
.btb-cal-listview { display:flex; flex-direction:column; gap:10px; }
.btb-cal-listrow { display:flex; gap:14px; align-items:flex-start; padding:12px 14px; border:1px solid var(--btb-border); border-left-width:5px; border-radius:10px; }
.btb-cal-listrow .d { min-width:60px; text-align:center; }
.btb-cal-listrow .d b { display:block; font-size:22px; line-height:1; }
.btb-cal-listrow .d span { font-size:12px; color:var(--btb-muted); text-transform:uppercase; }
.btb-cal-listrow a.t { font-weight:600; text-decoration:none; color:var(--btb-text); }
.btb-cal-listrow .m { font-size:13px; color:var(--btb-muted); margin-top:3px; }
/* Kalender-Seite volle Breite */
.page-id-1207 .btb-section > div { max-width:100% !important; }
@media (min-width:1024px){ .btb-calendar { max-width:1400px; margin-left:auto; margin-right:auto; } }
/* Kompakte Terminliste */
.btb-event-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.btb-event-item { display:flex; gap:14px; align-items:center; background:#fff; border:1px solid var(--btb-border); border-left:5px solid var(--btb-accent); border-radius:10px; padding:12px 14px; }
.btb-event-date { text-align:center; min-width:52px; }
.btb-event-day { display:block; font-size:24px; font-weight:800; line-height:1; }
.btb-event-mon { display:block; font-size:12px; text-transform:uppercase; color:var(--btb-muted); }
.btb-event-title { font-weight:600; text-decoration:none; color:var(--btb-text); }
.btb-event-title:hover { color:var(--btb-accent); }
.btb-event-meta { font-size:13px; color:var(--btb-muted); margin-top:2px; }
.btb-empty { color:var(--btb-muted); font-style:italic; }

/* ---------- Kopf-Menue: Desktop-Dropdown (klickbar) + Mobile-Burger ---------- */
html body nav.btb-nav { position: relative; }
html body nav.btb-nav li.menu-item-has-children { position: relative; }
html body nav.btb-nav ul.sub-menu {
	position:absolute !important; top:100% !important; left:0 !important; margin:0 !important; z-index:9999 !important;
	min-width:240px !important; width:max-content !important; background:#fff !important; border:1px solid #e6e9ef !important;
	border-radius:10px !important; box-shadow:0 12px 30px rgba(15,23,42,.14) !important; padding:8px 0 !important;
	list-style:none !important; display:none !important; flex-direction:column !important;
}
html body nav.btb-nav li.menu-item-has-children.btb-open > ul.sub-menu { display:block !important; }
html body nav.btb-nav ul.sub-menu > li { display:block !important; margin:0 !important; float:none !important; width:auto !important; }
html body nav.btb-nav ul.sub-menu > li > a { display:block !important; padding:9px 18px !important; white-space:nowrap !important; text-decoration:none !important; color:#1f2937 !important; font-weight:500 !important; }
html body nav.btb-nav ul.sub-menu > li > a:hover { background:#f1f5f9 !important; color:#0b5cab !important; }
html body nav.btb-nav li.menu-item-has-children > a::after { content:" \25BE"; font-size:.75em; opacity:.65; }
/* Burger-Button */
.btb-menu-toggle { display:none; background:none; border:0; cursor:pointer; padding:10px; margin-left:auto; }
.btb-menu-toggle span { display:block; width:26px; height:3px; background:#be1834; margin:5px 0; border-radius:2px; transition:.2s; }
.btb-nav.btb-mobile-open .btb-menu-toggle span:nth-child(1){ transform:translateY(8px) rotate(45deg); }
.btb-nav.btb-mobile-open .btb-menu-toggle span:nth-child(2){ opacity:0; }
.btb-nav.btb-mobile-open .btb-menu-toggle span:nth-child(3){ transform:translateY(-8px) rotate(-45deg); }
/* Mobile */
@media (max-width:900px) {
	.btb-menu-toggle { display:inline-block; }
	html body nav.btb-nav > ul {
		display:none !important; position:absolute !important; top:100% !important; left:auto !important; right:0 !important;
		flex-direction:column !important; background:#fff !important; border:1px solid #e6e9ef !important; border-radius:0 0 12px 12px !important; width:min(320px, 90vw) !important;
		box-shadow:0 12px 30px rgba(15,23,42,.14) !important; z-index:9998 !important; padding:6px 0 !important;
	}
	html body nav.btb-nav.btb-mobile-open > ul { display:flex !important; }
	html body nav.btb-nav > ul > li { width:100% !important; }
	html body nav.btb-nav > ul > li > a { display:block !important; padding:13px 18px !important; }
	html body nav.btb-nav ul.sub-menu {
		position:static !important; box-shadow:none !important; border:0 !important; border-radius:0 !important;
		margin:0 !important; padding:0 0 6px 0 !important; min-width:0 !important; width:auto !important; background:#f8fafc !important;
	}
	html body nav.btb-nav ul.sub-menu > li > a { padding:11px 34px !important; }
}

/* ---------- Feinschliff: Header, Titel, Mobile-Menue, Stats ---------- */
/* Logo hart links: leeren Logo-Platzhalter ausblenden -> echtes Logo linksbuendig */
header > a.btb-logo { display: none !important; }
/* Doppelten Seitentitel im Inhalt ausblenden (roter Theme-Titel bleibt) */
body.page .btb-section h1.wp-block-heading { display: none !important; }
/* Stat-Labels groesser/schoener */
.btb-stats .label { font-size: 16px !important; font-weight: 600 !important; color: #334155 !important; letter-spacing: .01em; }
.btb-section-head h2, .btb-section > h2 { letter-spacing: .01em; }
/* Mobile-Menue: groessere Schrift, weniger Abstand */
@media (max-width: 900px) {
	html body nav.btb-nav > ul { padding: 4px 0 !important; gap: 0 !important; row-gap: 0 !important; }
	html body nav.btb-nav > ul > li > a { font-size: 20px !important; padding: 9px 20px !important; }
	html body nav.btb-nav ul.sub-menu > li > a { font-size: 16px !important; padding: 8px 36px !important; }
}

/* ---------- Kennzahlen als moderne Karten ---------- */
.btb-stats { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 20px !important;
	max-width: 1200px !important; margin: 0 auto !important; padding: 44px 24px !important; border: 0 !important; }
.btb-stats > div { background: #fff !important; border: 1px solid #eef0f3 !important; border-top: 4px solid #be1834 !important;
	border-radius: 16px !important; padding: 28px 16px !important; text-align: center !important;
	box-shadow: 0 8px 24px rgba(15,23,42,.06) !important; transition: transform .18s ease, box-shadow .18s ease; }
.btb-stats > div:hover { transform: translateY(-4px) !important; box-shadow: 0 14px 30px rgba(15,23,42,.10) !important; }
.btb-stats .num { font-size: 42px !important; font-weight: 800 !important; color: #be1834 !important; line-height: 1 !important; }
.btb-stats .label { font-size: 15px !important; font-weight: 600 !important; color: #334155 !important; margin-top: 12px !important; letter-spacing: .02em; }
@media (max-width: 800px) { .btb-stats { grid-template-columns: repeat(2, 1fr) !important; padding: 28px 16px !important; } }

/* ---------- Bereichsseiten: 2 Spalten (Inhalt + Termine/Ansprechpartner) ---------- */
.wp-block-columns { display: flex; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.wp-block-column { flex: 1 1 300px; min-width: 280px; }
.wp-block-column:last-child { flex: 0 1 360px; }
@media (max-width: 800px) { .wp-block-column, .wp-block-column:last-child { flex: 1 1 100%; } }
.btb-ansprech { background: #f8fafc; border: 1px solid #e6e9ef; border-radius: 14px; padding: 18px 20px; margin-top: 22px; }
.btb-ansprech h3 { margin-top: 0 !important; color: #be1834; }
.btb-ansprech p { margin: 8px 0; line-height: 1.6; }
.btb-side-head { color: #be1834; text-transform: uppercase; letter-spacing: .02em; font-size: 20px; margin: 0 0 12px; }

/* ---------- Fix: letztes Dropdown nach links oeffnen ---------- */
html body nav.btb-nav > ul > li:last-child > ul.sub-menu { left: auto !important; right: 0 !important; }
/* ---------- Kennzahlen-Labels deutlich groesser ---------- */
.btb-stats .label { font-size: 19px !important; font-weight: 700 !important; color: #1f2937 !important; margin-top: 12px !important; }
/* ---------- Social-Media-Icons (Community) ---------- */
.btb-social { display: flex !important; gap: 14px !important; align-items: center; flex-wrap: wrap; }
.btb-social a { display: inline-flex !important; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; transition: transform .15s ease, background .15s ease, color .15s ease; }
.btb-social a:hover { transform: translateY(-3px); background: #fff; color: #be1834; }
.btb-social svg { width: 24px; height: 24px; fill: currentColor; }

/* ---------- Ansprechpartner / Team-Karten ---------- */
.btb-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.btb-team-card { background: #fff; border: 1px solid #e6e9ef; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 16px rgba(15,23,42,.05); display: flex; flex-direction: column; }
.btb-team-photo { width: 100%; aspect-ratio: 1/1; background-size: cover; background-position: center top; background-color: #eef2f7; }
.btb-team-body { padding: 14px 16px; }
.btb-team-name { font-weight: 700; font-size: 17px; color: #1f2937; }
.btb-team-func { font-size: 13px; color: #64748b; margin: 4px 0 10px; line-height: 1.4; }
.btb-team-contact { display: flex; flex-direction: column; gap: 5px; }
.btb-team-contact a { display: inline-flex; align-items: center; gap: 6px; color: #be1834; text-decoration: none; font-size: 14px; word-break: break-word; }
.btb-team-contact a:hover { text-decoration: underline; }
.btb-team-contact .dashicons { font-size: 16px; width: 16px; height: 16px; }
.btb-team-avail { font-size: 12px; color: #94a3b8; margin-top: 8px; }
/* ---------- Footer-Kontakte ---------- */
.btb-footer-contact { line-height: 1.7; }
.btb-footer-contact a { color: inherit; text-decoration: none; }
.btb-footer-contact a:hover { text-decoration: underline; }

/* ---------- Content-Bereich: zentriert, feste Breite ---------- */
@media (min-width: 900px) {
	.btb-section { padding-left: 40px !important; padding-right: 40px !important; }
	.btb-section > *:not(.wp-block-columns) { max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important; }
	.btb-section > div:has(.wp-block-columns), .btb-section > .wp-block-columns { max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important; }
	.btb-hero-inner, .btb-stats { max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box; }
	.btb-section p, .btb-section ul, .btb-section ol, .btb-section h1, .btb-section h2, .btb-section h3, .btb-section h4, .btb-section h5 { max-width: 100% !important; }
}

/* ---------- Seitenleiste (nur Seiten mit Spalten) ---------- */
@media (min-width: 900px) {
	.btb-section > div:has(.wp-block-columns) { max-width: 1200px !important; }
	.wp-block-columns { align-items: flex-start; gap: 34px; }
	.wp-block-column:first-child { flex: 1 1 auto !important; }
	.wp-block-column:last-child { flex: 0 0 340px !important; }
}
.btb-sidebar-block { margin-bottom: 22px; }

/* ---------- Terminliste mehrspaltig (auto: 3 breit, 1 in Seitenleiste) ---------- */
.btb-event-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.btb-event-item { height: 100%; }
@media (max-width: 640px) { .btb-event-list { grid-template-columns: 1fr !important; } }

/* ---------- Ansprechpartner in Seitenleiste: kompakt, ohne Foto ---------- */
.wp-block-column:last-child .btb-team-grid { grid-template-columns: 1fr !important; gap: 10px; }
.wp-block-column:last-child .btb-team-photo { display: none !important; }
.wp-block-column:last-child .btb-team-body { padding: 12px 14px; }
.wp-block-column:last-child .btb-team-name { font-size: 15px; }

/* Abstände / vertikaler Rhythmus */
.btb-side-head{margin-top:34px !important;margin-bottom:14px !important}
.wp-block-column > .btb-side-head:first-child,.wp-block-column > *:first-child.btb-side-head{margin-top:0 !important}
.wp-block-column .btb-event-list{margin-bottom:6px}
.wp-block-column .btb-team-grid{margin-top:4px}
.cta-row{margin-top:22px}
.btb-section .wp-block-buttons{margin-top:22px !important;margin-bottom:8px}
.btb-section .wp-block-button{margin-top:6px}
.btb-section h2{margin-top:38px}
.btb-section h3{margin-top:28px}
.btb-section > *:first-child h2,.btb-section h2:first-child{margin-top:0}
.btb-section p + .wp-block-buttons,.btb-section ul + .wp-block-buttons,.btb-section p + .cta-row{margin-top:24px !important}


/* Footer v2 – 3 Spalten */
.btb-footer{background:#1f2733;color:#cfd6de;padding:48px 0 0}
.btb-footer-cols{max-width:1200px;margin:0 auto;padding:0 24px;display:grid;grid-template-columns:1.1fr 1fr 1.2fr;gap:40px;align-items:start}
.btb-footer .btb-footer-title,.btb-footer .widget-title,.btb-footer .wp-block-heading{color:#fff;font-size:16px;margin:0 0 14px;font-weight:700}
.btb-footer-logobox{background:#fff;display:inline-block;padding:14px 18px;border-radius:10px}
.btb-footer-logobox img{display:block;max-width:200px;height:auto}
.btb-footer-tagline{margin:14px 0 0;color:#aeb7c2;font-size:15px;line-height:1.5}
.btb-footer a{color:#cfd6de;text-decoration:none}
.btb-footer a:hover{color:#fff;text-decoration:underline}
.btb-footer-col-2 ul{list-style:none;margin:0;padding:0;columns:2;column-gap:24px}
.btb-footer-col-2 ul li{margin:0 0 9px;break-inside:avoid}
.btb-footer-contact p{margin:0 0 14px;line-height:1.65}
.btb-footer-bottom{max-width:1200px;margin:36px auto 0;padding:16px 24px;border-top:1px solid rgba(255,255,255,.14);display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:14px;color:#aeb7c2}
.btb-footer-legal a{margin-left:18px}
@media(max-width:820px){.btb-footer-cols{grid-template-columns:1fr;gap:28px}.btb-footer-col-2 ul{columns:1}.btb-footer-bottom{flex-direction:column}.btb-footer-legal a{margin:0 18px 0 0}}


/* Hero Social-Icons */
.cta-row{flex-wrap:wrap;align-items:center;gap:14px}
.btb-hero-social{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.btb-hero-social-label{color:#fff;font-weight:600;font-size:15px}
.btb-hero-social a{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;transition:background .15s ease,transform .15s ease}
.btb-hero-social a:hover{background:#fff;color:#cf2e3f;transform:translateY(-2px)}
.btb-hero-social svg{width:20px;height:20px;display:block}
