/*
Theme Name: TC Buchenbach – Clubhaus Editorial
Theme URI: https://tcbuchenbach.de/
Author: TC Buchenbach
Description: Modernes Gutenberg-Block-Theme für den Tennisclub Buchenbach.
Version: 1.6.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: tcb-clubhaus-editorial
*/

:root { --tcb-blue: #1554a6; --tcb-navy: #0b2d62; --tcb-sand: #f4efe7; --tcb-ink: #13233f; --tcb-sticky-header:86px; --tcb-adminbar-height:0px; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
.wp-site-blocks { padding-top:calc(var(--tcb-sticky-header) + var(--tcb-adminbar-height)); font-family:'Avenir Next', Avenir, Inter, 'Segoe UI', Helvetica, Arial, sans-serif; }
.wp-site-blocks h1, .wp-site-blocks h2, .wp-site-blocks h3, .wp-site-blocks h4 { font-family:'Avenir Next', Avenir, Inter, 'Segoe UI', Helvetica, Arial, sans-serif; font-weight:650; letter-spacing:-.035em; }
.wp-site-blocks { overflow-x:clip; }
.wp-site-blocks > .wp-block-template-part, .wp-site-blocks > .wp-block-cover { margin-block-start:0 !important; margin-block-end:0 !important; }
/* Page templates saved in WordPress use different inline top paddings. Keep
   the page title consistently close to the fixed site header. */
.wp-site-blocks > main { padding-top:32px !important; }
.tcb-site-header { position:fixed; top:var(--tcb-adminbar-height); right:0; left:0; z-index:100; box-sizing:border-box; min-height:var(--tcb-sticky-header); background:#fff; }
/* WordPress adds the admin bar only for logged-in users. Keep the fixed site
   header below it instead of letting the bar cover the navigation. */
.admin-bar { --tcb-adminbar-height:32px; }
/* WordPress already shifts the document below its admin bar. Do not add that
   height a second time to the content area. */
.admin-bar .wp-site-blocks { padding-top:var(--tcb-sticky-header); }
#wpadminbar { position:fixed; z-index:999999; }
.tcb-mobile-page-title { display:none; }
.tcb-brand { display:flex; align-items:center; gap:14px; }
.tcb-brand-logo { display:block; width:104px; height:62px; }
.tcb-brand-logo img { display:block; width:100%; height:100%; object-fit:contain; object-position:left center; }
.tcb-brand-name { color:var(--tcb-navy); font-size:1.05rem; font-weight:700; letter-spacing:-.02em; white-space:nowrap; }
.tcb-brand-name small { font-size:.8em; font-weight:600; }
.tcb-primary-navigation .tcb-menu { display:flex; align-items:center; gap:25px; padding:0; margin:0; list-style:none; }
.tcb-primary-navigation .tcb-menu li { position:relative; margin:0; }
.tcb-primary-navigation .tcb-menu > li > a { position:relative; display:inline-block; padding:11px 0; color:var(--tcb-ink); text-decoration:none; font-size:.86rem; font-weight:650; white-space:nowrap; transition:color .18s ease; }
.tcb-primary-navigation .tcb-menu > li > a:after { content:""; position:absolute; right:0; bottom:4px; left:0; height:2px; border-radius:2px; background:var(--tcb-blue); transform:scaleX(0); transform-origin:left; transition:transform .18s ease; }
.tcb-primary-navigation .tcb-menu > li > a:hover, .tcb-primary-navigation .tcb-menu > li.current-menu-item > a, .tcb-primary-navigation .tcb-menu > li.current-menu-ancestor > a { color:var(--tcb-blue); }
.tcb-primary-navigation .tcb-menu > li > a:hover:after, .tcb-primary-navigation .tcb-menu > li.current-menu-item > a:after, .tcb-primary-navigation .tcb-menu > li.current-menu-ancestor > a:after { transform:scaleX(1); }
.tcb-primary-navigation .sub-menu { display:none; position:absolute; top:100%; left:0; right:auto; width:410px; min-width:0; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:3px; padding:10px; margin:0; list-style:none; background:#fff; border:0; border-radius:12px; box-shadow:0 16px 36px rgba(13,43,83,.17); }
.tcb-primary-navigation .sub-menu:before, .tcb-primary-navigation .tcb-team-menu:before { content:none; }
.tcb-primary-navigation .sub-menu li { position:relative; z-index:1; }
.tcb-primary-navigation .sub-menu a { display:block; padding:10px 11px; border-radius:7px; color:var(--tcb-ink) !important; font-size:.82rem; text-decoration:none !important; white-space:normal; }
.tcb-primary-navigation .sub-menu a:hover { background:#edf5fc; color:var(--tcb-ink) !important; }
.tcb-primary-navigation li:hover > .sub-menu, .tcb-primary-navigation li:focus-within > .sub-menu, .tcb-primary-navigation li.tcb-submenu-persist > .sub-menu { display:grid; }
.tcb-primary-navigation .tcb-team-menu { display:none; position:absolute; top:100%; right:-14px; width:650px; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; padding:18px; background:#fff; border-radius:14px; box-shadow:0 16px 36px rgba(13,43,83,.17); }
.tcb-primary-navigation .tcb-team-menu .tcb-team-menu-group { position:relative; z-index:1; min-width:0; }
.tcb-primary-navigation .tcb-team-menu h2 { margin:0 0 8px; padding:0 10px; color:var(--tcb-blue); font-family:inherit; font-size:.76rem; font-weight:750; letter-spacing:.08em; text-transform:uppercase; }
.tcb-primary-navigation .tcb-team-menu ul { display:grid; gap:3px; padding:0; margin:0; list-style:none; }
.tcb-primary-navigation .tcb-team-menu a { display:block; padding:9px 10px; border-radius:7px; color:var(--tcb-ink) !important; font-size:.84rem; text-decoration:none !important; transition:background-color .18s ease; }
.tcb-primary-navigation .tcb-team-menu a:hover, .tcb-primary-navigation .tcb-team-menu .current-menu-item > a { background:#edf5fc; color:var(--tcb-ink) !important; }
.tcb-primary-navigation li:hover > .tcb-team-menu, .tcb-primary-navigation li:focus-within > .tcb-team-menu, .tcb-primary-navigation li.tcb-submenu-persist > .tcb-team-menu { display:grid; }
.tcb-menu-toggle, .tcb-mobile-drawer { display:none; }
.tcb-hero { min-height: min(520px, 65vh); position: relative; }
.tcb-hero .wp-block-cover__background { display:none !important; }
.tcb-hero .wp-block-cover__inner-container { width: min(100% - 40px, 1200px); margin: 0 auto; }
.tcb-hero .wp-block-cover__inner-container { position:relative; }
.tcb-hero-copy { position:absolute; right:0; bottom:42px; margin:0; padding:0; background:transparent; }
.tcb-hero-copy h1 { color:#fff !important; text-shadow:0 3px 20px rgba(3,22,54,.88); }
.tcb-hero-copy p { color:#fff !important; text-shadow:0 2px 11px rgba(3,22,54,.9); }
.tcb-hero-copy .has-primary-color { color:#fff !important; text-shadow:0 2px 10px rgba(3,22,54,.9); }
.tcb-hero-copy .wp-block-button__link { box-shadow:0 4px 16px rgba(3,22,54,.25); }
.tcb-hero h1 { max-width: 760px; text-wrap: balance; }
.tcb-kicker { letter-spacing: .14em; text-transform: uppercase; }
.tcb-button-outline .wp-element-button { border: 1px solid #fff; background: rgba(8,45,98,.25) !important; color: #fff !important; }
.tcb-button-outline .wp-element-button:hover { background: #fff !important; color: var(--tcb-navy) !important; }
.tcb-news-card { height: 100%; border: 1px solid #dbe3ec; box-shadow: 0 10px 26px rgba(13, 43, 83, .07); transition: transform .2s ease, box-shadow .2s ease; }
.tcb-news-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(13, 43, 83, .12); }
.tcb-news-slider { position:relative; }
.tcb-news-slider__track { display:flex; gap:20px; margin:0; padding:0 0 12px; overflow-x:auto; overscroll-behavior-x:contain; scroll-behavior:smooth; scroll-snap-type:x mandatory; scrollbar-width:thin; scrollbar-color:var(--tcb-blue) #edf3f9; }
.tcb-news-slider__track > * { flex:0 0 calc((100% - 40px) / 3); min-width:0; margin:0 !important; scroll-snap-align:start; }
.tcb-news-slider__track .tcb-news-card { box-sizing:border-box; min-height:100%; }
.tcb-news-slider__controls { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.tcb-news-slider__button { display:grid; width:42px; height:42px; place-items:center; border:1px solid #b9cbe0; border-radius:50%; background:#fff; color:var(--tcb-navy); cursor:pointer; font:650 1.25rem/1 'Avenir Next', Avenir, Inter, sans-serif; transition:background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.tcb-news-slider__button:hover { border-color:var(--tcb-blue); background:var(--tcb-blue); color:#fff; transform:translateY(-1px); }
.tcb-event-date { min-width: 70px; }
.tcb-event-list > .wp-block-group + .wp-block-group { border-top: 1px solid #dbe3ec; }
.tcb-feature-grid .wp-block-column { min-height: 210px; }
.tcb-footer a { text-decoration: none; }
.tcb-footer a:hover { text-decoration: underline; }
.tcb-footer .wp-block-site-title { margin-bottom:12px; }
.tcb-footer-logo { width:150px; margin-top:0; margin-bottom:14px; }
.tcb-footer-logo img { display:block; width:100%; height:auto; }
.tcb-footer-grid { display:grid !important; grid-template-columns:minmax(240px,1.65fr) repeat(3,minmax(170px,1fr)); gap:40px; width:100%; max-width:1200px; margin:0 auto !important; }
.tcb-footer-grid > .wp-block-column { min-width:0 !important; margin:0 !important; }
.tcb-footer .tcb-footer-grid h3 { margin:4px 0 18px; font-size:.86rem; font-weight:750; }
.tcb-footer .tcb-footer-grid p, .tcb-footer .tcb-footer-grid strong, .tcb-footer .tcb-footer-grid a { color:#fff !important; }
.tcb-footer .tcb-footer-grid p { margin:0 0 16px; line-height:1.55; }
.tcb-footer-contact a { overflow-wrap:anywhere; }
.tcb-footer-bank span, .tcb-footer-bank strong { display:block; }
.tcb-footer-bank span { margin-bottom:3px; color:#bcd7f1; font-size:.74rem; font-weight:750; letter-spacing:.08em; text-transform:uppercase; }
.tcb-footer-bank strong { font-size:.9rem; letter-spacing:.015em; white-space:nowrap; }
.tcb-footer > .wp-block-separator, .tcb-footer > .wp-block-paragraph:last-child { width:100%; max-width:1200px; margin-right:auto !important; margin-left:auto !important; }
.wp-block-post-content table { width:100%; margin:28px 0; border-collapse:collapse; border:1px solid #dbe3ec; }
.wp-block-post-content th { background:var(--tcb-navy); color:#fff; font-weight:650; }
.wp-block-post-content td, .wp-block-post-content th { padding:13px 15px; text-align:left; vertical-align:top; border:1px solid #dbe3ec; }
.wp-block-post-content tr:nth-child(even) { background:#f7faff; }
.wp-block-post-content h2 { margin-top:2.2em; }
.wp-block-post-content img { height:auto; border-radius:12px; }
/* Court bookings: retain every court column on narrow screens. The wrapper,
   not the document, receives the horizontal scroll area. */
.rncbc_table_wrap { max-width:100%; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; }
.rncbc_table { min-width:700px; }
/* Booking form */
.rncbc_form { max-width:720px; margin:32px 0; padding:clamp(22px,4vw,36px); border:1px solid #dbe3ec; border-radius:16px; background:#f8fbfe; box-shadow:0 10px 28px rgba(13,43,83,.06); }
.rncbc_form .rncbc_field { margin:0 0 22px; color:var(--tcb-ink); font-size:1rem; font-weight:650; }
.rncbc_form .rncbc_field > input[type="text"], .rncbc_form .rncbc_field > input[type="email"], .rncbc_form .rncbc_field > input[type="tel"], .rncbc_form .rncbc_field > textarea, .rncbc_form .rncbc_field > select { box-sizing:border-box; width:100%; min-height:48px; margin-top:8px; padding:11px 13px; border:1px solid #b9c8d9; border-radius:8px; background:#fff; color:var(--tcb-ink); font:inherit; font-weight:400; transition:border-color .18s ease, box-shadow .18s ease; }
.rncbc_form .rncbc_field > textarea { min-height:120px; resize:vertical; }
.rncbc_form .rncbc_field > input:focus, .rncbc_form .rncbc_field > textarea:focus, .rncbc_form .rncbc_field > select:focus { border-color:var(--tcb-blue); outline:0; box-shadow:0 0 0 3px rgba(21,84,166,.16); }
.rncbc_form .rncbc_field label { display:inline-flex; align-items:center; gap:7px; margin:8px 15px 0 0; font-size:.94rem; font-weight:500; }
.rncbc_form input[type="checkbox"] { appearance:none; display:inline-grid; place-content:center; width:19px; height:19px; margin:0; border:1px solid #93a8be; border-radius:4px; background:#fff; }
.rncbc_form input[type="checkbox"]::before { width:10px; height:10px; content:""; border-radius:2px; background:var(--tcb-blue); transform:scale(0); transition:transform .12s ease; }
.rncbc_form input[type="checkbox"]:checked::before { transform:scale(1); }
.rncbc_form .rncbc_submit, .rncbc_form .rncbc_coaching_submit { min-height:48px; padding:0 20px; border:0; border-radius:8px; background:var(--tcb-blue); color:#fff; cursor:pointer; font:650 1rem/1 'Avenir Next', Avenir, Inter, sans-serif; box-shadow:0 5px 14px rgba(21,84,166,.2); transition:background-color .18s ease, transform .18s ease; }
.rncbc_form .rncbc_submit:hover, .rncbc_form .rncbc_coaching_submit:hover { background:var(--tcb-navy); transform:translateY(-1px); }
.wp-block-navigation .wp-block-navigation-item__content { text-underline-offset: .28em; }
.wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--tcb-blue); }
.wp-block-button__link { transition: transform .18s ease, background-color .18s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }
:focus-visible { outline: 3px solid #d4a35c; outline-offset: 3px; }
/* Tablet portrait and below use the same robust, touch-first navigation. */
@media (max-width: 1047px) {
  :root { --tcb-sticky-header:79px; }
  .tcb-site-header { margin-bottom:0 !important; }
  .tcb-site-header + * { margin-block-start:0 !important; }
  .wp-block-template-part:has(.tcb-site-header) { margin-bottom:0 !important; padding-bottom:0 !important; }
  .wp-site-blocks > main, .wp-site-blocks > .wp-block-group:not(.tcb-site-header):not(.tcb-footer) { padding-right:20px; padding-left:20px; }
  .wp-site-blocks > main { padding-top:24px !important; }
  .wp-site-blocks > .wp-block-cover, .wp-site-blocks > .wp-block-template-part { padding-right:0; padding-left:0; }
  .rncbc_table_wrap { margin-right:-20px; padding-right:20px; }
  .rncbc_table { width:max-content; min-width:700px; margin-top:10px; }
  .rncbc_table th, .rncbc_table td { min-width:86px; }
  .rncbc_table th:first-child, .rncbc_table td:first-child { min-width:120px; }
  /* The teams plugin breaks out to 100vw on small screens. That conflicts
     with this theme's content gutter and causes the right side to overflow. */
  .wp-block-post-content .tcb-teams-overview,
  .wp-block-post-content .tcb-team-page {
    box-sizing:border-box;
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:16px 0 !important;
  }
  .tcb-hero { display:block; height:auto !important; min-height:0 !important; padding:0 !important; aspect-ratio:auto; background:transparent; }
  .tcb-hero .wp-block-cover__image-background { position:relative !important; inset:auto !important; display:block !important; width:100% !important; height:auto !important; min-height:0 !important; object-fit:contain !important; object-position:center center !important; transform:none !important; }
  .tcb-hero .wp-block-cover__inner-container { position:absolute; inset:0; width:100%; height:100%; padding:0; }
  .tcb-site-header .wp-block-site-logo img { max-height: 58px; width: auto; }
  .tcb-site-header { padding-right:20px !important; padding-left:20px !important; }
  .tcb-site-header { min-height:76px; gap:10px; }
  .tcb-mobile-page-title { display:block; min-width:0; overflow:hidden; color:var(--tcb-navy); font-size:.9rem; font-weight:700; line-height:1.15; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
  .tcb-site-header + main .wp-block-post-title { display:none; }
  .tcb-brand-logo { width:82px; height:55px; }
  .tcb-brand-name { display:none; }
  .tcb-footer-logo { width:122px; margin-top:0; margin-bottom:12px; }
  .tcb-footer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:34px 28px; }
  .tcb-primary-navigation { display:none; }
  .tcb-menu-toggle { display:grid; grid-template-columns:16px auto; column-gap:8px; align-items:center; padding:10px 0; border:0; background:transparent; color:var(--tcb-navy); cursor:pointer; font:700 .92rem/1 'Avenir Next', Avenir, Inter, sans-serif; }
  .tcb-menu-toggle span { grid-column:1; width:16px; height:2px; background:currentColor; }
  .tcb-menu-toggle span:nth-child(1) { align-self:end; }
  .tcb-menu-toggle span:nth-child(3) { align-self:start; }
  .tcb-menu-toggle em { grid-column:2; grid-row:1 / span 3; font-style:normal; }
  .tcb-mobile-drawer { display:block; position:fixed; z-index:99999; inset:0; padding:16px; background:rgba(5,22,52,.55); opacity:0; pointer-events:none; transition:opacity .2s ease; }
  .tcb-mobile-drawer.is-open { opacity:1; pointer-events:auto; }
  .tcb-mobile-drawer__panel { height:100%; overflow:auto; padding:24px 20px 40px; background:#fff; border-radius:18px; box-shadow:0 20px 54px rgba(3,22,54,.3); transform:translateY(-18px); transition:transform .24s ease; }
  .tcb-mobile-drawer.is-open .tcb-mobile-drawer__panel { transform:translateY(0); }
  .tcb-mobile-drawer__top { display:flex; align-items:center; justify-content:space-between; padding-bottom:20px; border-bottom:1px solid #dbe3ec; color:var(--tcb-navy); font-size:1.15rem; }
  .tcb-menu-close { display:flex; align-items:center; justify-content:center; width:40px; height:40px; padding:0 0 3px; border:1px solid #dbe3ec; border-radius:50%; background:#fff; color:var(--tcb-navy); cursor:pointer; font-family:Arial, sans-serif; font-size:31px; font-weight:400; line-height:40px; text-align:center; }
  .tcb-mobile-drawer .tcb-menu { display:grid; gap:3px; padding:18px 0 0; margin:0; list-style:none; }
  .tcb-mobile-drawer .tcb-menu > li { position:relative; border-bottom:1px solid #e5ebf2; }
  .tcb-mobile-drawer .tcb-menu > li > a { display:block; padding:16px 46px 16px 0; color:var(--tcb-ink); font-size:1.06rem; font-weight:700; text-decoration:none; }
  .tcb-mobile-drawer .tcb-menu > li.current-menu-item > a, .tcb-mobile-drawer .tcb-menu > li.current-menu-ancestor > a { color:var(--tcb-blue); }
  .tcb-submenu-toggle { position:absolute; top:8px; right:0; display:grid; place-items:center; width:40px; height:40px; border:0; border-radius:8px; background:#edf5fc; color:var(--tcb-blue); cursor:pointer; font-size:23px; }
  .tcb-mobile-drawer .sub-menu { display:grid; gap:2px; padding:0 0 15px 14px; margin:0; list-style:none; }
  .tcb-mobile-drawer .sub-menu[hidden], .tcb-mobile-drawer .tcb-team-menu[hidden] { display:none !important; }
  .tcb-mobile-drawer .sub-menu a { display:block; padding:10px 0; color:var(--tcb-ink); font-size:.95rem; text-decoration:none; }
  .tcb-mobile-drawer .tcb-team-menu { display:grid; gap:14px; padding:0 0 16px 14px; }
  .tcb-mobile-drawer .tcb-team-menu h2 { margin:0; color:var(--tcb-blue); font-family:inherit; font-size:.76rem; letter-spacing:.08em; text-transform:uppercase; }
  .tcb-mobile-drawer .tcb-team-menu ul { display:grid; gap:3px; padding:7px 0 0 12px; margin:0; list-style:none; }
  .tcb-mobile-drawer .tcb-team-menu a { display:block; padding:8px 0; color:var(--tcb-ink); font-size:.95rem; text-decoration:none; }
  html.tcb-menu-open, html.tcb-menu-open body { overflow:hidden; }
  .tcb-hero-copy { right:0; bottom:28px; left:0; padding:0 20px; }
  .tcb-hero-copy .wp-block-buttons { gap:10px; }
  .tcb-hero-copy .wp-block-button__link { padding:9px 12px; font-size:.78rem; }
  .tcb-news-slider__track { gap:16px; padding-bottom:10px; }
  .tcb-news-slider__track > * { flex-basis:calc(100% - 34px); }
  .tcb-news-slider__controls { margin-top:12px; }
  .rncbc_form { margin-top:20px; padding:22px 18px; border-radius:12px; }
  .rncbc_form .rncbc_field label { margin-right:10px; font-size:.88rem; }
}

@media (max-width: 560px) {
  .tcb-footer-grid { grid-template-columns:1fr; gap:28px; }
  .tcb-footer-brand { display:grid; grid-template-columns:1fr auto; column-gap:20px; align-items:start; }
  .tcb-footer-brand .wp-block-site-title { grid-column:1; }
  .tcb-footer-brand .tcb-footer-logo { grid-column:2; grid-row:1 / span 2; width:96px; }
  .tcb-footer-brand > p:last-child { grid-column:1; }
  .tcb-footer .tcb-footer-grid h3 { margin-bottom:10px; }
  .tcb-footer-bank strong { white-space:normal; }
}

@media screen and (max-width: 782px) {
  .admin-bar { --tcb-adminbar-height:46px; }
}

/* Avoid edge-to-edge content in the narrow desktop range. */
@media (min-width: 1048px) and (max-width: 1280px) {
  .wp-site-blocks > .wp-block-group:not(.tcb-site-header):not(.tcb-footer) {
    padding-right:32px;
    padding-left:32px;
  }
}
