/**
 * Hexagon Photo Collage / Gallery - UX Builder
 * Category: A Elements
 */

.a-hex-gallery {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--a-hex-max-w, 660px);
  margin: 0 auto;
  padding: 10px;
  background: transparent !important;
}

/* Inner Ratio Container */
.a-hex-container {
  position: relative;
  width: 100%;
  aspect-ratio: 650 / 560;
  box-sizing: border-box;
}

/* Individual Hexagon Item */
.a-hex-item {
  position: absolute;
  overflow: hidden;
  box-sizing: border-box;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  -webkit-clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: #1e293b;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.4s ease;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
  cursor: pointer;
  z-index: 1;
}

.a-hex-item:hover {
  transform: translateY(-4px) scale(1.03);
  z-index: 5;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.4));
}

/* Positions matching the honeycomb diamond layout */
/* 1. Top Hexagon (Handshake) */
.a-hex-1 {
  width: 46%;
  height: 48%;
  left: 37%;
  top: 1%;
}

/* 2. Left Hexagon (Hands joined) */
.a-hex-2 {
  width: 45%;
  height: 47%;
  left: 1%;
  top: 31%;
}

/* 3. Bottom Center Hexagon (Meeting) */
.a-hex-3 {
  width: 44%;
  height: 46%;
  left: 41%;
  top: 52%;
}

/* 4. Right Hexagon (Colleagues smiling) */
.a-hex-4 {
  width: 34%;
  height: 36%;
  left: 77%;
  top: 31%;
}

/* Inner Image & Media */
.a-hex-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
}

.a-hex-inner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.a-hex-inner svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.a-hex-item:hover .a-hex-inner img,
.a-hex-item:hover .a-hex-inner svg {
  transform: scale(1.08);
}

/* Responsive */
@media (max-width: 600px) {
  .a-hex-gallery {
    padding: 5px;
  }
}