/* Responsive Slider Styles */
.main-carousel {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.carousel-cell {
  width: 100%;
  height: 100%;
}

.slidercanvas {
  position: relative;
  left: auto;
  top: auto;
}

.slidertext {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.sliderbutton {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  margin-top: 1rem;
  font-size: 16px;
  transition: all 0.3s ease;
}

@media (min-width: 1025px) {
  .sliderbutton {
    font-size: 32px;
  }
}

/* Mobile styles (under 1024px) */
@media (max-width: 1023px) {
  .main-carousel {
    height: 100vh;
  }

  /* 100vh ignores the mobile browser toolbar and hides the button behind it; svh is the visible height */
  @supports (height: 100svh) {
    .slider-hero,
    .main-carousel {
      height: 100svh;
    }
  }
  
  .slidertext {
    text-align: center;
    font-size: 1.8rem;
  }
  
  .sliderbutton {
    margin: 0 auto;
  }
}

/* Desktop styles (1024px and above) */
@media (min-width: 1025px) {
  .slidertext {
    font-size: 2.5rem;
  }

  .sliderbutton {
    margin-left: 0;
    padding-top: 22px;
  }
}

/* Each slide's image keeps its own proportions, so nothing is cropped whatever size is
   uploaded; the text column takes whatever the image leaves. The site menu overlays the
   top of the slider (80px on mobile, 103px on desktop), hence the padding-top. */
.slider-hero .slider-media picture {
  display: block;
  padding-top: 80px;
}

.slider-hero .slider-media-image {
  object-fit: cover;
}

.slider-hero .slidercanvas {
  flex: 1 1 0;
}

/* Mobile: the text column keeps its natural height and is always inside the
   visible screen; the image takes the rest, at its own ratio, shrinking on short
   screens. So the buttons are visible and tappable before the parallax covers them. */
@media (max-width: 1023.98px) {
  .slider-hero .slider-media {
    flex: 0 1 auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .slider-hero .slider-media picture {
    box-sizing: border-box;
    height: 100%;
  }

  .slider-hero .slider-media-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    object-fit: contain;
  }

  .slider-hero .slidercanvas {
    flex: 1 0 auto;
    height: auto;
  }
}

/* Desktop: image is full height, width follows the image */
@media (min-width: 1024px) {
  /* max-width keeps room for the text; only past it does the image crop */
  .slider-hero .slider-media {
    flex: none;
    width: auto;
    max-width: 65%;
  }

  .slider-hero .slider-media picture {
    height: 100%;
    padding-top: 103px;
  }

  .slider-hero .slider-media-image {
    width: auto;
    max-width: 100%;
  }

  .slider-hero .slidercanvas {
    width: auto;
    min-width: 0;
  }
}

/* Button group: one or two buttons, side by side, wrapping when narrow */
.sliderbuttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.sliderbuttons .sliderbutton {
  margin: 0;
}

.sliderbutton--outline {
  background-color: transparent;
  color: #000;
  border: 2px solid #000;
}

@media (min-width: 1025px) {
  .sliderbuttons {
    margin-top: 1rem;
  }
}

/* Large desktop styles */
@media (min-width: 1280px) {
  .slidertext {
    font-size: 3.5rem;
  }
}

/* Flickity pagination dots */
.flickity-page-dots {
  bottom: 20px;
}

.flickity-page-dots .dot {
  width: 12px;
  height: 12px;
  opacity: 1;
  background: rgba(255, 255, 255, 0.5);
  margin: 0 8px;
}

.flickity-page-dots .dot.is-selected {
  background: #fff;
}