/*
Theme Name: TTV Hervest-Dorsten Modern
Theme URI: https://ttv-hervest-dorsten.de/
Author: TTV Hervest-Dorsten
Author URI: https://ttv-hervest-dorsten.de/
Description: Modernes, responsives WordPress-Theme fuer den TTV Hervest-Dorsten 1949 e.V. Bewahrt die bestehende WordPress-Inhaltsstruktur und modernisiert Darstellung, Navigation, Beitraege, Seiten und Vereinsbereiche.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ttv-hervest
*/

:root {
  --ttv-red: #e10600;
  --ttv-red-dark: #b80400;
  --ttv-black: #090909;
  --ttv-white: #ffffff;
  --ttv-offwhite: #f6f4ef;
  --ttv-gray: #6d6d6d;
  --ttv-light: #ebe8e2;
  --ttv-yellow: #f2c400;
  --ttv-border: rgba(0,0,0,.08);
  --ttv-shadow: 0 18px 50px rgba(0,0,0,.11);
  --ttv-radius: 22px;
  --ttv-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ttv-black);
  background: var(--ttv-offwhite);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ttv-red); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.ttv-container { width: min(calc(100% - 44px), var(--ttv-max)); margin: 0 auto; }
.ttv-section { padding: 76px 0; }
.ttv-section--white { background: #fff; }
.ttv-section--dark { background: #0a0a0a; color: #fff; }
.ttv-section--soft { background: linear-gradient(135deg,#ece9e4,#fff); }
.ttv-kicker {
  display: inline-flex; align-items:center; gap:7px; padding:7px 11px;
  border-radius:999px; border:1px solid rgba(0,0,0,.1); background:#fff;
  font-size:.79rem; font-weight:850; letter-spacing:.08em; text-transform:uppercase;
}
.ttv-section--dark .ttv-kicker { border-color:rgba(255,255,255,.16); background:rgba(255,255,255,.07); }
.ttv-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:32px; margin-bottom:30px; }
.ttv-section-head h2 { margin:.5rem 0 0; font-size:clamp(2rem,4vw,3.5rem); line-height:.98; letter-spacing:-.045em; }
.ttv-section-head p { max-width:580px; margin:0; color:var(--ttv-gray); }
.ttv-section--dark .ttv-section-head p { color:rgba(255,255,255,.7); }

.ttv-topbar { background:#000; color:#fff; font-size:.88rem; }
.ttv-topbar__inner { min-height:38px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; opacity:.92; }
.site-header {
  position:sticky; top:0; z-index:1000; background:rgba(255,255,255,.96);
  backdrop-filter:blur(12px); border-bottom:1px solid var(--ttv-border);
}
.ttv-header-row { min-height:84px; display:flex; align-items:center; gap:24px; }
.ttv-brand { display:flex; align-items:center; gap:12px; min-width:270px; }
.ttv-brand__logo { width:64px; height:64px; object-fit:contain; border-radius:13px; background:#fff; }
.custom-logo-link { display:flex; align-items:center; }
.custom-logo { width:64px; max-height:64px; object-fit:contain; }
.ttv-brand__title { display:block; font-size:1.06rem; font-weight:900; line-height:1.1; letter-spacing:-.02em; }
.ttv-brand__sub { display:block; color:var(--ttv-gray); font-size:.82rem; margin-top:3px; }
.ttv-menu-toggle { display:none; margin-left:auto; border:0; background:#111; color:#fff; border-radius:12px; padding:10px 13px; cursor:pointer; font-weight:800; }
.ttv-primary-nav { margin-left:auto; }
.ttv-primary-nav ul { list-style:none; padding:0; margin:0; }
.ttv-primary-nav > div > ul, .ttv-primary-nav > ul { display:flex; align-items:center; gap:18px; }
.ttv-primary-nav li { position:relative; }
.ttv-primary-nav a { display:block; padding:29px 2px 27px; font-size:.91rem; font-weight:800; white-space:nowrap; }
.ttv-primary-nav > div > ul > li > a::after, .ttv-primary-nav > ul > li > a::after {
  content:""; position:absolute; height:2px; left:0; right:100%; bottom:20px; background:var(--ttv-red); transition:right .2s ease;
}
.ttv-primary-nav > div > ul > li:hover > a::after, .ttv-primary-nav > ul > li:hover > a::after, .ttv-primary-nav .current-menu-item > a::after { right:0; }
.ttv-primary-nav .sub-menu {
  display:none; position:absolute; top:100%; left:-16px; min-width:245px; padding:10px; background:#fff;
  border:1px solid var(--ttv-border); border-radius:16px; box-shadow:0 18px 50px rgba(0,0,0,.16); z-index:20;
}
.ttv-primary-nav li:hover > .sub-menu, .ttv-primary-nav li:focus-within > .sub-menu { display:block; }
.ttv-primary-nav .sub-menu a { padding:10px 12px; white-space:normal; border-radius:10px; font-weight:700; }
.ttv-primary-nav .sub-menu a:hover { background:#f4f2ee; }
.ttv-primary-nav .sub-menu .sub-menu { left:100%; top:-10px; }

.ttv-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:999px; padding:12px 19px; font-weight:850; border:0; cursor:pointer; transition:transform .18s ease, box-shadow .18s ease; }
.ttv-btn:hover { transform:translateY(-2px); color:#fff; }
.ttv-btn--primary { color:#fff; background:var(--ttv-red); box-shadow:0 10px 25px rgba(225,6,0,.27); }
.ttv-btn--dark { color:#fff; background:#111; }
.ttv-btn--ghost { color:#fff; background:transparent; border:1px solid rgba(255,255,255,.45); }

.ttv-hero { position:relative; overflow:hidden; color:#fff; background:radial-gradient(circle at 82% 18%,rgba(242,196,0,.2),transparent 24%),radial-gradient(circle at 18% 30%,rgba(225,6,0,.19),transparent 28%),linear-gradient(135deg,#080808 0%,#171717 62%,#2b0000 100%); }
.ttv-hero::before { content:""; position:absolute; inset:0; opacity:.65; background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px); background-size:42px 42px; }
.ttv-hero__inner { position:relative; z-index:2; display:grid; grid-template-columns:1.15fr .85fr; gap:48px; align-items:center; padding:74px 0 70px; }
.ttv-hero .ttv-kicker { color:#f0f0f0; border-color:rgba(255,255,255,.16); background:rgba(255,255,255,.07); }
.ttv-hero h1 { margin:18px 0 22px; font-size:clamp(2.9rem,6.2vw,5.9rem); line-height:.93; letter-spacing:-.055em; }
.ttv-hero h1 .accent { color:var(--ttv-red); display:block; }
.ttv-hero p { margin:0 0 28px; max-width:710px; color:rgba(255,255,255,.82); font-size:1.12rem; }
.ttv-hero__actions { display:flex; gap:12px; flex-wrap:wrap; }
.ttv-hero__logo-card { background:rgba(255,255,255,.97); color:#111; border-radius:28px; padding:28px; box-shadow:0 32px 90px rgba(0,0,0,.36); transform:rotate(1deg); }
.ttv-hero__logo-card img { display:block; width:min(100%,430px); margin:0 auto; filter:drop-shadow(0 18px 25px rgba(0,0,0,.15)); }
.ttv-hero__mini { margin-top:14px; padding:14px 16px; border-radius:15px; background:#111; color:#fff; font-size:.91rem; }

.ttv-ticker { overflow:hidden; background:var(--ttv-red); color:#fff; padding:10px 0; white-space:nowrap; text-transform:uppercase; font-weight:900; letter-spacing:.04em; }
.ttv-ticker__track { display:inline-block; padding-left:100%; animation:ttv-ticker 25s linear infinite; }
@keyframes ttv-ticker { from{transform:translateX(0)} to{transform:translateX(-100%)} }

.ttv-quicklinks { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.ttv-quicklink { position:relative; overflow:hidden; min-height:190px; padding:23px; border-radius:var(--ttv-radius); background:#fff; box-shadow:var(--ttv-shadow); border:1px solid var(--ttv-border); }
.ttv-quicklink::after { content:attr(data-index); position:absolute; right:12px; bottom:-18px; font-size:6rem; line-height:1; font-weight:950; color:rgba(225,6,0,.06); }
.ttv-quicklink strong { display:block; font-size:1.28rem; margin:9px 0; }
.ttv-quicklink p { margin:0; color:var(--ttv-gray); font-size:.94rem; }
.ttv-link { color:var(--ttv-red); font-weight:850; }

.ttv-post-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.ttv-card { background:#fff; border:1px solid var(--ttv-border); border-radius:var(--ttv-radius); overflow:hidden; box-shadow:var(--ttv-shadow); min-width:0; }
.ttv-card__image { display:block; aspect-ratio:16/9; overflow:hidden; background:linear-gradient(135deg,#1a1a1a,#3b0000); }
.ttv-card__image img { width:100%; height:100%; object-fit:cover; transition:transform .25s ease; }
.ttv-card:hover .ttv-card__image img { transform:scale(1.035); }
.ttv-card__body { padding:22px; }
.ttv-card__meta { display:flex; gap:9px; flex-wrap:wrap; color:var(--ttv-red); font-size:.76rem; font-weight:900; text-transform:uppercase; letter-spacing:.07em; }
.ttv-card h3 { margin:10px 0 10px; font-size:1.28rem; line-height:1.2; letter-spacing:-.02em; }
.ttv-card p { margin:0 0 16px; color:var(--ttv-gray); }

.ttv-sport-grid { display:grid; grid-template-columns:1.2fr .8fr .8fr; gap:18px; }
.ttv-sport-box { position:relative; overflow:hidden; min-height:265px; padding:27px; border-radius:24px; border:1px solid rgba(255,255,255,.08); background:linear-gradient(160deg,rgba(255,255,255,.08),rgba(255,255,255,.015)),#151515; }
.ttv-sport-box--feature { background:radial-gradient(circle at 82% 17%,rgba(225,6,0,.46),transparent 34%),linear-gradient(160deg,#1a1a1a,#090909); }
.ttv-sport-box h3 { margin:0 0 10px; font-size:1.7rem; }
.ttv-sport-box p { color:rgba(255,255,255,.72); }
.ttv-sport-box__number { position:absolute; right:15px; bottom:-8px; font-size:6rem; line-height:1; font-weight:950; color:rgba(255,255,255,.055); }

.ttv-split { display:grid; grid-template-columns:1fr 1fr; gap:26px; align-items:stretch; }
.ttv-panel { padding:31px; border-radius:26px; background:#fff; box-shadow:var(--ttv-shadow); }
.ttv-panel--red { background:var(--ttv-red); color:#fff; }
.ttv-panel h3 { margin-top:0; font-size:2rem; line-height:1.1; letter-spacing:-.03em; }
.ttv-panel ul { padding-left:20px; }

.ttv-events { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.ttv-event { padding:24px; border-radius:20px; background:#121212; border:1px solid rgba(255,255,255,.08); }
.ttv-event__date { color:var(--ttv-yellow); font-size:.78rem; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.ttv-event h3 { margin:9px 0 10px; font-size:1.35rem; line-height:1.2; }
.ttv-event p { color:rgba(255,255,255,.7); }

.ttv-cta { display:grid; grid-template-columns:1.15fr .85fr; border-radius:28px; overflow:hidden; box-shadow:var(--ttv-shadow); }
.ttv-cta__main { padding:35px; background:#111; color:#fff; }
.ttv-cta__side { padding:35px; background:var(--ttv-red); color:#fff; display:flex; flex-direction:column; justify-content:center; }
.ttv-cta h2 { margin:0 0 12px; font-size:clamp(2rem,4vw,3.2rem); line-height:1; letter-spacing:-.04em; }

.ttv-page-hero { color:#fff; background:radial-gradient(circle at 80% 20%,rgba(225,6,0,.35),transparent 24%),linear-gradient(135deg,#090909,#171717); padding:58px 0 52px; }
.ttv-page-hero h1 { margin:8px 0 0; font-size:clamp(2.3rem,5vw,4.7rem); line-height:.98; letter-spacing:-.05em; }
.ttv-breadcrumbs { color:rgba(255,255,255,.68); font-size:.88rem; }
.ttv-breadcrumbs a { color:#fff; }

.ttv-content-wrap { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:32px; align-items:start; }
.ttv-content-wrap--full { display:block; }
.ttv-content { background:#fff; border-radius:24px; padding:clamp(24px,4vw,42px); box-shadow:var(--ttv-shadow); overflow:hidden; }
.ttv-content > :first-child { margin-top:0; }
.ttv-content h2, .ttv-content h3 { line-height:1.2; letter-spacing:-.025em; }
.ttv-content a { color:var(--ttv-red); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
.ttv-content table { width:100%; border-collapse:collapse; margin:1.4rem 0; }
.ttv-content th, .ttv-content td { padding:12px 13px; border:1px solid #ddd; text-align:left; }
.ttv-content th { background:#111; color:#fff; }
.ttv-content tr:nth-child(even) td { background:#f7f6f3; }
.ttv-content iframe { max-width:100%; }
.ttv-content .wp-block-image img { border-radius:16px; }
.ttv-post-meta { display:flex; flex-wrap:wrap; gap:10px 18px; margin:0 0 22px; color:var(--ttv-gray); font-size:.89rem; }
.ttv-featured { margin:-10px -10px 28px; border-radius:18px; overflow:hidden; }

.ttv-sidebar { background:#fff; border-radius:22px; padding:23px; box-shadow:var(--ttv-shadow); }
.widget { margin-bottom:26px; }
.widget:last-child { margin-bottom:0; }
.widget-title { font-size:1rem; margin:0 0 12px; text-transform:uppercase; letter-spacing:.06em; }
.widget ul { list-style:none; margin:0; padding:0; }
.widget li { margin:.4rem 0; }

.navigation.pagination { margin-top:32px; }
.nav-links { display:flex; gap:8px; flex-wrap:wrap; }
.page-numbers { min-width:40px; height:40px; display:grid; place-items:center; background:#fff; border-radius:10px; border:1px solid var(--ttv-border); font-weight:800; }
.page-numbers.current { background:var(--ttv-red); color:#fff; }

.ttv-footer { background:#050505; color:#fff; padding:48px 0 24px; }
.ttv-footer__grid { display:grid; grid-template-columns:1.25fr .75fr .75fr; gap:30px; }
.ttv-footer__brand { display:flex; align-items:center; gap:15px; }
.ttv-footer__brand img { width:74px; height:74px; object-fit:contain; background:#fff; border-radius:14px; }
.ttv-footer h4 { margin:0 0 12px; }
.ttv-footer p, .ttv-footer a { color:rgba(255,255,255,.7); }
.ttv-footer a:hover { color:#fff; }
.ttv-footer ul { list-style:none; margin:0; padding:0; }
.ttv-footer li { margin:6px 0; }
.ttv-footer__bottom { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-top:30px; padding-top:18px; border-top:1px solid rgba(255,255,255,.12); color:rgba(255,255,255,.52); font-size:.84rem; }

.ttv-empty { padding:30px; border-radius:20px; background:#fff; border:1px dashed #bbb; color:var(--ttv-gray); }

@media (max-width:1080px) {
  .ttv-menu-toggle { display:block; }
  .ttv-primary-nav { display:none; position:absolute; top:100%; left:0; right:0; margin:0; background:#fff; border-bottom:1px solid var(--ttv-border); box-shadow:0 20px 35px rgba(0,0,0,.12); }
  .ttv-primary-nav.is-open { display:block; }
  .ttv-primary-nav > div > ul, .ttv-primary-nav > ul { display:block; padding:12px 22px 22px; }
  .ttv-primary-nav a { padding:11px 4px; }
  .ttv-primary-nav > div > ul > li > a::after, .ttv-primary-nav > ul > li > a::after { display:none; }
  .ttv-primary-nav .sub-menu { display:block; position:static; min-width:0; border:0; box-shadow:none; padding:0 0 0 18px; background:transparent; }
  .ttv-primary-nav .sub-menu .sub-menu { position:static; }
  .ttv-hero__inner { grid-template-columns:1fr; }
  .ttv-hero__logo-card { max-width:580px; }
  .ttv-quicklinks { grid-template-columns:repeat(2,1fr); }
  .ttv-post-grid { grid-template-columns:repeat(2,1fr); }
  .ttv-sport-grid { grid-template-columns:1fr; }
  .ttv-events { grid-template-columns:1fr 1fr; }
  .ttv-content-wrap { grid-template-columns:1fr; }
}

@media (max-width:720px) {
  .ttv-container { width:min(calc(100% - 28px),var(--ttv-max)); }
  .ttv-topbar__inner { padding:8px 0; justify-content:center; text-align:center; }
  .ttv-topbar__inner span:last-child { display:none; }
  .ttv-header-row { min-height:74px; }
  .ttv-brand { min-width:0; }
  .ttv-brand__logo, .custom-logo { width:52px; height:52px; }
  .ttv-brand__title { font-size:.95rem; }
  .ttv-brand__sub { font-size:.75rem; }
  .ttv-hero__inner { padding:54px 0; }
  .ttv-hero h1 { font-size:3.2rem; }
  .ttv-section { padding:58px 0; }
  .ttv-section-head { flex-direction:column; align-items:flex-start; }
  .ttv-quicklinks, .ttv-post-grid, .ttv-events, .ttv-split, .ttv-cta, .ttv-footer__grid { grid-template-columns:1fr; }
  .ttv-content { padding:23px; border-radius:18px; }
  .ttv-page-hero { padding:42px 0 38px; }
}

/* --- Verbesserungen: Kontrast, Fokus, Reduced Motion --- */
:root { --ttv-gray: #5f5f5f; }
a:focus-visible, button:focus-visible, .ttv-btn:focus-visible, .ttv-quicklink:focus-visible {
  outline: 3px solid var(--ttv-red); outline-offset: 3px; border-radius: 6px;
}
.ttv-skip-link {
  position:absolute; left:-9999px; top:0; z-index:1000;
  background:var(--ttv-red); color:#fff; padding:10px 16px; border-radius:0 0 10px 0; font-weight:800;
}
.ttv-skip-link:focus { left:0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .ttv-ticker__track { animation:none; }
  * { transition:none !important; }
}

/* --- WordPress-Standardklassen --- */
.alignleft { float:left; margin:0 1.5rem 1rem 0; }
.alignright { float:right; margin:0 0 1rem 1.5rem; }
.aligncenter { display:block; margin-left:auto; margin-right:auto; }
.wp-caption { max-width:100%; }
.wp-caption-text { font-size:.85rem; color:var(--ttv-gray); }
.sticky, .gallery-caption, .bypostauthor { }
.ttv-primary-nav .current-menu-item > a,
.ttv-primary-nav .current_page_item > a { color:var(--ttv-red); }
.ttv-pagination { display:flex; gap:10px; flex-wrap:wrap; margin-top:32px; }
.ttv-pagination .page-numbers { display:inline-flex; align-items:center; justify-content:center;
  min-width:42px; height:42px; padding:0 12px; border:1px solid var(--ttv-border);
  border-radius:12px; font-weight:800; background:#fff; }
.ttv-pagination .page-numbers.current { background:var(--ttv-red); color:#fff; border-color:var(--ttv-red); }
.ttv-post-content { max-width:760px; }
.ttv-post-content p { margin:0 0 1.1rem; }
.ttv-post-content h2 { margin:2rem 0 .8rem; }
.ttv-post-content img { border-radius:14px; }
.ttv-empty { padding:60px 0; text-align:center; color:var(--ttv-gray); }
