/* RTL support */
*[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #f5f5f5;
}

/* Section Header with Title and Navigation */
.section-header {
  display: -webkit-flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 5px 0;
}

/* Section Title */
.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  margin: 0;
}

/* Navigation Controls Container */
.navigation-controls {
  display: -webkit-flex;
  align-items: center;
}

/* Carousel Container */
.carousel-container {
  position: relative;
  margin-bottom: 15px;
  padding: 15px;
  background-color: #f0f0f0; /* Light gray background like in the image */
  border-radius: 4px;
}

/* Carousel Wrapper */
.carousel-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Carousel Slides */
.carousel-slides {
  display: -webkit-flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  flex: 0 0 33.333%;
  padding: 0 10px;
  box-sizing: border-box;
  transition: opacity 0.3s ease;
  width: calc(100% / 3); /* Force exactly 3 slides per row */
}
@media (max-width: 991px) {
  .carousel-slide {
    flex: 0 0 33.333%;
    padding: 0 4px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
    width: calc(100% / 3);
  }
}
@media (max-width: 767px) {
  .carousel-slide {
    flex: 0 0 33.333%;
    padding: 0 4px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
    width: calc(100% / 3);
  }
}
/* Image Placeholder */
.image-placeholder {
  /* background-color: #4ecca3;  */
  /* Teal/turquoise color as shown in the image */
  height: 250px; /* Adjusted to match image */
  display: -webkit-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden; /* This ensures images don't spill outside the container */
  position: relative; /* For proper positioning of content */
}

.image-text {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Image styling within the placeholder */
.slide-image-content {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 2px;
  width: 100%;
  height: 100%;
}

/* Slide Info */
.slide-info {
  text-align: center;
}

.slide-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: bold;
}

.slide-date {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #666;
}

/* Navigation Arrows */
.nav-arrow {
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: -webkit-flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 1rem;
  z-index: 2;
}

.nav-arrow i {
  font-size: 1.3rem;
}

/* Pagination */
.carousel-pagination {
  display: -webkit-flex;
  justify-content: center;
  align-items: center;
  margin: 0 10px;
}

.pagination-bullet {
  margin: 0 5px;
  cursor: pointer;
  width: 22px;
  height: 22px;
  display: -webkit-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  color: #666;
}

.pagination-bullet.active {
  color: #4ecca3;
  font-weight: bold;
}

/* Additional class for when image has loaded successfully */
.image-loaded {
  background-color: transparent !important;
}

/* Error handling for images */
.image-error {
  position: relative;
}

.image-error::after {
  content: "!";
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  font-size: 1.5rem;
  color: white;
}

/* Channel Banner Styles */
.channel-banner-link {
  display: block;
  width: 100%;
}

.channel-banner {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .carousel-slide {
    flex: 0 0 33.333%;
    width: calc(100% / 3);
  }
}

@media (max-width: 767px) {
  .carousel-slide {
    flex: 0 0 33.333%;
    width: calc(100% / 3);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .navigation-controls {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
  }

  .image-placeholder {
    height: 100px; /* Slightly smaller on mobile */
  }
}
#channelPictures {
  height: 120px;
}
@media (max-width: 1000px) {
  #channelPictures {
    height: auto;
    width: 100%;
  }
}
