/* Mitarbeiter Module Styles */
.wp-shortcode-module {
  margin: 2rem 0;
}

/* Grid Layout */
.module-grid .grid-item {
  margin-bottom: 2rem;
  padding: 0 15px;
}

.module-card {
  background: #fff;
  overflow: hidden;
  height: 100%;
  text-align: left;
}

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

.leistung-image img {
    width: 116px;
}

.mitarbeiter-image {
  width: 100%;
  padding-top: 109%; /* 1:1 Aspect Ratio */
  position: relative;
  overflow: hidden;
}

.mitarbeiter-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}

.module-card:hover .mitarbeiter-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem 0;
  text-align: left;
  position: relative;
  min-height: 120px; /* Ensure consistent height for alignment */

  h3 {
    color: #0E4887;
    margin-bottom: 0.5rem;
  }

  .leistungen-excerpt p {
    line-height: 1.3;
    margin-bottom: .35rem;
  }

  a.service-link {
    text-decoration: underline;
    &:hover {
      text-decoration: none !important;
    }
  }

  .wp-block-button {
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 0;
    
    &__link {
      display: inline-block;
      padding: 0.5rem 1.5rem;
      background-color: transparent;
      color: #0E4887;
      border: 1px solid #0E4887;
      text-decoration: none;
      border-radius: 4px;
      transition: all 0.3s ease;
      font-size: 0.9rem;
      
      &:hover {
        background-color: #0E4887;
        color: white;
        text-decoration: none;
      }
    }
  }
}

.card-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #333;
}

.mitarbeiter-qualifikation {
  font-weight: 300;
  color: #212422;
}

/* Swiper Slider for Mobile */
.module-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  @media (min-width: 768px) {
    padding: 0 15px;
  }
}

.module-slider .swiper-container {
  padding: 20px 0 40px;
  margin: 0 auto;
  width: 100%;
}

.module-slider .swiper-wrapper {
  align-items: center;
}

.module-slider .swiper-slide {
  height: auto;
  width: 85%;
  margin: 0 auto;
  padding: 0;
  transition: transform 0.3s ease;
  box-sizing: border-box;
}

/* Center the active slide */
.module-slider .swiper-slide-active {
  transform: scale(1);
  z-index: 1;
}

/* Slightly scale down non-active slides */
.module-slider .swiper-slide:not(.swiper-slide-active) {
  transform: scale(0.95);
  opacity: 0.9;
}

.module-slider .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background: #ccc;
  opacity: 1;
}

.module-slider .swiper-pagination-bullet-active {
  background: #0E4887;
}

.module-slider .swiper-button-next,
.module-slider .swiper-button-prev {
  color: #0E4887;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-slider .swiper-button-next:after,
.module-slider .swiper-button-prev:after {
  font-size: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  .module-grid .col-lg-3 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

@media (max-width: 767.98px) {
  .module-grid .col-lg-3,
  .module-grid .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Single Team Member Page */
.mitarbeiter-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.mitarbeiter-featured-image {
    max-width: 300px;
    margin: 0 auto 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.mitarbeiter-featured-image img {
    display: block;
    width: 100%;
    height: auto;
}

.card-content {
    line-height: 1.6;
}

.mitarbeiter-qualification {
    font-size: 1.2rem;
    color: #0E4887;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.entry-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.back-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    color: #0E4887;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: #0E4887;
    color: #fff;
    text-decoration: none;
}

/* Ensure proper spacing on mobile */
@media (max-width: 575.98px) {
  .module-grid .col-sm-6 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
  }

  .module-card {
    margin-bottom: 1.5rem;
  }
}

.ausbildungssiegel-shortcode {
  width:100%;
  position:relative;
  @media (max-width: 767px) {
    min-height: 90px;
    margin-left: -19%;
  }
}