/* ==========================================================
   12. GALLERY & LIGHTBOX STYLES
   ========================================================== */

/* --- Filter Buttons --- */
.filter-container {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: var(--sp-12);
}
.filter-btn {
  padding: 10px 24px; border-radius: var(--rad-pill); background: var(--clr-surface);
  border: 1px solid var(--clr-border); color: var(--clr-text-muted); font-weight: 700;
  cursor: pointer; transition: var(--trans-fast); font-size: 0.95rem; box-shadow: var(--shadow-sm);
}
.filter-btn:hover { border-color: var(--clr-primary-300); color: var(--clr-primary-700); }
.filter-btn.active {
  background: var(--clr-primary-500); color: white; border-color: var(--clr-primary-500);
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 25px;
}
.gallery-item {
  position: relative; border-radius: var(--rad-md); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}
.gallery-item.hide { display: none; }
.gallery-item:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-radius: var(--rad-lg); }

.gallery-img { width: 100%; height: 280px; object-fit: cover; transition: transform 0.6s ease; }
.gallery-item:hover .gallery-img { transform: scale(1.1); }

/* Hover Overlay (لایه تیره روی عکس با انیمیشن) */
.gallery-overlay {
  position: absolute; inset: 0; background: rgba(12, 74, 110, 0.85); backdrop-filter: blur(2px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.4s ease; color: white; padding: 20px; text-align: center;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay svg { width: 45px; height: 45px; margin-bottom: 15px; transform: translateY(20px); transition: transform 0.4s ease; color: var(--clr-primary-300); }
.gallery-item:hover .gallery-overlay svg { transform: translateY(0); }
.gallery-overlay h3 { font-size: 1.2rem; margin-bottom: 5px; transform: translateY(20px); transition: transform 0.4s ease 0.1s; }
.gallery-item:hover .gallery-overlay h3 { transform: translateY(0); }
.gallery-overlay p { font-size: 0.9rem; opacity: 0.8; transform: translateY(20px); transition: transform 0.4s ease 0.2s; }
.gallery-item:hover .gallery-overlay p { transform: translateY(0); }

/* --- Lightbox (نمایشگر تمام‌صفحه عکس) --- */
.lightbox {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 2000; display: flex; align-items: center; justify-content: center; flex-direction: column;
  opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-close {
  position: absolute; top: 25px; right: 35px; color: white; font-size: 3rem; line-height: 1;
  cursor: pointer; transition: color 0.3s ease; background: none; border: none; font-weight: 300;
}
.lightbox-close:hover { color: var(--clr-primary-500); transform: scale(1.1); }
.lightbox-content {
  position: relative; max-width: 90%; max-height: 80vh; transform: scale(0.95); transition: transform 0.4s ease;
}
.lightbox.active .lightbox-content { transform: scale(1); }
.lightbox-img {
  max-width: 100%; max-height: 80vh; border-radius: var(--rad-md); box-shadow: 0 25px 50px rgba(0,0,0,0.5); border: 4px solid white;
}
.lightbox-caption { text-align: center; color: white; font-size: 1.2rem; margin-top: 20px; font-weight: 700; }