/* ==========================================================================
   TuRa Hechthausen – Tennis
   All rules are scoped to .wrapper-tennis so they only affect this page.
   ========================================================================== */

/* ---------- Base / variables ---------- */
.wrapper-tennis {
  --tura-red: #C41E3A;
  --tura-red-dark: #9B1830;
  --tura-black: #1a1a1a;
  --tura-gray: #f5f5f5;
  --text: #333;
  --white: #ffffff;
  --box-padding: 24px 32px;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-wrap: break-word;
  hyphens: auto;
}
.wrapper-tennis *::before,
.wrapper-tennis *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.wrapper-tennis .hero-content p,
.wrapper-tennis .cta p {
  color: var(--white);
}

.wrapper-tennis img {
  display: block;
  max-width: 100%;
}

.wrapper-tennis p {
  margin-bottom: 16px;
}

.wrapper-tennis .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Hero (full-bleed, breaks out of the Joomla content column) ---------- */
.wrapper-tennis .hero {
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: 100vw;
  margin-left: -50vw;
  height: 420px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 40px;
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)), url('../../../images/sparten/tennis/neu/serve.jpg') center / cover no-repeat;
  color: var(--white);
}

.wrapper-tennis .hero-content {
  width: 100%;
}

.wrapper-tennis .hero-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.wrapper-tennis .hero-content p {
  max-width: 600px;
  margin-bottom: 0;
  font-size: 1.25rem;
  opacity: 0.95;
}

/* ---------- Contact + times bar ---------- */
.wrapper-tennis .info-bar {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  max-width: 1100px;
  margin: -30px auto 40px;
  padding: 0 20px;
}

.wrapper-tennis .info-card {
  padding: 22px 28px;
  background: var(--tura-red);
  color: var(--white);
}

.wrapper-tennis .info-card:last-child {
  background: var(--tura-red-dark);
}

.wrapper-tennis .info-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--white);
}

.wrapper-tennis .info-card p,
.wrapper-tennis .info-card a {
  margin-bottom: 0;
  font-size: 0.98rem;
  color: var(--white);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wrapper-tennis .info-card a:hover {
  text-decoration: underline;
}

/* ---------- Sections ---------- */
.wrapper-tennis section {
  padding: 32px 0;
  container-type: inline-size;
}

.wrapper-tennis .section-gray {
  padding: var(--box-padding);
  background: var(--tura-gray);
}

.wrapper-tennis h2 {
  position: relative;
  margin-bottom: 20px;
  padding-bottom: 12px;
  font-size: 1.9rem;
  line-height: 1.25;
  color: var(--tura-black);
}

.wrapper-tennis h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--tura-red);
}

/* ---------- Features grid ---------- */
.wrapper-tennis .features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 30px;
}

/* 4 → 2 → 1 columns depending on the available section width (avoids a 3 + 1 layout) */
@container (min-width: 440px) {
  .wrapper-tennis .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@container (min-width: 900px) {
  .wrapper-tennis .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

.wrapper-tennis .feature-card {
  padding: 28px 24px;
  background: var(--white);
  border-top: 4px solid var(--tura-red);
  border-radius: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.wrapper-tennis .feature-card:hover {
  transform: translateY(-4px);
}

.wrapper-tennis .feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: var(--tura-black);
}

.wrapper-tennis .feature-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}

/* ---------- Training locations ---------- */
.wrapper-tennis .times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
  margin-top: 20px;
}

.wrapper-tennis .time-card {
  overflow: hidden;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.wrapper-tennis .time-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.wrapper-tennis .time-card-body {
  padding: 20px;
}

.wrapper-tennis .time-card h3 {
  margin-bottom: 8px;
  color: var(--tura-red);
}

.wrapper-tennis .badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  font-size: 0.8rem;
  background: var(--tura-red);
  color: var(--white);
  border-radius: 20px;
}

/* ---------- Gallery ---------- */
.wrapper-tennis .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  margin-top: 25px;
}

.wrapper-tennis .gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

/* ---------- Call to action ---------- */
.wrapper-tennis .cta {
  padding: 60px 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--tura-red), var(--tura-red-dark));
  color: var(--white);
  border-radius: 16px;
}

.wrapper-tennis .cta h2 {
  color: var(--white);
}

.wrapper-tennis .cta h2::after {
  left: 50%;
  background: var(--white);
  transform: translateX(-50%);
}

.wrapper-tennis .cta p {
  max-width: 600px;
  margin: 0 auto 25px;
  font-size: 1.1rem;
}

.wrapper-tennis .btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--white);
  color: var(--tura-red);
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.2s;
}

.wrapper-tennis .btn:hover {
  background: var(--tura-black);
  color: var(--white);
}

/* ---------- Footer note ---------- */
.wrapper-tennis .note {
  margin-top: 30px;
  padding-top: 20px;
  font-size: 0.9rem;
  color: #666;
  border-top: 1px solid #ddd;
}

/* ---------- Responsive ----------
   Grids adapt automatically to the available column width (auto-fit),
   the breakpoints below only scale spacing and typography. */

/* Tablet portrait / large phones */
@media (max-width: 768px) {
  .wrapper-tennis {
    --box-padding: 32px 20px;
  }

  .wrapper-tennis .hero {
    height: 340px;
    padding-bottom: 50px;
  }

  .wrapper-tennis .hero-content h1 {
    font-size: 2.1rem;
  }

  .wrapper-tennis .hero-content p {
    font-size: 1.1rem;
  }

  .wrapper-tennis section {
    padding: 36px 0;
  }

  .wrapper-tennis h2 {
    font-size: 1.6rem;
  }

  .wrapper-tennis .cta {
    padding: 44px 20px;
    border-radius: 12px;
  }
}

/* Phones */
@media (max-width: 480px) {
  .wrapper-tennis {
    --box-padding: 28px 16px;
  }

  .wrapper-tennis .container,
  .wrapper-tennis .info-bar {
    padding: 0 12px;
  }

  .wrapper-tennis .hero {
    height: 300px;
  }

  .wrapper-tennis .hero-content h1 {
    font-size: 1.75rem;
  }

  .wrapper-tennis .hero-content p {
    font-size: 1rem;
  }

  .wrapper-tennis .info-card {
    padding: 18px 20px;
  }

  .wrapper-tennis .gallery img {
    height: 200px;
  }

  .wrapper-tennis h2 {
    font-size: 1.4rem;
  }

  .wrapper-tennis .cta p {
    font-size: 1rem;
  }

  .wrapper-tennis .btn {
    display: block;
    padding: 14px 20px;
  }
}

/* ---------- Touch devices: no hover lift ---------- */
@media (hover: none) {
  .wrapper-tennis .feature-card:hover {
    transform: none;
  }
}

/* ---------- Exception: prevent horizontal scrollbar caused by 100vw hero ----------
   Only applies to pages that contain .wrapper-tennis.
   "clip" (unlike "hidden") keeps sticky headers of the Joomla template working. */
html:has(.wrapper-tennis),
body:has(.wrapper-tennis) {
  overflow-x: clip;
}
