/*
Theme Name: TSV Gomaringen Badminton
Theme URI: https://www.badminton-gomaringen.de/
Description: Sauberes, modernes Design in den Vereinsfarben (Blau und Rot). Kindtheme von Twenty Twenty-Five.
Author: TSV Gomaringen Abt. Badminton
Template: twentytwentyfive
Version: 1.3.1
Requires at least: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: tsv-gomaringen
*/

:root {
  --tsv-blue: #0a1185;
  --tsv-blue-dark: #050a55;
  --tsv-red: #c80200;
  --tsv-red-dark: #9c0200;
  --tsv-ink: #14152e;
  --tsv-muted: #585a78;
  --tsv-surface: #f4f5fb;
  --tsv-line: #e0e2f0;
  --tsv-radius: 14px;
  --tsv-shadow:
    0 1px 2px rgba(5, 10, 85, 0.06), 0 8px 24px rgba(5, 10, 85, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--tsv-ink);
  -webkit-font-smoothing: antialiased;
}

/* Plain links: no box on click or tap. Keyboard focus still uses the theme ring. */
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Header ---------- */

.tsv-header {
  /* No backdrop-filter here: it would turn the header into the containing block of the
	   fixed full-screen mobile menu and squash the menu into the header. */
  background: #fff;
  border-top: 3px solid var(--tsv-red);
}

.tsv-header-top {
  padding-block: 1.1rem 1rem;
  padding-inline: var(--wp--style--root--padding-left, 1.5rem);
}

/* Menu bar: the hairline above it spans the full screen width */
.tsv-header-bar {
  border-top: 1px solid var(--tsv-line);
  padding-block: 0.15rem;
  padding-inline: var(--wp--style--root--padding-left, 1.5rem);
}

/* Short pages still fill the viewport, so the footer stays at the bottom */
.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.admin-bar .wp-site-blocks {
  min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
  min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}

/* No gap between the header and the page content */
.wp-site-blocks > main {
  flex: 1 0 auto;
  margin-block-start: 0;
}

/* Brand: crest, club name, department */

.tsv-brand {
  flex-shrink: 0;
  align-items: stretch !important;
}

/* name + subline form one tight block, centred on the crest */
.tsv-brand-text {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.tsv-header .wp-block-site-logo img {
  height: auto;
  display: block;
}

/* crest sits 5px lower relative to the name */
.tsv-brand .wp-block-site-logo {
  position: relative;
  top: 5px;
}

.tsv-brand-text p {
  margin: 0;
}

.tsv-brand-name {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: -0.06em !important;
}

.tsv-brand-name a {
  color: var(--tsv-blue);
  text-decoration: none;
}

.tsv-brand-sub {
  margin-bottom: -0.1em !important;
  font-size: clamp(0.68rem, 1.4vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tsv-muted);
  line-height: 1;
}

/* Navigation: left-aligned under the crest */

.tsv-header
  .wp-block-navigation__container
  > .wp-block-navigation-item:first-child
  > .wp-block-navigation-item__content {
  padding-left: 0; /* first label lines up with the crest edge */
}

.tsv-header
  .wp-block-navigation__container
  > .wp-block-navigation-item:first-child
  > .wp-block-navigation-item__content::after {
  left: 0;
}

.tsv-header .wp-block-navigation {
  font-size: 0.95rem;
  font-weight: 600;
}

.tsv-header .wp-block-navigation a {
  color: var(--tsv-ink);
  text-decoration: none;
}

.tsv-header .wp-block-navigation-item__content {
  position: relative;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s ease;
}

/* No box around menu items on click or tap (keyboard focus keeps a clear ring) */
.tsv-header .wp-block-navigation a,
.tsv-header .wp-block-navigation button {
  -webkit-tap-highlight-color: transparent;
}

.tsv-header .wp-block-navigation a:focus:not(:focus-visible),
.tsv-header .wp-block-navigation button:focus:not(:focus-visible),
.tsv-header .wp-block-navigation a:active,
.tsv-header .wp-block-navigation button:active {
  outline: none;
  box-shadow: none;
}

.tsv-header .wp-block-navigation a:focus-visible,
.tsv-header .wp-block-navigation button:focus-visible {
  outline: 2px solid var(--tsv-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Thin red underline instead of a pill background */
.tsv-header
  .wp-block-navigation__container
  > .wp-block-navigation-item
  > .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--tsv-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.tsv-header .wp-block-navigation-item__content:hover,
.tsv-header .wp-block-navigation-item__content:focus-visible {
  color: var(--tsv-blue);
}

.tsv-header
  .wp-block-navigation__container
  > .wp-block-navigation-item
  > .wp-block-navigation-item__content:hover::after,
.tsv-header
  .wp-block-navigation__container
  > .wp-block-navigation-item
  > .wp-block-navigation-item__content:focus-visible::after,
.tsv-header
  .wp-block-navigation__container
  > .current-menu-item
  > .wp-block-navigation-item__content::after,
.tsv-header
  .wp-block-navigation__container
  > .wp-block-navigation-item
  > .wp-block-navigation-item__content[aria-current="page"]::after {
  transform: scaleX(1);
}

.tsv-header .current-menu-item > .wp-block-navigation-item__content,
.tsv-header .wp-block-navigation-item__content[aria-current="page"] {
  color: var(--tsv-blue);
}

/* Dropdown arrow sits right next to its label */
.tsv-header .wp-block-navigation__submenu-icon {
  margin-left: -0.55rem;
  margin-right: 0.15rem;
  width: 1.05em;
}

.tsv-header .wp-block-navigation__submenu-container {
  border: 1px solid var(--tsv-line);
  border-radius: 10px;
  box-shadow: var(--tsv-shadow);
  padding: 0.35rem;
  min-width: 13rem;
}

.tsv-header
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.tsv-header
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content:hover {
  background: var(--tsv-surface);
}

/* Menu button (small screens) */
.tsv-header .wp-block-navigation__responsive-container-open {
  padding: 0.45rem;
  border: 1px solid var(--tsv-line);
  border-radius: 8px;
  color: var(--tsv-blue);
}

.tsv-header .wp-block-navigation__responsive-container-open svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 599px) {
  /* Stick the template-part header itself. The bar sits inside a flex column,
     so a sticky child would scroll away with its parent. */
  .wp-site-blocks > header,
  .tsv-header {
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .admin-bar .wp-site-blocks > header,
  .admin-bar .tsv-header {
    top: var(--wp-admin--admin-bar--height, 32px);
  }

  /* Menu button sits in the top row, right next to the club name */
  .tsv-header-bar {
    position: absolute;
    top: 0;
    right: 0;
    border-top: 0;
    padding-block: 0;
    padding-inline: 0 var(--wp--style--root--padding-right, 1.25rem);
    height: 5.4rem;
    display: flex;
    align-items: center;
  }

  .tsv-header-top {
    padding-right: 4.5rem;
  }

  /* Full-screen menu */
  .tsv-header .wp-block-navigation__responsive-container.is-menu-open {
    padding: 1.25rem;
    background: #fff;
    overflow-y: auto;
  }

  .tsv-header
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content {
    padding-top: 2.5rem;
  }

  /* Core's overlay rules are fairly specific, so these are too */
  .tsv-header
    .wp-block-navigation
    .is-menu-open
    .wp-block-navigation__container {
    width: 100%;
    align-items: stretch;
    gap: 0;
  }

  .tsv-header .wp-block-navigation .is-menu-open .wp-block-navigation-item {
    width: 100%;
    flex-wrap: wrap;
    margin: 0;
  }

  .tsv-header
    .wp-block-navigation
    .is-menu-open
    .wp-block-navigation-item__content {
    display: block;
    padding: 0.85rem 0 !important;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 0;
  }

  .tsv-header
    .wp-block-navigation
    .is-menu-open
    .wp-block-navigation-item__content::after {
    display: none;
  }

  .tsv-header
    .wp-block-navigation
    .is-menu-open
    .wp-block-navigation__responsive-container-content
    > .wp-block-navigation__container
    > .wp-block-navigation-item {
    border-bottom: 1px solid var(--tsv-line);
  }

  /* Submenus open inline, indented, no floating box */
  .tsv-header
    .wp-block-navigation
    .is-menu-open
    .wp-block-navigation__submenu-container {
    position: static;
    width: 100%;
    min-width: 0;
    padding: 0 0 0.5rem 1rem !important;
    border: 0;
    box-shadow: none;
    background: none;
  }

  .tsv-header
    .wp-block-navigation
    .is-menu-open
    .wp-block-navigation__submenu-container
    .wp-block-navigation-item {
    margin: 0;
  }

  .tsv-header
    .wp-block-navigation
    .is-menu-open
    .wp-block-navigation__submenu-container
    .wp-block-navigation-item__content {
    padding: 0.5rem 0 !important;
    font-size: 1rem;
    font-weight: 500;
  }
}

/* ---------- Hero ---------- */

.tsv-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: var(--tsv-blue-dark);
  background-image:
    radial-gradient(
      900px 400px at 85% -10%,
      rgba(200, 2, 0, 0.45),
      transparent 60%
    ),
    linear-gradient(
      100deg,
      rgba(5, 10, 85, 0.94) 0%,
      rgba(10, 17, 133, 0.78) 55%,
      rgba(10, 17, 133, 0.55) 100%
    ),
    url("assets/hero.webp?v=3");
  background-size: auto, auto, cover;
  background-position:
    center,
    center,
    70% center;
  background-repeat: no-repeat;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  padding-inline: var(--wp--style--root--padding-left, 1.5rem);
}

.tsv-hero h1,
.tsv-hero p {
  color: #fff;
}

.tsv-hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.tsv-hero .tsv-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ff9d9a;
  margin-bottom: 0.8rem;
}

.tsv-hero .tsv-lead {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 36rem;
  opacity: 0.92;
}

.tsv-hero .is-style-tonal > .wp-block-button__link {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.3);
  border: 0;
}

.tsv-hero .is-style-tonal > .wp-block-button__link:hover,
.tsv-hero .is-style-tonal > .wp-block-button__link:focus-visible {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.5);
}

.tsv-hero .wp-block-button:not(.is-style-tonal) > .wp-block-button__link {
  background-color: rgba(200, 2, 0, 1);
}

.tsv-hero .wp-block-button:not(.is-style-tonal) > .wp-block-button__link:hover,
.tsv-hero
  .wp-block-button:not(.is-style-tonal)
  > .wp-block-button__link:focus-visible {
  background-color: rgba(156, 2, 0, 0.82);
}

/* ---------- Sponsor strip ---------- */

.tsv-sponsors,
.tsv-sponsors.has-global-padding {
  background: #fff;
  border-bottom: 1px solid var(--tsv-line);
  padding: 1.15rem 0 1.25rem;
  margin: 0;
}

.tsv-sponsors-plate {
  width: min(
    var(--wp--style--global--wide-size, 1120px),
    calc(
      100% - var(--wp--style--root--padding-left, clamp(30px, 5vw, 50px)) -
        var(--wp--style--root--padding-right, clamp(30px, 5vw, 50px))
    )
  );
  margin-inline: auto;
  container-type: inline-size;
}

.tsv-sponsors-viewport {
  --tsv-sponsors-visible: 5;
  overflow: hidden;
  container-type: inline-size;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}

@container (max-width: 720px) {
  .tsv-sponsors-viewport {
    --tsv-sponsors-visible: 4;
  }
}

.tsv-sponsors-track {
  display: flex;
  width: max-content;
  align-items: center;
}

.tsv-sponsors-set {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tsv-sponsors-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 calc(100cqi / var(--tsv-sponsors-visible));
  width: calc(100cqi / var(--tsv-sponsors-visible));
  height: 4.5rem;
  padding-inline: 0.85rem;
}

.tsv-sponsors-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.tsv-sponsors-item img {
  display: block;
  height: auto;
  width: auto;
  max-height: 2.75rem;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.72;
  transition:
    filter 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.tsv-sponsors-item a:hover img,
.tsv-sponsors-item a:focus-visible img {
  filter: none;
  opacity: 1;
  transform: scale(1.04);
}

.tsv-sponsors.is-static .tsv-sponsors-set[aria-hidden="true"] {
  display: none;
}

.tsv-sponsors.is-static .tsv-sponsors-track {
  width: 100%;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .tsv-sponsors-set[aria-hidden="true"],
  .tsv-sponsors-item[data-repeat] {
    display: none;
  }

  .tsv-sponsors-viewport {
    -webkit-mask-image: none;
    mask-image: none;
    overflow: visible;
  }

  .tsv-sponsors-track {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ---------- Buttons ---------- */

.wp-block-button__link,
.wp-element-button {
  border-radius: 10px;
  font-weight: 700;
  padding: 0.8rem 1.4rem;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;
}

.wp-block-button__link:hover {
  transform: translateY(-1px);
}

/* ---------- Post cards ---------- */

.tsv-section-title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tsv-muted);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.tsv-cards .wp-block-post-template {
  gap: 1.5rem;
  align-items: start;
}

.tsv-card {
  height: auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.94) 45%,
    rgba(222, 228, 250, 0.92) 100%
  );
  border: 0;
  border-radius: var(--tsv-radius);
  box-shadow: 0 12px 30px rgba(5, 10, 85, 0.16);
  padding: 1.4rem 1.5rem 1.3rem;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.tsv-card > * {
  margin-block: 0;
}

.tsv-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(5, 10, 85, 0.24);
}

.tsv-card .tsv-card-image {
  margin: -1.4rem -1.5rem 1.1rem;
  overflow: hidden;
  border-radius: var(--tsv-radius) var(--tsv-radius) 0 0;
  background: var(--tsv-surface);
}

.tsv-card .tsv-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 0;
  display: block;
  transition: transform 0.3s ease;
}

.tsv-card:hover .tsv-card-image img {
  transform: scale(1.04);
}

.tsv-card .tsv-card-image.tsv-card-placeholder,
.wp-block-post-featured-image.tsv-card-placeholder {
  background: #c5d4ea;
}

.tsv-card .tsv-card-image.tsv-card-placeholder img,
.wp-block-post-featured-image.tsv-card-placeholder img {
  filter: saturate(0.3) brightness(1);
  opacity: 0.75;
}

.tsv-card .tsv-card-image.tsv-card-placeholder a {
  display: block;
  width: 100%;
  height: 100%;
}

.wp-block-post-featured-image.tsv-card-video {
  position: relative;
  background: #11131f;
}

.wp-block-post-featured-image.tsv-card-video.tsv-card-placeholder {
  background: #c5d4ea;
}

main > .wp-block-post-featured-image.tsv-card-video {
  margin-bottom: 2rem;
}

.wp-block-post-featured-image.tsv-card-video .tsv-video-facade {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.wp-block-post-featured-image.tsv-card-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: #11131f;
}

.tsv-card:hover .tsv-card-image.tsv-card-video video {
  transform: none;
}

.tsv-card .wp-block-post-date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tsv-muted);
}

.tsv-card .wp-block-post-title {
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-block: 0.5rem 0.7rem;
}

.tsv-card .wp-block-post-title a {
  color: var(--tsv-blue);
  text-decoration: none;
  transition: color 0.18s ease;
}

.tsv-card:hover .wp-block-post-title a,
.tsv-card .wp-block-post-title a:hover {
  color: var(--tsv-red);
}

.tsv-card .wp-block-post-excerpt {
  color: var(--tsv-muted);
  font-size: 0.95rem;
}

.tsv-card .wp-block-post-excerpt p {
  margin: 0;
}

.tsv-card .wp-block-post-excerpt__more-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-weight: 700;
  color: var(--tsv-red);
  text-decoration: none;
}

.tsv-card .wp-block-post-excerpt__more-link::after {
  content: " →";
}

.wp-block-query-pagination {
  margin-top: 2.5rem;
  font-weight: 700;
  gap: 0.5rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
}

.wp-block-query-pagination .current {
  background: var(--tsv-blue);
  color: #fff;
}

/* ---------- Page and article content ---------- */

.wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.wp-block-post-content img {
  height: auto;
  max-width: 100%;
  object-position: center center;
  border-radius: 10px;
}

.wp-block-post-content video,
.wp-block-post-content .tsv-video-facade {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  background: #11131f;
  border-radius: 10px;
  overflow: hidden;
}

.tsv-video-facade {
  position: relative;
}

.tsv-video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tsv-video-play {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.tsv-video-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 4.25rem;
  height: 4.25rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(5, 10, 85, 0.82);
}

.tsv-video-play::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 0.7rem 0 0.7rem 1.15rem;
  border-color: transparent transparent transparent #fff;
}

.wp-block-post-content p:has(> img:only-child) > img,
.wp-block-post-content > img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Tables: no grid, just hairlines between rows */
.wp-block-post-content .wp-block-table {
  margin-block: 1.5rem;
}

/* Core adds a 3px thead/tfoot rule in the text color, which stacks on the section line */
.wp-block-post-content .wp-block-table thead {
  border-bottom: 0;
}

.wp-block-post-content .wp-block-table tfoot {
  border-top: 0;
}

.wp-block-post-content table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

/* Tables with just a label and a value stay compact instead of spanning the whole page */
.wp-block-post-content table:not(:has(tr > :nth-child(3))) {
  max-width: 36rem;
}

.wp-block-post-content th,
.wp-block-post-content td {
  border: 0;
  border-bottom: 1px solid var(--tsv-line);
  padding: 0.85rem 0.25rem;
  vertical-align: middle;
  text-align: left;
}

.wp-block-post-content th:first-child,
.wp-block-post-content td:first-child {
  padding-left: 0;
}

.wp-block-post-content th:last-child,
.wp-block-post-content td:last-child {
  padding-right: 0;
}

.wp-block-post-content td:last-child:not(:first-child) {
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

/* Section rows (header cell or full-width cell) */
.wp-block-post-content th,
.wp-block-post-content td[colspan] {
  background: none;
  color: var(--tsv-blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tsv-line);
  padding-top: 1.8rem;
  text-align: left;
}

.wp-block-post-content thead th {
  padding-top: 0.85rem;
}

.wp-block-post-content td[colspan] strong,
.wp-block-post-content th strong {
  font-weight: inherit;
}

.wp-block-post-content iframe {
  border: 0;
  max-width: 100%;
  border-radius: 10px;
}

/* Halls: title above the map, two maps per row on large screens */
.wp-block-post-content .tsv-places {
  align-items: stretch;
  flex-wrap: wrap !important;
}

.wp-block-post-content .tsv-places > .wp-block-column {
  display: flex;
  flex-direction: column;
}

@media (min-width: 782px) {
  .wp-block-post-content .tsv-places > .wp-block-column {
    flex: 0 0 calc((100% - var(--wp--preset--spacing--50, 50px)) / 2);
    max-width: calc((100% - var(--wp--preset--spacing--50, 50px)) / 2);
  }
}

.wp-block-post-content .tsv-places .wp-block-column > p {
  margin: 0 0 0.65rem;
}

.wp-block-post-content .tsv-places iframe {
  display: block;
  width: 100%;
  height: 300px;
  margin-top: auto;
}

/* Training plans: one row per PDF, grouped by month. Stay on the left with the title. */
.wp-block-post-content > .wp-block-tsv-training-plans,
.editor-styles-wrapper .wp-block-tsv-training-plans {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left;
}

.wp-block-post-content .tsv-plans,
.editor-styles-wrapper .tsv-plans {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  max-width: none;
  margin-inline: 0;
  text-align: left;
}

.wp-block-post-content .tsv-plans-month {
  margin: 0 0 0.55rem;
  color: var(--tsv-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.wp-block-post-content .tsv-plans-list {
  border: 1px solid var(--tsv-line);
  border-radius: var(--tsv-radius);
  background: #fff;
  overflow: hidden;
}

.wp-block-post-content a.tsv-plan {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--tsv-line);
  color: var(--tsv-ink);
  text-decoration: none;
}

.wp-block-post-content a.tsv-plan:first-child {
  border-top: 0;
}

.wp-block-post-content a.tsv-plan:hover,
.wp-block-post-content a.tsv-plan:focus-visible {
  background: var(--tsv-surface);
  color: var(--tsv-ink);
  text-decoration: none;
}

.wp-block-post-content a.tsv-plan:focus-visible {
  outline: 2px solid var(--tsv-blue);
  outline-offset: -2px;
}

.tsv-plan-date {
  display: flex;
  flex: 0 0 3.1rem;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.tsv-plan-day {
  color: var(--tsv-blue);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tsv-plan-wd {
  margin-top: 0.22rem;
  color: var(--tsv-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tsv-plan-title {
  font-weight: 700;
}

.wp-block-post-content a.tsv-plan:hover .tsv-plan-title,
.wp-block-post-content a.tsv-plan:focus-visible .tsv-plan-title {
  color: var(--tsv-red);
}

.tsv-plan-file {
  margin-left: auto;
  color: var(--tsv-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tsv-plan-file::after {
  content: " →";
}

.wp-block-post-content .tsv-plans-more {
  margin: 0;
}

.wp-block-post-content .tsv-plans-more a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.1rem;
  border-radius: var(--tsv-radius);
  background: var(--tsv-blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.wp-block-post-content .tsv-plans-more a:hover,
.wp-block-post-content .tsv-plans-more a:focus-visible {
  background: var(--tsv-blue-dark);
  color: #fff;
  text-decoration: none;
}

.wp-block-post-content .tsv-plans-empty {
  margin: 0;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--tsv-line);
  border-radius: var(--tsv-radius);
  background: var(--tsv-surface);
  color: var(--tsv-muted);
}

/* Editor: date, file name, and the two buttons on one row */
.tsv-plans-edit .tsv-plans-edit-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.tsv-plans-edit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tsv-plans-edit-row input[type="date"] {
  font: inherit;
}

.tsv-plans-edit-file {
  flex: 1 1 10rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tsv-plans-edit .components-button.is-primary {
  margin-top: 0.75rem;
}

.tsv-plans-edit-empty {
  margin: 1rem 0 0;
  color: var(--tsv-muted);
}

/* Highlighted note (class set by the page cleanup, also usable in the editor) */
.wp-block-post-content .tsv-notice {
  /* Tonal alert: soft red tint, dark red text, accent bar on the left */
  background: color-mix(in srgb, var(--tsv-red) 10%, #fff);
  color: var(--tsv-red-dark);
  border-left: 5px solid var(--tsv-red);
  text-align: left;
  border-radius: var(--tsv-radius);
  padding: 1.2rem 1.5rem;
  margin-block: 1.5rem;
}

.wp-block-post-content .tsv-notice > * {
  max-width: none;
  margin-inline: 0;
  text-align: left;
  color: inherit;
}

.wp-block-post-content .tsv-notice a {
  color: inherit;
}

.wp-block-post-content .tsv-notice > :first-child {
  margin-top: 0;
}

.wp-block-post-content .tsv-notice > :last-child {
  margin-bottom: 0;
}

/* Training schedule: one column on small screens, two from 900px.
   Jugend and Hobby share the first column; Mannschaft is the second. */
.wp-block-post-content .tsv-schedule {
  display: grid;
  gap: 1rem;
  margin: 1.75rem 0 0;
}

@media (min-width: 900px) {
  .wp-block-post-content .tsv-schedule {
    grid-template-columns: 1fr 1fr;
    column-gap: 1.25rem;
    align-items: start;
  }

  .wp-block-post-content .tsv-schedule-jugend {
    grid-column: 1;
    grid-row: 1;
  }

  .wp-block-post-content .tsv-schedule-mannschaft {
    grid-column: 2;
    grid-row: 1;
  }

  .wp-block-post-content .tsv-schedule-hobby {
    grid-column: 1;
    grid-row: 2;
  }

  .wp-block-post-content .tsv-schedule-open {
    grid-column: 1 / -1;
  }
}

.wp-block-post-content .tsv-schedule-group {
  padding: 0.15rem 0 0.35rem;
}

.wp-block-post-content .tsv-schedule-group h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.wp-block-post-content .tsv-slots {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wp-block-post-content .tsv-slot {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--tsv-line);
}

.wp-block-post-content .tsv-slot-day {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tsv-blue);
}

.wp-block-post-content .tsv-slot-time {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tsv-ink);
}

.wp-block-post-content .tsv-slot-place {
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--tsv-muted);
}

.wp-block-post-content .tsv-schedule-note {
  margin: 0.15rem 0 0.9rem;
  font-size: 0.95rem;
  color: var(--tsv-muted);
}

/* Sponsor logos on Unsere Sponsoren: one group of image blocks, two columns. */
.wp-block-post-content .tsv-sponsor-logos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 2.5rem;
  align-items: center;
}

@media (min-width: 700px) {
  .wp-block-post-content .tsv-sponsor-logos {
    grid-template-columns: 1fr 1fr;
  }
}

.wp-block-post-content .tsv-sponsor-logos .wp-block-image {
  margin: 0;
  text-align: center;
}

.wp-block-post-content .tsv-sponsor-logos .wp-block-image img {
  width: auto;
  max-width: 100%;
  max-height: 160px;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 0;
}

/* Shown in the editor above the rotation, not on the public site. */
.tsv-sponsors-editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--tsv-surface);
  border: 1px solid var(--tsv-line);
  border-radius: 10px;
}

.tsv-sponsors-editor-bar p {
  margin: 0;
}

/* Logo grid (sponsors): logos centered and not larger than their column */
.wp-block-post-content .wp-block-columns .wp-block-image {
  text-align: center;
}

.wp-block-post-content .wp-block-columns .wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

.wp-block-post-title {
  color: var(--tsv-blue);
  letter-spacing: -0.02em;
}

/* ---------- Footer ---------- */

.tsv-footer {
  background: var(--tsv-blue-dark);
  color: #d6d9f2;
  border-top: 5px solid var(--tsv-red);
  padding-block: 3rem 1.5rem;
  padding-inline: var(--wp--style--root--padding-left, 1.5rem);
}

.tsv-footer h2,
.tsv-footer h3 {
  color: #fff;
}

.tsv-footer a {
  color: #fff;
  text-decoration: none;
}

.tsv-footer a:hover {
  color: #ff9d9a;
  text-decoration: underline;
}

/* No box around footer links on click or tap (keyboard focus keeps a clear ring) */
.tsv-footer a {
  -webkit-tap-highlight-color: transparent;
}

.tsv-footer a:focus:not(:focus-visible),
.tsv-footer a:active {
  outline: none;
  box-shadow: none;
}

.tsv-footer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

.tsv-footer .tsv-footer-links {
  list-style: none;
  padding: 0;
  /* Same gap below the heading as the paragraph in the first column */
  margin: var(--wp--style--block-gap, 1.2rem) 0 0;
  display: grid;
  gap: 0.4rem;
}

.tsv-footer .tsv-footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  opacity: 0.8;
}

/* nuLiga staffel block: standings and fixtures, restyled to the club table look */
.tsv-liga-heading {
  margin: 0 0 0.35rem;
}

.tsv-liga-scroll {
  overflow-x: auto;
  margin-block: 0.4rem 1.4rem;
}

.tsv-liga table,
.wp-block-post-content .tsv-liga table {
  width: max-content;
  max-width: none;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.tsv-liga th,
.tsv-liga td {
  border-bottom: 1px solid var(--tsv-line);
  padding: 0.7rem 0.55rem;
  vertical-align: middle;
  text-align: left;
  background: none;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
}

.tsv-liga thead th {
  color: var(--tsv-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tsv-blue);
  padding-top: 0.7rem;
}

.tsv-liga td.tsv-liga-text {
  white-space: normal;
}

.tsv-liga td.tsv-liga-num,
.tsv-liga th.tsv-liga-num {
  text-align: right;
  font-weight: 600;
}

.tsv-liga thead th.tsv-liga-num {
  font-weight: 700;
}

.tsv-liga tr.tsv-liga-own td {
  background: color-mix(in srgb, var(--tsv-blue) 10%, #fff);
  font-weight: 700;
}

.tsv-liga tr.tsv-liga-up td:first-child {
  box-shadow: inset 3px 0 0 var(--tsv-blue);
}

.tsv-liga tr.tsv-liga-down td:first-child {
  box-shadow: inset 3px 0 0 var(--tsv-red);
}

.tsv-liga-source {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--tsv-muted);
}

/* Beat the generic content-table rules (uppercase headers, last column forced right) */
.wp-block-post-content .tsv-liga th,
.wp-block-post-content .tsv-liga td {
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  border-bottom: 1px solid var(--tsv-line);
  padding: 0.7rem 0.55rem;
  text-align: left;
  background: none;
}

.wp-block-post-content .tsv-liga thead th {
  color: var(--tsv-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tsv-blue);
  padding-top: 0.7rem;
}

.wp-block-post-content .tsv-liga td.tsv-liga-text {
  text-align: left;
  font-weight: 400;
  white-space: normal;
}

.wp-block-post-content .tsv-liga td.tsv-liga-num,
.wp-block-post-content .tsv-liga th.tsv-liga-num {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}

.wp-block-post-content .tsv-liga thead th.tsv-liga-num {
  font-weight: 700;
}

.wp-block-post-content .tsv-liga tr.tsv-liga-own td {
  background: color-mix(in srgb, var(--tsv-blue) 10%, #fff);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
