.gallery-banner {
  width: 100%;
  height: 50vh;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.gallery-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--gallery-banner-url);
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.gallery-banner-content {
  position: absolute;
  top: 65%;
  left: 50%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
  color: white;
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.gallery-banner-content h2 {
  font-weight: bold;
  margin: 0 0 0.5rem 0;
  word-wrap: break-word;
  hyphens: auto;
  flex-shrink: 1;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 1);
  color: var(--white);
}

.gallery-banner-content h3 {
  margin: 0 0 1rem 0;
  word-wrap: break-word;
  flex-shrink: 1;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 1);
  color: var(--white);
}

.typing-text::after {
  content: "|";
  animation: blink-caret 0.7s step-end infinite;
}

@keyframes blink-caret {
  from,
  to {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.typing-text.typing-done::after {
  content: none;
}

/* Gallery cards */
.gallery-cards-container {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  width: 80%;
  margin: 0 auto;
  margin-top: 8vh;
  margin-bottom: 8vh;
  flex-wrap: wrap;
}

.gallery-card {
  flex: 1;
  text-align: center;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s, flex 0.3s;
  background: #f5f5f5;
  position: relative;
  flex: 1 1 calc(33.333% - 1rem);
  max-width: calc(33.333% - 1rem);

}

.gallery-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-content {
  padding: 1rem;
  bottom: 0;
  width: 100%;
  text-align: center;
  justify-content: center;
  align-items: center;
}

.gallery-title {
  margin-bottom: 0;
  color: var(--red);
}

.gallery-subtitle {
  margin-bottom: 0;
}

.fancybox__container {
  z-index: 99999 !important;
}

.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(232, 48, 48, 0.15);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s ease;
  font-size: 1.2rem;
  text-align: center;
  padding: 1rem;
}

.gallery-overlay i {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.gallery-card:hover .gallery-overlay {
    background: rgba(0, 0, 0, 0); 
}


/* Mobile Styles */
@media screen and (max-width: 1024px) {
  .gallery-banner-content {
    padding: 0.5rem;
  }

  .gallery-card {
    flex: 1 1 calc(50% - 1rem); 
    max-width: calc(50% - 1rem);
  }

  .gallery-overlay i {
    font-size: 1.5rem;
  }
  .gallery-overlay span {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  .gallery-card {
    flex: 1 1 100%; 
    max-width: 100%;
  }
}

@media (min-width: 1920px) {
 .gallery-cards-container {
    max-width: 1890px;
 }
 
}
