/* ==========================================================================
   YachtFriends — Yacht Hero Gallery Widget CSS (Prefix: yf-hg-)
   ========================================================================== */

.yf-hg-viewport {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  height: 600px;
  box-sizing: border-box;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
  background-color: #0f172a;
}

/* Background Image Layer (Absolute Behind Overlay) */
.yf-hg-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  cursor: zoom-in;
}

.yf-hg-active-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 10s linear;
}

.yf-hg-viewport:hover .yf-hg-active-bg {
  transform: scale(1.1);
}

/* Hero Content Overlay (Stays static above background) */
.yf-hg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 100px 60px 60px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 2;
  pointer-events: none;
}

/* Enable pointer events on interactive children in overlay */
.yf-hg-overlay > * {
  pointer-events: auto;
}

.yf-hg-title {
  font-size: 4rem;
  font-weight: 700;
  margin: 0 0 15px 0;
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.yf-hg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.95;
  letter-spacing: 0.5px;
}

.yf-hg-meta span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yf-hg-meta i {
  color: #c8922a;
  font-size: 1rem;
}

/* Navigational Slide Arrows */
.yf-hg-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
  transition: all 0.3s ease;
}

.yf-hg-nav:hover {
  background: #6c9e9e;
  color: #fff;
}

.yf-hg-nav.prev {
  left: 20px;
}

.yf-hg-nav.next {
  right: 20px;
}

/* Premium Outside Thumbnail Carousel Strip */
.yf-hg-carousel-wrapper {
  position: relative;
  margin-top: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 20px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.yf-hg-carousel {
  overflow-x: hidden;
  width: 100%;
  display: block;
}

.yf-hg-carousel-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  align-items: center;
}

.yf-hg-thumb {
  width: 100px;
  height: 65px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.6;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.yf-hg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yf-hg-thumb:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.yf-hg-thumb.active {
  border-color: #6c9e9e;
  opacity: 1;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 6px 12px rgba(108, 158, 158, 0.3);
}

/* Horizontal scroll buttons */
.yf-hg-carousel-arrow {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.yf-hg-carousel-arrow:hover {
  background: #6c9e9e;
  border-color: #6c9e9e;
  color: #fff;
  transform: scale(1.1);
}

/* Lightbox Modal */
#yf-hg-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 35, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#yf-hg-lightbox-close {
  position: absolute;
  top: 25px;
  right: 25px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 1000000;
}

#yf-hg-lightbox-close:hover {
  transform: scale(1.1);
  color: #6c9e9e;
}

#yf-hg-lightbox .yf-hg-lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#yf-hg-lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  display: block;
  user-select: none;
}

#yf-hg-lightbox .yf-hg-lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

#yf-hg-lightbox .yf-hg-lightbox-nav:hover {
  transform: scale(1.1);
  color: #6c9e9e;
}

#yf-hg-lightbox .yf-hg-lightbox-prev {
  left: -70px;
}

#yf-hg-lightbox .yf-hg-lightbox-next {
  right: -70px;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 991px) {
  .yf-hg-viewport {
    height: 500px;
  }
  .yf-hg-carousel-wrapper {
    margin-top: 12px;
    padding: 10px 15px;
  }
  .yf-hg-title {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .yf-hg-viewport {
    height: 450px;
    border-radius: 0;
  }
  .yf-hg-overlay {
    padding: 40px 24px;
  }
  .yf-hg-title {
    font-size: 2.5rem;
  }
  .yf-hg-meta {
    gap: 12px;
    font-size: 0.95rem;
  }
  .yf-hg-carousel-wrapper {
    margin-top: 10px;
    padding: 6px 10px;
  }
  .yf-hg-thumb {
    width: 75px;
    height: 50px;
  }
  .yf-hg-nav {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  #yf-hg-lightbox .yf-hg-lightbox-prev {
    left: 10px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #yf-hg-lightbox .yf-hg-lightbox-next {
    right: 10px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
