/* ============================================================
   Site-wide uniform gallery — full image visible (not cropped)
   ============================================================ */

:root {
  --shpe-gallery-bg: transparent;
  --shpe-gallery-border: transparent;
  --shpe-gallery-gap: 14px;
  --shpe-gallery-pad: 0;
  --shpe-gallery-radius: 0;
}

/* ---------- Homepage Elementor gallery (tabs) ---------- */
.elementor-element-c081704 .elementor-gallery__container,
.elementor-gallery__container.shpe-gallery-ready {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--shpe-gallery-gap) !important;
  width: 100%;
  padding-bottom: 0 !important;
  position: relative !important;
  align-items: stretch;
}

.elementor-element-c081704 .elementor-gallery__container .e-gallery-item,
.elementor-gallery__container.shpe-gallery-ready .e-gallery-item {
  position: relative !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  padding: 0 !important;
  box-sizing: border-box;
  line-height: 0;
}

.elementor-element-c081704 .elementor-gallery__container .e-gallery-item.e-gallery-item--hidden,
.elementor-gallery__container.shpe-gallery-ready .e-gallery-item.shpe-gallery-filtered {
  display: none !important;
}

.elementor-element-c081704 .elementor-gallery__container img.shpe-gallery-img,
.elementor-gallery__container.shpe-gallery-ready .e-gallery-image,
.elementor-gallery__container.shpe-gallery-ready img.e-gallery-image,
.elementor-gallery__container.shpe-gallery-ready img.shpe-gallery-img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  padding-bottom: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: transparent !important;
  vertical-align: top;
}

/* Tab bar */
.elementor-element-1418606 > .e-con-inner {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 28px;
  padding-bottom: 8px;
}

.elementor-element-1418606 .elementor-heading-title {
  font-size: clamp(0.75rem, 1.6vw, 0.95rem);
  letter-spacing: 0.04em;
  margin: 0;
}

.elementor-element-1418606 .elementor-heading-title a {
  color: inherit;
  text-decoration: none;
}

.elementor-element-1418606 .elementor-widget-heading {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.elementor-element-1418606 .elementor-heading-title,
.elementor-element-1418606 .elementor-heading-title a {
  transition: color 0.3s ease;
}

.elementor-element-1418606 .shpe-gallery-tab--active {
  transform: translateY(-1px);
}

.elementor-element-1418606 .shpe-gallery-tab--active .elementor-heading-title,
.elementor-element-1418606 .shpe-gallery-tab--active .elementor-heading-title a {
  color: var(--e-global-color-ce7c1bd, #6ec1e4);
}

/* Tab switch animations */
.elementor-gallery__container.shpe-gallery-ready {
  min-height: 120px;
}

.elementor-gallery__container.shpe-gallery-ready.shpe-gallery-animating .e-gallery-item {
  transition:
    opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.elementor-gallery__container.shpe-gallery-ready .e-gallery-item.shpe-gallery-item-out {
  opacity: 0 !important;
  transform: scale(0.96) !important;
  pointer-events: none;
}

.elementor-gallery__container.shpe-gallery-ready .e-gallery-item.shpe-gallery-item-in {
  animation: shpe-gallery-tab-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes shpe-gallery-tab-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .elementor-gallery__container.shpe-gallery-ready .e-gallery-item.shpe-gallery-item-in {
    animation: none !important;
  }

  .elementor-gallery__container.shpe-gallery-ready.shpe-gallery-animating .e-gallery-item {
    transition: none !important;
  }
}

.elementor-gallery__container.shpe-gallery-ready .e-gallery-item.e-gallery-item--hidden {
  opacity: 1 !important;
}

/* Hover — subtle shadow only, no white tile */
.elementor-gallery__container.shpe-gallery-ready .e-gallery-item:hover,
.elementor-image-gallery .gallery-item:hover .gallery-icon {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ---------- Portfolio pages (WordPress / Elementor image gallery) ---------- */
.elementor-widget-image-gallery .elementor-image-gallery .gallery {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--shpe-gallery-gap);
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

.elementor-widget-image-gallery .elementor-image-gallery .gallery-columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.elementor-widget-image-gallery .elementor-image-gallery .gallery-columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.elementor-widget-image-gallery .elementor-image-gallery .gallery-item {
  display: block !important;
  float: none !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center;
  vertical-align: top;
}

.elementor-widget-image-gallery .elementor-image-gallery .gallery-icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  padding: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
  line-height: 0;
  transition: box-shadow 0.3s ease;
}

.elementor-widget-image-gallery .elementor-image-gallery .gallery-icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.elementor-widget-image-gallery .elementor-image-gallery .gallery-icon img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 !important;
}

.elementor-widget-image-gallery.gallery-spacing-custom .gallery-icon {
  padding: 0 !important;
}

/* Scroll-reveal on portfolio tiles */
.elementor-image-gallery .gallery-item.shpe-scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.elementor-image-gallery .gallery-item.shpe-scroll-reveal.shpe-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .elementor-widget-image-gallery .elementor-image-gallery .gallery-columns-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .elementor-element-c081704 .elementor-gallery__container,
  .elementor-gallery__container.shpe-gallery-ready {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .elementor-widget-image-gallery .elementor-image-gallery .gallery-columns-4,
  .elementor-widget-image-gallery .elementor-image-gallery .gallery-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .elementor-element-1418606 > .e-con-inner {
    gap: 8px 18px;
  }
}

@media (max-width: 767px) {
  .elementor-element-c081704 .elementor-gallery__container,
  .elementor-gallery__container.shpe-gallery-ready {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .elementor-widget-image-gallery .elementor-image-gallery .gallery-columns-4,
  .elementor-widget-image-gallery .elementor-image-gallery .gallery-columns-3,
  .elementor-widget-image-gallery .elementor-image-gallery .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .elementor-element-1418606 > .e-con-inner {
    gap: 8px 14px;
  }
}

@media (max-width: 479px) {
  .elementor-widget-image-gallery .elementor-image-gallery .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .elementor-element-c081704 .elementor-gallery__container,
  .elementor-gallery__container.shpe-gallery-ready {
    gap: 8px !important;
  }

  .elementor-element-1418606 > .e-con-inner {
    gap: 6px 10px;
  }
}

/* No white tile behind gallery images — all variants */
.elementor-widget-image-gallery .gallery-icon,
.elementor-widget-image-gallery .gallery-item,
.elementor-gallery__container .e-gallery-item,
.elementor-gallery__container .e-gallery-image {
  background-color: transparent !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none;
}
