@import url('roots.css');
@import url('style.css');

body {
  overflow-x: hidden;
  background: var(--background-color, #000);
}

.gallery-section {
  width: 100vw;
  background: var(--background-color, #000);
  padding: .5rem 1rem;
  margin-top: 5rem;
  overflow: visible;
}

.gallery-title {
  font-size: var(--h2-font-size, 2.5rem);
  color: var(--primary-color, #fff);
  text-align: center;
  margin: 2rem 0 3rem 0;
  font-family: var(--heading-font, 'Montserrat', sans-serif);
  font-weight: var(--font-medium, 700);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.gallery-horizontal-wrapper {
  width: 100vw;
  overflow: visible;
  position: relative;
}

.gallery-grid {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  will-change: transform;
}

/* --- Gallery Image Sizing for Consistent Animation --- */
.gallery-img-wrapper {
  flex: 0 0 auto;
  width: 320px; /* consistent width for all images */
  height: 220px; /* consistent height for all images */
  margin-right: 24px; /* gap between images */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px; /* optional: rounded corners */
  background: #fff;    /* optional: clean background */
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); /* optional: subtle shadow */
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop to fill, or use 'contain' for letterboxing */
  display: block;
  transition: transform 0.3s;
}

.gallery-img:hover {
  transform: scale(1.04);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .gallery-img-wrapper {
    width: 90vw;
    height: 180px;
    margin-right: 12px;
  }
}

/* Responsive for phones only */
@media (max-width: 576px) {
  .gallery-grid {
    flex-direction: column;
    gap: 1rem;
  }
  .gallery-img-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    aspect-ratio: 4/3;
    min-height: unset;
    max-height: unset;
    height: auto;
    margin: 0 auto;
  }
  .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .gallery-title {
    font-size: 1.3rem;
  }
}
