/**
 * DH Community Carousel - Styles
 * Version: 1.0.0
 */

.dh-carousel {
  --carousel-width: min(1600px, 96vw);
  --slide-aspect: 16/9;
  --slide-gap: 32px;
  --border-radius: 28px;
  --transition-speed: 650ms;
  --slides-visible: 2;
  --frost-background: rgba(255, 255, 255, 0.55);
  --frost-blur: 12px;
  --frost-saturation: 160%;
  --title-size: clamp(13px, 2.2vw, 18px);
  --subtitle-size: clamp(16px, 3vw, 28px);
  --title-weight: 800;
  --subtitle-weight: 600;
  --accent-color: #B09043;
  
  width: var(--carousel-width);
  max-width: 100%;
  margin-inline: auto;
  position: relative;
  padding: 0 clamp(1em, 3vw, 2em);
  box-sizing: border-box;
}

.dh-carousel__viewport {
  overflow: hidden;
  position: relative;
  isolation: isolate;
  width: 100%;
}

.dh-carousel__track {
  display: flex;
  gap: var(--slide-gap);
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform var(--transition-speed) cubic-bezier(0.22, 0.61, 0.36, 1);
  padding: clamp(4px, 1vw, 6px);
  box-sizing: border-box;
}

.dh-carousel__slide {
  flex: 0 0 calc((100% - (var(--slide-gap) * (var(--slides-visible) - 1))) / var(--slides-visible));
  border-radius: var(--border-radius);
  background: transparent;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  min-width: 0;
  box-sizing: border-box;
  transition: transform 0.3s ease;
}


.dh-carousel__image-wrapper {
  margin: 0;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  overflow: hidden;
  background: #111;
  position: relative;
}

.dh-carousel__image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--slide-aspect);
  object-fit: cover;
  transform: translateZ(0);
}

.dh-carousel__content {
  position: relative;
  padding: clamp(12px, 2vw, 16px) clamp(14px, 2.5vw, 20px) clamp(14px, 2.5vw, 18px);
  color: #EAE4DC;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  margin-top: -1px;
  background: #111C4E;
  display: flex;
  flex-direction: column;
  min-height: clamp(100px, 10vh, 150px);
  justify-content: center;
  box-sizing: border-box;
}

.dh-carousel__content::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.14), transparent);
}

.dh-carousel__subtitle {
  display: block;
  text-transform: uppercase;
  opacity: 0.95;
  margin: 0 0 clamp(6px, 1.5vw, 10px) 0;
  font-size: var(--subtitle-size);
  line-height: 1.2;
  font-family: 'FS Benjamin Bold', -apple-system, sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.dh-carousel__title {
  margin: 0;
  font-size: 1.2em;
  line-height: 1.5em;
  font-family: 'Poppins', -apple-system, sans-serif;
  font-weight: 300;
}

.dh-carousel__navigation {
  width: var(--carousel-width);
  max-width: 100%;
  margin: clamp(10px, 2vw, 14px) auto 0;
  position: relative;
  height: clamp(36px, 8vw, 42px);
  box-sizing: border-box;
}

.dh-carousel__dots-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 10;
}

.dh-carousel__dots {
  display: inline-flex;
  gap: clamp(6px, 1.5vw, 10px);
  align-items: center;
}

.dh-carousel__dot {
  width: clamp(6px, 1.5vw, 8px);
  height: clamp(6px, 1.5vw, 8px);
  border-radius: 999px;
  background: #111C4E;
  opacity: 0.95;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: none;
}

.dh-carousel__dot:hover {
  opacity: 1;
  background-color: #B09043;
}

.dh-carousel__dot:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.dh-carousel__dot.is-active {
  width: clamp(18px, 4vw, 26px);
  height: clamp(6px, 1.5vw, 8px);
  background-color: #B09043;
}

.dh-carousel__buttons {
  position: absolute;
  right: clamp(1em, 3vw, 2em);
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 10px);
  z-index: 10;
}

.dh-carousel__button {
  width: clamp(36px, 8vw, 42px);
  height: clamp(36px, 8vw, 42px);
  border-radius: 999px;
  background: #EAE4DC;
  color: #111C4E;
  border: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dh-carousel__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  background-color: #B09043;
}

.dh-carousel__button:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.dh-carousel__button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.dh-carousel__button svg {
  pointer-events: none;
}

.dh-carousel-error {
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 4px;
  padding: 1em;
  color: #c33;
  text-align: center;
}

@media (max-width: 1024px) {
  .dh-carousel {
    --slides-visible: 2;
    --slide-gap: 20px;
    padding: 0 1.5em;
  }

  .dh-carousel__content {
    padding: 12px 16px 14px;
    min-height: 100px;
  }
}

@media (max-width: 768px) {
  .dh-carousel {
    --mobile-gutter: 20px;
    --mobile-slide-spacing: 16px;
    --slides-visible: 1 !important;
    --slide-gap: 0px !important;
    --border-radius: 20px;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-left: calc((100vw - 100%) / -2) !important;
  }
  
  .dh-carousel__viewport {
    width: calc(100vw - (var(--mobile-gutter) * 2)) !important;
    max-width: calc(100vw - (var(--mobile-gutter) * 2)) !important;
    overflow: hidden !important;
    margin: 0 var(--mobile-gutter) !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
  }
  
  .dh-carousel__viewport::before,
  .dh-carousel__viewport::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: transparent;
    z-index: 10;
    pointer-events: none;
  }
  
  .dh-carousel__viewport::before {
    left: -1px;
  }
  
  .dh-carousel__viewport::after {
    right: -1px;
  }
  
  .dh-carousel__track {
    gap: 0 !important;
    padding: 0 !important;
    display: flex !important;
  }
  
  .dh-carousel__slide {
    flex: 0 0 calc(100vw - (var(--mobile-gutter) * 2)) !important;
    width: calc(100vw - (var(--mobile-gutter) * 2)) !important;
    min-width: calc(100vw - (var(--mobile-gutter) * 2)) !important;
    max-width: calc(100vw - (var(--mobile-gutter) * 2)) !important;
    border-radius: var(--border-radius) !important;
    margin-right: var(--mobile-slide-spacing) !important;
    box-sizing: border-box !important;
  }
  
  .dh-carousel__slide:last-child {
    margin-right: 0 !important;
  }
  
  .dh-carousel__image-wrapper {
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
  }
  

  }
  
  .dh-carousel__navigation {
    width: 100vw;
    padding: 0 var(--mobile-gutter);
    margin-top: 16px;
  }
  

  
  .dh-carousel__button {
    width: 40px;
    height: 40px;
  }
  
  .dh-carousel__dot {
    width: 6px;
    height: 6px;
  }
  
  .dh-carousel__dot.is-active {
    width: 20px;
    height: 6px;
  }


@media (max-width: 480px) {
  .dh-carousel {
    --border-radius: 16px;
  }

  .dh-carousel__content {
    min-height: 100px;
    padding: 12px 16px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dh-carousel__track,
  .dh-carousel__dot,
  .dh-carousel__button,
  .dh-carousel__slide {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .dh-carousel__navigation,
  .dh-carousel__buttons,
  .dh-carousel__dots-container {
    display: none !important;
  }

  .dh-carousel__slide {
    break-inside: avoid;
  }
}