/* ===== Services & Testimonials — Leistungen Page ===== */
/* Design: Organic warm, service cards with numbered accents, testimonial carousel */

/* --- Page Hero --- */
.services-hero {
  position: relative;
  padding: clamp(8rem, 12vw, 12rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  text-align: center;
}

.services-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.services-hero-icon {
  width: 18px;
  height: 18px;
  vertical-align: -2px;
  margin-right: 0.25rem;
}

.services-hero .section-title {
  margin-top: 0.5rem;
}

.services-hero .section-desc {
  margin: 0 auto;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* --- Service Card --- */
.service-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease,
    border-color 0.3s ease;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--accent-subtle);
}

.service-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  margin-bottom: 1.25rem;
  transition: background 0.3s ease;
}

.service-card:hover .service-icon-wrap {
  background: var(--accent);
}

.service-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  transition: color 0.3s ease;
}

.service-card:hover .service-icon {
  color: #fff;
}

.service-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.service-desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: 0;
}

.service-number {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-subtle);
  line-height: 1;
  opacity: 0.5;
  transition: color 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.service-card:hover .service-number {
  color: var(--accent);
  opacity: 0.2;
}

/* Make the last card span full width if odd number on 2-col */
@media (min-width: 640px) and (max-width: 1023px) {
  .services-grid .service-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
}

/* On 3-col: last 2 items centered if 5 total */
@media (min-width: 1024px) {
  .services-grid {
    justify-items: center;
  }

  .services-grid .service-card {
    width: 100%;
  }
}

/* --- Testimonials Section --- */
.testimonials-section {
  position: relative;
  overflow: hidden;
}

/* --- Testimonial Carousel --- */
.testimonial-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-track {
  position: relative;
  overflow: hidden;
}

.testimonial-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(60px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.testimonial-card.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.testimonial-card.slide-out-left {
  opacity: 0;
  transform: translateX(-60px);
}

.testimonial-card.slide-out-right {
  opacity: 0;
  transform: translateX(60px);
}

.testimonial-card.slide-in-right {
  opacity: 0;
  transform: translateX(60px);
}

.testimonial-card.slide-in-left {
  opacity: 0;
  transform: translateX(-60px);
}

.testimonial-quote-mark {
  margin-bottom: 1.25rem;
}

.testimonial-quote-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  opacity: 0.5;
}

.testimonial-text {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-style: italic;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

.testimonial-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.testimonial-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.testimonial-initials {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  color: #fff;
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.testimonial-author {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  font-style: normal;
  color: var(--text);
}

.testimonial-topic {
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 500;
}

.testimonial-rating {
  display: flex;
  gap: 0.15rem;
  flex-shrink: 0;
}

.star-icon {
  width: 18px;
  height: 18px;
  color: var(--border);
}

.star-icon.star-filled {
  color: var(--earth);
  fill: var(--earth);
}

/* --- Carousel Navigation --- */
.testimonial-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.testimonial-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease;
}

.testimonial-btn:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(118, 175, 49, 0.2);
}

.testimonial-btn-icon {
  width: 20px;
  height: 20px;
  color: var(--text);
}

.testimonial-btn:hover .testimonial-btn-icon {
  color: var(--accent);
}

.testimonial-dots {
  display: flex;
  gap: 0.5rem;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.testimonial-dot:hover {
  background: var(--accent-subtle);
  transform: scale(1.2);
}

.testimonial-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* --- CTA Section --- */
.services-cta-section {
  padding-bottom: clamp(4rem, 8vw, 8rem);
}

.services-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(2.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

/* services-cta noise texture removed — feTurbulence kills iOS Safari */

.services-cta-content {
  position: relative;
  z-index: 1;
}

.services-cta-content h2 {
  margin-bottom: 0.75rem;
}

.services-cta-content p {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.services-cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

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

  .services-cta-content p {
    margin: 0;
  }

  .services-cta-actions {
    flex-shrink: 0;
    flex-direction: column;
  }
}

/* --- Mobile Performance --- */
@media (max-width: 768px) {
  .service-card {
    transition: none;
  }

  .service-card:hover {
    transform: none;
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 480px) {
  .testimonial-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .testimonial-rating {
    margin-top: 0.25rem;
  }

  .services-cta-actions .btn {
    width: 100%;
  }
}
