﻿/*
Theme Name: TC Matchball
Theme URI: https://example.org/tc-matchball
Author: Codex
Description: Modernes WordPress-Theme fuer Tennisclubs mit Startseite, Terminen, Training, Mitgliedschaft und Kontakt.
Version: 1.0.23
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: tc-matchball
*/

:root {
  --ink: #192522;
  --muted: #5a6763;
  --line: #d9e3df;
  --paper: #f6f8f5;
  --white: #ffffff;
  --clay: #b85632;
  --clay-dark: #843c25;
  --grass: #216b4d;
  --lime: #d7ea68;
  --sky: #dbeef2;
  --shadow: 0 18px 50px rgba(25, 37, 34, 0.16);
  --radius: 8px;
  --max: 1180px;
  --header-bg: rgba(246, 248, 245, 0.92);
  --menu-text: #192522;
  --menu-hover-bg: #dbeef2;
  --status-bg: #d7ea68;
  --status-text: #192522;
  --logo-width: 48px;
  --header-height: 76px;
  --hero-height: 680px;
  --hero-fade-duration: 1800ms;
  --hero-title-size: clamp(2rem, 5vw, 4.2rem);
  --hero-text-size: clamp(0.98rem, 2vw, 1.18rem);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--grass);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(25, 37, 34, 0.1);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.site-header__inner,
.wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 7px 12px 7px 8px;
  border: 1px solid rgba(25, 37, 34, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 24px rgba(25, 37, 34, 0.08);
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--grass);
  font-weight: 900;
  letter-spacing: 0;
}

.brand__logo {
  width: var(--logo-width);
  height: auto;
  max-height: calc(var(--header-height) - 14px);
  object-fit: contain;
}

.brand__name {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.05;
}

.brand__tagline {
  display: block;
  margin-top: 4px;
  padding-left: 10px;
  border-left: 3px solid var(--lime);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 1.35rem;
  cursor: pointer;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu a {
  display: block;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(25, 37, 34, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  color: var(--menu-text);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: var(--menu-hover-bg);
  border-color: rgba(25, 37, 34, 0.2);
}

.primary-menu a:hover {
  transform: translateY(-1px);
}

.status-bar {
  overflow: hidden;
  border-top: 1px solid rgba(25, 37, 34, 0.08);
  background: var(--status-bg);
  color: var(--status-text);
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-bar__track {
  display: inline-flex;
  min-width: 200%;
  animation: status-marquee 28s linear infinite;
}

.status-bar__item {
  display: inline-flex;
  align-items: center;
  padding: 8px 28px;
}

.status-bar:hover .status-bar__track {
  animation-play-state: paused;
}

@keyframes status-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-bar__track {
    animation: none;
  }
}

.button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background: var(--grass);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  padding: 11px 18px;
}

.button--light {
  background: var(--white);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: min(var(--hero-height), calc(100svh - 32px));
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--ink);
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__image--slide {
  opacity: 0;
  transition: opacity var(--hero-fade-duration) ease-in-out;
  z-index: 0;
}

.hero__image--slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(20, 31, 28, 0.8), rgba(20, 31, 28, 0.34) 48%, rgba(20, 31, 28, 0.1));
}

.hero__content {
  position: relative;
  z-index: 3;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: clamp(34px, 8vh, 96px) 0 clamp(24px, 5vh, 54px);
  color: var(--white);
}

.hero__content h1 {
  max-width: 780px;
  margin: 0 0 12px;
  font-size: var(--hero-title-size);
  line-height: 1.02;
}

.hero__content p {
  max-width: 640px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--hero-text-size);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section {
  padding: 74px 0;
}

.section--white {
  background: var(--white);
}

.section--grass {
  background: var(--grass);
  color: var(--white);
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section__head h2,
.entry-content h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.section__head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.section--grass .section__head p {
  color: rgba(255, 255, 255, 0.75);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.club-image {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.club-image img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.club-image figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.editable-home .wp-block-image img {
  width: 100%;
  border-radius: var(--radius);
}

.editable-home .section {
  margin: 0;
}

.editable-home .wp-block-group.wrap,
.editable-home .wrap.wp-block-group {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.editable-home .wp-block-columns.grid {
  margin: 0;
}

.editable-home .wp-block-column.feature,
.editable-home .wp-block-column.contact-box,
.editable-home .wp-block-column.post-card {
  flex-basis: auto !important;
}

.editable-home .wp-block-column.feature > :last-child,
.editable-home .wp-block-column.contact-box > :last-child,
.editable-home .wp-block-column.post-card > :last-child {
  margin-bottom: 0;
}

.editable-home .wp-block-heading {
  margin-top: 0;
}

.feature,
.event,
.contact-box,
.post-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px;
}

.feature h3,
.event h3,
.contact-box h3,
.post-card h3 {
  margin: 0 0 10px;
  font-size: 1.24rem;
}

.feature p,
.event p,
.post-card p {
  margin: 0;
  color: var(--muted);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(100% - 32px, var(--max));
  margin: 24px 0;
  margin-inline: auto;
}

.news-card {
  display: flex;
  min-height: 214px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px;
}

.news-card h3 {
  margin: 0 0 10px;
  font-size: 1.24rem;
}

.news-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.news-card__date {
  display: block;
  margin-bottom: 10px;
  color: var(--clay-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.news-card__link {
  margin-top: auto;
  font-weight: 800;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(100% - 32px, var(--max));
  margin: 24px 0;
  margin-inline: auto;
}

.event-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  min-height: 172px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 22px;
}

.event-card__date {
  display: grid;
  height: 74px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--clay);
  color: var(--white);
  font-weight: 900;
  text-align: center;
}

.event-card__date span {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
}

.event-card h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.event-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.event-card__time {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.feature__icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--sky);
  color: var(--grass);
  font-size: 1.4rem;
  font-weight: 900;
}

.event {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
}

.event__date {
  display: grid;
  min-height: 78px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--clay);
  color: var(--white);
  font-weight: 900;
  text-align: center;
}

.event__date span {
  display: block;
  font-size: 1.9rem;
  line-height: 1;
}

.training-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.training-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.training-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px 0;
}

.training-list strong {
  font-size: 1.02rem;
}

.notice {
  border-left: 6px solid var(--lime);
  background: rgba(255, 255, 255, 0.12);
  padding: 22px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.contact-box p {
  margin: 8px 0;
}

.map-placeholder {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--sky), #e8efe5);
  padding: 28px;
}

.entry-main {
  width: min(100% - 32px, 880px);
  margin: 0 auto;
  padding: 72px 0;
}

.single-post .entry-main article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 46px);
}

.entry-content {
  font-size: 1.08rem;
}

.entry-meta {
  margin: -10px 0 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

.entry-footer {
  margin-top: 40px;
}

.entry-featured-image {
  margin: 0 0 28px;
}

.entry-content img,
.entry-content iframe {
  border-radius: var(--radius);
}
.tc-gallery-section {
  background: var(--white);
}

.tc-gallery-section .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tc-gallery-section .wp-block-gallery.has-nested-images figure.wp-block-image {
  width: 100% !important;
}

.tc-gallery-section .wp-block-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(25, 37, 34, 0.12);
  cursor: zoom-in;
}

.tc-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 18, 16, 0.86);
  padding: 22px;
}

.tc-gallery-lightbox.is-open {
  display: flex;
}

.tc-gallery-lightbox img {
  max-width: min(100%, 1120px);
  max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.tc-gallery-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  padding: 40px 0;
}

.site-footer a {
  color: var(--white);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

@media (max-width: 820px) {
  .brand {
    min-height: 54px;
    padding: 6px 8px 6px 6px;
  }

  .brand__name {
    font-size: 0.96rem;
  }

  .brand__tagline {
    max-width: 190px;
    font-size: 0.72rem;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .primary-nav {
    position: absolute;
    top: var(--header-height);
    right: 16px;
    left: 16px;
    z-index: 40;
    display: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: block;
  }

  .site-header.menu-open .status-bar {
    display: none;
  }

  .primary-menu {
    display: block;
    padding: 8px;
  }

  .primary-menu a {
    min-height: 44px;
    padding: 12px;
    background: transparent;
    transform: none;
  }

  .grid--3,
  .grid--2,
  .news-grid,
  .event-grid,
  .tc-gallery-section .wp-block-gallery,
  .training-band,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .section__head,
  .site-footer__inner {
    display: block;
  }

  .hero {
    min-height: min(var(--hero-height), 620px);
  }

  .hero__content {
    align-self: center;
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .hero__content h1 {
    margin-bottom: 9px;
  }

  .hero__content p {
    margin-bottom: 16px;
  }

  .event {
    grid-template-columns: 72px 1fr;
  }
}

