/* =============================================
   GALLERY SECTION — Our Past Projects (#two)
   ============================================= */

.gallery-section {
  width: 100%;
  background-color: #000;
  padding: 80px 40px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

/* --- Header --- */
.gallery-header {
  text-align: center;
  max-width: 600px;
}

.gallery-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #60a5fa;
  margin: 0 0 12px;
  font-family: "Poppins", sans-serif;
}

.gallery-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  font-family: "Poppins", sans-serif;
  line-height: 1.2;
}

.gallery-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.7;
  font-family: "Poppins", sans-serif;
}

/* --- Gallery Stage --- */
.gallery-stage {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  perspective: 500px;
  height: 400px;
  transition: 1.2s ease;
  transform: scale(0.9);
  width: 35%;
  margin: auto;
  position: relative;
}

.container img {
  width: 30vw;
  height: 30vh;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: 0.4s ease;
  cursor: pointer;
}

.item-1 {
  z-index: 3;
}

.item-2 {
  transform: translate(-50%, -70%) scale(0.9);
  z-index: 2;
}

.item-3 {
  transform: translate(-50%, -90%) scale(0.8);
  z-index: 1;
}

.container:hover {
  transform: scale(1);
}

.container:hover .item-1 {
  transform: translate(-80%, -50%) scale(1) rotateY(-40deg);
}

.container:hover .item-2 {
  transform: translate(-55%, -50%) scale(0.9) rotateY(-20deg);
}

.container:hover .item-3 {
  transform: translate(-30%, -50%) scale(0.9) rotateY(0deg);
}

.item:hover {
  margin-top: -20px;
}

/* --- CTA Button --- */
.gallery-cta {
  display: flex;
  justify-content: center;
}

.gallery-more-btn {
  display: inline-block;
  padding: 14px 40px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

.gallery-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.gallery-more-btn:hover::before {
  left: 100%;
}

.gallery-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.55);
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  color: #fff;
}

.gallery-more-btn:active {
  transform: translateY(-1px);
}

/* --- Page Swipe Transitions (shared, triggered by page-swipe.js) --- */
body.swipe-page-right {
  overflow: hidden;
}

body.swipe-page-right #wrapper,
body.swipe-page-right #footer,
body.swipe-page-right #sidebar,
body.swipe-page-right #preloader {
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

body.swipe-page-left {
  overflow: hidden;
  position: relative;
}

body.swipe-page-left #wrapper,
body.swipe-page-left #footer,
body.swipe-page-left #sidebar,
body.swipe-page-left #preloader {
  transform: translateX(-130%);
  opacity: 0.8;
  transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .container {
    width: 50%;
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 60px 24px 80px;
    gap: 48px;
  }

  .gallery-title {
    font-size: 1.6rem;
  }

  .container {
    width: 80%;
    height: 280px;
  }

  .container img {
    width: 65vw;
    height: 22vh;
  }

  .gallery-more-btn {
    padding: 14px 32px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .gallery-title {
    font-size: 1.4rem;
  }

  .container {
    width: 90%;
  }

  .container img {
    width: 75vw;
  }
}
