/*
Theme Name: TV Europabad Marbach Avada Child
Description: Avada Child Theme fuer die moderne, barrierearme Website des TV Europabad Marbach.
Author: TV Europabad Marbach
Template: Avada
Version: 1.0.0
Text Domain: tvem-avada-child
*/

/* --------------------------------------------------------------------------
   TV Europabad Marbach Designsystem
   Inhalte bleiben im Avada Builder. Diese Datei liefert Tokens, Komponenten
   und Avada-kompatible Klassen fuer Layout, Buttons, Karten und Fokus-Stile.
   -------------------------------------------------------------------------- */

:root {
  --tvem-color-green-950: #0b2419;
  --tvem-color-green-900: #0f3022;
  --tvem-color-green-800: #173d2b;
  --tvem-color-green-700: #1e4b33;
  --tvem-color-olive: #6f7a4b;
  --tvem-color-clay-700: #8f523f;
  --tvem-color-clay-600: #a7654d;
  --tvem-color-sand-300: #d8c39a;
  --tvem-color-sand-200: #e8dcc1;
  --tvem-color-yellow-400: #f6ed5b;
  --tvem-color-offwhite: #f7f3e8;
  --tvem-color-paper: #fffdf7;
  --tvem-color-ink: #171a16;
  --tvem-color-muted: #5c6258;
  --tvem-color-border: rgba(15, 48, 34, 0.16);
  --tvem-color-focus: #0f3022;
  --tvem-color-focus-halo: rgba(246, 237, 91, 0.72);

  --tvem-font-heading: "Oswald", "Bebas Neue", "Anton", "Arial Narrow", Arial, sans-serif;
  --tvem-font-body: "Inter", "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --tvem-space-1: 0.25rem;
  --tvem-space-2: 0.5rem;
  --tvem-space-3: 0.75rem;
  --tvem-space-4: 1rem;
  --tvem-space-5: 1.25rem;
  --tvem-space-6: 1.5rem;
  --tvem-space-8: 2rem;
  --tvem-space-10: 2.5rem;
  --tvem-space-12: 3rem;
  --tvem-space-16: 4rem;
  --tvem-space-20: 5rem;

  --tvem-radius-sm: 4px;
  --tvem-radius-md: 8px;
  --tvem-shadow-card: 0 18px 45px rgba(11, 36, 25, 0.10);
  --tvem-shadow-soft: 0 10px 30px rgba(11, 36, 25, 0.08);

  --tvem-content-max: 1180px;
  --tvem-copy-max: 42rem;
  --tvem-button-min: 3rem;

  --tvem-h1-size: 3rem;
  --tvem-h2-size: 2.25rem;
  --tvem-h3-size: 1.45rem;
}

@media (min-width: 48rem) {
  :root {
    --tvem-h1-size: 4.35rem;
    --tvem-h2-size: 3rem;
    --tvem-h3-size: 1.65rem;
  }
}

@media (min-width: 72rem) {
  :root {
    --tvem-h1-size: 5.35rem;
    --tvem-h2-size: 3.65rem;
    --tvem-h3-size: 1.85rem;
  }
}

.tvem-theme {
  background: var(--tvem-color-offwhite);
  color: var(--tvem-color-ink);
  font-family: var(--tvem-font-body);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

.tvem-theme :where(p, li) {
  max-width: var(--tvem-copy-max);
}

.tvem-theme :where(img, picture, video) {
  max-width: 100%;
  height: auto;
}

.tvem-theme :where(a) {
  color: var(--tvem-color-green-800);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

.tvem-theme :where(a:hover) {
  color: var(--tvem-color-clay-700);
}

.tvem-theme :where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--tvem-color-focus);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px var(--tvem-color-focus-halo);
}

.tvem-skip-link {
  position: fixed;
  z-index: 100000;
  top: var(--tvem-space-4);
  left: var(--tvem-space-4);
  transform: translateY(-150%);
  display: inline-flex;
  align-items: center;
  min-height: var(--tvem-button-min);
  padding: 0 var(--tvem-space-5);
  border-radius: var(--tvem-radius-md);
  background: var(--tvem-color-yellow-400);
  color: var(--tvem-color-green-950);
  font-weight: 800;
  text-decoration: none;
}

.tvem-skip-link:focus,
.tvem-skip-link:focus-visible {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .tvem-theme *,
  .tvem-theme *::before,
  .tvem-theme *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Typografie: als Klassen in Avada Titel/Text-Elementen verwendbar. */
.tvem-kicker,
.tvem-highlight {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 2rem;
  padding: var(--tvem-space-1) var(--tvem-space-3);
  border-radius: var(--tvem-radius-sm);
  background: var(--tvem-color-yellow-400);
  color: var(--tvem-color-green-950);
  font-family: var(--tvem-font-body);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.tvem-heading-display,
.tvem-section-title,
.tvem-hero :where(h1, .fusion-title-heading) {
  color: inherit;
  font-family: var(--tvem-font-heading);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.98;
  text-transform: uppercase;
}

.tvem-heading-display,
.tvem-hero :where(h1, .fusion-title-heading) {
  max-width: 12ch;
  font-size: var(--tvem-h1-size);
}

.tvem-section-title {
  max-width: 13ch;
  font-size: var(--tvem-h2-size);
}

.tvem-lead {
  max-width: 38rem;
  color: inherit;
  font-size: 1.125rem;
  line-height: 1.65;
}

@media (min-width: 48rem) {
  .tvem-lead {
    font-size: 1.2rem;
  }
}

/* Layout-Utilities fuer Avada Container, Columns und Content Boxes. */
.tvem-section-clay,
.tvem-section-green,
.tvem-section-light {
  position: relative;
  padding-top: var(--tvem-space-16);
  padding-bottom: var(--tvem-space-16);
}

.tvem-section-clay {
  background: var(--tvem-color-sand-200);
  color: var(--tvem-color-ink);
}

.tvem-section-green {
  background: var(--tvem-color-green-900);
  color: var(--tvem-color-offwhite);
}

.tvem-section-green :where(a:not(.fusion-button):not(.tvem-button-primary):not(.tvem-button-secondary)) {
  color: var(--tvem-color-yellow-400);
}

.tvem-section-light {
  background: var(--tvem-color-offwhite);
  color: var(--tvem-color-ink);
}

.tvem-flow > * + * {
  margin-top: var(--tvem-space-5);
}

.tvem-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--tvem-space-5);
}

@media (min-width: 44rem) {
  .tvem-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--tvem-space-6);
  }
}

@media (min-width: 66rem) {
  .tvem-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--tvem-space-8);
  }

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

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

.tvem-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--tvem-space-4);
}

.tvem-media-tile {
  position: relative;
  overflow: hidden;
  min-height: 16rem;
  border-radius: var(--tvem-radius-md);
  background: var(--tvem-color-green-900);
  box-shadow: var(--tvem-shadow-soft);
}

.tvem-media-tile img,
.tvem-media-tile picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 56rem) {
  .tvem-media-grid {
    grid-template-columns: 1.4fr 0.8fr;
    grid-auto-rows: minmax(14rem, auto);
  }

  .tvem-media-tile--wide {
    grid-row: span 2;
    min-height: 32rem;
  }
}

/* Hero: Avada Container mit Hintergrundbild und Klasse .tvem-hero versehen. */
.tvem-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 82vh;
  min-height: 82svh;
  overflow: hidden;
  padding: var(--tvem-space-20) 0 var(--tvem-space-12);
  background-color: var(--tvem-color-green-900);
  background-position: center;
  background-size: cover;
  color: var(--tvem-color-offwhite);
}

.tvem-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 36, 25, 0.88) 0%, rgba(11, 36, 25, 0.62) 42%, rgba(11, 36, 25, 0.28) 100%),
    linear-gradient(0deg, rgba(11, 36, 25, 0.80) 0%, rgba(11, 36, 25, 0.08) 58%);
}

.tvem-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: min(42rem, 72%);
  height: 0.55rem;
  background: var(--tvem-color-yellow-400);
}

.tvem-hero > .fusion-builder-row,
.tvem-hero > .fusion-row {
  width: min(100% - 2rem, var(--tvem-content-max));
}

.tvem-hero :where(p, .tvem-lead) {
  max-width: 36rem;
  color: rgba(247, 243, 232, 0.94);
}

.tvem-hero .fusion-button-wrapper,
.tvem-hero .tvem-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tvem-space-3);
  margin-top: var(--tvem-space-6);
}

@media (max-width: 42rem) {
  .tvem-hero {
    align-items: flex-end;
    min-height: 76vh;
    min-height: 76svh;
    padding-top: var(--tvem-space-16);
  }

  .tvem-hero::before {
    background:
      linear-gradient(180deg, rgba(11, 36, 25, 0.34) 0%, rgba(11, 36, 25, 0.90) 70%),
      linear-gradient(90deg, rgba(11, 36, 25, 0.78) 0%, rgba(11, 36, 25, 0.24) 100%);
  }
}

/* Buttons: Klasse direkt am Avada Button-Element hinterlegen. */
.tvem-button-primary,
.fusion-button.tvem-button-primary,
.tvem-button-secondary,
.fusion-button.tvem-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tvem-button-min);
  min-width: 9.5rem;
  border: 2px solid transparent;
  border-radius: var(--tvem-radius-md);
  font-family: var(--tvem-font-body);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tvem-button-primary,
.fusion-button.tvem-button-primary {
  background: var(--tvem-color-yellow-400);
  color: var(--tvem-color-green-950);
}

.tvem-button-primary:hover,
.fusion-button.tvem-button-primary:hover {
  background: var(--tvem-color-offwhite);
  color: var(--tvem-color-green-950);
  transform: translateY(-1px);
}

.fusion-button.tvem-button-primary :where(.fusion-button-text, .fusion-button-icon-divider, i),
.fusion-button.tvem-button-secondary :where(.fusion-button-text, .fusion-button-icon-divider, i) {
  color: inherit;
}

.tvem-button-secondary,
.fusion-button.tvem-button-secondary {
  border-color: currentColor;
  background: transparent;
  color: currentColor;
}

.tvem-button-secondary:hover,
.fusion-button.tvem-button-secondary:hover {
  background: var(--tvem-color-green-950);
  border-color: var(--tvem-color-green-950);
  color: var(--tvem-color-offwhite);
  transform: translateY(-1px);
}

.tvem-section-green .tvem-button-secondary,
.tvem-section-green .fusion-button.tvem-button-secondary,
.tvem-hero .tvem-button-secondary,
.tvem-hero .fusion-button.tvem-button-secondary {
  color: var(--tvem-color-offwhite);
}

.tvem-section-green .tvem-button-secondary:hover,
.tvem-section-green .fusion-button.tvem-button-secondary:hover,
.tvem-hero .tvem-button-secondary:hover,
.tvem-hero .fusion-button.tvem-button-secondary:hover {
  background: var(--tvem-color-offwhite);
  border-color: var(--tvem-color-offwhite);
  color: var(--tvem-color-green-950);
}

@media (max-width: 36rem) {
  .tvem-button-primary,
  .fusion-button.tvem-button-primary,
  .tvem-button-secondary,
  .fusion-button.tvem-button-secondary {
    width: 100%;
  }
}

/* Karten und Tiles fuer Vorteile, Anlage, Mannschaften und News. */
.tvem-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  padding: var(--tvem-space-5);
  border: 1px solid var(--tvem-color-border);
  border-radius: var(--tvem-radius-md);
  background: var(--tvem-color-paper);
  color: var(--tvem-color-ink);
  box-shadow: var(--tvem-shadow-card);
}

.tvem-card > * + * {
  margin-top: var(--tvem-space-4);
}

.tvem-card :where(img, picture) {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--tvem-radius-md);
  background: var(--tvem-color-sand-200);
}

.tvem-card :where(h2, h3, h4, .fusion-title-heading) {
  max-width: 14ch;
  margin-bottom: 0;
  color: var(--tvem-color-green-950);
  font-family: var(--tvem-font-heading);
  font-size: var(--tvem-h3-size);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: uppercase;
}

.tvem-card :where(p) {
  color: var(--tvem-color-muted);
}

.tvem-card :where(a:not(.fusion-button)) {
  margin-top: auto;
  font-weight: 800;
}

.tvem-card--dark {
  background: var(--tvem-color-green-900);
  color: var(--tvem-color-offwhite);
}

.tvem-card--dark :where(h2, h3, h4, .fusion-title-heading),
.tvem-card--dark :where(p),
.tvem-card--dark :where(a:not(.fusion-button)) {
  color: inherit;
}

.tvem-card--accent {
  border-color: rgba(246, 237, 91, 0.56);
  background: var(--tvem-color-yellow-400);
}

.tvem-card--accent :where(h2, h3, h4, .fusion-title-heading),
.tvem-card--accent :where(p),
.tvem-card--accent :where(a:not(.fusion-button)) {
  color: var(--tvem-color-green-950);
}

.tvem-booking,
.tvem-membership {
  position: relative;
  overflow: hidden;
  padding: var(--tvem-space-10);
  border-radius: var(--tvem-radius-md);
  background: var(--tvem-color-green-900);
  color: var(--tvem-color-offwhite);
}

.tvem-booking {
  border-left: 0.5rem solid var(--tvem-color-yellow-400);
}

.tvem-membership {
  background: var(--tvem-color-clay-700);
}

.tvem-booking :where(h2, h3, .fusion-title-heading),
.tvem-membership :where(h2, h3, .fusion-title-heading) {
  color: inherit;
  font-family: var(--tvem-font-heading);
  font-size: var(--tvem-h2-size);
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.tvem-booking :where(p),
.tvem-membership :where(p) {
  color: rgba(247, 243, 232, 0.94);
}

@media (max-width: 42rem) {
  .tvem-booking,
  .tvem-membership {
    padding: var(--tvem-space-6);
  }
}

.tvem-news .fusion-post-card,
.tvem-news .fusion-post-grid,
.tvem-news .tvem-card {
  min-height: 100%;
}

.tvem-news time,
.tvem-card time {
  color: var(--tvem-color-clay-700);
  font-size: 0.9rem;
  font-weight: 800;
}

/* Formulare: vorbereitet fuer Fluent Forms und Avada Forms. */
.tvem-membership :where(label, legend),
.tvem-theme :where(.fluentform label, .fusion-form label) {
  color: inherit;
  font-weight: 800;
}

.tvem-theme :where(.fluentform input, .fluentform textarea, .fluentform select, .fusion-form input, .fusion-form textarea, .fusion-form select) {
  min-height: 3rem;
  border: 2px solid rgba(15, 48, 34, 0.22);
  border-radius: var(--tvem-radius-md);
  background: var(--tvem-color-paper);
  color: var(--tvem-color-ink);
  font: inherit;
}

.tvem-theme :where(.fluentform input, .fluentform textarea, .fluentform select, .fusion-form input, .fusion-form textarea, .fusion-form select):focus-visible {
  border-color: var(--tvem-color-green-900);
}

.tvem-theme :where(.ff-btn-submit, .fusion-form-submit, button[type="submit"]) {
  min-height: var(--tvem-button-min);
  border-radius: var(--tvem-radius-md);
  background: var(--tvem-color-yellow-400);
  color: var(--tvem-color-green-950);
  font-weight: 850;
}

/* Avada Header und Mobile Menue: sauber, tastaturfreundlich, grosse Touch-Ziele. */
.tvem-theme :where(.fusion-main-menu > ul > li > a, .awb-menu__main-a) {
  min-height: 2.75rem;
  font-weight: 800;
  text-decoration: none;
}

.tvem-theme :where(.fusion-main-menu > ul > li.current-menu-item > a, .awb-menu__main-li_regular.current-menu-item .awb-menu__main-a) {
  color: var(--tvem-color-green-900);
}

@media (max-width: 64rem) {
  .tvem-theme :where(.fusion-mobile-menu-icons a, .awb-menu__m-toggle) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    min-height: 3rem;
    border-radius: var(--tvem-radius-md);
    background: var(--tvem-color-green-900);
    color: var(--tvem-color-offwhite);
  }

  .tvem-theme :where(.fusion-mobile-nav-holder, .awb-menu__m-collapse) {
    border-top: 1px solid var(--tvem-color-border);
    background: var(--tvem-color-offwhite);
    box-shadow: var(--tvem-shadow-soft);
  }

  .tvem-theme :where(.fusion-mobile-nav-holder a, .awb-menu__sub-a, .awb-menu__main-a) {
    min-height: 3rem;
    padding-top: var(--tvem-space-3);
    padding-bottom: var(--tvem-space-3);
    color: var(--tvem-color-green-950);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
  }
}

/* Footer: Avada Container oder Footer-Builder-Section mit .tvem-footer versehen. */
.tvem-footer {
  padding-top: var(--tvem-space-12);
  padding-bottom: var(--tvem-space-8);
  background: var(--tvem-color-green-950);
  color: var(--tvem-color-offwhite);
}

.tvem-footer :where(h2, h3, h4, .fusion-title-heading) {
  color: inherit;
  font-family: var(--tvem-font-heading);
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: uppercase;
}

.tvem-footer :where(p, li) {
  color: rgba(247, 243, 232, 0.88);
}

.tvem-footer :where(a) {
  color: var(--tvem-color-offwhite);
}

.tvem-footer :where(a:hover) {
  color: var(--tvem-color-yellow-400);
}

.tvem-footer .tvem-grid {
  align-items: start;
}

/* Kleine Helfer fuer Pflege im Builder. */
.tvem-visually-muted {
  color: var(--tvem-color-muted);
}

.tvem-no-margin {
  margin: 0 !important;
}

.tvem-align-end {
  align-self: end;
}

.tvem-stack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tvem-space-3);
}

@media (max-width: 36rem) {
  .tvem-stack-actions {
    flex-direction: column;
  }
}
