/**
 * Futuristic Image Gallery Styles
 */

/* General Wrapper */
.fig-gallery-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.fig-item {
  position: relative;
  box-sizing: border-box;
}

.fig-item-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  background: #000;
}

.fig-image-wrap {
  width: 100%;
  height: 100%;
}

.fig-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Hover Effects */
.fig-item-inner:hover .fig-image-wrap img {
  transform: scale(1.1);
}

/* Overlay */
.fig-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fig-item-inner:hover .fig-overlay {
  opacity: 1;
}

.fig-title {
  margin: 0 0 5px 0;
  font-size: 1.2rem;
  font-weight: bold;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.fig-caption {
  font-size: 0.9rem;
  transform: translateY(20px);
  transition: transform 0.3s ease 0.1s;
}

.fig-item-inner:hover .fig-title,
.fig-item-inner:hover .fig-caption {
  transform: translateY(0);
}

/* Layout: Grid */
.fig-layout-grid {
  display: grid;
  /* Columns and gap handled by inline styles/JS via Elementor controls */
}

/* Layout: Masonry */
/* Simple CSS column based masonry */
.fig-layout-masonry {
  display: flex;
  flex-wrap: wrap;
  /* Widths handled by inline styles */
}

/* Layout: Accordion (Horizontal) */
.fig-layout-accordion {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.fig-layout-accordion .fig-item {
  flex: 1;
  height: 100%;
  transition:
    flex 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    margin 0.3s ease;
  cursor: pointer;
  margin: 0; /* Override generic margin */
}

/* For gap, we added margin-right via controls, but we need to handle last child */
.fig-layout-accordion .fig-item:last-child {
  margin-right: 0 !important;
}

.fig-layout-accordion .fig-item.active {
  flex: 4; /* Expands to 4x size */
}

.fig-layout-accordion .fig-item.active .fig-overlay {
  opacity: 1;
}

.fig-layout-accordion .fig-item.active .fig-title,
.fig-layout-accordion .fig-item.active .fig-caption {
  transform: translateY(0);
}

/* Layout: Futuristic (3D Card Deck Style or Floating) */
.fig-layout-futuristic {
  display: grid;
  perspective: 1000px;
}

.fig-effect-tilt .fig-item-inner {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.fig-effect-tilt .fig-overlay {
  transform: translateZ(30px); /* Parallax text */
}

/* Glow Effect handling */
/* Box shadow added via inline PHP style based on control */

/* Slider Tweaks */
.fig-layout-slider .swiper-container {
  width: 100%;
  height: 100%;
  padding-bottom: 30px; /* Space for pagination */
}
.fig-layout-slider .swiper-slide {
  height: auto;
}
