/* Carousels General */
.swiper {
    width: 100%;
    margin: var(--space-lg) auto;
    position: relative;
    border-radius: 8px;
     overflow: visible !important;
    /* Ensure swipers respect container padding on smaller screens */
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
    box-sizing: border-box;
    max-width: 100vw; /* Ensure carousel never exceeds viewport width */
}

.swiper-slide {
    text-align: center;
    font-size: var(--text-base);
    background: transparent;
    box-sizing: border-box;
    /* Padding is often better applied within the slide content or specific carousel styles */
    width: 100% !important; /* Force slides to respect parent width */
}

/* Gallery Swiper */
.gallery-swiper {
  width: 90%; /* Adjust width as needed */
  max-width: 1200px; /* Max width for larger screens */
  margin: 2rem auto;
  padding-bottom: 50px; /* Space for pagination */
}

.gallery-swiper .swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;
  /* Center slide content vertically */
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 16 / 9; /* Maintain aspect ratio for the slide container */
  overflow: hidden; /* Hide parts of the image that overflow */
}

.gallery-swiper .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Scale the image to cover the container, cropping if necessary */
  object-position: center; /* Center the image within the container */
}

/* Testimonial Carousel */
.testimonial-swiper {
    max-width: 1000px;
}

.testimonial-swiper .swiper-slide {
    min-height: 200px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl);
    /* Add transition for smooth slider changes */
    transition: all 0.3s ease;
    width: calc(100% - 10px) !important; /* Ensure slide is never wider than container */
}

.testimonial-swiper .swiper-slide p {
    font-size: var(--text-base);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    color: var(--earth);
}

.testimonial-swiper cite {
    margin-top: auto;
    font-family: var(--font-sans);
    font-style: normal;
    font-weight: 600;
    color: var(--saddle-brown);
    font-size: var(--text-sm);
}

/* Swiper Navigation/Pagination */
.swiper-button-next,
.swiper-button-prev {
    color: var(--verdant-green);
    --swiper-navigation-size: 30px;
}

.swiper-pagination-bullet {
    background: var(--stone);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--verdant-green);
}

/* New Testimonial Card */
.testimonial-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg) 0;
}

.testimonial-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.testimonial-content {
    padding: var(--space-xl);
    position: relative;
}

.testimonial-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--earth);
    font-style: italic;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

.testimonial-content p::before {
    font-size: 5rem;
    color: rgba(var(--primary-green-rgb), 0.1);
    position: absolute;
    top: -30px;
    left: -20px;
    z-index: -1;
}

.testimonial-stars {
    color: #e6b332;
    font-size: 1.25rem;
    margin-top: var(--space-sm);
}

.testimonial-accent-image {
    float: right;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 0 var(--space-sm) var(--space-md);
    border: 3px solid var(--verdant-green);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Remove swiper padding on larger screens where container handles it */
@media (min-width: 1100px) {
    .swiper {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Responsive styles for the testimonial carousel */
@media (max-width: 768px) {
    .swiper {
        padding-left: var(--space-sm);
        padding-right: var(--space-sm);
        margin-left: 0;
        margin-right: 0;
        width: 100%; 
    }
    
    .testimonial-swiper {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    .testimonial-swiper .swiper-slide {
        padding: var(--space-md);
        width: 100% !important;
    }
    
    /* Increase spacing between pagination bullets for better touch targets */
    .swiper-pagination-bullet {
        margin: 0 8px !important;
    }
}

/* Responsive adjustments for Gallery Swiper */
@media (max-width: 768px) {
  .gallery-swiper {
    width: 95%;
  }
  .gallery-swiper .swiper-slide {
    aspect-ratio: 4 / 3; /* Adjust aspect ratio for smaller screens if needed */
  }
}
