/* ==========================================================================
   Tennismarkt Online – Style
   Premium, clean, mobile-first
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --charcoal: #2B486B;
  --green: #38812B;
  --green-light: #659E22;
  --blue: #1F5D8B;
  --blue-light: #4687C5;
  --gold: #FDBB16;
  --gold-bright: #FDD307;
  --red: #D44844;
  --red-light: #F36253;
  --bg: #F7F6F4;
  --bg-alt: #EEF1F5;
  --white: #FFFFFF;
  --text: #2B486B;
  --text-light: #5A7190;
  --border: #D0D6DE;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(43,72,107,0.08), 0 4px 12px rgba(43,72,107,0.04);
  --shadow-lg: 0 4px 12px rgba(43,72,107,0.1), 0 12px 32px rgba(43,72,107,0.06);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1120px;
}

/* --- Font: Nunito Sans (self-hosted, DSGVO-konform) --- */
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/NunitoSans-Variable.woff2') format('woff2');
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--green);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--bg-alt);
}

.text-center { text-align: center; }

/* --- Top Bar (Markisen-Streifen Brand Detail) --- */
.topbar {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--green-light) 0%,
    var(--green-light) 25%,
    var(--red-light) 25%,
    var(--red-light) 50%,
    var(--blue-light) 50%,
    var(--blue-light) 75%,
    var(--gold) 75%,
    var(--gold) 100%
  );
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav__logo {
  height: 60px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--blue);
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .nav__toggle { display: block; }

  .nav__links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 0;
    box-shadow: var(--shadow);
  }

  .nav__links.is-open { display: flex; }

  .nav__links li {
    border-bottom: 1px solid var(--bg-alt);
  }

  .nav__links li:last-child { border-bottom: none; }

  .nav__links a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
  }

  .nav__toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* --- Hero Section (Fullscreen Photo) --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  background-color: #1a2a3a;
  background-image: url('../img/hero-bg.webp');
  background-image: image-set(url('../img/hero-bg.webp') type('image/webp'), url('../img/hero-bg.jpg') type('image/jpeg'));
}

@media (max-width: 768px) {
  .hero {
    background-image: url('../img/hero-bg-mobile.webp');
    background-image: image-set(url('../img/hero-bg-mobile.webp') type('image/webp'), url('../img/hero-bg-mobile.jpg') type('image/jpeg'));
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.15) 40%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 6rem 1.25rem 5rem;
  max-width: 600px;
}

.hero__logo {
  width: clamp(240px, 40vw, 400px);
  height: auto;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.hero__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__claim {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  margin-bottom: 1rem;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero__text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* --- Photo Divider (Parallax-Trenner) --- */
.photo-divider {
  height: 280px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .photo-divider {
    height: 180px;
    background-attachment: scroll;
  }
}

/* --- Buttons --- */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}

.btn--primary:hover {
  background: #1a4f76;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--outline {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
  transform: translateY(-1px);
}

.btn--outline-light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--outline-light:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* --- Section Headings --- */
.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section__header p {
  color: var(--text-light);
  margin-top: 0.75rem;
  font-size: 1.05rem;
}

/* --- About Section --- */
.about__content {
  max-width: 720px;
  margin: 0 auto;
  border-left: 3px solid var(--green);
  padding-left: 1.5rem;
}

.about__content p {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about__content p:last-child { margin-bottom: 0; }

/* --- Cards (Zielgruppen) --- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}

@media (max-width: 599px) {
  .card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 1rem;
    align-items: center;
  }

  .card__icon {
    grid-row: 1;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .card h3 {
    grid-row: 1;
    margin-bottom: 0;
  }

  .card p {
    grid-column: 1 / -1;
    margin-top: 0.75rem;
  }
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.card__icon--green { background: rgba(56, 129, 43, 0.1); color: var(--green); }
.card__icon--blue  { background: rgba(31, 93, 139, 0.1); color: var(--blue); }
.card__icon--gold  { background: rgba(253, 187, 22, 0.15); color: #c89400; }

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* --- Benefits --- */
.benefits__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 640px;
  margin: 0 auto;
  list-style: none;
}

@media (min-width: 600px) {
  .benefits__list { grid-template-columns: 1fr 1fr; max-width: 800px; }
}

.benefits__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.benefits__check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(56, 129, 43, 0.1);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

.benefits__item p {
  font-size: 0.95rem;
  color: var(--text);
}

/* --- Timeline (Coming Soon) --- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 480px;
  margin: 2.5rem auto 0;
}

@media (min-width: 600px) {
  .timeline { flex-direction: row; gap: 0; }
}

.timeline__step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 1.5rem 1rem;
}

.timeline__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  border: 2px solid var(--border);
  background: var(--white);
}

.timeline__step--active .timeline__dot {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(56, 129, 43, 0.15);
}

.timeline__step h3 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.timeline__step p {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Connecting line between dots on mobile (vertical) */
@media (max-width: 599px) {
  .timeline__step {
    padding-left: 2.5rem;
    text-align: left;
  }

  .timeline__dot {
    position: absolute;
    left: 0;
    top: 1.5rem;
    margin: 0;
  }

  .timeline__step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 6px;
    top: calc(1.5rem + 14px);
    width: 2px;
    height: calc(100% - 14px);
    background: var(--border);
  }

  .timeline__step--active::after {
    background: var(--green) !important;
  }
}

/* Connecting line between dots on desktop */
@media (min-width: 600px) {
  .timeline__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: calc(1.5rem + 6px);
    right: 0;
    width: 50%;
    height: 2px;
    background: var(--border);
  }

  .timeline__step:not(:first-child)::before {
    content: '';
    position: absolute;
    top: calc(1.5rem + 6px);
    left: 0;
    width: 50%;
    height: 2px;
    background: var(--border);
  }

  .timeline__step--active::after {
    background: var(--green) !important;
  }
}

/* --- Contact Form --- */
.contact {
  background: var(--white);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 768px) {
  .contact__grid { grid-template-columns: 1fr 1fr; }
}

.contact__info h2 {
  margin-bottom: 1rem;
}

.contact__info p {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.contact__mailto {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--blue);
  margin-top: 0.5rem;
  transition: color var(--transition);
}

.contact__mailto:hover { color: #1a4f76; }

.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 480px) {
  .form__row { grid-template-columns: 1fr 1fr; }
}

.form__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal);
}

.form__label .required {
  color: var(--red);
  margin-left: 0.15rem;
}

.form__input,
.form__textarea {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 93, 139, 0.1);
  outline: none;
  background: var(--white);
}

.form__input.is-error,
.form__textarea.is-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(212, 72, 68, 0.08);
}

.form__textarea {
  min-height: 120px;
  resize: vertical;
}

.form__error {
  font-size: 0.8rem;
  color: var(--red);
  display: none;
}

.form__error.is-visible { display: block; }

/* Checkbox group */
.form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.form__checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.form__checkbox label {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

.form__checkbox label a {
  color: var(--blue);
  text-decoration: underline;
}

/* Honeypot */
.form__hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* Submit */
.form__submit {
  align-self: flex-start;
}

@media (max-width: 480px) {
  .form__submit {
    align-self: stretch;
    min-height: 48px;
  }
}

/* Messages */
.form__message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.form__message--success {
  background: rgba(56, 129, 43, 0.08);
  color: var(--green);
  border: 1px solid rgba(56, 129, 43, 0.2);
}

.form__message--error {
  background: rgba(212, 72, 68, 0.08);
  color: var(--red);
  border: 1px solid rgba(212, 72, 68, 0.2);
}

/* --- Footer --- */
.footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.65);
  padding: 2.5rem 0;
  font-size: 0.875rem;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 600px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__credits {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.35rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--white);
}

/* --- Legal Pages (Impressum, Datenschutz) --- */
.legal {
  padding: 4rem 0;
  background: var(--white);
  min-height: calc(100vh - 200px);
}

.legal__content {
  max-width: 720px;
  margin: 0 auto;
}

.legal__content h1 {
  margin-bottom: 2rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.legal__content h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal__content p {
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.legal__content ul {
  color: var(--text-light);
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

.legal__content a {
  color: var(--blue);
  text-decoration: underline;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
}

.legal__back:hover { color: var(--green); }

/* --- Photo Divider Platzhalter (bis Padel-Bild geliefert wird) --- */
.photo-divider--placeholder {
  background-image: none;
  background-color: var(--charcoal);
  opacity: 0.85;
}

/* --- Animations (subtle) --- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; }
}
