/**
 * Hero Slider Block Styles
 * Pixel-perfect replication of coveredbridges.com slider
 */

/* Reset and base styles */
.bridges-hero-slider {
  position: relative;
  width: 100%;
  height: 95vh;
  margin: 0;
  overflow: hidden;
  background-color: #f8f8f8;
}

/* Container structure */
.hero-slider__container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hero-slider__wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-slider__holder {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Slides container */
.hero-slider__slides {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(0);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Individual slide */
.hero-slider__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 1;
}

.hero-slider__slide.slide--active {
  opacity: 1;
  z-index: 2;
}

/* Slide article container */
.slide__article {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image container */
.slide__media-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  z-index: 1;
}

.slide__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover zoom effect */
.bridges-hero-slider:hover .slide__image {
  transform: scale(1.05);
}

/* Content overlay */
.slide__content {
  position: relative;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: saturate(180%) blur(50px);
  padding: 60px 80px;
  margin: 0;
  width: 500px;
  min-height: 300px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide__content-inner {
  width: 100%;
}

/* Typography */
.slide__header {
  margin-bottom: 20px;
}

.slide__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  color: #333333;
  margin: 0 0 20px 0;
  letter-spacing: -0.5px;
}

.slide__description {
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #666666;
  margin-bottom: 30px;
}

/* Button styling */
.slide__button-container {
  margin-top: 30px;
}

.slide__button {
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  background-color: #B82330;
  padding: 12px 24px;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
}

.slide__button:hover,
.slide__button:focus {
  background-color: #a01e2a;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(184, 35, 48, 0.3);
}

/* Navigation arrows - Desktop */
.hero-slider__navigation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.hero-slider__arrows {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slider__arrows--desktop {
  display: block;
}

.hero-slider__arrows--mobile {
  display: none;
}

.hero-slider__arrow-container {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  z-index: 15;
}

.hero-slider__arrow-container--left {
  left: 30px;
}

.hero-slider__arrow-container--right {
  right: 30px;
}

.hero-slider__arrow-button {
  position: relative;
  width: 60px;
  height: 60px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.hero-slider__arrow-button:hover,
.hero-slider__arrow-button:focus {
  transform: scale(1.1);
  outline: none;
}

.hero-slider__arrow-icon-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

.hero-slider__arrow-icon {
  position: relative;
  width: 44px;
  height: 18px;
  z-index: 1;
}

.hero-slider__arrow-icon-path {
  stroke: #333333;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mobile navigation arrows */
.hero-slider__mobile-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 15;
}

.hero-slider__mobile-arrow--left {
  left: 20px;
}

.hero-slider__mobile-arrow--right {
  right: 20px;
}

.hero-slider__mobile-arrow-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

.hero-slider__mobile-arrow-icon {
  position: relative;
  width: 24px;
  height: 14px;
  z-index: 1;
}

.hero-slider__mobile-arrow-path {
  stroke: #333333;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Dot navigation */
.hero-slider__dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
  pointer-events: auto;
}

.hero-slider__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background-color: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.hero-slider__dot:hover,
.hero-slider__dot:focus {
  border-color: rgba(255, 255, 255, 1);
  outline: none;
}

.hero-slider__dot--active {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 1);
}

/* Screen reader text */
.screen-reader-text,
.hero-slider__sr-announcements {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Responsive Design */

/* Tablet styles (768px - 1024px) */
@media screen and (max-width: 1024px) {
  .bridges-hero-slider {
    max-width: 100%;
    height: 95vh;
  }
  
  .hero-slider__slide {
    height: 100%;
  }
  
  .slide__article {
    height: 100%;
    min-height: 100%;
    justify-content: center;
    align-items: center;
  }
  
  .slide__media-container {
    height: 100%;
  }
  
  .slide__image {
    height: 100%;
  }
  
  .slide__content {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    margin: 0 40px;
    width: calc(100% - 80px);
    max-width: 500px;
    min-height: 250px;
    padding: 40px 60px;
    background-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: saturate(180%) blur(50px);
    border-radius: 8px;
    text-align: center;
  }
  
  .slide__title {
    font-size: 32px;
    color: #333333;
  }
  
  .slide__description {
    font-size: 15px;
    color: #666666;
  }
  
  /* Switch to mobile-style navigation for tablets */
  .hero-slider__arrows--desktop {
    display: none;
  }
  
  .hero-slider__arrows--mobile {
    display: flex;
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    justify-content: center;
    align-items: end;
    gap: 20px;
    z-index: 20;
    pointer-events: none;
  }
  
  .hero-slider__mobile-arrow {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    pointer-events: auto;
    z-index: 25;
    cursor: pointer;
  }
}

/* Mobile styles (up to 767px) */
@media screen and (max-width: 767px) {
  .bridges-hero-slider {
    height: 95vh;
    width: 100vw;
    margin: 0;
    max-width: none;
  }
  
  .slide__article {
    justify-content: center;
    align-items: center;
  }
  
  .slide__content {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    margin: 0 20px;
    width: calc(100% - 40px);
    max-width: 400px;
    min-height: auto;
    padding: 30px 20px;
    background-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: saturate(180%) blur(50px);
    border-radius: 8px;
    text-align: center;
  }
  
  .slide__title {
    font-size: 28px;
    color: #333333;
    margin-bottom: 15px;
  }
  
  .slide__description {
    font-size: 14px;
    color: #666666;
    margin-bottom: 20px;
  }
  
  .slide__button {
    background-color: #B82330;
    color: #ffffff;
  }
  
  .slide__button:hover,
  .slide__button:focus {
    background-color: #a01e2a;
    color: #ffffff;
  }
  
  /* Switch to mobile navigation */
  .hero-slider__arrows--desktop {
    display: none;
  }
  
  .hero-slider__arrows--mobile {
    display: flex;
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    justify-content: center;
    align-items: end;
    gap: 20px;
    z-index: 20;
    pointer-events: none;
  }
  
  .hero-slider__mobile-arrow {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    pointer-events: auto;
    z-index: 25;
    cursor: pointer;
  }
  
  .hero-slider__dots {
    bottom: 40px;
    gap: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 20;
  }
  
  .hero-slider__dot {
    width: 10px;
    height: 10px;
  }
}

/* Small mobile styles (up to 480px) */
@media screen and (max-width: 480px) {
  .bridges-hero-slider {
    height: 95vh;
  }
  
  .slide__content {
    padding: 25px 15px;
    margin: 0 15px;
    width: calc(100% - 30px);
    max-width: 350px;
  }
  
  .slide__title {
    font-size: 24px;
    margin-bottom: 12px;
  }
  
  .slide__description {
    font-size: 13px;
    margin-bottom: 18px;
  }
  
  .hero-slider__mobile-arrow {
    width: 35px;
    height: 35px;
  }
  
  .hero-slider__mobile-arrow-icon {
    width: 20px;
    height: 12px;
  }
  
  .hero-slider__arrows--mobile {
    bottom: 70px;
    gap: 15px;
  }
  
  .hero-slider__dots {
    bottom: 30px;
  }
}

/* High DPI displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
  .slide__image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-slider__slides,
  .hero-slider__slide,
  .hero-slider__arrow-button,
  .hero-slider__dot,
  .slide__button {
    transition: none;
  }
  
  .bridges-hero-slider[data-autoplay="true"] {
    animation-play-state: paused;
  }
}

/* Focus styles for accessibility */
.hero-slider__arrow-button:focus-visible,
.hero-slider__mobile-arrow:focus-visible,
.hero-slider__dot:focus-visible,
.slide__button:focus-visible {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .hero-slider__navigation,
  .hero-slider__dots {
    display: none;
  }
  
  .hero-slider__slide {
    position: static;
    opacity: 1;
    page-break-inside: avoid;
  }
  
  .slide__content {
    background-color: rgba(255, 255, 255, 0.95);
  }
}