.gallery-hero {
  background-color: #FFF1D4;
  padding: 4rem 0 1rem 0;
  text-align: center;
  position: relative;
  overflow: visible;
}

.gallery-hero-content {
  margin: 0 auto;
  position: relative;
  background-image: url('../src/images/hero-bg.svg');
  background-repeat: repeat;
  border-top: 2px dashed #4D2900;
  border-bottom: 2px dashed #4D2900;
  padding: 2rem 0;
  margin-top: 4rem;
}

.gallery-title {
  font-family: 'Alumni Sans', sans-serif;
  font-size: clamp(3rem, 15vw, 12rem);
  width: 90%;
  font-weight: 800;
  color: #1f1a17;
  text-transform: uppercase;
  letter-spacing: normal;
  line-height: 0.8;
  margin: 0 auto;
  position: relative;
}

.gallery-section {
  padding: 0;
  margin: 0;
  background-color: #faf7f2;
}

.gallery-container {
  margin: 0;
  padding: 0;
  max-width: 100%;
  width: 100%;
}

.gallery-top-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-color: #faf7f2;
  gap: 0;
  padding: 0;
}

.gallery-top-item {
  height: 50vh;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
}

.gallery-top-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.gallery-top-item:hover img {
  transform: scale(1.05);
}

/* Stacking Container - Controlled by JS for Desktop & Tablet */
.gallery-stacking-container {
  position: relative;
  width: 100%;
  overflow: visible;
}

.gallery-stacking-section {
  width: 100% !important;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.gallery-main-item {
  width: 100%;
  height: 100vh;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.gallery-main-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-split-row {
  display: grid;
  background-color: #faf7f2;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  width: 100%;
  height: 100vh;
}

.gallery-split-item {
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.gallery-split-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* RESPONSIVE OVERRIDES */
@media (max-width: 1024px) {
  .gallery-hero-content {
    margin-top: 3rem;
  }
}

/* Mobile Devices (Continuous Scroll) */
@media (max-width: 767px) {
  .gallery-stacking-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0;
  }

  .gallery-stacking-section {
    height: auto !important;
    position: relative;
    overflow: visible;
    padding: 0;
  }

  .gallery-main-item {
    height: 50vh;
    min-height: 250px;
    border-radius: 0;
  }

  .gallery-top-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0;
  }

  .gallery-top-item:last-child {
    grid-column: span 2;
    height: 250px;
  }

  .gallery-split-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: auto;
    gap: 0;
  }

  .gallery-split-item {
    height: 35vh;
    min-height: 200px;
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .gallery-hero-content {
    margin-top: 2rem;
    padding: 1.5rem 0;
  }

  .gallery-top-row {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .gallery-top-item:last-child {
    grid-column: span 1;
    height: 200px;
  }
}