/* ═══════════════════════════════════════════════════
   MRCSG Components
   Buttons, cards, nav, tags, layout helpers, animations.
═══════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  font-weight: 300;
  overflow-x: hidden;
  transition: background var(--t-slow), color var(--t-slow);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, video { max-width: 100%; height: auto; display: block; }

/* ── Animations ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.8; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

/* ── Reveal (IntersectionObserver driven) ── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Live dot ── */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-red);
  animation: pulse 1.4s ease infinite;
  flex-shrink: 0;
}

/* ── Tag / label ── */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-label);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0;
  line-height: 1;
}

/* ── Headings ── */
.heading-hero {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-hero);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.heading-h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-h2);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.heading-h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-h3);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.accent-italic {
  color: var(--accent);
  font-style: italic;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  padding: 11px 24px;
  transition: background var(--t-mid), color var(--t-mid), border-color var(--t-mid);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent2);
  border-color: var(--accent2);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: #fff;
}
.btn-ghost-white {
  background: rgba(0,0,0,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost-white:hover {
  background: rgba(0,0,0,0.35);
}

/* ── Navigation ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: color-mix(in oklch, var(--bg) 97%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: var(--border-w);
  display: flex;
  align-items: center;
  padding: 0 var(--page-pad-h);
  transition: background var(--t-slow);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--fg);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-nav);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg2);
  padding: 6px 12px;
  text-decoration: none;
  transition: color var(--t-mid);
}
.nav-link:hover { color: var(--fg); }
.nav-link.active { color: var(--accent); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 1px;
  background: var(--bg2);
  border: var(--border-w);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg2);
  padding: 5px 9px;
  transition: all var(--t-fast);
}
.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Theme toggle */
.theme-toggle {
  background: var(--bg2);
  border: var(--border-w);
  border-radius: var(--radius);
  cursor: pointer;
  width: 34px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--fg2);
  transition: all var(--t-mid);
}
.theme-toggle:hover { color: var(--fg); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
  transition: all 0.25s;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  padding: 32px 24px;
  gap: 8px;
  border-top: var(--border-w);
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-nav-link {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg2);
  padding: 10px 0;
  border-bottom: var(--border-w);
  transition: color var(--t-fast);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mobile-nav-link:hover,
.mobile-nav-link.active { color: var(--accent); }
.mobile-theme-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.mobile-theme-btn {
  flex: 1;
  padding: 10px;
  border: var(--border-w);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--fg2);
  transition: all var(--t-fast);
}
.mobile-theme-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Layout helpers ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--page-pad-h);
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.three-col {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
}
.four-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--card-gap);
}
.section-pad {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

/* ── Spec grid ── */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: var(--border-w);
  margin: 28px 0;
}
.spec-cell {
  background: var(--bg);
  padding: 14px 18px;
}
.spec-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--fg);
}
.spec-label {
  font-family: var(--font-display);
  font-size: var(--text-caption);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg2);
  margin-top: 2px;
}

/* ── Race event row ── */
.event-row {
  background: var(--bg2);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: minmax(100px, 130px) 1fr auto;
  align-items: center;
  gap: 20px;
  border-left: 3px solid var(--fg2);
  transition: background var(--t-fast);
  cursor: pointer;
}
.event-row:hover { background: var(--bg3); }
.event-row--sm  { border-left-color: var(--accent); }
.event-row--gp  { border-left-color: oklch(0.65 0.18 270); }
.event-row--club { border-left-color: var(--fg2); }
.event-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--fg2);
  letter-spacing: 0.04em;
}
.event-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}
.event-type {
  font-size: 12px;
  color: var(--fg2);
  margin-top: 2px;
}
.event-badge {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 4px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.event-badge--sm   { color: var(--accent); }
.event-badge--gp   { color: oklch(0.65 0.18 270); }
.event-badge--club { color: var(--fg2); }

/* ── Price card ── */
.price-card {
  background: var(--bg3);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.price-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
.price-note {
  font-size: 12px;
  color: var(--fg2);
  margin-top: 2px;
}
.price-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--accent);
}

/* ── Gallery grid ── */
.gallery-item {
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--t-mid);
  cursor: pointer;
}
.gallery-item:hover { border-color: var(--accent); }
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover .gallery-img { transform: scale(1.04); }
.gallery-placeholder {
  width: 100%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg2);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Stream embed ── */
.stream-container {
  position: relative;
  aspect-ratio: 16 / 9;
  background: oklch(0.07 0.01 55);
  border: var(--border-w);
  overflow: hidden;
}
.stream-iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.stream-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.stream-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--live-red);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius);
}
.stream-badge-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #fff;
  text-transform: uppercase;
}

/* ── Info strip ── */
.info-strip {
  background: var(--accent);
  padding: 22px var(--page-pad-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.info-strip-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 2vw, 20px);
  letter-spacing: 0.04em;
  color: #fff;
  max-width: 780px;
}

/* ── Footer ── */
.site-footer {
  background: var(--bg2);
  border-top: var(--border-w);
  padding: 48px var(--page-pad-h) 28px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-col-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg2);
  margin-bottom: 12px;
}
.footer-link {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg2);
  padding: 3px 0;
  text-align: left;
  text-decoration: none;
  transition: color var(--t-fast);
}
.footer-link:hover { color: var(--fg); }
.footer-bottom {
  border-top: var(--border-w);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-copy {
  font-size: 12px;
  color: var(--fg2);
  opacity: 0.45;
}

/* ── Scroll indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.35;
}
.scroll-label {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 36px;
  background: var(--fg2);
  animation: scrollPulse 2s ease infinite;
}

/* ── Image placeholder ── */
.img-placeholder {
  background: var(--bg2);
  border: var(--border-w);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  color: var(--fg2);
  font-family: monospace;
  font-size: 9px;
  opacity: 0.4;
}
.img-placeholder-accent-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

/* ── Hours schedule row ── */
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: var(--border-w);
  flex-wrap: wrap;
  gap: 8px;
}
.hours-day {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}
.hours-time {
  color: var(--fg2);
  font-size: 14px;
  font-weight: 300;
}

/* ── WP admin bar offset ── */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .two-col   { grid-template-columns: 1fr; gap: 40px; }
  .three-col { grid-template-columns: 1fr 1fr; gap: 32px; }
  .three-col > *:first-child { grid-column: 1 / -1; }
  .four-col  { grid-template-columns: repeat(2, 1fr); }
  .hamburger { display: flex; }
  .nav-links, .nav-controls { display: none !important; }
  .container, .section-pad { padding-left: 20px !important; padding-right: 20px !important; }
  .event-row { grid-template-columns: 1fr auto; }
  .event-date { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .four-col { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 24px !important; flex-wrap: wrap; }
  .hero-btns  { flex-direction: column !important; }
}

/* ── Logo Dark/Light Switching ── */
/* Dark mode: zeige dark logo, verstecke light logo */
[data-theme="dark"]  .mrcsg-logo-light { display: none !important; }
[data-theme="dark"]  .mrcsg-logo-dark  { display: block !important; }

/* Light mode: zeige light logo, verstecke dark logo */
[data-theme="light"] .mrcsg-logo-dark  { display: none !important; }
[data-theme="light"] .mrcsg-logo-light { display: block !important; }

/* Default (kein theme gesetzt): dark logo sichtbar */
.mrcsg-logo-dark  { display: block; }
.mrcsg-logo-light { display: none; }

/* ── Contact Form 7 — MRCSG Theme Override ── */
.wpcf7 .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.wpcf7 .wpcf7-form p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
    width: 100% !important;
    background: var(--bg3) !important;
    border: 1px solid var(--border) !important;
    color: var(--fg) !important;
    padding: 12px 16px !important;
    font-family: var(--font-body) !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    border-radius: var(--radius) !important;
    outline: none !important;
    transition: border-color var(--t-fast) !important;
    box-shadow: none !important;
}
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    border-color: var(--accent) !important;
}
.wpcf7 textarea {
    resize: vertical !important;
    min-height: 140px !important;
}
.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
    background: transparent !important;
    color: var(--accent) !important;
    border: 1px solid var(--accent) !important;
    padding: 12px 32px !important;
    font-family: var(--font-display) !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    border-radius: var(--radius) !important;
    cursor: pointer !important;
    transition: background var(--t-mid), color var(--t-mid) !important;
    width: auto !important;
    align-self: flex-start !important;
}
.wpcf7 input[type="submit"]:hover,
.wpcf7 .wpcf7-submit:hover {
    background: var(--accent) !important;
    color: #fff !important;
}
.wpcf7 label {
    font-family: var(--font-display) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--fg2) !important;
}
.wpcf7-not-valid-tip {
    color: #e53e3e !important;
    font-size: 12px !important;
    margin-top: 4px !important;
}
.wpcf7-response-output {
    border: 1px solid var(--border) !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
    margin-top: 8px !important;
    border-radius: var(--radius) !important;
    background: var(--bg2) !important;
    color: var(--fg2) !important;
}
.wpcf7-response-output.wpcf7-mail-sent-ok {
    border-color: #48bb78 !important;
    color: #48bb78 !important;
}
.wpcf7-response-output.wpcf7-validation-errors {
    border-color: #e53e3e !important;
    color: #e53e3e !important;
}
/* Two-column form layout on desktop */
.wpcf7-two-col .wpcf7-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.wpcf7-two-col .wpcf7-form p:nth-last-child(-n+3) {
    grid-column: 1 / -1;
}
