:root {
  --gallery-overlay: rgba(15, 17, 23, 0.7);
}

body {
  background: var(--brand-surface);
}

.gallery-hero {
  position: relative;
  min-height: calc(85vh - 80px);
  display: flex;
  align-items: center;
  background-image: url('https://images.unsplash.com/photo-1488646953014-85cb44e25828?w=1600&q=80');
  background-size: cover;
  background-position: center;
  padding-top: 100px;
  padding-bottom: 100px;
}

.gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 15, 24, 0.8), rgba(12, 15, 24, 0.3));
  pointer-events: none;
}

.gallery-hero .container-xl {
  position: relative;
  z-index: 2;
}

.gallery-hero .hero-copy {
  max-width: 720px;
}

.gallery-hero .hero-title {
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  line-height: 1.02;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: #fff;
}

.gallery-hero .hero-title em {
  color: var(--brand-primary);
  font-style: italic;
}

.gallery-hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 92%;
}

.gallery-filter {
  background: #fff;
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-tabs .f-tab {
  min-width: 100px;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid rgba(15, 17, 23, 0.1);
  border-radius: 50px;
  background: transparent;
  color: var(--brand-text);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-tabs .f-tab:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.gallery-tabs .f-tab.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.gallery-grid {
  background: #fff;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  grid-auto-rows: 300px;
}

@media (min-width: 768px) {
  .gallery-masonry {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-auto-rows: 350px;
  }
}

@media (min-width: 1024px) {
  .gallery-masonry {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 320px;
  }
}

.gallery-item-wrap {
  overflow: hidden;
}

.gallery-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 17, 23, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 70px rgba(15, 17, 23, 0.2);
}

.gallery-img {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: var(--gallery-overlay);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: #fff;
}

.gallery-location {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.gallery-location i {
  color: var(--brand-primary);
  margin-right: 0.5rem;
}

.gallery-item-wrap.d-none {
  display: none !important;
}

/* Footer Integration */
.site-footer {
  background: #0f1117;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 4rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.site-footer a:hover {
  color: #f2b57d;
}

.f-logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.f-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.75);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.soc-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  transition: all 0.3s ease;
}

.soc-link:hover {
  background: var(--brand-primary);
  transform: translateY(-3px);
}

.f-heading {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  color: #fff;
}

.f-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.f-links li {
  margin-bottom: 0.75rem;
}

.f-links a {
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.f-links a:hover {
  color: var(--brand-primary);
}

.f-copyright {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .gallery-hero {
    min-height: calc(70vh - 80px);
    padding-top: 80px;
    padding-bottom: 60px;
  }

  .gallery-hero .hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
  }

  .gallery-hero .hero-subtitle {
    font-size: 0.95rem;
  }

  .gallery-tabs {
    gap: 0.75rem;
  }

  .gallery-tabs .f-tab {
    min-width: 90px;
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }

  .gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .gallery-title {
    font-size: 1.2rem;
  }

  .gallery-location {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .gallery-masonry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-title {
    font-size: 1.1rem;
  }

  .f-heading {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .f-links a {
    font-size: 0.9rem;
  }
}
