.hero-slider {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

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

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  z-index: 2;
  text-align: center;
  max-width: 80%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-content.with-background {
  position: relative;
  width: auto;
  min-width: 300px;
  border-radius: 8px;
  overflow: hidden; /* Ensure background stays within border radius */
}

/* Background element for opacity control */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Push it behind the content */
  border-radius: inherit;
}

/* Card size variations - only apply to background cards */
.hero-content.with-background.card-size-small {
  padding: 1rem 1.5rem;
}

.hero-content.with-background.card-size-medium {
  padding: 2rem 3rem;
}

.hero-content.with-background.card-size-large {
  padding: 3rem 4rem;
}

/* Text position variations - applied to all content regardless of background */
.hero-content {
  position: absolute !important; /* Force position absolute */
  z-index: 2; /* Ensure it's above the image */
}

/* Reset all position properties first to avoid conflicts */
.hero-content.position-center,
.hero-content.position-top-left,
.hero-content.position-top-right,
.hero-content.position-bottom-left,
.hero-content.position-bottom-right {
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
}

/* Then set specific positions */
.hero-content.position-center {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

.hero-content.position-top-left {
  top: 5% !important;
  left: 5% !important;
}

.hero-content.position-top-right {
  top: 5% !important;
  right: 5% !important;
  left: auto !important;
}

.hero-content.position-bottom-left {
  bottom: 5% !important;
  left: 5% !important;
  top: auto !important;
}

.hero-content.position-bottom-right {
  bottom: 5% !important;
  right: 5% !important;
  top: auto !important;
  left: auto !important;
}

.hero-content.without-background {
  background-color: transparent;
  padding: 1rem;
  max-width: 90%;
}

.hero-title {
  font-size: 2.5rem;
  margin: 0;
  padding: 0;
  /* Default font and color will be overridden by inline styles */
  font-family: 'Lato', sans-serif;
  color: white;
  width: 100%;
  text-align: center;
}

.with-background .hero-title {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.without-background .hero-title {
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

.slider-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 3;
}

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

.slider-dot.active {
  background-color: #B74233;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background-color: rgba(255, 255, 255, 0.3);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-nav:hover {
  background-color: rgba(183, 66, 51, 0.7);
}

.slider-prev {
  left: 20px;
}

.slider-next {
  right: 20px;
}

@media (max-width: 768px) {
  .hero-slider {
    height: 400px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .slider-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .hero-content {
    max-width: 90%;
  }
  
  .hero-content.with-background {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    height: 300px;
  }
  
  .hero-title {
    font-size: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
  }
  
  .hero-content.with-background {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.6);
  }
}
