/* Hero Slideshow Component - based on the constrained hero design */

/* Base slideshow container */
.hero-slideshow {
  position: relative;
  border-radius: .5rem;
  overflow: hidden;
  height: 400px;
  display: flex;
  align-items: flex-end;
  width: 100%; /* Ensure full width */
  max-width: 100%; /* Prevent overflow */
}

/* Mobile Image Cap - hidden by default */
.mobile-image-cap {
  display: none;
}

/* Content wrapper - hidden by default on mobile */
.hero-slideshow .content-wrapper {
  position: relative;
  width: 100%;
}

/* Desktop content styling */
.hero-slideshow .desktop-content {
  position: relative;
  z-index: 4;
}

/* Mobile content styling - hidden by default */
.hero-slideshow .mobile-content {
  display: none;
}

/* Make first slide visible immediately without transition */
.hero-slideshow .slides-container .slide:first-child {
  opacity: 1;
  transition: none;
}

/* Left Section (Solid Color) - leftmost solid band */
.hero-slideshow .hero-left-band {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 38% 0, 62% 100%, 0% 100%);
  z-index: 3; /* Above background image */
  overflow: hidden; /* Ensure pattern stays within clip path */
}

/* Override some acs-background-secondary styles for hero-left-band */
.hero-slideshow .hero-left-band.acs-background-secondary {
  min-height: unset;
  display: block;
}

.hero-slideshow .hero-left-band.acs-background-secondary::before {
  -webkit-mask-image: none;
  mask-image: none;
}

.hero-slideshow .hero-left-band.acs-background-secondary > .gradient-overlay {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.8) 30%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* Background Image Slides Container */
.hero-slideshow .slides-container {
  position: absolute;
  inset: 0;
  z-index: 0; /* Base layer */
}

/* Individual Background Image Slides */
.hero-slideshow .slide {
  position: absolute;
  inset: 0;
  background-position: right;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  z-index: 0;
  transition: opacity 2s ease-in-out;
}

/* Active slide */
.hero-slideshow .slide.active {
  opacity: 1;
  z-index: 1;
}

/* Ensure both incoming and outgoing slides are visible during transition */
.hero-slideshow .slide.fade-out {
  opacity: 0;
  z-index: 1;
  transition: opacity 2s ease-in-out;
}

/* Middle Section (Tinted Background) */
.hero-slideshow .hero-tint {
  position: absolute;
  inset: 0;
  background-color: rgba(var(--primary-color-rgb), 0.2);
  clip-path: polygon(0 0, 40% 0, 64% 100%, 0% 100%);
  z-index: 2; /* Above base layer */
}

/* Middle Section Shadow */
.hero-slideshow .middle-shadow {
  position: absolute;
  inset: 0;
  clip-path: polygon(38% 0, 70% 0, 85% 100%, 62% 100%);
  background: linear-gradient(
    53deg,
    var(--primary-shadow-color) 20%,
    hsla(var(--primary-color-hsl), 0) 65%
  );
  z-index: 3; /* Above tint layer */
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Content */
.hero-slideshow .container {
  position: relative;
  z-index: 4; /* Highest layer - content */
}

/* Paragraph text size */
.hero-slideshow .container p {
}

/* Navigation dots */
.hero-slideshow .slideshow-nav {
  position: absolute;
  bottom: 15px;
  right: 15px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-slideshow .slideshow-nav .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.hero-slideshow .slideshow-nav .dot.active {
  background-color: #fff;
}

/*************************************
 * Responsive Styles
 *************************************/
/* Tablet and below (< 992px) */
@media (max-width: 991.98px) {
  .hero-slideshow {
    height: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  /* Hide desktop elements */
  .hero-slideshow .slides-container,
  .hero-slideshow .hero-left-band,
  .hero-slideshow .middle-shadow,
  .hero-slideshow .right-shadow,
  .hero-slideshow .hero-left-band[class*="acs-background-"],
  .hero-slideshow .hero-tint {
    display: none !important;
  }

  /* Show and style mobile image cap */
  .mobile-image-cap {
    display: block;
    width: 100%;
    height: 200px;
    border-radius: .5rem .5rem 0 0;
    overflow: hidden;
  }

  .mobile-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
  }

  /* Hide desktop content */
  .hero-slideshow .desktop-content {
    display: none;
  }

  /* Show and style mobile content area */
  .hero-slideshow .container.mobile-content {
    display: block;
    position: relative;
    background-color: var(--acs-yellow);
    border-radius: 0 0 .5rem .5rem;
    min-height: 250px;
  }

  /* Pattern overlay */
  .hero-slideshow .container.mobile-content::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.85;
    background-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='15' height='30' patternTransform='scale(0.85) rotate(0)'><rect x='0' y='0' width='100%' height='100%' fill='%23ffffff00'/><path d='M0 22.5h15L7.5 37.5zm-7.5-15h15L0 22.5zm15 0h15L15 22.5zM0-7.5h15L7.5 7.5z'  stroke-width='1' stroke='rgb(255, 205, 0)' fill='none'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: multiply;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 70%);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 70%);
    border-radius: inherit;
  }

  /* Gradient overlay */
  .hero-slideshow .container.mobile-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.8) 30%,
      rgba(255, 255, 255, 0) 100%
    );
    z-index: 2;
    pointer-events: none;
  }

  /* Content positioning and styling */
  .hero-slideshow .container.mobile-content {
    position: relative;
    padding: 2rem;
  }

  /* Ensure content is above overlays */
  .hero-slideshow .container.mobile-content > * {
    position: relative;
    z-index: 3;
  }

  /* Content text styling */
  .hero-slideshow .mobile-content h2 {
    color: var(--acs-blue);
    margin-bottom: 1rem;
  }

  .hero-slideshow .mobile-content p {
    color: var(--bs-body-color);
    margin-bottom: 1.5rem;
  }
}

/* Mobile (< 576px) */
@media (max-width: 575.98px) {
  .mobile-image-cap {
    height: 150px;
  }
} 