/* ========================================
   Gallery Page Styles - Bold Creative Design
   ======================================== */

.gallery-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
  padding: 150px 0 80px;
  position: relative;
  overflow: hidden;
}

.gallery-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 50%, rgba(157, 80, 187, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(78, 205, 196, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.gallery-hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.gallery-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 900;
  margin-bottom: 20px;
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gallery-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Filters Section */
.gallery-filters-section {
  padding: 60px 0 40px;
  background: var(--bg-dark);
  position: sticky;
  top: 80px;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 28px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-btn:hover {
  border-color: var(--orange-primary);
  color: var(--orange-primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gradient-orange);
  border-color: var(--orange-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
}

/* Gallery Grid */
.gallery-section {
  padding: var(--section-padding) 0;
  background: var(--bg-dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 40px;
}

.gallery-item {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.gallery-item.hidden {
  display: none;
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 107, 53, 0.4);
}

/* Featured card spans 2 columns on wide screens */
.gallery-item--featured {
  grid-column: span 2;
}

/* Coloured header band */
.gallery-item-header {
  position: relative;
  height: 200px;
  background: #111214;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.gallery-item--featured .gallery-item-header {
  height: 260px;
}

/* Real project image */
.gallery-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

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

/* Logo PNGs with transparent backgrounds — contain so the full logo is visible,
   no background on the img itself so transparency shows through cleanly */
.gallery-item:not(.gallery-item--featured) .gallery-item-img[src$=".png"] {
  object-fit: contain;
  padding: 28px;
}

.gallery-item-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.gallery-item-icon {
  font-size: 4.5rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
  transition: transform 0.4s ease;
  z-index: 1;
}

.gallery-item:hover .gallery-item-icon {
  transform: scale(1.15);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10,14,39,0.85) 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.gallery-item-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.gallery-featured-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--gradient-orange);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(255,107,53,0.4);
  z-index: 2;
}

.gallery-no-url-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--gradient-purple);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

/* Content area */
.gallery-item-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gallery-item-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.gallery-item-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}

.gallery-item-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.gallery-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gallery-visit-btn:hover {
  background: var(--orange-primary);
  border-color: var(--orange-primary);
  color: white;
  transform: translateY(-2px);
}

.gallery-visit-btn svg {
  flex-shrink: 0;
}

.gallery-item-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.93rem;
  margin-bottom: 18px;
}

.gallery-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-highlights li {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px 12px;
  border-radius: 6px;
}

.gallery-highlights li::before {
  content: '✓ ';
  color: var(--teal-primary);
}

.gallery-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gallery-item[data-category~="analysis"] .category {
  color: var(--yellow-primary);
}

.year {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Empty State */
.gallery-empty {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-muted);
}

.gallery-empty h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 900px) {
  .gallery-item--featured {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    padding: 120px 0 60px;
  }
  
  .gallery-filters-section {
    top: 70px;
    padding: 40px 0 30px;
  }
  
  .filters {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .gallery-item--featured {
    grid-column: span 1;
  }

  .gallery-item-header {
    height: 140px;
  }
  
  .gallery-item-content {
    padding: 20px;
  }

  .gallery-item-content h3 {
    font-size: 1.2rem;
  }
}
