@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   DESIGN TOKENS — Apple Style
============================================ */
:root {
  --black:       #1d1d1f;
  --white:       #ffffff;
  --bg:          #f5f5f7;
  --bg-2:        #fbfbfd;
  --gray-100:    #f5f5f7;
  --gray-200:    #e8e8ed;
  --gray-400:    #c7c7cc;
  --gray-500:    #86868b;
  --gray-600:    #6e6e73;
  --gray-800:    #424245;
  --accent:      #d70015;
  --accent-dark: #a50010;
  --red:         #d70015;

  /* keep legacy names so PHP templates still work */
  --offwhite:    #f5f5f7;
  --gray-light:  #e8e8ed;
  --gray-mid:    #86868b;
  --gray-dark:   #424245;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text',    'Helvetica Neue', sans-serif;
  --font-mono:    'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;

  --nav-h:   64px;
  --max-w:   1200px;
  --radius:  18px;
  --radius-sm: 12px;
  --radius-pill: 980px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.09), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
}

/* ============================================
   RESET
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--bg-2);
  overflow-x: hidden;
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--black);
}
h1 { font-size: clamp(2.2rem, 9vw, 8rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2.4rem); }
h4 { font-size: clamp(1.1rem, 1.8vw, 1.6rem); font-weight: 700; }

p { font-size: 1rem; line-height: 1.75; color: var(--gray-600); }

.label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
}

/* ============================================
   LAYOUT
============================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

/* ============================================
   NAVIGATION
============================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: background 0.3s var(--ease-out), box-shadow 0.3s;
}
#site-header.scrolled {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--black);
  line-height: 1;
}
.nav-logo span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--gray-500);
  margin-top: 3px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--gray-600);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: color 0.15s, background 0.15s;
}
.nav-links a::after { display: none; }
.nav-links a:hover {
  color: var(--black);
  background: rgba(0,0,0,0.05);
}
.nav-instagram {
  display: flex !important;
  align-items: center;
  gap: 6px;
  background: var(--black) !important;
  color: var(--white) !important;
  padding: 7px 16px !important;
  border-radius: var(--radius-pill) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  font-family: var(--font-body) !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-instagram:hover {
  background: var(--accent) !important;
  color: var(--white) !important;
  transform: scale(1.03) !important;
}

/* Language Toggle */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-pill);
  padding: 4px 4px;
  cursor: pointer;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.lang-toggle:hover { border-color: var(--gray-400); }
.lang-opt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  color: var(--gray-500);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  line-height: 1;
}
.lang-opt.active {
  background: var(--black);
  color: var(--white);
}
.lang-sep {
  font-size: 0.6rem;
  color: var(--gray-400);
  pointer-events: none;
}
/* "DE" badge on German-only nav links when English is active */
.lang-de-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  background: var(--gray-200);
  color: var(--gray-600);
  border-radius: var(--radius-pill);
  margin-left: 5px;
  vertical-align: middle;
  font-weight: 500;
}

/* Mobile Nav */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}
.nav-burger:hover { background: rgba(0,0,0,0.05); }
.nav-burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 24px 28px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--gray-800);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.nav-mobile a:hover { background: var(--gray-100); color: var(--black); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  /* Tighten the right-side cluster on mobile */
  .nav-right { gap: 6px; }
  .lang-opt { padding: 4px 7px; }
}

/* ============================================
   HERO
============================================ */
#hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--black);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://lorishaettenschwiler.ch/wp-content/uploads/2026/03/thoemusakros_@jeanluchalter-306600.jpg');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.5;
  transform: scale(1.05);
  animation: heroZoom 14s ease-out forwards;
}
@keyframes heroZoom {
  to { transform: scale(1); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,12,0.92) 0%,
    rgba(10,10,12,0.4) 50%,
    rgba(10,10,12,0.05) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 40px 80px;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s var(--ease-out) forwards;
}
.hero-eyebrow .label { color: var(--accent); font-size: 0.72rem; }
.hero-eyebrow-line {
  width: 32px; height: 1px;
  background: var(--accent);
  border-radius: 1px;
}
.hero-name {
  color: var(--white);
  opacity: 0;
  animation: fadeUp 0.9s 0.45s var(--ease-out) forwards;
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 900;
}
.hero-name em {
  font-style: normal;
  color: var(--accent);
  display: block;
}
.hero-sub {
  margin-top: 28px;
  opacity: 0;
  animation: fadeUp 0.8s 0.65s var(--ease-out) forwards;
}
.hero-sub p {
  font-size: 1.15rem;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  max-width: 460px;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 48px;
  opacity: 0;
  animation: fadeUp 0.8s 0.85s var(--ease-out) forwards;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}
.hero-stats > div {
  padding: 20px 36px;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.hero-stats > div:last-child { border-right: none; }
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 5px;
}
.hero-scroll {
  position: absolute;
  bottom: 40px; right: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeIn 1s 1.6s forwards;
}
.hero-scroll .label {
  writing-mode: vertical-rl;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.3);
}
.hero-scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.35), transparent);
  animation: scrollLine 2.2s 2.2s infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { to { opacity: 1; } }

@media (max-width: 640px) {
  .hero-content { padding: 0 20px 60px; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; }
  .hero-stats > div { padding: 16px 24px; }
}

/* ============================================
   SECTION DEFAULTS
============================================ */
section { padding: 120px 0; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 64px;
  gap: 24px;
}
.section-header-left { display: flex; flex-direction: column; gap: 10px; }
.section-title { line-height: 1.05; letter-spacing: -0.03em; }
.section-link {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
  white-space: nowrap;
  transition: opacity 0.2s;
}
.section-link:hover { opacity: 0.7; }

/* ============================================
   LATEST NEWS / POSTS
============================================ */
#latest-news { background: var(--bg-2); }

.posts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}
.post-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.post-card:first-child { grid-row: span 2; }
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.post-card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.post-card:first-child .post-card-img { height: 480px; }
.post-card:hover .post-card-img { transform: scale(1.04); }
.post-card-body { padding: 20px 24px 24px; }
.post-card-date {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.post-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.post-card:hover .post-card-title { color: var(--accent); }
.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card:first-child .post-card-excerpt { -webkit-line-clamp: 3; }

@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .post-card:first-child { grid-column: span 2; grid-row: span 1; }
  .post-card:first-child .post-card-img { height: 300px; }
}
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; gap: 12px; }
  .post-card:first-child { grid-column: span 1; }
}

/* ============================================
   RESULTATE
============================================ */
#resultate { background: var(--black); color: var(--white); }
#resultate .label { color: var(--gray-500); }
#resultate .section-title { color: var(--white); }
#resultate .section-link { color: rgba(255,255,255,0.6); }
#resultate .section-link:hover { color: var(--white); opacity: 1; }

.results-table {
  width: 100%;
  border-collapse: collapse;
}
.results-table th {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  text-align: left;
  padding: 0 20px 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.results-table td {
  padding: 20px 20px 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  vertical-align: middle;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td {
  color: var(--white);
  background: rgba(255,255,255,0.03);
}
.result-rank {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  line-height: 1;
  letter-spacing: -0.03em;
  min-width: 60px;
}
.result-rank.top3 { color: var(--accent); }
.result-race { font-weight: 600; color: var(--white) !important; }
.result-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
}
.result-badge.worldcup { border-color: rgba(215,0,21,0.5); color: var(--accent); }
.result-badge.wm       { border-color: rgba(215,0,21,0.6); color: var(--accent); }
.result-badge.em       { border-color: rgba(100,160,255,0.5); color: #5eabff; }
.result-badge.sm       { border-color: rgba(160,100,255,0.5); color: #b880ff; }

/* ============================================
   RENNKALENDER
============================================ */
#rennkalender { background: var(--bg); }

.calendar-list { display: flex; flex-direction: column; gap: 8px; }
.calendar-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-out);
}
.calendar-item:hover {
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}
.calendar-item.upcoming { border-left-color: var(--accent); }
.cal-date {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--black);
}
.cal-month {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-top: 2px;
}
.cal-race { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; margin-bottom: 4px; }
.cal-location {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  text-transform: uppercase;
}
.cal-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-pill);
}
.cal-tag.worldcup { background: var(--accent); }

@media (max-width: 640px) {
  .calendar-item { grid-template-columns: 60px 1fr; }
  .cal-tag { display: none; }
}

/* ============================================
   ÜBER MICH
============================================ */
#ueber-mich { background: var(--bg-2); overflow: hidden; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-img-wrap::after { display: none; }
.about-img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.about-content { display: flex; flex-direction: column; gap: 28px; }
.about-content .label { margin-bottom: -12px; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}
@media (max-width: 640px) {
  .about-stats { grid-template-columns: 1fr 1fr; }
}
.about-stat {
  padding: 20px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  text-align: center;
}
.about-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--black);
}
.about-stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-top: 5px;
}
.about-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 14px 26px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-pill);
  transition: background 0.2s, transform 0.2s var(--ease-spring);
  width: fit-content;
}
.about-cta:hover { background: var(--accent); transform: scale(1.03); }
.about-cta svg { transition: transform 0.3s; }
.about-cta:hover svg { transform: translateX(4px); }

/* ============================================
   GALERIE
============================================ */
#galerie { background: var(--black); overflow: hidden; }
#galerie .section-title { color: var(--white); }
#galerie .label { color: var(--gray-500); }
#galerie .section-link { color: rgba(255,255,255,0.5); }
#galerie .section-link:hover { color: var(--white); opacity: 1; }

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 0;
}
.gallery-item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border-radius: var(--radius-sm);
}
.gallery-item img {
  width: 100%; height: 280px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.4s;
  filter: grayscale(10%) brightness(0.9);
}
.gallery-item:hover img { transform: scale(1.06); filter: grayscale(0%) brightness(1); }
.gallery-item:nth-child(2) { grid-row: span 2; }
.gallery-item:nth-child(2) img { height: 100%; min-height: 570px; }

@media (max-width: 900px) {
  .gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(2) { grid-row: span 1; }
  .gallery-item:nth-child(2) img { min-height: 280px; }
}
@media (max-width: 640px) {
  .gallery-strip { grid-template-columns: 1fr 1fr; gap: 6px; }
  .gallery-item img { height: 180px; }
}

/* ============================================
   SPONSOREN
============================================ */
#sponsoren { background: var(--bg); }

.sponsor-intro {
  max-width: 560px;
  margin-bottom: 56px;
}
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.sponsor-card {
  background: var(--white);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.2s;
  text-align: center;
  min-height: 140px;
}
.sponsor-card:hover {
  background: var(--black);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.sponsor-card:hover .sponsor-name { color: var(--white); }
.sponsor-card:hover .sponsor-role { color: var(--gray-500); }
.sponsor-logo {
  max-width: 120px;
  max-height: 50px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter 0.3s, opacity 0.3s;
}
.sponsor-card:hover .sponsor-logo { filter: grayscale(0%) brightness(8); opacity: 1; }
.sponsor-name {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
  transition: color 0.2s;
}
.sponsor-role {
  font-size: 0.78rem;
  color: var(--gray-500);
  transition: color 0.2s;
}
.hauptsponsor-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius-pill);
  margin-bottom: 4px;
}

/* ============================================
   KONTAKT
============================================ */
#kontakt { background: var(--black); }
#kontakt .section-title { color: var(--white); }
#kontakt .label { color: var(--gray-500); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-intro p { color: rgba(255,255,255,0.55); font-size: 1.1rem; line-height: 1.8; }
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 40px;
}
.contact-item { display: flex; flex-direction: column; gap: 4px; }
.contact-item .label { margin-bottom: 4px; }
.contact-item a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  transition: color 0.2s;
}
.contact-item a:hover { color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(215,0,21,0.5);
  background: rgba(255,255,255,0.09);
}
.form-group textarea { min-height: 120px; }
.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 15px 28px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease-spring);
  width: fit-content;
}
.form-submit:hover { background: var(--accent-dark); transform: scale(1.03); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================
   FOOTER
============================================ */
#site-footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }

/* ============================================
   SCROLL ANIMATIONS
============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================
   SINGLE POST
============================================ */
.post-header {
  padding: 140px 0 60px;
  background: var(--black);
}
.post-header-inner { max-width: 800px; }
.post-header .label { color: var(--gray-500); margin-bottom: 16px; }
.post-header h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.04em; }
.post-meta {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.post-content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 0 100px;
}
.post-content p { margin-bottom: 24px; font-size: 1.05rem; line-height: 1.85; }
.post-content h2 { margin: 48px 0 20px; letter-spacing: -0.03em; }
.post-content img { width: 100%; margin: 32px 0; border-radius: var(--radius-sm); }
.post-content figure { margin: 32px 0; }

/* ============================================
   PAGE TEMPLATES
============================================ */
.page-hero {
  padding: 160px 0 80px;
  background: var(--black);
}
.page-hero .label { color: var(--gray-500); margin-bottom: 12px; }
.page-hero h1 { color: var(--white); letter-spacing: -0.04em; }

.resultate-table-full { padding: 80px 0; }

/* ============================================
   ARCHIVE / BLOG
============================================ */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .archive-grid { grid-template-columns: 1fr; } }

/* ============================================
   SEARCH
============================================ */
.search-form { display: flex; gap: 8px; margin-bottom: 48px; }
.search-form input[type="search"] {
  flex: 1;
  padding: 14px 20px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  background: var(--white);
  transition: border-color 0.2s;
}
.search-form input[type="search"]:focus { border-color: var(--accent); }
.search-form button {
  padding: 14px 24px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.search-form button:hover { background: var(--accent); }

/* ============================================
   WIDGETS
============================================ */
.widget { margin-bottom: 40px; }
.widget-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-200);
}
.widget ul { display: flex; flex-direction: column; gap: 8px; }
.widget ul li a {
  font-size: 0.9rem;
  color: var(--gray-600);
  transition: color 0.2s;
}
.widget ul li a:hover { color: var(--black); }

/* ============================================
   PAGINATION
============================================ */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 60px;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--gray-200);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pagination a:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.pagination .current { background: var(--black); color: var(--white); border-color: var(--black); }

/* ============================================
   UTILITIES
============================================ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.accent { color: var(--accent); }
.text-white { color: var(--white); }
.mt-0 { margin-top: 0; }
.wp-caption-text { font-family: var(--font-mono); font-size: 0.68rem; color: var(--gray-500); margin-top: 8px; letter-spacing: 0.04em; }
.aligncenter { margin-left: auto; margin-right: auto; display: block; }
.alignleft  { float: left;  margin-right: 24px; margin-bottom: 16px; }
.alignright { float: right; margin-left: 24px;  margin-bottom: 16px; }

/* ============================================
   LATEST POST FULL — inline readable article
============================================ */
.latest-post-full {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  overflow: hidden;
}
.latest-post-full .latest-post-img-wrap {
  display: block;
  overflow: hidden;
  position: relative;
}
.latest-post-full .latest-post-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease-out);
}
.latest-post-full .latest-post-img-wrap:hover .latest-post-img {
  transform: scale(1.02);
}
/* no side gradient needed in stacked layout */
.latest-post-full .latest-post-img-overlay { display: none; }

.latest-post-full .latest-post-body {
  padding: 52px 60px 56px;
  max-width: 860px;
  margin: 0 auto;
}
.latest-post-full .latest-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.latest-post-full .latest-post-title {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 28px;
}
.latest-post-full .latest-post-title a { transition: color 0.2s; }
.latest-post-full .latest-post-title a:hover { color: var(--accent); }

/* Full article content inside the inline card */
.latest-post-full-content {
  font-size: 1.05rem;
  line-height: 1.88;
  color: var(--gray-800);
}
.latest-post-full-content p {
  margin-bottom: 22px;
  color: var(--gray-800);
  font-size: 1.05rem;
  line-height: 1.88;
}
.latest-post-full-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 40px 0 16px;
  color: var(--black);
}
.latest-post-full-content h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 32px 0 12px;
  color: var(--black);
}
.latest-post-full-content img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin: 28px 0;
  display: block;
}
.latest-post-full-content figure { margin: 28px 0; }
.latest-post-full-content ul,
.latest-post-full-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.latest-post-full-content li { margin-bottom: 6px; line-height: 1.75; color: var(--gray-800); }
.latest-post-full-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 28px 0;
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.latest-post-full-content blockquote p { margin-bottom: 0; color: var(--gray-600); font-style: italic; }

/* Permalink at the bottom */
.latest-post-permalink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-200);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  transition: color 0.2s;
}
.latest-post-permalink:hover { color: var(--accent); }
.latest-post-permalink svg { flex-shrink: 0; }

/* Responsive */
@media (max-width: 768px) {
  .latest-post-full .latest-post-img { height: 320px; }
  .latest-post-full .latest-post-body { padding: 32px 28px 36px; }
}
@media (max-width: 480px) {
  .latest-post-full .latest-post-img { height: 240px; }
  .latest-post-full .latest-post-body { padding: 24px 16px 28px; }
  .latest-post-full .latest-post-title { font-size: clamp(1.5rem, 7vw, 2rem); }
}

/* ============================================
   LATEST POST FEATURED
============================================ */
.latest-post-featured {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.latest-post-featured:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.latest-post-img-wrap {
  position: relative;
  overflow: hidden;
  display: block;
}
.latest-post-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.latest-post-img-wrap:hover .latest-post-img { transform: scale(1.04); }
.latest-post-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 60%, var(--white));
  pointer-events: none;
}
.latest-post-body {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.latest-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.latest-new-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius-pill);
}
.latest-post-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.latest-post-title a { transition: color 0.2s; }
.latest-post-title a:hover { color: var(--accent); }
.latest-post-excerpt {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.75;
}
.latest-post-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 12px 22px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-pill);
  width: fit-content;
  transition: background 0.2s, transform 0.2s var(--ease-spring);
  margin-top: 4px;
}
.latest-post-cta:hover { background: var(--accent); transform: scale(1.03); }
.latest-post-cta svg { transition: transform 0.3s; }
.latest-post-cta:hover svg { transform: translateX(4px); }

/* No-image fallback */
.post-card-noimg, .post-card-small-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  background: var(--gray-100);
  color: var(--gray-500);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.post-card-noimg:hover, .post-card-small-noimg:hover { background: var(--gray-200); }

/* Smaller post cards */
.posts-grid-small {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 0;
}
.post-card-small {
  background: var(--white);
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.post-card-small:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card-small-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
  display: block;
}
.post-card-small:hover .post-card-small-img { transform: scale(1.05); }
.post-card-small-body { padding: 14px 16px 18px; }
.post-card-small-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 6px;
}
.post-card-small-title a { transition: color 0.2s; }
.post-card-small-title a:hover { color: var(--accent); }

/* "Alle Rennberichte" Button */
.news-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-200);
}
.news-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 16px 32px;
  border: 2px solid var(--black);
  color: var(--black);
  background: transparent;
  border-radius: var(--radius-pill);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-spring);
}
.news-all-btn:hover { background: var(--black); color: var(--white); transform: scale(1.03); }
.news-all-btn svg { transition: transform 0.3s; }
.news-all-btn:hover svg { transform: translateX(5px); }

@media (max-width: 1024px) {
  .latest-post-featured { grid-template-columns: 1fr; }
  .latest-post-img { height: 280px; }
  .latest-post-img-overlay { background: linear-gradient(to top, var(--white) 5%, transparent 40%); }
  .posts-grid-small { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .posts-grid-small { grid-template-columns: 1fr 1fr; }
  .latest-post-body { padding: 28px 20px; }
}

/* ============================================
   CALENDAR FULL PAGE
============================================ */
.calendar-stats {
  display: flex;
  gap: 40px;
  padding: 32px 40px;
  background: var(--black);
  border-radius: var(--radius);
  margin-bottom: 0;
}

/* ============================================
   MOBILE — COMPREHENSIVE FIXES
   Prevents horizontal overflow & improves
   layout on screens ≤ 768px / ≤ 480px
============================================ */

/* ── Tablet (≤ 768px) ── */
@media (max-width: 768px) {

  /* Section vertical rhythm */
  section { padding: 80px 0; }

  /* Section headers: stack label + link */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 12px;
  }

  /* Results table: horizontal scroll so long race names don't blow layout */
  #resultate .container { padding: 0; }
  #resultate > .container > .section-header { padding: 0 20px; }
  .results-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px;
  }
  .results-table {
    min-width: 520px;
  }

  /* Hero stats: stretch full width, reduce padding */
  .hero-stats {
    width: 100%;
    flex-wrap: wrap;
  }
  .hero-stats > div {
    flex: 1 1 auto;
    padding: 16px 20px;
  }

  /* Hero scroll indicator: hide on touch devices */
  .hero-scroll { display: none; }

  /* Latest featured post */
  .latest-post-featured { grid-template-columns: 1fr; }
  .latest-post-img { height: 240px; }
  .latest-post-img-overlay {
    background: linear-gradient(to top, var(--white) 5%, transparent 40%);
  }
  .latest-post-body { padding: 28px 24px 32px; }

  /* Smaller post cards: 2 columns */
  .posts-grid-small { grid-template-columns: repeat(2, 1fr); }

  /* About grid: single column */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }

  /* Sponsor grid: 2 columns */
  .sponsor-grid { grid-template-columns: 1fr 1fr; }

  /* Footer: stack items */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {

  section { padding: 64px 0; }

  /* Hero */
  .hero-content { padding: 0 16px 52px; }
  .hero-sub p { font-size: 1rem; }
  .hero-stat-num { font-size: 1.6rem; }
  .hero-stat-label { font-size: 0.58rem; }
  .hero-stats > div { padding: 14px 16px; }

  /* Make hero name not overflow on narrowest phones */
  .hero-name { word-break: break-word; overflow-wrap: break-word; }

  /* Section header */
  .section-header { margin-bottom: 32px; }

  /* Results table */
  .results-table th,
  .results-table td { padding: 14px 12px 14px 0; font-size: 0.85rem; }
  .result-rank { font-size: 1.3rem; min-width: 44px; }

  /* News CTA button: full width */
  .news-all-btn { width: 100%; justify-content: center; padding: 16px 20px; }
  .news-cta-wrap { margin-top: 32px; padding-top: 28px; }

  /* About stats: 2 columns */
  .about-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .about-stat { padding: 16px 12px; }
  .about-stat-num { font-size: 1.7rem; }

  /* About CTA: full width */
  .about-cta { width: 100%; justify-content: center; }

  /* Sponsor grid: single column */
  .sponsor-grid { grid-template-columns: 1fr; }
  .sponsor-card { padding: 28px 20px; }

  /* Footer links: wrap */
  .footer-links { flex-wrap: wrap; gap: 16px; }

  /* Latest post body */
  .latest-post-body { padding: 20px 16px 24px; }

  /* Gallery: 2 columns, smaller height */
  .gallery-strip { grid-template-columns: 1fr 1fr; gap: 6px; }
  .gallery-item img { height: 140px; }
  .gallery-item:nth-child(2) img { min-height: 140px; }

  /* Calendar items */
  .calendar-stats { padding: 20px; gap: 20px; flex-wrap: wrap; }
}
