/* ========== GLOBALE STYLES ========== */
:root {
  --primary: #000000;
  --secondary: #c8102e;
  --light: #f5f5f5;
  --dark: #333333;
  --gray: #777777;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: #f9f9f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 6rem; /* globaler Abstand für fixierten Header */
}

/* ========== HEADER MIT SCHRIFTZUG ========== */
header {
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: nowrap;
}

.header-title {
  order: 0;
}

.nav-menu {
  order: 1;
  flex-grow: 1;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
  order: 2;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: white;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ========== NAVIGATION ========== */
.main-menu {
  display: flex;
  list-style: none;
}

.main-menu > li {
  position: relative;
  margin-left: 1.5rem;
}

.main-menu a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: block;
  font-weight: 500;
  transition: color 0.3s ease;
}

.main-menu a:hover {
  color: var(--secondary);
}

.dropdown-content {
  position: absolute;
  right: 0;
  background: var(--dark);
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
}

.dropdown-content a {
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ========== STARTSEITEN-LOGO ========== */
.home-logo {
  width: 500px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  transition: transform 0.3s ease;
}

.home-logo:hover {
  transform: scale(1.03);
}

/* ========== HAUPTINHALT ========== */
main {
  flex: 1;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.hero {
  text-align: center;
  padding: 4rem 0;
}

.btn {
  display: inline-block;
  background: var(--secondary);
  color: white;
  padding: 0.8rem 1.8rem;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 1rem;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #d1401a;
}

/* ========== TRAINERPROFIL ========== */
.trainer-profile {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0;
  overflow: visible; /* verhindert Abschneiden beim Zoomen */
}

.trainer-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary);
  transition: transform 0.3s ease-in-out;
  transform-origin: center center; /* zoomt von der Mitte */
}

/* ========== ABSÄTZE GLOBAL ========== */
p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ========== FOOTER ========== */
footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--secondary);
}

footer p {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Mobile Ansicht */
@media (max-width: 600px) {
  .footer-links {
    flex-direction: column;
    gap: 0.8rem;
  }

  footer p {
    font-size: 0.8rem;
    text-align: center;
  }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 992px) {
  .home-logo {
    width: 400px;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: flex;
  }

  .main-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--dark);
    flex-direction: column;
    padding: 100px 20px 20px;
    transition: right 0.3s ease;
    overflow-y: auto;
  }

  .main-menu.active {
    right: 0;
  }

  .main-menu > li {
    margin: 1rem 0;
  }

  .dropdown-content {
    position: static;
    display: none;
    padding-left: 1rem;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }

  .home-logo {
    width: 300px;
  }
}

@media (max-width: 576px) {
  .trainer-profile {
    flex-direction: column;
    text-align: center;
  }

  .home-logo {
    width: 250px;
  }
}

/* ========== HEADER TITEL ========== */
.header-title h1 {
  font-size: clamp(1.1rem, 5vw, 1.8rem);
  white-space: nowrap;
  line-height: 1.3;
}

.header-title .subtitle {
  display: block;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ========== FORMULARE ========== */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

form input,
form textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.2s ease;
}

form input:focus,
form textarea:focus {
  border-color: var(--secondary);
  outline: none;
}

form button {
  padding: 0.75rem;
  font-size: 1rem;
  background-color: var(--secondary);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: #444;
}

/* ========== KACHEL-BEREICHE (Kids Cup, Karate EM etc.) ========== */
.kachel {
  background: linear-gradient(to bottom, #ffffff, #f5f7fb);
  border-radius: 14px;
  padding: 2rem;
  margin: 2rem auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 1000px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kachel:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.kachel h2 {
  color: var(--secondary);
  margin-bottom: 1rem;
  font-size: 1.6rem;
  font-weight: 700;
}

.kachel p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  color: var(--gray);
}

.kachel a.btn {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.kachel a.btn:hover {
  background: #a10a1f;
  transform: translateY(-2px);
}

/* Scrollschutz */
html, body {
  overflow-x: hidden;
}

section {
  max-width: 100%;
  overflow-x: hidden;
}

/* Mobile Optimierung */
@media (max-width: 600px) {
  .kachel {
    padding: 1.5rem;
    margin: 1.5rem auto;
  }

  .kachel h2 {
    font-size: 1.3rem;
  }

  .kachel p {
    font-size: 1rem;
  }

  .kachel a.btn {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    padding: 0.9rem;
    font-size: 1rem;
  }
}

/* ========== SHOP ========== */
.shop-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

/* ========== MODAL BILDER ========== */
.img-modal {
  display: none;
  position: fixed;
  z-index: 150;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.img-modal.active {
  display: flex;
}

.img-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
  cursor: zoom-out;
  transition: transform 0.3s ease;
}

.img-modal img:hover {
  transform: scale(1.05);
}

/* ========== COOKIE-BANNER ========== */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #222;
  color: white;
  padding: 1rem;
  text-align: center;
  z-index: 10000;
  font-size: 0.9rem;
}

#cookie-banner p {
  margin: 0 0 0.5rem 0;
}

#cookie-banner a {
  color: #fff;
  text-decoration: underline;
}

#cookie-banner button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-right: 0.5rem;
}

#cookie-banner #accept-cookies {
  background: #cc0000;
  color: white;
}

#cookie-banner #decline-cookies {
  background: #666;
  color: white;
}

#cookie-banner div {
  margin: 0.5rem 0;
}

#cookie-banner label {
  margin-right: 1rem;
  cursor: pointer;
}

#cookie-banner input[type="checkbox"] {
  margin-right: 0.3rem;
}

/* ========== NAVIGATION OPTIMIERUNG FÜR iPAD PRO ========== */
@media (max-width: 1024px) {
  .main-menu > li {
    margin-left: 0.6rem;
  }
  .main-menu a {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
  .header-title h1 {
    font-size: 1.3rem;
  }
  .header-title .subtitle {
    font-size: 0.85rem;
  }
}

@media (min-width: 1025px) and (max-width: 1366px) {
  .main-menu > li {
    margin-left: 0.9rem;
  }
  .main-menu a {
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
  }
  .header-title h1 {
    font-size: 1.45rem;
  }
  .header-title .subtitle {
    font-size: 0.9rem;
  }
}

/* Handy-Optimierung Kopfzeile */
@media (max-width: 576px) {
  .header-title h1 {
    font-size: 1rem;
    white-space: nowrap;
  }
  .header-title .subtitle {
    font-size: 0.75rem;
  }
}

/* ========== HOVER-EFFEKTE NUR DESKTOP ========== */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
  .trainer-img:hover {
    transform: scale(1.1);
    z-index: 2;
  }
}

/* ========== KORREKTUR FÜR TRAINER-SEITE (weißer Rand + Clipping) ========== */
/* Lässt die Trainer-Sektion überlaufen (überschreibt das globale section{overflow-x:hidden}) */
#trainer { overflow: visible; }

/* Zieht die Profile links bündig über das main-Padding und hält Textausrichtung bei */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
  #trainer .trainer-profile {
    overflow: visible;
    margin-left: -2rem;   /* kompensiert main{ padding-left:2rem } */
    padding-left: 2rem;   /* Inhalt bleibt optisch ausgerichtet */
  }
}

/* ===== TO-TOP BUTTON (GLOBAL, unverändert) ===== */
#toTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background-color: #c8102e;
  color: white;
  border: none;
  outline: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#toTopBtn:hover {
  background-color: #a60000;
  transform: scale(1.1);
}

/* ===== NEU: EINHEITLICHE BREITE FÜR LANGE SEITEN ===== */
/* Nur für Seiten mit <body class="longpage"> */
body.longpage main {
  max-width: 1200px;     /* schöne Lesebreite */
  width: 100%;
  margin: 2rem auto;
  padding: 0 2rem;
}