/* ============================================================
   LIGHTBOX & PROJECT GALLERY — projects-gallery.css
   Sinerji Elektrik | Shared style for konutlar/oteller/dukkanlar
   ============================================================ */

/* ── Gallery Grid ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-primary-deep);
  box-shadow: 0 4px 20px rgba(14,42,91,0.14);
  border: 1px solid rgba(255,255,255,0.06);
  aspect-ratio: 4/3;
  transition: transform 0.35s cubic-bezier(0.23,1,0.32,1), box-shadow 0.35s;
}
.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 16px 48px rgba(14,42,91,0.25);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.35s;
}
.gallery-item:hover img,
.gallery-item:hover video {
  filter: brightness(0.75);
}

/* Hover overlay */
.gallery-item .item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9,20,60,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  gap: 0.5rem;
}
.gallery-item:hover .item-overlay {
  opacity: 1;
}
.gallery-item .item-overlay svg {
  color: #fff;
  width: 40px;
  height: 40px;
  opacity: 0.9;
}
.gallery-item .item-overlay span {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Video badge */
.gallery-item .video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(30,120,255,0.85);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.73rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Caption below item */
.gallery-item .item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(9,20,60,0.92) 0%, transparent 100%);
  padding: 1.4rem 1rem 0.9rem;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  transition: opacity 0.3s;
}
.gallery-item:hover .item-caption {
  opacity: 0;
}

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 10, 30, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-inner {
  position: relative;
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.lightbox-media {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 14px;
  display: block;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: lbIn 0.35s cubic-bezier(0.23,1,0.32,1);
}
@keyframes lbIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.lightbox-caption-text {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  text-align: center;
  max-width: 600px;
}
.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
  z-index: 10000;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.22);
}
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s, transform 0.2s;
  z-index: 10000;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.22);
}
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

.lightbox-counter {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ── Category Filter Tabs ── */
.filter-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.filter-tab {
  background: rgba(14,42,91,0.06);
  border: 1.5px solid var(--border-default);
  border-radius: 50px;
  padding: 0.45rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}
.filter-tab.active,
.filter-tab:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ── Breadcrumb category link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1rem;
}
.back-link:hover {
  text-decoration: underline;
}

/* Placeholder item */
.gallery-item.placeholder {
  background: linear-gradient(135deg, #0d2a5c 0%, #091840 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: rgba(255,255,255,0.25);
  font-size: 0.85rem;
  cursor: default;
  border: 2px dashed rgba(255,255,255,0.1);
}
.gallery-item.placeholder svg {
  opacity: 0.25;
}
.gallery-item.placeholder:hover {
  transform: none;
  box-shadow: 0 4px 20px rgba(14,42,91,0.14);
}
