/*
Theme Name: TSG Sulzbach Basketball
Theme URI: https://basketball.tsg-sulzbach.de
Author: TSG Sulzbach Basketball
Description: Visual rebuild of the former Joomla cloudbase3/Gantry site for the basketball department.
Version: 1.2.1
Text Domain: tsg-basketball
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
*/

@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap");

:root {
  --tsg-orange: #ee9900;
  --tsg-orange-hot: #ea9c4c;
  --tsg-orange-dark: #cc7a00;
  --tsg-text: #3c3c3c;
  --tsg-muted: #666666;
  --tsg-bg: #f3f3f3;
  --tsg-card: #ffffff;
  --tsg-footer-bg: #252525;
  --tsg-header-bg: #ffffff;
  --tsg-border: #e5e5e5;
  --tsg-max: 1140px;
  --tsg-font: "Roboto", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--tsg-font);
  font-weight: 400;
  color: var(--tsg-text);
  background: var(--tsg-bg);
  line-height: 1.55;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--tsg-orange);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--tsg-orange-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--tsg-font);
  line-height: 1.25;
  font-weight: 300;
  color: #222;
}

.site-container {
  width: min(100% - 2rem, var(--tsg-max));
  margin-inline: auto;
}


/* ========== Header ========== */
.site-header {
  background: #fff;
  margin: 0;
  padding: 0;
  display: block;
}
.site-header__bar {
  position: relative;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  padding: 16px 0;
}
.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 80px;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
  padding: 4px 0;
}
.site-branding:hover {
  text-decoration: none !important;
}
.site-logo-image {
  max-height: 85px;
  width: auto;
  object-fit: contain;
  display: block;
}
.site-logo-mark {
  width: 72px;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}
.site-logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
  font-family: var(--tsg-font);
}
.site-logo-text__black {
  color: #2b2b2b;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.site-logo-text__orange {
  color: var(--tsg-orange);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.site-logo-text__line {
  display: block;
  white-space: nowrap;
}
.site-title { display: none; }
.custom-logo-link { display: none; }

.site-header__social {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.site-header__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #cccccc;
  border-radius: 3px;
  color: #555555;
  text-decoration: none;
  background: #ffffff;
  transition: all 0.2s ease;
}
.site-header__social a:hover {
  background: var(--tsg-orange);
  color: #ffffff;
  border-color: var(--tsg-orange);
  text-decoration: none;
}

/* ========== Navigation ========== */
.site-nav {
  background: #ffffff;
  border: 0;
  margin: 0;
  padding: 0;
  display: block;
}
.site-nav__inner {
  display: flex;
  align-items: stretch;
}
.primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.primary-menu > li {
  position: relative;
  display: flex;
}
.primary-menu > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 6px;
  padding: 18px 20px;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #333333;
  text-decoration: none;
  line-height: 1.2;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
/* caret for items with children */
.primary-menu > li.menu-item-has-children > a::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 2px;
  opacity: 0.85;
}
.primary-menu > li:hover > a,
.primary-menu > li.focus > a,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-ancestor > a,
.primary-menu > li.current_page_item > a,
.primary-menu > li.current_page_ancestor > a {
  background: var(--tsg-orange) !important;
  color: #ffffff !important;
  text-decoration: none;
}

/* First-level dropdown */
.primary-menu .sub-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #2b2b2b;
  z-index: 300;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  min-width: 230px;
}
.primary-menu > li:hover > .sub-menu,
.primary-menu > li.focus > .sub-menu {
  display: block;
}
.primary-menu .sub-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.15s ease;
}
.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu li:hover > a {
  background: var(--tsg-orange);
  color: #ffffff;
  text-decoration: none;
}
.primary-menu .sub-menu > li {
  position: relative;
}
/* nested flyout */
.primary-menu .sub-menu .sub-menu {
  display: none;
  left: 100%;
  top: 0;
  min-width: 190px;
  padding: 6px 0;
  background: #2b2b2b;
}
.primary-menu .sub-menu > li:hover > .sub-menu,
.primary-menu .sub-menu > li.focus > .sub-menu {
  display: block;
}
.primary-menu .sub-menu .menu-item-has-children > a::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid currentColor;
  float: none;
  margin-left: 10px;
  opacity: 0.9;
}

/* Teams dropdown: standard sub-menu for current active teams */
.primary-menu > li.menu-item-teams > .sub-menu {
  min-width: 240px;
}


.menu-toggle {
  display: none;
  margin: 8px 0;
  background: var(--tsg-orange);
  color: #fff;
  border: 0;
  padding: 10px 14px;
  font-weight: 500;
  font-family: var(--tsg-font);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

/* ========== Hero / showcase ========== */
.site-hero {
  position: relative;
  display: block;
  margin-top: 0;
  min-height: 200px;
  height: 200px;
  overflow: hidden;
  background-color: #2b2b2b;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
.site-hero--has-image {
  min-height: 200px;
  height: 200px;
}
@media (max-width: 720px) {
  .site-hero {
    background-attachment: scroll;
  }
}

/* Layout */
.site-main-wrap {
  padding: 1.5rem 0 2.5rem;
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
}

.content-card,
.sidebar-card {
  background: var(--tsg-card);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1.5rem 1.75rem;
}

.sidebar-card + .sidebar-card {
  margin-top: 1rem;
}

.sidebar-card h2,
.sidebar-card .widget-title {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
  font-weight: 300;
  color: #2b2b2b;
}

.entry-title {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
  font-weight: 300;
}

.entry-meta {
  color: var(--tsg-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.6rem;
  background: #efefef;
  border-radius: 3px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.post-list-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--tsg-border);
}

.post-list-item:first-child {
  padding-top: 0;
}

.post-list-item h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.post-list-item h2 a {
  color: var(--tsg-orange);
  text-decoration: none;
}

.post-list-item h2 a:hover {
  text-decoration: underline;
}

/* Buttons */
.button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  display: inline-block;
  background: var(--tsg-orange);
  color: #fff !important;
  border: 0;
  border-radius: 4px;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
}

.button:hover,
.wp-block-button__link:hover {
  background: var(--tsg-orange-dark);
}

.button--block {
  display: block;
  text-align: center;
  width: 100%;
}

/* News sidebar widget styling - matches specification screenshot */
.news-widget-list,
.widget_recent_entries ul,
.widget_recent_posts ul,
.wp-block-latest-posts,
.wp-block-latest-posts__list,
.sidebar-card ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.news-widget-list li,
.widget_recent_entries li,
.widget_recent_posts li,
.wp-block-latest-posts li,
.wp-block-latest-posts__list li,
.widget_block li {
  display: flex !important;
  flex-direction: column !important;
  padding: 0.75rem 0 !important;
  border-bottom: 1px solid var(--tsg-border) !important;
}

.news-widget-list li:last-child,
.widget_recent_entries li:last-child,
.wp-block-latest-posts li:last-child {
  border-bottom: 1px solid var(--tsg-border) !important;
}

/* Date styling & flex order (always 1st) */
.news-widget-list li .date,
.news-widget-list li .post-date,
.widget_recent_entries li .post-date,
.widget_recent_entries li time,
.wp-block-latest-posts li .wp-block-latest-posts__post-date,
.wp-block-latest-posts li time,
.sidebar-card li .post-date,
.sidebar-card li time,
.sidebar-card li .date {
  order: 1 !important;
  display: block !important;
  font-size: 0.82rem !important;
  color: var(--tsg-muted) !important;
  font-weight: 400 !important;
  margin-bottom: 3px !important;
}

/* Title link styling & flex order (always 2nd) */
.news-widget-list li a,
.widget_recent_entries li a,
.widget_recent_posts li a,
.wp-block-latest-posts li a,
.wp-block-latest-posts__post-title,
.sidebar-card li a {
  order: 2 !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--tsg-orange) !important;
  text-decoration: none !important;
  line-height: 1.35 !important;
}

.news-widget-list li a:hover,
.widget_recent_entries li a:hover,
.widget_recent_posts li a:hover,
.wp-block-latest-posts li a:hover,
.wp-block-latest-posts__post-title:hover,
.sidebar-card li a:hover {
  text-decoration: underline !important;
}

/* Search */
.search-form {
  display: flex;
  gap: 0.35rem;
}

.search-form input[type="search"] {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

/* Team archive banner */
.team-archive-banner {
  background: #fff8e8;
  border-left: 4px solid var(--tsg-orange);
  padding: 0.9rem 1rem;
  margin: 0 0 1.25rem;
}

.team-archive-banner strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* DBB links block */
.dbb-links-group {
  margin: 0.75rem 0 1.25rem;
}

.dbb-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0.5rem 0 1rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dbb-links__label {
  width: 100%;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tsg-muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.dbb-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  color: var(--tsg-orange) !important;
  border: 1.5px solid var(--tsg-orange);
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dbb-links a::after {
  content: "↗";
  font-size: 0.85em;
  transition: transform 0.2s ease;
}

.dbb-links a:hover {
  background: var(--tsg-orange);
  color: #ffffff !important;
  border-color: var(--tsg-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(238, 153, 0, 0.25);
}

.dbb-links a:hover::after {
  transform: translate(2px, -2px);
}

/* Team meta */
.team-meta {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.4rem 0.5rem !important;
  margin: 0 0 1.25rem !important;
  padding: 0.35rem 0.6rem !important;
  background: #efefef !important;
  border-radius: 3px !important;
  color: var(--tsg-muted) !important;
  font-size: 0.9rem !important;
}

.team-meta__item,
.team-meta > div,
.team-meta > span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
}

.team-meta__item:not(:last-child)::after,
.team-meta > div:not(:last-child)::after,
.team-meta > span:not(:last-child)::after {
  content: "•";
  margin-left: 0.5rem;
  color: #bbb;
}

.team-meta__item strong,
.team-meta > div strong,
.team-meta > span strong {
  font-weight: 600;
  color: #333;
}

.team-featured {
  margin: 0 0 1.25rem;
}

.team-featured img {
  width: 100%;
  border-radius: 4px;
}

/* Footer */
.site-footer {
  background-color: #252525;
  background-image: url("assets/images/giveball.png");
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: auto 240px;
  color: #a1a1a1;
  padding: 45px 0 20px;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 960px) {
  .site-footer {
    background-size: auto 180px;
  }
}
@media (max-width: 720px) {
  .site-footer {
    background-image: none;
  }
}

.site-footer a {
  color: var(--tsg-orange);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: var(--tsg-orange-hot);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 300;
  margin: 0 0 14px;
  font-family: var(--tsg-font);
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu li {
  margin: 0.4rem 0;
}

.footer-social-links {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.footer-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #444444;
  border-radius: 3px;
  color: #cccccc;
  background: #1a1a1a;
  transition: all 0.2s ease;
}

.footer-social-links a:hover {
  background: var(--tsg-orange);
  border-color: var(--tsg-orange);
  color: #ffffff;
  text-decoration: none;
}

.footer-hashtag {
  color: var(--tsg-orange);
  font-size: 15px;
  font-weight: 500;
  margin-top: 14px;
}

.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: #888888;
}

/* Pagination */
.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.page-numbers {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  background: #fff;
  border: 1px solid var(--tsg-border);
  color: var(--tsg-text);
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--tsg-orange);
  border-color: var(--tsg-orange);
  color: #fff;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="date"],
select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 2.65rem;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  color: var(--tsg-text);
  vertical-align: middle;
}

textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  color: var(--tsg-text);
  height: auto;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.form-row {
  margin-bottom: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-block;
  }

  .primary-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    background: #fff;
  }

  .primary-menu.is-open {
    display: flex;
  }

  .primary-menu > li > a {
    border-bottom: 1px solid var(--tsg-border);
  }

  .primary-menu .sub-menu {
    position: static;
    display: none;
    min-width: 0;
    box-shadow: none;
  }

  .primary-menu > li.is-open > .sub-menu {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-header__top {
    flex-wrap: wrap;
  }
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.custom-logo-link img,
.custom-logo {
  height: 48px;
  width: auto;
}

@media (max-width: 720px) {
  .primary-menu > li.menu-item-teams > .sub-menu,
  .primary-menu > li.menu-item-object-custom > .sub-menu:has(> li > a[href*="saison="]) {
    display: none;
    width: 100%;
    min-width: 0;
    grid-template-columns: none;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
  .primary-menu > li.menu-item-teams.is-open > .sub-menu,
  .primary-menu > li.menu-item-teams > .sub-menu.is-open {
    display: block;
  }
  .primary-menu > li.menu-item-teams > .sub-menu > li {
    width: auto;
  }
  .primary-menu .sub-menu .sub-menu {
    position: static;
    left: auto;
    display: none;
    box-shadow: none;
    min-width: 0;
    padding-left: 12px;
  }
  .primary-menu .sub-menu > li.is-open > .sub-menu {
    display: block;
  }
  .site-logo-text { font-size: 22px; }
  .site-logo-mark { width: 48px; height: 48px; }
  .site-header__bar { padding: 12px 0 10px; }
  .site-hero, .site-hero--has-image { height: 140px; min-height: 140px; }
}

/* ========== Header Actions & Accessibility Toolbar ========== */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.site-header__a11y-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--tsg-border);
  border-radius: 6px;
  padding: 3px 6px;
}

.a11y-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #555;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.a11y-btn:hover {
  background: var(--tsg-orange);
  color: #ffffff;
}

.a11y-btn[aria-pressed="true"] {
  background: #2b2b2b;
  color: var(--tsg-orange);
}

.a11y-toolbar__sep {
  width: 1px;
  height: 14px;
  background: var(--tsg-border);
  margin: 0 2px;
}

/* Accessibility Font Scale */
html.tsg-font-sm { font-size: 13px; }
html.tsg-font-lg { font-size: 16px; }
html.tsg-font-xl { font-size: 18px; }

/* ========== Premium Dark Mode Theme (High Legibility & Aesthetics) ========== */
html.tsg-dark-mode,
html.tsg-high-contrast {
  --tsg-bg: #0f172a;
  --tsg-card: #1e293b;
  --tsg-header-bg: #0f172a;
  --tsg-footer-bg: #0b0f19;
  --tsg-text: #f8fafc;
  --tsg-muted: #94a3b8;
  --tsg-border: #334155;
  --tsg-orange: #ee9900;
  --tsg-orange-hot: #ffad33;
  --tsg-orange-dark: #cc7a00;
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

html.tsg-dark-mode body,
html.tsg-high-contrast body {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

/* Headings */
html.tsg-dark-mode h1, html.tsg-dark-mode h2, html.tsg-dark-mode h3, html.tsg-dark-mode h4, html.tsg-dark-mode h5, html.tsg-dark-mode h6,
html.tsg-dark-mode .entry-title, html.tsg-dark-mode .widget-title, html.tsg-dark-mode .sidebar-card h2, html.tsg-dark-mode .sidebar-card .widget-title,
html.tsg-high-contrast h1, html.tsg-high-contrast h2, html.tsg-high-contrast h3, html.tsg-high-contrast h4, html.tsg-high-contrast h5, html.tsg-high-contrast h6,
html.tsg-high-contrast .entry-title, html.tsg-high-contrast .widget-title, html.tsg-high-contrast .sidebar-card h2, html.tsg-high-contrast .sidebar-card .widget-title {
  color: #f8fafc !important;
}

/* Body Text & Paragraphs */
html.tsg-dark-mode p, html.tsg-dark-mode li, html.tsg-dark-mode span, html.tsg-dark-mode label, html.tsg-dark-mode td, html.tsg-dark-mode th,
html.tsg-dark-mode strong, html.tsg-dark-mode b, html.tsg-dark-mode em, html.tsg-dark-mode time, html.tsg-dark-mode div,
html.tsg-high-contrast p, html.tsg-high-contrast li, html.tsg-high-contrast span, html.tsg-high-contrast label, html.tsg-high-contrast td, html.tsg-high-contrast th,
html.tsg-high-contrast strong, html.tsg-high-contrast b, html.tsg-high-contrast em, html.tsg-high-contrast time, html.tsg-high-contrast div {
  color: #f8fafc !important;
}

/* Logo Text */
html.tsg-dark-mode .site-logo-text__black,
html.tsg-high-contrast .site-logo-text__black {
  color: #f8fafc !important;
}
html.tsg-dark-mode .site-logo-text__orange,
html.tsg-high-contrast .site-logo-text__orange {
  color: #ffaa22 !important;
}

/* Header & Nav */
html.tsg-dark-mode .site-header,
html.tsg-dark-mode .site-header__bar,
html.tsg-dark-mode .site-nav,
html.tsg-high-contrast .site-header,
html.tsg-high-contrast .site-header__bar,
html.tsg-high-contrast .site-nav {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html.tsg-dark-mode .primary-menu > li > a,
html.tsg-high-contrast .primary-menu > li > a {
  color: #e2e8f0 !important;
}

html.tsg-dark-mode .primary-menu > li:hover > a,
html.tsg-dark-mode .primary-menu > li.focus > a,
html.tsg-dark-mode .primary-menu > li.current-menu-item > a,
html.tsg-dark-mode .primary-menu > li.current-menu-ancestor > a,
html.tsg-high-contrast .primary-menu > li:hover > a,
html.tsg-high-contrast .primary-menu > li.focus > a,
html.tsg-high-contrast .primary-menu > li.current-menu-item > a,
html.tsg-high-contrast .primary-menu > li.current-menu-ancestor > a {
  background-color: var(--tsg-orange) !important;
  color: #ffffff !important;
}

/* Submenu Dropdowns */
html.tsg-dark-mode .primary-menu .sub-menu,
html.tsg-high-contrast .primary-menu .sub-menu {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5) !important;
}

/* Cards & Containers */
html.tsg-dark-mode .content-card,
html.tsg-dark-mode .sidebar-card,
html.tsg-high-contrast .content-card,
html.tsg-high-contrast .sidebar-card {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Links */
html.tsg-dark-mode a,
html.tsg-high-contrast a {
  color: #ffaa22 !important;
}

html.tsg-dark-mode a:hover,
html.tsg-high-contrast a:hover {
  color: #ffc266 !important;
}

/* Meta Banners */
html.tsg-dark-mode .team-meta,
html.tsg-dark-mode .team-archive-banner,
html.tsg-dark-mode .entry-meta,
html.tsg-high-contrast .team-meta,
html.tsg-high-contrast .team-archive-banner,
html.tsg-high-contrast .entry-meta {
  background: #151e2e !important;
  border: 1px solid #334155 !important;
  color: #94a3b8 !important;
}

/* DBB Links in Dark Mode */
html.tsg-dark-mode .dbb-links a,
html.tsg-high-contrast .dbb-links a {
  background: #1e293b !important;
  color: #ffaa22 !important;
  border-color: #ffaa22 !important;
}
html.tsg-dark-mode .dbb-links a:hover,
html.tsg-high-contrast .dbb-links a:hover {
  background: var(--tsg-orange) !important;
  color: #ffffff !important;
}

/* Buttons & Call To Action Elements */
html.tsg-dark-mode .button,
html.tsg-dark-mode .wp-block-button__link,
html.tsg-dark-mode input[type="submit"],
html.tsg-dark-mode button[type="submit"],
html.tsg-dark-mode .sidebar-card .button,
html.tsg-dark-mode .post-list-item a.button,
html.tsg-dark-mode .post-list-item p a.button,
html.tsg-high-contrast .button,
html.tsg-high-contrast .wp-block-button__link,
html.tsg-high-contrast input[type="submit"],
html.tsg-high-contrast button[type="submit"],
html.tsg-high-contrast .sidebar-card .button,
html.tsg-high-contrast .post-list-item a.button,
html.tsg-high-contrast .post-list-item p a.button {
  background-color: var(--tsg-orange) !important;
  color: #ffffff !important;
  border: 0 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  text-decoration: none !important;
}

html.tsg-dark-mode .button:hover,
html.tsg-dark-mode .wp-block-button__link:hover,
html.tsg-dark-mode input[type="submit"]:hover,
html.tsg-dark-mode button[type="submit"]:hover,
html.tsg-dark-mode .sidebar-card .button:hover,
html.tsg-dark-mode .post-list-item a.button:hover,
html.tsg-dark-mode .post-list-item p a.button:hover,
html.tsg-high-contrast .button:hover,
html.tsg-high-contrast .wp-block-button__link:hover,
html.tsg-high-contrast input[type="submit"]:hover,
html.tsg-high-contrast button[type="submit"]:hover,
html.tsg-high-contrast .sidebar-card .button:hover,
html.tsg-high-contrast .post-list-item a.button:hover,
html.tsg-high-contrast .post-list-item p a.button:hover {
  background-color: var(--tsg-orange-dark) !important;
  color: #ffffff !important;
}

/* Pagination (.page-numbers, .next.page-numbers, .prev.page-numbers) */
html.tsg-dark-mode .page-numbers,
html.tsg-high-contrast .page-numbers {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}

html.tsg-dark-mode .page-numbers.current,
html.tsg-dark-mode .page-numbers:hover,
html.tsg-high-contrast .page-numbers.current,
html.tsg-high-contrast .page-numbers:hover {
  background: var(--tsg-orange) !important;
  border-color: var(--tsg-orange) !important;
  color: #ffffff !important;
}

/* Post list item paragraph links */
html.tsg-dark-mode .post-list-item p a:not(.button),
html.tsg-high-contrast .post-list-item p a:not(.button) {
  color: #ffaa22 !important;
  font-weight: 600;
  text-decoration: underline !important;
}

html.tsg-dark-mode .post-list-item p a:not(.button):hover,
html.tsg-high-contrast .post-list-item p a:not(.button):hover {
  color: #ffc266 !important;
}

/* Toolbar & Social Icons */
html.tsg-dark-mode .site-header__a11y-toolbar,
html.tsg-high-contrast .site-header__a11y-toolbar {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: #334155 !important;
}
html.tsg-dark-mode .a11y-btn,
html.tsg-high-contrast .a11y-btn {
  color: #cbd5e1 !important;
}
html.tsg-dark-mode .a11y-btn:hover,
html.tsg-high-contrast .a11y-btn:hover {
  background: var(--tsg-orange) !important;
  color: #ffffff !important;
}
html.tsg-dark-mode .site-header__social a,
html.tsg-dark-mode .footer-social-links a,
html.tsg-high-contrast .site-header__social a,
html.tsg-high-contrast .footer-social-links a {
  border-color: #334155 !important;
  background: #1e293b !important;
  color: #cbd5e1 !important;
}

/* Probetraining Form & Recommendation Box */
html.tsg-dark-mode .tsg-recommendation-container,
html.tsg-high-contrast .tsg-recommendation-container {
  background: #151e2e !important;
  border: 1px solid #334155 !important;
}
html.tsg-dark-mode .tsg-recommendation-badge__title,
html.tsg-high-contrast .tsg-recommendation-badge__title {
  color: #f8fafc !important;
}
html.tsg-dark-mode .tsg-recommendation-badge__link,
html.tsg-high-contrast .tsg-recommendation-badge__link {
  color: var(--tsg-orange) !important;
}

/* Non-Intrusive Focus Indicators */
:focus-visible {
  outline: 3px solid var(--tsg-orange);
  outline-offset: 2px;
}

/* Modern Card Hover Animations & Shadows */
.content-card,
.sidebar-card,
.post-list-item {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Probetraining Form & Recommendation Badge Styling */
.tsg-probetraining-form-wrap {
  margin: 1.5rem 0;
}

.tsg-probetraining-form .form-row--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.tsg-probetraining-form .form-field {
  display: flex;
  flex-direction: column;
}

.tsg-probetraining-form .form-field input[type="text"],
.tsg-probetraining-form .form-field input[type="email"],
.tsg-probetraining-form .form-field input[type="tel"],
.tsg-probetraining-form .form-field select {
  box-sizing: border-box;
  height: 2.65rem;
  line-height: 1.4;
  padding: 0.55rem 0.75rem;
}

.tsg-recommendation-container {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: #fff8e8;
  border-left: 4px solid var(--tsg-orange);
  border-radius: 4px;
}

.tsg-recommendation-badge__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tsg-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.tsg-recommendation-badge__title {
  font-size: 1.25rem;
  color: #2b2b2b;
  font-weight: 700;
}

.tsg-recommendation-badge__link {
  display: inline;
  margin-top: 0;
  background: transparent;
  color: var(--tsg-orange-dark) !important;
  padding: 0;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline !important;
  transition: color 0.2s ease;
}

.tsg-recommendation-badge__link:hover {
  background: transparent;
  color: var(--tsg-orange) !important;
  text-decoration: none !important;
}

.tsg-alert {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.tsg-alert--success {
  background: #e6f4ea;
  color: #137333;
  border: 1px solid #ceead6;
}

.tsg-alert--error {
  background: #fce8e6;
  color: #c5221f;
  border: 1px solid #fad2cf;
}

/* ==========================================================================
   Practice Times (Single Team Card & Timetable Schedule Overview)
   ========================================================================== */

/* Single Team Practice Box (Regular Text Layout) */
.tsg-team-practice-box {
  margin: 1.5rem 0;
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}

.tsg-team-practice-box__title {
  margin: 0 0 0.75rem 0;
}

.tsg-team-practice-list {
  list-style: disc;
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.tsg-team-practice-item {
  margin-bottom: 0.4rem;
  font-size: inherit;
  line-height: inherit;
  background: none;
  border: none;
  padding: 0;
}

/* Full width layout (No sidebar) */
.layout-full-width {
  display: block;
  width: 100%;
}

.layout-full-width .content-card {
  width: 100%;
}

/* Practice Schedule Overview (Light & Minimal Design) */
.tsg-practice-schedule-container {
  margin: 1.5rem 0 2rem;
}

.tsg-practice-schedule-header {
  margin-bottom: 1.25rem;
}

.tsg-practice-schedule-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--tsg-orange, #e65100);
  margin-bottom: 0.25rem;
}

.tsg-practice-schedule-subtitle {
  color: var(--tsg-muted, #666666);
  font-size: 0.95rem;
  margin: 0;
}

/* Grid Layout */
.tsg-schedule-grid-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tsg-schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
  margin-top: 1rem;
}

.tsg-schedule-day-column {
  background: transparent;
  display: flex;
  flex-direction: column;
}

.tsg-schedule-day-header {
  padding: 0.4rem 0 0.5rem;
  border-bottom: 2px solid var(--tsg-orange, #e65100);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.tsg-day-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--tsg-text, #222222);
}

.tsg-day-count {
  font-size: 0.75rem;
  color: #888888;
  font-weight: 600;
}

.tsg-schedule-day-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tsg-no-training {
  color: #aaaaaa;
  font-size: 0.9rem;
  padding: 0.75rem 0;
}

/* Timetable Matrix Table */
.tsg-schedule-matrix-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
  border: 1px solid var(--tsg-border, #e2e8f0);
  border-radius: 6px;
}

.tsg-schedule-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #ffffff;
}

html.tsg-dark-mode .tsg-schedule-matrix-table {
  background: #0f172a;
}

.tsg-schedule-matrix-table tr {
  height: 22px;
}

.tsg-schedule-matrix-table th,
.tsg-schedule-matrix-table td {
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--tsg-border, #e2e8f0);
  text-align: center;
  vertical-align: middle;
}

.tsg-matrix-corner,
.tsg-matrix-day-header {
  background: #f8fafc;
  color: var(--tsg-orange, #e65100);
  font-weight: 800;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--tsg-orange, #e65100) !important;
}

html.tsg-dark-mode .tsg-matrix-corner,
html.tsg-dark-mode .tsg-matrix-day-header {
  background: #1e293b;
  color: #f8fafc;
}

/* Clean Weekday Separation (Thin 1px border + Alternating Tints) */
.tsg-schedule-matrix-table th.tsg-day-start,
.tsg-schedule-matrix-table td.tsg-day-start {
  border-left: 1px solid #cbd5e1 !important;
}

html.tsg-dark-mode .tsg-schedule-matrix-table th.tsg-day-start,
html.tsg-dark-mode .tsg-schedule-matrix-table td.tsg-day-start {
  border-left: 1px solid #475569 !important;
}

/* Subtle alternating background tint for even weekdays */
.tsg-schedule-matrix-table th.tsg-day-even,
.tsg-schedule-matrix-table td.tsg-day-even.tsg-matrix-cell--empty {
  background-color: #f8fafc;
}

html.tsg-dark-mode .tsg-schedule-matrix-table th.tsg-day-even,
html.tsg-dark-mode .tsg-schedule-matrix-table td.tsg-day-even.tsg-matrix-cell--empty {
  background-color: #131c2e;
}

.tsg-matrix-gym-header {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

html.tsg-dark-mode .tsg-matrix-gym-header {
  background: #0f172a;
  color: #cbd5e1;
}

.tsg-matrix-time-cell {
  background: #f8fafc;
  font-weight: 700;
  color: var(--tsg-text, #1e293b);
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 2;
  font-size: 0.82rem;
}

html.tsg-dark-mode .tsg-matrix-time-cell {
  background: #1e293b;
  color: #f8fafc;
}

.tsg-matrix-cell--active {
  padding: 0.25rem !important;
  background-color: var(--tsg-team-bg) !important;
}

.tsg-matrix-cell-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.tsg-matrix-team-block {
  padding: 0.35rem 0.45rem;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  text-align: center;
}

.tsg-matrix-team-link {
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  display: block;
  color: var(--tsg-team-text) !important;
}

.tsg-matrix-team-link:hover {
  text-decoration: underline;
}

.tsg-matrix-exact-time {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--tsg-team-text);
  margin-top: 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.tsg-matrix-exact-time .tsg-time-sep {
  font-size: 0.68rem;
  line-height: 1;
  opacity: 0.75;
}

.tsg-matrix-notes {
  font-size: 0.72rem;
  color: var(--tsg-team-text);
  display: block;
  font-style: italic;
  margin-top: 0.1rem;
  opacity: 0.8;
}

/* Dark Mode Overrides for Timetable Matrix */
html.tsg-dark-mode .tsg-schedule-matrix-wrap {
  border-color: #334155;
}

html.tsg-dark-mode .tsg-schedule-matrix-table {
  background: #0f172a;
}

html.tsg-dark-mode .tsg-schedule-matrix-table th,
html.tsg-dark-mode .tsg-schedule-matrix-table td {
  border-color: #334155;
}

html.tsg-dark-mode .tsg-matrix-corner,
html.tsg-dark-mode .tsg-matrix-day-header {
  background: #1e293b;
  color: #f97316;
  border-bottom: 2px solid #ea580c !important;
}

html.tsg-dark-mode .tsg-matrix-gym-header {
  background: #1e293b;
  color: #cbd5e1;
}

html.tsg-dark-mode .tsg-matrix-time-cell {
  background: #1e293b;
  color: #f8fafc;
}

html.tsg-dark-mode .tsg-matrix-cell--active {
  background-color: var(--tsg-team-dark-bg) !important;
}

html.tsg-dark-mode .tsg-matrix-cell--active .tsg-matrix-team-link {
  color: var(--tsg-team-dark-text) !important;
}

html.tsg-dark-mode .tsg-matrix-cell--active .tsg-matrix-exact-time {
  color: var(--tsg-team-dark-text);
  opacity: 0.85;
}

html.tsg-dark-mode .tsg-matrix-cell--active .tsg-matrix-notes {
  color: var(--tsg-team-dark-text);
  opacity: 0.8;
}



