/* Main wrapper */
.page-slideshow-block {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Horizontal scrolling track */
.page-slideshow-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth; /* Enables native smooth scrolling */
  scrollbar-width: none;   /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  -webkit-overflow-scrolling: touch; /* Smoother scrolling on iOS */
  touch-action: auto; /* Allow vertical scrolling by default */
  /* Prevent text selection during swipe */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Special class for touch handling */
.page-slideshow-track.is-swiping {
  scroll-behavior: auto !important;
}

.page-slideshow-track::-webkit-scrollbar {
  display: none;           /* Chrome, Safari, Opera */
}

/* Each slide occupies full container width */
.page-slideshow-slide {
  min-width: 100%;
  flex-shrink: 0;
  position: relative;
  height: 100vh; /* Adjust as needed or use responsive units */
}

/*Let's darken the image slightly, so we can read the overlay text */
 .page-slideshow-slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 50% transparent black overlay */
    z-index: 1;
  }

/* Other styles remain the same… */
.page-slideshow-slide-image {
  width: 100%;
  height: 100%;
  background-size: cover!important;
  background-position: center;
}

.page-slideshow-slide-overlay {
  position: absolute;
  top: 15%;
  left: 10%;
  right: 10%;
  width: 40%;
  color: white;
}

.page-slideshow-slide-overlay h1 {
  font-size: 3em;
  color: white;
}

.page-slideshow-slide-overlay p {
  font-size: 1.75em;
}

.page-slideshow-readmore-btn {
  color: white;
  Background-color: #e10f14;
  border-radius: 8px;
  font-style: none;
  font-size: 1.5em;
  padding: 0.67rem 3.38rem;
  border: 0;
  margin-top: 1.5rem;
}

.page-slideshow-arrow {
  display: flex;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  align-items: center!important;
  justify-content: center!important;
  border: none;
  cursor: pointer;
  z-index: 10;
  background: transparent;
}

.page-slideshow-arrow img {
  width: 60px;
  height: auto;
  background: transparent!important;
  filter: brightness(0) invert(1)!important;
}

/* Change from white to red (#e10f14) on hover */
.page-slideshow-arrow:hover img {
  filter: invert(15%) sepia(92%) saturate(6000%) hue-rotate(345deg) brightness(95%) contrast(105%);
}

.page-slideshow-arrow-left {
  left: 1rem;
}

.page-slideshow-arrow-right {
  right: 1rem;
}

.page-slideshow-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.page-slideshow-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.2s;
}

.page-slideshow-dot.active,
.page-slideshow-dot:hover {
  opacity: 1;
}

/* Fix for iOS scrolling issues */
@supports (-webkit-touch-callout: none) {
  .page-slideshow-track {
    scroll-behavior: smooth;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .page-slideshow-slide {
    height: 70vh;
    width: 100%;
    position: relative; /* Ensure positioning context for the pseudo-element */
  }
  
  .page-slideshow-slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 50% transparent black overlay */
    z-index: 1;
  }
  
  .page-slideshow-slide-overlay {
    position: absolute;
    top: 20%;
    left: 8%;
    right: 8%;
    padding: 0% 0% 0% 0%;
    color: white;
    width: 84%;
    z-index: 12; /* Ensure overlay text sits above the overlay */
    /* Ensure text is clearly visible over the overlay */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  }
  
  .page-slideshow-slide-overlay h1 {
    font-size: 2em;
    color: white;
  }
  
  .page-slideshow-slide-overlay p {
    font-size: 1.1em;
  }
  
  .page-slideshow-arrow {
    display: none;
  }
  
  .page-slideshow-readmore-btn {
    color: white;
    Background-color: #e10f14;
    border-radius: 8px;
    font-style: none;
    font-size: 1em;
    padding: 0.67rem 3.38rem;
    border: 0;
    margin-top: 0;
  }
  
  /* Make touch targets larger */
  .page-slideshow-dot {
    width: 15px;
    height: 15px;
    margin: 0 6px;
  }
  
  /* Better positioning of dot indicators */
  .page-slideshow-dots {
    bottom: 15px;
  }
}

/* Additional tweaks for very small screens */
@media (max-width: 480px) {
  .page-slideshow-slide-overlay h1 {
    font-size: 1.75em;
    margin-bottom: 0.5em;
  }
  
  .page-slideshow-slide-overlay p {
    font-size: 1em;
    line-height: 1.4;
  }
  
  .page-slideshow-readmore-btn {
    margin-top: 0.5em;
  }
  
  /* Improve dot visibility */
  .page-slideshow-dots {
    bottom: 10px;
  }
  
  .page-slideshow-dot {
    width: 12px;
    height: 12px;
    margin: 0 5px;
  }
}