/*
Theme Name: Tischtennis Linz & Umgebung v25
Theme URI: https://www.tischtennis-linz-umgebung.at
Author: Manfred Wunder
Author URI: https://www.tischtennis-linz-umgebung.at
Description: Modernes Theme für die Tischtennis-Informationsplattform Linz & Umgebung.
Version: 25.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tt-linz-v25
Tags: sports, modern, responsive, custom-menu, featured-images, widgets
*/

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1a3a5c;
  --navy-dark: #0f2540;
  --red: #e63329;
  --red-light: #fef2f2;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === TOP BAR === */
.site-topbar {
  background: var(--navy-dark);
  color: #a8c8e8;
  font-size: 12px;
  padding: 6px 0;
}
.site-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-links { display: flex; gap: 20px; }
.topbar-links a { color: #a8c8e8; transition: color .2s; }
.topbar-links a:hover { color: var(--white); }

/* === HEADER / NAV === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 3px solid var(--red);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 140px;
}

/* Logo */
.site-branding { display: flex; align-items: center; }
.site-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-logo-img {
  height: 62px;
  width: 66px;
  display: block;
  object-fit: cover;
  object-position: left center;
  flex-shrink: 0;
}
/* Site name text next to icon */
.site-name-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.site-name-main {
  font-size: 22px;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.site-name-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* Primary nav */
.main-nav-wrap { flex: 1; display: flex; justify-content: center; padding: 0 24px; }
.main-nav { display: flex; align-items: center; justify-content: space-evenly; gap: 0; width: 100%; }

.main-nav > li { position: relative; }

.main-nav > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.main-nav > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5l3 3 3-3' stroke='%231a3a5c' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .2s;
}
.main-nav > li:hover > a,
.main-nav > li.current-menu-item > a {
  background: var(--red-light);
  color: var(--red);
}
.main-nav > li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
  filter: invert(28%) sepia(98%) saturate(1200%) hue-rotate(340deg);
}

/* Invisible bridge: fills the gap between nav item and dropdown */
.main-nav > li::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
  z-index: 201;
}

/* Dropdown */
/* Level 1 dropdown */
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding: 8px 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
  min-width: 200px;
  z-index: 200;
}
.main-nav li:hover > .sub-menu { display: block; }
.main-nav .sub-menu li { position: relative; margin: 0; padding: 0; }
.main-nav .sub-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text);
  border-radius: 8px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.main-nav .sub-menu li a:hover { background: var(--red-light); color: var(--red); }

/* Arrow indicator for items with children inside dropdown */
/* Mobile toggle button — hidden on desktop, shown only in mobile media query */
.sub-toggle { display: none; }

.main-nav .sub-menu li.menu-item-has-children > a::after {
  content: '›';
  font-size: 16px;
  line-height: 1;
  margin-left: 8px;
  color: var(--muted);
}

/* Level 2 fly-out (3rd level) */
.main-nav .sub-menu .sub-menu {
  top: -8px;
  left: 100%;
  margin-left: 6px;
  border-radius: 14px;
}
/* Fly left if near right edge */
@media (min-width: 769px) {
  .main-nav > li:nth-last-child(-n+3) .sub-menu .sub-menu {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 6px;
  }
}

/* CTA button */
.btn-cta {
  background: var(--red);
  color: var(--white) !important;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-cta:hover { opacity: .9; transform: translateY(-1px); }

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--navy);
}
.menu-toggle svg { display: block; }

/* === HERO === */
.site-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 60%, var(--navy) 100%);
  position: relative;
  overflow: hidden;
  padding: 80px 0 70px;
}
.hero-deco-1 {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: var(--red);
  opacity: .08;
  top: -200px; right: -80px;
  pointer-events: none;
}
.hero-deco-2 {
  position: absolute;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: var(--white);
  opacity: .04;
  bottom: -120px; left: -40px;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-content { flex: 1; min-width: 280px; }
.hero-badge {
  display: inline-block;
  background: rgba(230,51,41,.18);
  color: #f87171;
  border: 1px solid rgba(230,51,41,.3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero-title span { color: #f87171; }
.hero-desc {
  font-size: 16px;
  color: #a8c8e8;
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 12px;
  text-decoration: none;
  transition: opacity .2s, transform .2s;
  display: inline-block;
}
.btn-primary:hover { opacity: .9; transform: translateY(-2px); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 26px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,.3);
  text-decoration: none;
  transition: background .2s, color .2s;
  display: inline-block;
}
.btn-ghost:hover { background: var(--white); color: var(--navy); }

/* Stats grid */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  flex-shrink: 0;
}
.stat-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 20px 24px;
  text-align: center;
  min-width: 120px;
}
.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  color: #a8c8e8;
  margin-top: 5px;
}

/* === QUICK SEARCH BAR === */
.quicksearch-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.quicksearch-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.quicksearch-label { font-size: 13px; font-weight: 700; color: var(--navy); }
.quicksearch-tag {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, color .2s;
  text-decoration: none;
  display: inline-block;
}
.quicksearch-tag:hover { border-color: var(--red); color: var(--red); }

/* === MAIN CONTENT === */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title { font-size: 20px; font-weight: 900; color: var(--navy); }
.section-link { font-size: 13px; font-weight: 700; color: var(--red); transition: opacity .2s; }
.section-link:hover { opacity: .75; }

/* Club cards */
.clubs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.club-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
.club-card:hover { border-color: var(--red); box-shadow: 0 4px 16px rgba(230,51,41,.08); }
.club-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.club-name { font-weight: 700; font-size: 14px; color: var(--navy); }
.club-city { font-size: 12px; color: var(--muted); margin-top: 2px; }
.club-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: var(--red-light); color: var(--red);
  white-space: nowrap;
}
.club-meta { font-size: 12px; color: #9ca3af; margin-bottom: 12px; display: flex; gap: 14px; }
.club-btn {
  display: block; width: 100%; text-align: center;
  font-size: 12px; font-weight: 600; padding: 7px;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--navy);
  transition: background .2s, color .2s; text-decoration: none;
}
.club-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.news-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  background: var(--white); transition: box-shadow .2s;
  text-decoration: none; display: block; color: inherit;
}
.news-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.news-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.news-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; }
.news-date { font-size: 11px; color: var(--muted); }
.news-title { font-weight: 700; font-size: 14px; color: var(--navy); margin-bottom: 4px; }
.news-teaser { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* === WIDGET AREAS === */
.widget-area { padding: 48px 0; background: var(--bg); border-top: 1px solid var(--border); }
.widget-area .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.widget h2, .widget h3 { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--red); }
.widget ul li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.widget ul li a { color: var(--text); transition: color .2s; }
.widget ul li a:hover { color: var(--red); }
.widget p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* === FOOTER === */
.site-footer { background: var(--navy-dark); color: #a8c8e8; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.footer-brand .footer-logo { font-size: 16px; font-weight: 900; color: var(--white); letter-spacing: .05em; }
.footer-brand .footer-subtitle { font-size: 10px; font-weight: 700; color: var(--red); letter-spacing: .15em; text-transform: uppercase; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.65; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 14px; }
.footer-col ul li { padding: 4px 0; }
.footer-col ul li a { font-size: 13px; color: #a8c8e8; transition: color .2s; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.4); }

/* === CONTENT PAGES === */
.page-content-wrap { padding: 48px 0; }
.page-content-inner { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.page-main-content { max-width: 860px; margin: 0 auto; width: 100%; }
.entry-title { font-size: 2rem; font-weight: 900; color: var(--navy); margin-bottom: 24px; }
.entry-content h2 { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin: 28px 0 12px; }
.entry-content h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin: 20px 0 8px; }
.entry-content p { margin-bottom: 14px; color: var(--text); line-height: 1.7; }
.entry-content ul, .entry-content ol { margin: 0 0 14px 20px; }
.entry-content li { margin-bottom: 5px; line-height: 1.65; }
.entry-content a { color: var(--red); text-decoration: underline; }

/* Post list */
.post-list { display: flex; flex-direction: column; gap: 24px; }
.post-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--white); transition: box-shadow .2s; }
.post-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.post-item-body { padding: 20px 24px; }
.post-item-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.post-item-title { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.post-item-title a { color: inherit; }
.post-item-title a:hover { color: var(--red); }
.post-item-excerpt { font-size: 14px; color: var(--muted); line-height: 1.6; }
.post-item-readmore { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--red); }

/* AI badge & notice */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 2px 9px;
  letter-spacing: .02em;
}
.news-ai { margin-top: 8px; }
.ai-notice {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 10px 0 20px;
  line-height: 1.4;
}
.ai-notice svg { flex-shrink: 0; color: #9ca3af; }

/* Breadcrumb */
.breadcrumb-bar { background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 0; font-size: 13px; color: var(--muted); }
.breadcrumb-bar a { color: var(--navy); }
.breadcrumb-bar a:hover { color: var(--red); }
.breadcrumb-bar span { margin: 0 6px; }

/* Search form */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; }
.search-form button { padding: 10px 18px; background: var(--navy); color: var(--white); border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .content-grid, .footer-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { display: none; }
}

@media (max-width: 768px) {
  .site-topbar { display: none; }
  .main-nav { display: none; flex-direction: column; align-items: stretch; width: 100%; position: absolute; top: 73px; left: 0; right: 0; background: var(--white); border-bottom: 2px solid var(--border); z-index: 99; }
  .main-nav.open { display: flex; }
  .main-nav > li::before { display: none; }
  .main-nav > li > a { border-radius: 0; border-bottom: 1px solid var(--border); padding: 14px 20px; }
  .main-nav .sub-menu { display: none; position: static; box-shadow: none; border: none; border-radius: 0; padding: 0 0 0 20px; background: var(--bg); }
  /* Mobile: invisible tap-zone — purely functional, zero visual weight */
  .sub-toggle { display: block; position: absolute; right: 0; top: 0; height: 100%; width: 52px; background: transparent; border: none; cursor: pointer; z-index: 2; }
  /* Chevron via CSS — small, subtle, part of the design */
  .main-nav .menu-item-has-children { position: relative; }
  .main-nav .menu-item-has-children > a::after { content: ''; position: absolute; right: 20px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid rgba(26,58,92,0.4); border-bottom: 1.5px solid rgba(26,58,92,0.4); transform: translateY(-70%) rotate(45deg); transition: transform .2s; pointer-events: none; }
  .main-nav .menu-item-has-children.sub-open > a::after { transform: translateY(-20%) rotate(-135deg); }
  .main-nav > li > a { padding-right: 48px; }
  .menu-toggle { display: block; }
  .btn-cta { display: none; }
  .header-inner { height: 100px; }
  .site-logo-img { height: 56px; width: auto; object-fit: contain; object-position: left center; }
  .site-name-wrap { display: none; }
  .clubs-grid { grid-template-columns: 1fr; }
  .page-content-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .tg-grid { grid-template-columns: 1fr; }
  .tg-hero-inner { flex-direction: column; gap: 12px; }
  .tg-join-inner { flex-direction: column; gap: 16px; }
}

/* === TRAININGSGRUPPE === */
.tg-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0f2d4f 60%, #1a3a5c 100%);
  padding: 56px 0 48px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.tg-hero-deco {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 50%, rgba(230,51,41,.15) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(255,255,255,.04) 0%, transparent 50%);
  pointer-events: none;
}
.tg-hero-inner { display: flex; align-items: center; gap: 32px; }
.tg-hero-badge-wrap { flex-shrink: 0; }
.tg-hero-badge {
  width: 88px; height: 88px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
}
.tg-hero-label {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red);
  background: rgba(230,51,41,.15); border: 1px solid rgba(230,51,41,.3);
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  margin-bottom: 12px;
}
.tg-hero-title {
  font-size: 36px; font-weight: 900; color: var(--white);
  margin-bottom: 12px; line-height: 1.1;
}
.tg-hero-desc { font-size: 15px; color: #a8c8e8; line-height: 1.65; margin: 0; max-width: 560px; }
.tg-hero-desc p { margin: 0; color: #a8c8e8; }

/* Steps bar */
.tg-steps {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  padding: 0;
}
.tg-steps-grid {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 20px 0;
}
.tg-step {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
}
.tg-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  font-size: 14px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tg-step-text { display: flex; flex-direction: column; }
.tg-step-text strong { font-size: 13px; font-weight: 800; color: var(--navy); }
.tg-step-text span { font-size: 11px; color: var(--muted); margin-top: 1px; }
.tg-step-arrow { font-size: 20px; color: var(--red); font-weight: 900; padding: 0 4px; }

/* Section */
.tg-section { padding: 48px 0; background: var(--bg); }
.tg-section-header { margin-bottom: 28px; }
.tg-section-title {
  font-size: 22px; font-weight: 900; color: var(--navy);
  display: flex; align-items: center; gap: 12px;
}
.tg-count {
  font-size: 13px; font-weight: 700;
  background: var(--navy); color: var(--white);
  padding: 2px 10px; border-radius: 999px;
}

/* Grid */
.tg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

/* Card */
.tg-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .25s, transform .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.tg-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  transform: translateY(-4px);
}
.tg-card-accent { height: 5px; width: 100%; }
.tg-card-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }

.tg-card-top { display: flex; align-items: center; gap: 16px; }
.tg-avatar {
  width: 68px; height: 68px;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.tg-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.tg-avatar-placeholder {
  width: 100%; height: 100%;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; letter-spacing: -.5px;
}
.tg-card-info { flex: 1; min-width: 0; }
.tg-name {
  font-size: 17px; font-weight: 800; color: var(--navy);
  margin-bottom: 7px; line-height: 1.2;
}
.tg-level {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .03em;
}

.tg-desc {
  font-size: 13px; color: var(--muted); line-height: 1.6;
  margin: 0; font-style: italic;
  padding: 10px 14px;
  background: var(--bg); border-radius: 8px;
  border-left: 3px solid var(--border);
}

.tg-details { display: flex; flex-direction: column; gap: 7px; }
.tg-detail {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--text); line-height: 1.3;
}
.tg-detail-icon { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }

.tg-contacts {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px;
  font-size: 12px; font-weight: 700; text-decoration: none;
  transition: all .2s; flex: 1; justify-content: center;
  letter-spacing: .01em;
}
.tg-btn-phone    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.tg-btn-phone:hover    { background: #166534; color: #fff; border-color: #166534; }
.tg-btn-whatsapp { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
.tg-btn-whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; }
.tg-btn-email    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.tg-btn-email:hover    { background: #1e40af; color: #fff; border-color: #1e40af; }

.tg-no-contact {
  font-size: 12px; color: var(--muted); text-align: center;
  padding: 10px; background: var(--bg); border-radius: 8px;
  border: 1px dashed var(--border); margin-top: auto;
}

.tg-empty {
  text-align: center; padding: 60px 0;
  color: var(--muted);
}
.tg-empty-icon { font-size: 48px; margin-bottom: 12px; }

/* Join */
.tg-join {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 48px 0;
  position: relative; overflow: hidden;
}
.tg-join::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 90% 50%, rgba(230,51,41,.2) 0%, transparent 60%);
  pointer-events: none;
}
.tg-join-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 32px;
  position: relative;
}
.tg-join-left { display: flex; align-items: center; gap: 20px; }
.tg-join-icon {
  font-size: 40px; width: 68px; height: 68px;
  background: rgba(255,255,255,.1); border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tg-join-title { font-size: 24px; font-weight: 900; color: var(--white); margin-bottom: 5px; }
.tg-join-text  { font-size: 14px; color: #a8c8e8; margin: 0; }
.tg-join-actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.tg-join-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px;
  font-size: 14px; font-weight: 700; text-decoration: none;
  transition: all .2s; white-space: nowrap;
}
.tg-join-btn-primary { background: var(--red); color: #fff; border: 2px solid var(--red); }
.tg-join-btn-primary:hover { background: #c0392b; border-color: #c0392b; }
.tg-join-btn-ghost { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.3); }
.tg-join-btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }

/* === TRAINER SECTION === */
.tg-section-trainers {
  background: var(--white);
  border-bottom: 3px solid var(--bg);
}
.tg-section-header { margin-bottom: 28px; }
.tg-section-icon { font-size: 22px; }
.tg-section-sub { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.tg-count-trainer { background: #5b21b6; }

.tg-trainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.tg-trainer-card {
  display: flex;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: box-shadow .25s, transform .25s;
}
.tg-trainer-card:hover {
  box-shadow: 0 16px 48px rgba(26,58,92,.15);
  transform: translateY(-4px);
}

.tg-trainer-card-left {
  width: 120px;
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--navy) 0%, #0f2d4f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
}
.tg-trainer-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.tg-trainer-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e63329, #c0392b);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900;
}
.tg-trainer-badge-wrap { text-align: center; }
.tg-trainer-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.2);
  padding: 3px 8px; border-radius: 999px;
  white-space: nowrap;
}

.tg-trainer-body {
  flex: 1;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 4px solid var(--red);
}
.tg-trainer-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tg-trainer-name { font-size: 19px; font-weight: 900; color: var(--navy); }
.tg-trainer-level {
  font-size: 11px; font-weight: 700;
  background: #ede9fe; color: #5b21b6;
  padding: 3px 10px; border-radius: 999px;
}
.tg-trainer-desc {
  font-size: 13px; color: var(--muted); line-height: 1.6;
  font-style: italic; margin: 0;
}
.tg-trainer-details { gap: 5px; }
.tg-trainer-contacts { border-top: 1px solid var(--border); padding-top: 12px; }

/* Responsive trainer cards */
@media (max-width: 600px) {
  .tg-trainer-grid { grid-template-columns: 1fr; }
  .tg-trainer-card { flex-direction: column; }
  .tg-trainer-card-left { width: 100%; flex-direction: row; gap: 16px; padding: 16px 20px; }
  .tg-trainer-avatar { width: 60px; height: 60px; }
  .tg-trainer-body { border-left: none; border-top: 4px solid var(--red); }
}

/* === WPFORMS EINTRAGEN-SECTION === */
.tg-form-section {
  background: #f8fafc;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.tg-form-inner {
  max-width: 700px;
  margin: 0 auto;
}
.tg-form-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}
.tg-form-icon {
  width: 56px; height: 56px;
  background: var(--navy);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.tg-form-title {
  font-size: 22px; font-weight: 900; color: var(--navy);
  margin-bottom: 4px;
}
.tg-form-sub { font-size: 14px; color: var(--muted); margin: 0; }
.tg-form-body {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
/* WPForms overrides für saubere Optik */
.tg-form-body .wpforms-field-label { font-weight: 600 !important; font-size: 13px !important; color: var(--navy) !important; }
.tg-form-body .wpforms-field input,
.tg-form-body .wpforms-field select,
.tg-form-body .wpforms-field textarea {
  border-radius: 8px !important;
  border: 1px solid #d1d5db !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  transition: border-color .2s, box-shadow .2s !important;
}
.tg-form-body .wpforms-field input:focus,
.tg-form-body .wpforms-field select:focus,
.tg-form-body .wpforms-field textarea:focus {
  border-color: var(--navy) !important;
  box-shadow: 0 0 0 3px rgba(26,58,92,.1) !important;
  outline: none !important;
}
.tg-form-body .wpforms-submit {
  background: var(--red) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 12px 28px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  cursor: pointer !important;
  transition: background .2s !important;
}
.tg-form-body .wpforms-submit:hover { background: #c0392b !important; }

/* Single post – weitere Beiträge unter dem Artikel */
.single-more-posts {
  background: var(--bg);
  border-top: 2px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}

/* Vereinsfinder iframe */
.vereinsfinder-wrap {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(26,58,92,.10);
  margin: 32px 0;
}
@media (max-width: 768px) {
  .vereinsfinder-wrap iframe { height: 540px !important; }
}

/* ══════════════════════════════════════════════════════
   Meisterschaft & Tabellen  (page-meisterschaft.php)
   ══════════════════════════════════════════════════════ */
.mstr-wrap { padding-bottom: 60px; }

/* Hero */
.mstr-hero { background: var(--navy); padding: 36px 0 32px; margin-bottom: 0; }
.mstr-hero-inner { display: flex; align-items: center; gap: 18px; }
.mstr-hero-icon { font-size: 42px; line-height: 1; }
.mstr-hero-title { color: #fff; font-size: clamp(22px,4vw,34px); font-weight: 900; margin: 0 0 6px; }
.mstr-hero-sub { color: rgba(255,255,255,.7); margin: 0; font-size: 15px; }

/* Section */
.mstr-section { margin: 48px 0; }
.mstr-section-title { font-size: 22px; font-weight: 800; color: var(--navy); margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.mstr-section-icon { font-size: 22px; }
.mstr-section-sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

/* ── Klassen-Tabs (1. Ebene) ── */
.mstr-klasse-tabs { display: flex; gap: 6px; margin-bottom: 0; border-bottom: 2px solid var(--border); }
.mstr-klasse-tab { padding: 10px 22px; font-size: 14px; font-weight: 700; color: var(--muted); background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: color .15s, border-color .15s; border-radius: 6px 6px 0 0; }
.mstr-klasse-tab:hover { color: var(--navy); }
.mstr-klasse-tab.active { color: var(--navy); border-bottom-color: var(--navy); background: #f4f7fb; }

/* Klassen-Panel */
.mstr-klasse-panel { display: none; background: #f4f7fb; border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; padding: 16px 16px 4px; }
.mstr-klasse-panel.active { display: block; }

/* ── Liga-Tabs (2. Ebene) ── */
.mstr-liga-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mstr-liga-tab { padding: 7px 16px; font-size: 13px; font-weight: 600; color: var(--navy); background: #fff; border: 1.5px solid var(--border); border-radius: 20px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.mstr-liga-tab:hover { border-color: var(--navy); }
.mstr-liga-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* iframes */
.mstr-iframe-wrap { display: none; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(26,58,92,.08); margin-bottom: 12px; }
.mstr-iframe-wrap.active { display: block; }
.mstr-iframe-wrap iframe { display: block; width: 100%; height: 620px; border: none; }

.mstr-xttv-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.mstr-xttv-hint a { color: var(--red); }

/* ── Vereins-Filter ── */
.mstr-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.mstr-filter-btn { padding: 7px 18px; font-size: 13px; font-weight: 600; color: var(--navy); background: var(--bg); border: 1.5px solid var(--border); border-radius: 20px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.mstr-filter-btn:hover { border-color: var(--navy); }
.mstr-filter-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Vereinskarten ── */
.mstr-clubs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.mstr-club-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 14px; transition: box-shadow .15s, transform .15s; }
.mstr-club-card:hover { box-shadow: 0 4px 18px rgba(26,58,92,.10); transform: translateY(-2px); }
.mstr-club-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; letter-spacing: .02em; }
.mstr-club-info { flex: 1; min-width: 0; }
.mstr-club-name { font-weight: 700; color: var(--navy); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mstr-club-ort { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.mstr-club-ligas { display: flex; flex-wrap: wrap; gap: 4px; }
.mstr-liga-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.mstr-liga-badge--regionalklasse { background: rgba(26,58,92,.1); color: var(--navy); }
.mstr-liga-badge--bezirksliga    { background: rgba(230,51,41,.1); color: var(--red); }
.mstr-club-link { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--navy); font-weight: 700; text-decoration: none; flex-shrink: 0; transition: background .15s, color .15s; }
.mstr-club-link:hover { background: var(--navy); color: #fff; }

.mstr-hint-edit { font-size: 12px; color: var(--muted); margin-top: 24px; background: var(--bg); border: 1px dashed var(--border); border-radius: 8px; padding: 10px 14px; }
.mstr-hint-edit code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* Mobile */
@media (max-width: 768px) {
  .mstr-hero { padding: 24px 0; }
  .mstr-hero-icon { font-size: 30px; }
  .mstr-klasse-tabs { gap: 3px; }
  .mstr-klasse-tab { padding: 9px 14px; font-size: 13px; }
  .mstr-liga-tab { font-size: 12px; padding: 6px 12px; }
  .mstr-iframe-wrap iframe { height: 500px; }
  .mstr-clubs-grid { grid-template-columns: 1fr; }
}
