/* About Section Image Slider
 * Professional, dynamic, and responsive image slider
 * with adjustable height to match the left content
 */

/* Single image specific styles */
.about-carousel.single-image {
  display: block !important;
  height: 100% !important;
}

.about-carousel.single-image .about-carousel-item {
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.about-carousel.single-image .about-carousel-caption {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.about-slider {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.about-slider:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.about-slider-header {
  padding: 24px 28px;
  flex-shrink: 0;
}

.about-slider-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--primary-color), #008c44);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.about-slider-header p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

/* Main Carousel Container - with height: auto to adapt to parent height */
.about-carousel-container {
  position: relative;
  flex-grow: 1;
  overflow: hidden;
  border-radius: 12px;
  z-index: 1;
  min-height: 200px;
}

/* Gradient overlay at the bottom of the image */
.about-carousel-container::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  z-index: 5;
  opacity: 0.8;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Image Carousel */
.about-carousel {
  display: flex;
  height: 100%;
  width: 100%;
  will-change: transform;
  position: absolute;
  top: 0;
  bottom: 0;
}

/* Carousel Items - Full height images with captions */
.about-carousel-item {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
  overflow: hidden;
  height: 100%;
  transform: scale(1);
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.about-carousel-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 1;
}

.about-carousel-item.active::after {
  opacity: 1;
}

/* Image Styling with zoom effect */
.about-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 10s ease-out;
  will-change: transform;
}

.about-carousel-item.active img {
  transform: scale(1.1);
}

/* Caption styling */
.about-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 25px;
  z-index: 10;
  color: white;
  text-align: left;
}

.about-carousel-caption h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.about-carousel-caption p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease 0.5s, transform 0.5s ease 0.5s;
}

.about-carousel-item.active .about-carousel-caption h4,
.about-carousel-item.active .about-carousel-caption p {
  opacity: 1;
  transform: translateY(0);
}

/* Modern Navigation Dots */
.about-carousel-nav {
  position: absolute;
  bottom: 20px;
  right: 25px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  z-index: 10;
}

.about-carousel-dot {
  width: 8px;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.about-carousel-dot.active {
  width: 24px;
  background-color: #fff;
}

/* Arrow Navigation */
.about-carousel-arrows {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
  pointer-events: none;
}

.about-carousel-container:hover .about-carousel-arrows {
  opacity: 1;
}

.about-carousel-arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateX(0);
}

.about-carousel-arrow.prev {
  transform: translateX(-10px);
}

.about-carousel-arrow.next {
  transform: translateX(10px);
}

.about-carousel-container:hover .about-carousel-arrow.prev,
.about-carousel-container:hover .about-carousel-arrow.next {
  transform: translateX(0);
}

.about-carousel-arrow i {
  color: white;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.about-carousel-arrow:hover {
  background-color: var(--primary-color);
  transform: scale(1.1);
}

.about-carousel-arrow:hover i {
  transform: scale(1.1);
}

/* Progress Bar Indicator */
.about-carousel-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.7), var(--primary-color));
  z-index: 10;
  transition: width 0.1s linear;
  border-radius: 0 1.5px 1.5px 0;
}

/* "Learn More" Button */
.about-view-more {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 12px;
  background-color: #f8f9fa;
  color: var(--primary-color);
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.about-view-more:hover {
  background-color: var(--primary-color);
  color: white;
}

.about-view-more i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.about-view-more:hover i {
  transform: translateX(5px);
}

/* Responsive Adjustments - these will be overridden by the JS height adjustment */
@media (max-width: 991px) {
  .about-carousel-container {
    min-height: 280px;
  }
}

@media (max-width: 767px) {
  .about-carousel-container {
    min-height: 240px;
  }
  
  .about-carousel-arrow {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 575px) {
  .about-carousel-container {
    min-height: 220px;
  }
}
