/* NEW: 4 different Ken Burns animations */
@keyframes kb-tl { /* pan top-left */
  0% { transform: scale(1.1) translate(0, 0); }
  100% { transform: scale(1.15) translate(-3%, -3%); }
}
@keyframes kb-tr { /* pan top-right */
  0% { transform: scale(1.1) translate(0, 0); }
  100% { transform: scale(1.15) translate(3%, -3%); }
}
@keyframes kb-br { /* pan bottom-right */
  0% { transform: scale(1.1) translate(0, 0); }
  100% { transform: scale(1.15) translate(3%, 3%); }
}
@keyframes kb-bl { /* pan bottom-left */
  0% { transform: scale(1.1) translate(0, 0); }
  100% { transform: scale(1.15) translate(-3%, 3%); }
}

.slideshow_container { 
  display: flex; 
  width: 100%; 
  flex: 1; 
  min-height: 0; 
  position: relative; /* For layering */
  overflow: hidden; /* To contain the overlay/image */
  /* REMOVED: border-radius and box-shadow */
}
.slideshow_container__image {
  width: 100%; height: 100%;
  /* UPDATED: Removed background-position. JS will now handle this. */
  background-size: cover; background-repeat: no-repeat;
  position: absolute; 
  inset: 0; 
  z-index: 1;
  
  /* UPDATED: Default state is hidden and scaled up */
  opacity: 0;
  transform: scale(1.1); /* Always zoomed in to prevent seeing edges */
  transition: opacity 1.5s ease-in-out; /* 1.5s cross-fade */
}

/* NEW: This class is added by JS to the visible slide */
.slideshow_container__image.slide-active {
  opacity: 1; /* Fades in */
}

/* NEW: These classes apply the random animation */
.slideshow_container__image.kb-tl {
  animation: kb-tl 6s ease-in-out forwards;
}
.slideshow_container__image.kb-tr {
  animation: kb-tr 6s ease-in-out forwards;
}
.slideshow_container__image.kb-br {
  animation: kb-br 6s ease-in-out forwards;
}
.slideshow_container__image.kb-bl {
  animation: kb-bl 6s ease-in-out forwards;
}


/* Dark overlay for text readability */
.slideshow_overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* Wrapper for the hero text and buttons */
.hero_content_wrapper {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #fff;
}

.hero_content_wrapper h1 {
  /* FIX: Ensure H1 inherits the white color from the parent, overriding base.css */
  color: inherit;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero_content_wrapper p {
  font-size: 17px;
  margin: 0 0 24px 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  max-width: 500px; /* Keep subtext from getting too wide */
  line-height: 1.6;
}

/* Update CTA container to sit inside the hero */
.hero_content_wrapper .cta_container {
  padding-bottom: 0;
  flex-shrink: 1; /* Allow it to shrink if needed */
}

@media (min-width: 769px) {
  /* .slideshow_container flex: 1.4; is no longer needed */
  
  /* UPDATED: Removed background-position from here as well. */
  
  .hero_content_wrapper h1 {
    font-size: 44px; /* Larger text on desktop */
  }
  .hero_content_wrapper p {
    font-size: 20px;
  }
}

@media (min-width: 1200px) {
  .hero_content_wrapper h1 {
    font-size: 52px;
  }
}