/* ==========================================
   MAIN
========================================== */

.gallery-main {
  background: var(--white);
  color: var(--text3);
  overflow: hidden;
}

/* ==========================================
   HERO
========================================== */

.gallery-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  overflow: hidden;
}

.gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 15% 50%,
      rgba(255, 202, 129, 0.15),
      transparent 30%
    ),
    radial-gradient(
      circle at 85% 20%,
      rgba(255, 202, 129, 0.12),
      transparent 30%
    );
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12));
}

.gallery-hero-content {
  position: relative;
  z-index: 2;
  padding: 100px 20px 50px 20px;
}

.gallery-small-title {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--secondary);
  margin-bottom: 6px;
}

.gallery-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -1px;
  color: var(--white);
}

.gallery-hero h1 span {
  color: var(--secondary);
}

.gallery-title-line {
  width: 70px;
  height: 3px;
  background: var(--secondary);
  margin: 18px auto;
}

.gallery-hero p {
  max-width: 650px;
  margin: auto;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.4;
}

/* ==========================================
   FILTER
========================================== */

.gallery-filter-section {
  background: var(--white);
  padding: 25px 0;
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--border3);
}

.gallery-filter-wrapper {
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  padding: 3px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--secondary) var(--light-bg);
}

.gallery-filter-wrapper::-webkit-scrollbar {
  height: 5px;
}

.gallery-filter-wrapper::-webkit-scrollbar-track {
  background: var(--light-bg);
}

.gallery-filter-wrapper::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 50px;
}

.gallery-filter-btn {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text3);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.gallery-filter-btn i {
  font-size: 16px;
}

.gallery-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.gallery-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(113, 25, 40, 0.18);
}

/* ==========================================
   GALLERY CONTENT
========================================== */

.gallery-content-section {
  padding: 45px 0 60px;
  background: linear-gradient(180deg, var(--light-bg), var(--white));
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  transition: var(--transition);
}

/* ==========================================
   GALLERY ITEM
========================================== */

.gallery-item {
  min-width: 0;
  animation: galleryFade 0.45s ease both;
}

@keyframes galleryFade {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gallery-item.hidden {
  display: none !important;
}

/* ==========================================
   CARD
========================================== */

.gallery-card {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--border3);
  box-shadow: 0 8px 25px rgba(113, 25, 40, 0.06);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(113, 25, 40, 0.16);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card:hover img {
  transform: scale(1.08);
}

/* ==========================================
   IMAGE OVERLAY
========================================== */

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 55%);
  opacity: 0;
  transition: var(--transition);
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-card-overlay span {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 6px;
  background: rgba(113, 25, 40, 0.9);
}

.gallery-view-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: var(--transition);
  cursor: pointer;
}

.gallery-view-btn:hover {
  background: var(--white);
  transform: rotate(10deg) scale(1.08);
}

/* ==========================================
   NO RESULT
========================================== */

.gallery-no-result {
  display: none;
  text-align: center;
  padding: 70px 20px;
}

.gallery-no-result.show {
  display: block;
}

.gallery-no-result i {
  font-size: 50px;
  color: var(--secondary);
}

.gallery-no-result h4 {
  margin-top: 15px;
  color: var(--primary);
  font-weight: 700;
}

.gallery-no-result p {
  color: var(--muted);
  margin-bottom: 0;
}

/* ==========================================
   CTA
========================================== */

.gallery-cta-section {
  padding: 0 0 70px;

  background: var(--white);
}

.gallery-cta {
  background: linear-gradient(120deg, var(--light-bg), var(--secondary-light));

  border: 1px solid var(--border3);

  border-radius: 18px;

  padding: 35px 40px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 30px;
}

.gallery-cta span {
  font-size: 11px;

  font-weight: 800;

  letter-spacing: 1.5px;

  color: var(--primary);
}

.gallery-cta h2 {
  margin: 7px 0;

  font-size: 28px;

  font-weight: 800;

  color: var(--primary);
}

.gallery-cta p {
  margin: 0;

  color: var(--text2);

  font-size: 14px;
}

.gallery-cta-buttons {
  display: flex;

  gap: 12px;

  flex-wrap: wrap;
}

.gallery-primary-btn,
.gallery-outline-btn {
  text-decoration: none;

  padding: 13px 20px;

  border-radius: 8px;

  font-size: 13px;

  font-weight: 700;

  display: inline-flex;

  align-items: center;

  gap: 9px;

  transition: var(--transition);

  white-space: nowrap;
}

.gallery-primary-btn {
  background: var(--primary);

  color: var(--white);

  border: 1px solid var(--primary);
}

.gallery-primary-btn:hover {
  background: var(--primary-dark);

  color: var(--white);

  transform: translateY(-2px);
}

.gallery-outline-btn {
  background: var(--white);

  color: var(--primary);

  border: 1px solid var(--primary);
}

.gallery-outline-btn:hover {
  background: var(--primary);

  color: var(--white);

  transform: translateY(-2px);
}

/* ==========================================
   MODAL / LIGHTBOX
========================================== */

.gallery-modal .modal-dialog {
  max-width: 1100px;
}

.gallery-modal .modal-content {
  background: #080808;

  border: none;

  border-radius: 15px;

  overflow: hidden;
}

.gallery-modal .modal-body {
  padding: 0;

  position: relative;
}

.gallery-modal img {
  width: 100%;

  max-height: 82vh;

  object-fit: contain;

  display: block;

  margin: auto;
}

.gallery-modal-close {
  position: absolute;

  z-index: 10;

  right: 15px;
  top: 15px;

  width: 42px;
  height: 42px;

  border: none;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.92);

  color: var(--primary);

  display: flex;

  align-items: center;
  justify-content: center;

  cursor: pointer;

  transition: var(--transition);
}

.gallery-modal-close:hover {
  background: var(--secondary);

  transform: rotate(90deg);
}

.gallery-modal-caption {
  position: absolute;

  bottom: 0;
  left: 0;
  right: 0;

  padding: 18px 20px;

  color: var(--white);

  font-size: 15px;

  font-weight: 700;

  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 1199px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .gallery-hero {
    min-height: 270px;
  }

  .gallery-hero-content {
    padding: 60px 20px;
  }
  .gallery-filter-wrapper {
    width: 100%;
    /* overflow: visible; */
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-cta {
    flex-direction: column;

    align-items: flex-start;
  }
}

@media (max-width: 575px) {
  .gallery-hero {
    min-height: 240px;
  }

  .gallery-hero-content {
    padding: 50px 15px;
  }

  .gallery-hero h1 {
    font-size: 40px;
  }

  .gallery-hero p {
    font-size: 13px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;

    gap: 12px;
  }

  .gallery-card {
    height: 240px;
  }

  .gallery-cta {
    padding: 25px 20px;
  }

  .gallery-cta h2 {
    font-size: 23px;
  }

  .gallery-cta-buttons {
    width: 100%;

    flex-direction: column;
  }

  .gallery-primary-btn,
  .gallery-outline-btn {
    width: 100%;

    justify-content: center;
  }
}
