/* =============================
   ** SECTION 2 CAROUSEL STYLES **
   ============================= */

/* Container for all carousels - HORIZONTAL STACKING */
.section2-carousels-wrapper {
  width: 100%;
  margin: 50px 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px;
  box-sizing: border-box;
}

/* Individual carousel container - 4:5 ASPECT RATIO */
.section2-carousel-container {
  margin: 0;
  width: calc(33.333% - 27px);
  min-width: 200px;
  max-width: 320px;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.section2-carousel-container:hover {
  transform: translateY(-5px);
}

/* Carousel wrapper - main container */
.featured-carousel {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: transparent;
  border-radius: 16px;
  box-shadow: none;
  transition: transform 0.3s ease;
}

/* Carousel track - contains all slides and handles the sliding animation */
.featured-track {
  display: flex;
  /* =============================================
     ** RTL-SAFE SLIDING **
     The JS uses translateX(%) math that assumes an LTR flow.
     On RTL pages, a flex track with `direction: rtl` can make the
     initial translate land in "empty" space. Force the track LTR.
     ============================================= */
  direction: ltr;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: grab;
}

.featured-track:active {
  cursor: grabbing;
}

/* ONE SLIDE VISIBLE AT A TIME - All devices */
.featured-slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 0;
  box-sizing: border-box;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image wrapper - proper sizing without artifacts */
/* Polaroid effect on hover per plan */
.featured-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The actual image element */
.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform 0.5s ease;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.featured-caption {
  /* Keep Hebrew captions naturally RTL even though the track is LTR */
  direction: rtl;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(25%);
  background: #ffffff;
  color: #1a1a1a;
  text-align: center;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}




/* ======================================================================
   ** INTERACTIONS & RESPONSIVE ADJUSTMENTS **
=============================================
/* Hover shrink/caption reveal for desktop 
======================================================================== */
@media (min-width: 769px) {
  .featured-image-wrapper:hover .featured-image {
    transform: scale(0.83);
  }

  .featured-image-wrapper:hover .featured-caption {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ======================================================================
    ** MOBILE ADJUSTMENTS **
============================ 
    disable hover transforms, lighten padding 
======================================================================== */
@media (max-width: 768px) {
  .featured-image-wrapper {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  }

  .featured-image {
    transform: none;
    transition: none;
  }

  .featured-caption {
    display: none;
  }
}

/* Navigation buttons - positioned on sides of carousel */
.carousel-nav-buttons {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  pointer-events: none;
  box-sizing: border-box;
  z-index: 10;
}

/* Individual navigation button */
.carousel-nav-btn {
  background: rgba(26, 26, 26, 0.7);
  color: white;
  border: none;
  padding: 14px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 26px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: auto;
  min-width: 55px;
  text-align: center;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-nav-btn:hover {
  background: rgba(212, 175, 55, 0.95);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.carousel-nav-btn:active {
  transform: scale(0.98);
}

/* Indicator dots - shows current position in carousel */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  direction: ltr;
  flex-wrap: wrap;
}

/* Individual dot indicator */
.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d0d0d0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 2px solid transparent;
}

.carousel-dot:hover {
  background: #a0a0a0;
  transform: scale(1.2);
}

/* Active dot - shows the current slide */
.carousel-dot.active {
  background: var(--accent-color);
  transform: scale(1.4);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6), 0 0 0 2px rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.3);
}



/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== 


*/

/* Tablet: 2 carousels visible */
@media (max-width: 1024px) {
  .section2-carousel-container {
    width: calc(50% - 20px);
    max-width: 400px;
  }

  .featured-carousel {
    height: 350px;
  }

  .carousel-nav-btn {
    padding: 10px 14px;
    font-size: 20px;
  }
}

/* Mobile: 1 carousel visible, full width */
@media (max-width: 768px) {
  .section2-carousels-wrapper {
    padding: 10px;
    gap: 20px;
    margin: 30px 0;
  }

  .section2-carousel-container {
    width: 95%;
    max-width: 100%;
    margin: 0 auto;
  }

  .featured-slide {
    padding: 10px;
  }

  .featured-carousel {
    height: 300px;
  }

  .carousel-nav-btn {
    padding: 8px 12px;
    font-size: 18px;
    min-width: 40px;
  }

  .carousel-nav-buttons {
    padding: 0 10px;
  }
}

