/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

.banner-carousel {
  position: relative;
  width: 100vw;
  max-width: 100%;
  height: calc(100dvh - 80px);
  overflow: hidden;
  margin: 0;
  padding: 0;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  cursor: default;
}

.banner-carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.banner-carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.banner-carousel-item.active {
  opacity: 1;
  z-index: 1;
}

/* Dark overlay for banner images */
.banner-carousel-item.has-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Black with 40% opacity */
  z-index: 1;
}

.banner-carousel-item picture {
  display: block;
  width: 100%;
  height: 100%;
}

.banner-carousel-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  padding: 0;
}

.banner-carousel-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

.banner-carousel-title {
  font-family: "Montserrat", sans-serif;
  font-size: 60px;
  font-weight: 900;
  color: white;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.02em;
  overflow: visible;
  width: 100%;
  cursor: default;
  user-select: none;
}

.banner-carousel-title-small {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* When both small title and large subtitle on large screens (1080px+) */
@media (min-width: 1400px) {
  /* Container becomes grid */
  .banner-carousel-text-overlay:has(.banner-carousel-title-small + .banner-carousel-subtitle-large) {
    display: grid;
    grid-template-columns: minmax(0, max-content);
    justify-content: center;
    gap: 20px;
  }
  
  /* Both elements share the same column and center as a group */
  .banner-carousel-title-small + .banner-carousel-subtitle-large,
  .banner-carousel-text-overlay:has(.banner-carousel-title-small + .banner-carousel-subtitle-large) .banner-carousel-title-small {
    width: 100%;
    margin-top: 0;
  }
  
  /* Subtitle centers its text */
  .banner-carousel-title-small + .banner-carousel-subtitle-large {
    text-align: center;
  }
  
  /* Title left-aligns its text */
  .banner-carousel-text-overlay:has(.banner-carousel-title-small + .banner-carousel-subtitle-large) .banner-carousel-title-small {
    text-align: left;
  }
}

.banner-carousel-subtitle {
  font-family: "Montserrat", sans-serif;
  font-size: 40px;
  font-weight: 400;
  color: white;
  text-transform: uppercase;
  margin-top: 20px;
  letter-spacing: 0.05em;
  overflow: visible;
  width: 100%;
  cursor: default;
  user-select: none;
}

.banner-carousel-subtitle-large {
  font-size: 90px;
  font-weight: 900;
  letter-spacing: 0.02em;
  width: fit-content;
}

.banner-carousel-subtitle-left {
  text-align: left;
}

/* Align container and text only on extra large screens */
@media (min-width: 1550px) {
  .banner-carousel-text-overlay-left {
    left: 0;
    transform: translateX(0);
    text-align: left;
    padding-left: 5%;
  }
  
  .banner-carousel-text-overlay-right {
    left: auto;
    right: 0;
    transform: translateX(0);
    text-align: right;
    padding-right: 5%;
  }
  
  .banner-carousel-title-left {
    text-align: left;
  }
  
  .banner-carousel-title-right {
    text-align: right;
  }
  
  .banner-carousel-subtitle-right {
    text-align: right;
  }
}

.banner-carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.banner-carousel-control {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 15px 20px;
  cursor: pointer;
  font-size: 24px;
  transition: opacity 0.5s ease, background-color 0.3s ease;
  pointer-events: all;
  opacity: 0;
}

.banner-carousel:hover .banner-carousel-control {
  opacity: 1;
}

.banner-carousel-control:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.banner-carousel-control.prev {
  border-radius: 0 4px 4px 0;
}

.banner-carousel-control.next {
  border-radius: 4px 0 0 4px;
}

.banner-carousel-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.banner-carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s;
}

.banner-carousel-indicator.active {
  background-color: #ff99cc;
}

.banner-carousel-indicator:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
  .banner-carousel {
    height: calc(100dvh - 80px);
    min-height: 300px;
    max-height: calc(100dvh - 80px);
  }
  
  /* Hide arrows on mobile - use swipe instead */
  .banner-carousel-control {
    display: none;
  }
  
  .banner-carousel-indicators {
    bottom: 20px;
  }
  
  .banner-carousel-title {
    font-size: 40px;
  }
  
  .banner-carousel-title-small {
    font-size: 20px;
  }
  
  .banner-carousel-subtitle {
    font-size: 20px;
    margin-top: 10px;
  }
  
  .banner-carousel-subtitle-large {
    font-size: 50px;
  }
}

@media (max-width: 480px) {
  .banner-carousel-title {
    font-size: 32px;
  }
  
  .banner-carousel-title-small {
    font-size: 16px;
  }
  
  .banner-carousel-subtitle {
    font-size: 16px;
    margin-top: 8px;
  }
  
  .banner-carousel-subtitle-large {
    font-size: 38px;
  }
}

