.gallery_container {
  width: 100%;
  max-width: 1450px;
  margin: 0 auto;
  padding: 0 24px;
}

@keyframes gallery_float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
@keyframes gallery_pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(216, 31, 37, 0.4);
  }
  50% {
    box-shadow: 0 0 0 18px rgba(216, 31, 37, 0);
  }
}
@keyframes gallery_shine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
@keyframes gallery_gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gallery_reveal {
  opacity: 1;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery_reveal.gallery_visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery_page_hero {
  background:
    linear-gradient(
      160deg,
      rgba(6, 6, 26, 0.94) 0%,
      rgba(6, 6, 26, 0.7) 50%,
      rgba(6, 6, 26, 0.94) 100%
    ),
    url("./img/gallery23.jpg") center/cover;
  padding: 110px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gallery_page_hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(
      circle at 30% 50%,
      rgba(216, 31, 37, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 50%,
      rgba(201, 168, 76, 0.04) 0%,
      transparent 50%
    );
  animation: gallery_gradientShift 8s ease infinite;
}
.gallery_page_hero_content {
  position: relative;
  z-index: 1;
}
.gallery_page_hero_badge {
  display: inline-block;
  background: var(--pri);
  color: #fff;
  padding: 10px 26px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
  animation: gallery_pulse 2.5s infinite;
}
.gallery_page_hero h1 {
  font-size: clamp(2.6rem, 4.8vw, 4rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 18px;
  line-height: 1.2;
}
.gallery_page_hero h1 span {
  background: linear-gradient(135deg, var(--gold-light), #ffeaa7, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gallery_shine 4s infinite;
}
.gallery_page_hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 650px;
  margin: 0 auto;
}

.gallery_sec {
  padding: 40px 0;
  position: relative;
  overflow: hidden;
  background: var(--gray);
}
.gallery_sec::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(216, 31, 37, 0.025) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(201, 168, 76, 0.025) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.gallery_tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}
.gallery_tab {
  padding: 11px 26px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--tr-spring);
  background: #fff;
  color: var(--text);
  border: 2px solid rgba(0, 0, 0, 0.06);
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.gallery_tab:hover {
  background: var(--pri-soft);
  color: var(--pri);
  border-color: rgba(216, 31, 37, 0.2);
  transform: translateY(-2px);
}
.gallery_tab.active {
  background: var(--pri);
  color: #fff;
  border-color: var(--pri);
  box-shadow: 0 8px 28px rgba(216, 31, 37, 0.3);
}

/* FIXED GRID - Equal size cards, no spanning */
.gallery_main_grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
  z-index: 1;
}
.gallery_card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  opacity: 1;
  transform: scale(1);
}
.gallery_card:hover {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15);
  transform: translateY(-8px) !important;
  z-index: 2;
}
.gallery_card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.gallery_card:hover img {
  transform: scale(1.12);
}
.gallery_card_overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(216, 31, 37, 0) 0%,
    rgba(216, 31, 37, 0.8) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: all 0.45s ease;
  z-index: 2;
  pointer-events: none;
  gap: 10px;
}
.gallery_card:hover .gallery_card_overlay {
  opacity: 1;
}
.gallery_card_overlay i {
  color: #fff;
  font-size: 2rem;
  transition: transform 0.45s ease;
}
.gallery_card:hover .gallery_card_overlay i {
  transform: scale(1.25);
}
.gallery_card_overlay span {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Animations */
.gallery_card:nth-child(odd) {
  animation: gallery_float 5s ease-in-out infinite;
}
.gallery_card:nth-child(even) {
  animation: gallery_float 5.5s ease-in-out infinite;
  animation-delay: 0.3s;
}
.gallery_card:hover {
  animation: none;
}

/* Footer Buttons */
.gallery_footer_btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
  transition: var(--tr-spring);
  letter-spacing: 0.02em;
}
.gallery_footer_btn_pri {
  background: var(--pri);
  color: #fff;
}
.gallery_footer_btn_pri:hover {
  background: var(--pri-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(216, 31, 37, 0.35);
}
.gallery_footer_btn_out {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.gallery_footer_btn_out:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  .gallery_main_grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 767px) {
  .gallery_container {
    padding: 0 12px;
  }
  .gallery_sec {
    padding: 56px 0;
  }
  .gallery_page_hero {
    padding: 70px 0 56px;
  }
  .gallery_main_grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .gallery_tab {
    padding: 8px 16px;
    font-size: 0.76rem;
  }
}
