/* ============================================================
   LEISTUNGEN – Liquid Glass Design
   ============================================================ */

.leistungen-page {
  padding-top: 0;
}

.main:has(.leistungen-page) {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
  padding-bottom: 0;
}

/* ── Hauptinhalt ─────────────────────────────────────────── */
.leistungen-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 5rem;
}

/* ── Hintergrund-Dekoration ──────────────────────────────── */
.leistungen-page::before,
.leistungen-page::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.25;
}

.leistungen-page::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(120, 196, 58, 0.5), transparent 70%);
  top: 10%;
  right: -10%;
}

.leistungen-page::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(120, 196, 58, 0.35), transparent 70%);
  bottom: 20%;
  left: -8%;
}

/* ══════════════════════════════════════════════════════════
   LEISTUNGS-BOXEN-GRID
   ══════════════════════════════════════════════════════════ */

/* ── Grid-Abschnitt ──────────────────────────────────────── */
.leistungen-grid-section {
  padding: 3.5rem 0 4rem;
}

.leistungen-grid-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ── Grid mit variabler Spaltenanzahl via CSS Custom Property ── */
.leistungen-boxen-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 4), 1fr);
  gap: 1.25rem;
}

@media (max-width: 56rem) {
  .leistungen-boxen-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 32rem) {
  .leistungen-boxen-grid {
    grid-template-columns: 1fr;
  }
}

/* Spaltenbreiten der Boxen */
.leistungen-box.col-span-1 { grid-column: span 1; }
.leistungen-box.col-span-2 { grid-column: span 2; }
.leistungen-box.col-span-3 { grid-column: span 3; }
.leistungen-box.col-span-4 { grid-column: span 4; }

@media (max-width: 56rem) {
  .leistungen-box.col-span-3,
  .leistungen-box.col-span-4 { grid-column: span 2; }
}

@media (max-width: 32rem) {
  .leistungen-box.col-span-1,
  .leistungen-box.col-span-2,
  .leistungen-box.col-span-3,
  .leistungen-box.col-span-4 { grid-column: span 1; }
}

/* ── Einzelne Glas-Box ───────────────────────────────────── */
.leistungen-box {
  position: relative;     /* Anker für das absolute Hintergrundbild */
  overflow: hidden;       /* Hintergrundbild-Zoom clippen */
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.07),
    0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    transform var(--tr-slow),
    box-shadow var(--tr),
    border-color var(--tr),
    background var(--tr);
  outline: none;
  /* Link-Reset */
  text-decoration: none;
  color: inherit;
}

/* Hover – nur wenn <a> oder role="button" */
a.leistungen-box:hover,
a.leistungen-box:focus-visible {
  transform: translateY(-6px) scale(1.015);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(120, 196, 58, 0.4);
  box-shadow:
    0 16px 48px rgba(120, 196, 58, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  outline: none;
  cursor: pointer;
}

/* ── Hintergrundbild der Box ─────────────────────────────── */
.leistungen-box-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);   /* Rand-Blur-Artefakte verbergen */
  filter: blur(4px) brightness(0.32) saturate(0.7);
  z-index: 0;
  transition:
    transform var(--tr-slow),
    filter var(--tr);
}

a.leistungen-box:hover .leistungen-box-bg,
a.leistungen-box:focus-visible .leistungen-box-bg {
  transform: scale(1.14);
  filter: blur(3px) brightness(0.45) saturate(0.85);
}

/* Box mit Hintergrundbild: Glas transparent machen */
.leistungen-box.has-bg-img {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.leistungen-box.has-bg-img:hover {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(120, 196, 58, 0.45);
}

/* ── Inhalts-Schicht (über dem Hintergrundbild) ──────────── */
.leistungen-box-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

/* ── Icon: Emoji oder Bild ───────────────────────────────── */
.leistungen-box-icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.leistungen-box-icon img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  display: block;
}

/* ── Titel ───────────────────────────────────────────────── */
.leistungen-box-titel {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Weiße Schrift wenn Hintergrundbild gesetzt */
.leistungen-box.has-bg-img .leistungen-box-titel {
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* ── Kurzbeschreibung ────────────────────────────────────── */
.leistungen-box-kurz {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--c-text-muted);
  flex: 1;
}

.leistungen-box.has-bg-img .leistungen-box-kurz {
  color: rgba(255, 255, 255, 0.82);
}

/* ── "Weitere Infos" Button ──────────────────────────────── */
.leistungen-box-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  align-self: flex-start;
  padding: 0.45rem 1rem;
  border-radius: 2rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--c-brand-light);
  color: var(--c-brand-hover);
  border: 1px solid rgba(120, 196, 58, 0.3);
  transition:
    background var(--tr-fast),
    color var(--tr-fast),
    border-color var(--tr-fast),
    gap var(--tr-fast);
}

.leistungen-box-btn svg {
  transition: transform var(--tr-fast);
  flex-shrink: 0;
}

a.leistungen-box:hover .leistungen-box-btn,
a.leistungen-box:focus-visible .leistungen-box-btn {
  background: var(--c-brand);
  color: #fff;
  border-color: transparent;
  gap: 0.6rem;
}

a.leistungen-box:hover .leistungen-box-btn svg,
a.leistungen-box:focus-visible .leistungen-box-btn svg {
  transform: translateX(3px);
}

/* Variante für Boxen mit Hintergrundbild */
.leistungen-box.has-bg-img .leistungen-box-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

a.leistungen-box.has-bg-img:hover .leistungen-box-btn,
a.leistungen-box.has-bg-img:focus-visible .leistungen-box-btn {
  background: var(--c-brand);
  border-color: transparent;
}
