/* === Fancybox Backdrop === */
.fancybox__backdrop {
  background: linear-gradient(
    to bottom right,
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.6)
  );
  transition: background 0.3s ease;
}

.fancybox__backdrop::after {
  content: '';
  position: absolute;
  width: 10%;
  height: 10%;
  filter: blur(4px); /* More dramatic blur */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(11);
  opacity: 0.4;
  background-image: var(--bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transition: opacity 0.3s ease;
}

/* === Toolbar & Navigation Styling === */
.fancybox__toolbar {
  /* A bit of extra padding on the toolbar */
  padding: 16px;
}

/* 
  Define custom button variables for both the fancybox toolbar 
  and the main carousel nav (renamed from fancybox__nav -> carousel__nav)
*/
.fancybox__toolbar,
.carousel__nav {
  --f-button-border-radius: 50%;
  --f-button-bg: rgba(91, 78, 76, 0.64);
  --f-button-hover-bg: rgba(91, 78, 76, 0.74);
  --f-button-active-bg: rgba(91, 78, 76, 0.84);
}

/* Style the .carousel__button elements inside the toolbar and nav */
.fancybox__toolbar .carousel__button,
.carousel__nav .carousel__button {
  cursor: pointer;
  border: none;
  background: var(--f-button-bg);
  border-radius: var(--f-button-border-radius);
  padding: 8px;
  margin-left: 0.5rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.fancybox__nav .carousel__button:hover {
  color: var(--primary);
  border-radius: 50%;
  background:  rgba(91, 78, 76, 0.4);
}

.fancybox__toolbar .carousel__button:hover,
.carousel__nav .carousel__button:hover
{
  background: var(--f-button-hover-bg);
  transform: scale(1.05);
}

.fancybox__toolbar .carousel__button:active,
.carousel__nav .carousel__button:active {
  background: var(--f-button-active-bg);
  transform: scale(0.95);
}

/* 
  Navigation button SVG icon sizes.

  In Fancybox 4, the nav uses .carousel__nav + .carousel__button. 
  Set your custom widths here if desired. 
*/
.carousel__nav {
  --f-button-svg-width: 22px;
  --f-button-svg-height: 22px;
}

/* === Caption Styling === */
.fancybox__caption {
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
  color: #fff;
  font-size: 16px;
  padding: 10px 15px;
  border-radius: 4px;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  margin: 0 auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s ease;
}

/* === Classic Thumbnails Styling === */
.fancybox__thumbs.is-classic {
  --f-thumb-width: 48px;
  --f-thumb-height: 48px;
  --f-thumb-gap: 16px;
  --f-thumb-border-radius: 6px;
  --f-thumb-outline: 0;
}

/* Animate thumbnails on hover in "classic" mode */
.fancybox__thumbs.is-classic .fancybox__thumb {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.fancybox__thumbs.is-classic .fancybox__thumb:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.8);
}

.fancybox__image{border-radius: 10px !important;}