/* =============================================
   GALLERY PAGE STYLES
   ============================================= */

.gallery-container {
  max-width: 1440px;
  margin: calc(var(--nav-h) + 40px) auto 80px;
  padding: 0 40px;
}

.gallery-title-main {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: #111;
  margin-bottom: 60px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 12px;
}

/* --- Masonry Grid --- */
.gallery-grid {
  column-count: 3;
  column-gap: 24px;
}

@media (max-width: 1100px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    column-count: 1;
  }
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 24px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 30px rgba(46, 158, 71, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* --- Hero Carousel --- */
.gallery-hero {
    max-width: 1440px;
    margin: 0 auto 60px;
    position: relative;
    padding: 0 40px;
}

.carousel-container {
    width: 100%;
    aspect-ratio: 21 / 9;
    background: #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 8px 20px rgba(46, 158, 71, 0.2);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background: white;
    width: 24px;
    border-radius: 10px;
}

/* --- Filter Tags --- */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 10px 30px;
    background: white;
    border: 1.5px solid #cbd5e1;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tag:hover {
    border-color: #2e9e47;
    color: #2e9e47;
}

.filter-tag.active {
    background: #1a6b2a;
    border-color: #1a6b2a;
    color: white;
    box-shadow: 0 4px 12px rgba(46, 158, 71, 0.3);
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 4px;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
}

/* Animation classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.hide {
    display: none !important;
}
