:root {
  --navy: #0a1f44;
  --gold: #c5a572;
  --dark-gold: #a68759;
  --light-gray: #f8f9fa;
  --mid-gray: #e9ecef;
  --text-dark: #1a1a1a;
  --text-light: #6c757d;
  --white: #ffffff;
}

.container {
  max-width: 1200px;
  padding: 0px 10px;
  width: 100%;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
}

.gallery-item:nth-child(1) {
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.gallery-item:nth-child(2) {
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.gallery-item:nth-child(3) {
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.image-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.gallery-item:hover .image-wrapper::before {
  opacity: 1;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: grayscale(20%) contrast(1.1);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--dark-gold) 0%, transparent 100%);
  padding: 40px 30px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
  opacity: 1;
}

.overlay h3 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.overlay p {
  color: #aaa;
  font-size: 0.875rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.number {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--navy);
  font-size: 4rem;
  font-weight: 100;
  line-height: 1;
  z-index: 2;
  transition: color 0.3s ease;
}

.gallery-item:hover .number {
  color: var(--dark-gold);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Mobile in-viewport effects */
@media (max-width: 768px) {
  .gallery-item:has(img.in-viewport) .image-wrapper::before {
    opacity: 1;
  }

  .image-wrapper img.in-viewport {
    transform: scale(1.08);
  }

  .gallery-item:has(img.in-viewport) .overlay {
    transform: translateY(0);
    opacity: 1;
  }

  .gallery-item:has(img.in-viewport) .number {
    color: var(--dark-gold);
  }
  .gallery-item .number {
  color: var(--dark-gold);
}


.gallery-item:nth-child(1) {
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.gallery-item:nth-child(2) {
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.gallery-item:nth-child(3) {
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}


.gallery-item .image-wrapper::before {
  opacity: 1;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: grayscale(20%) contrast(1.1);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.gallery-item img {
  transform: scale(1.08);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--dark-gold) 0%, transparent 100%);
  padding: 40px 30px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.gallery-item .overlay {
  transform: translateY(0);
  opacity: 1;
}

.overlay h3 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.overlay p {
  color: #aaa;
  font-size: 0.875rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}


}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.close-modal:hover {
  transform: rotate(90deg);
}
