/* ========== Gallery Page Styles ========== */

/* --- Gallery Section --- */
.gallery-section {
  padding: var(--section-padding) 0;
}

.gallery-header {
  text-align: center;
  margin-bottom: 48px;
}

.gallery-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--gray-900);
  margin: 12px 0 16px;
}

.gallery-header p {
  color: var(--gray-500);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* --- Gallery Filters --- */
.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.gallery-filter-btn {
  padding: 10px 24px;
  min-height: 44px;
  border-radius: 100px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-filter-btn:hover {
  border-color: var(--primary-300);
  color: var(--primary-600);
  background: var(--primary-50);
}

.gallery-filter-btn.active {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

/* --- Gallery Item --- */
.gallery-item {
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(147, 51, 234, 0.1);
}

.gallery-item.hidden {
  display: none;
}

/* --- Comparison Slider --- */
.comparison-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}

.comparison-before,
.comparison-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.comparison-before {
  z-index: 1;
  clip-path: inset(0 50% 0 0);
}

.comparison-after {
  z-index: 0;
}

/* Placeholder styles for before/after images */
.comparison-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.comparison-placeholder.before {
  background: linear-gradient(135deg, #2d1b4e 0%, #1a0a2e 50%, #0d0618 100%);
}

.comparison-placeholder.after {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 50%, var(--primary-400) 100%);
}

.comparison-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
  color: white;
}

.comparison-placeholder span {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.4);
}

/* Before/After Labels */
.comparison-label {
  position: absolute;
  bottom: 16px;
  padding: 6px 16px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: white;
  z-index: 3;
  pointer-events: none;
}

.comparison-before .comparison-label {
  left: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.comparison-after .comparison-label {
  right: 16px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
}

/* Slider Handle */
.comparison-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.comparison-handle-line {
  flex: 1;
  width: 3px;
  background: white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.comparison-handle-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), 0 0 20px rgba(147, 51, 234, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  pointer-events: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comparison-handle-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 30px rgba(147, 51, 234, 0.3);
}

.comparison-handle-circle svg {
  width: 14px;
  height: 14px;
  color: var(--primary-600);
}

/* --- Gallery Item Info --- */
.gallery-item-info {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gallery-item-info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.gallery-tag {
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-size: 0.78rem;
  font-weight: 600;
}

/* --- Gallery Stats --- */
.gallery-stats {
  padding: 80px 0;
  background: linear-gradient(135deg, #1a0a2e 0%, #16082a 50%, #0d0618 100%);
  position: relative;
  overflow: hidden;
}

.gallery-stats::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.gallery-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

.gallery-stat {
  text-align: center;
}

.gallery-stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-300), var(--primary-200));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline;
}

.gallery-stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-300), var(--primary-200));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gallery-stat p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* --- Gallery Marquee --- */
.gallery-marquee {
  padding: 24px 0;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-500));
  overflow: hidden;
  white-space: nowrap;
}

.gallery-marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: galleryMarquee 20s linear infinite;
}

.gallery-marquee-track span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  letter-spacing: 1px;
  flex-shrink: 0;
}

@keyframes galleryMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Gallery CTA --- */
.gallery-cta {
  padding: var(--section-padding) 0;
}

.gallery-cta-content {
  text-align: center;
  background: linear-gradient(135deg, var(--primary-50), white);
  border: 1px solid var(--primary-100);
  border-radius: 24px;
  padding: 64px 40px;
  position: relative;
  overflow: hidden;
}

.gallery-cta-content::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.gallery-cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  position: relative;
}

.gallery-cta-content p {
  color: var(--gray-500);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 32px;
  position: relative;
}

.gallery-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}

.gallery-cta-buttons .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-600);
  border-color: var(--primary-200);
  background: white;
}

.gallery-cta-buttons .btn-outline:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
  color: var(--primary-700);
}

.gallery-cta-buttons .btn-outline svg {
  width: 18px;
  height: 18px;
  fill: var(--primary-600);
}

/* --- Responsive: Tablet --- */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .gallery-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
  .gallery-section {
    padding: 60px 0;
  }

  .gallery-header {
    margin-bottom: 32px;
  }

  .gallery-header h2 {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  .gallery-header p {
    font-size: 0.92rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery-filters {
    gap: 8px;
    margin-bottom: 28px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .gallery-filter-btn {
    padding: 8px 18px;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .gallery-stats {
    padding: 48px 0;
  }

  .gallery-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .gallery-stat-number {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .gallery-stat p {
    font-size: 0.8rem;
  }

  .gallery-cta-content {
    padding: 40px 24px;
  }

  .gallery-cta-content h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }

  .gallery-cta-content p {
    font-size: 0.92rem;
  }

  .comparison-handle-circle {
    width: 40px;
    height: 40px;
  }

  .comparison-handle-circle svg {
    width: 12px;
    height: 12px;
  }

  .gallery-item {
    border-radius: 16px;
  }

  .gallery-marquee-track span {
    font-size: 1rem;
  }
}

/* --- Responsive: Small Mobile --- */
@media (max-width: 480px) {
  .gallery-section {
    padding: 40px 0;
  }

  .gallery-item-info {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .gallery-item-info h3 {
    font-size: 0.95rem;
  }

  .gallery-tag {
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  .gallery-stats {
    padding: 36px 0;
  }

  .gallery-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .gallery-marquee {
    padding: 16px 0;
  }

  .gallery-marquee-track {
    gap: 32px;
  }

  .gallery-marquee-track span {
    font-size: 0.88rem;
  }

  .gallery-cta {
    padding: 40px 0;
  }

  .gallery-cta-content {
    padding: 32px 20px;
    border-radius: 16px;
  }

  .gallery-cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .gallery-cta-buttons .btn-primary,
  .gallery-cta-buttons .btn-outline {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  .comparison-handle-circle {
    width: 36px;
    height: 36px;
  }

  .comparison-handle-circle svg {
    width: 10px;
    height: 10px;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .gallery-marquee-track {
    animation: none;
  }
}

/* --- Real Before/After Images --- */
.comparison-before img,
.comparison-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Work in Progress Section --- */
.wip-section {
  padding: var(--section-padding) 0;
  background: linear-gradient(180deg, #faf5ff 0%, white 100%);
}

.wip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.wip-item {
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.wip-item::after {
  content: 'In Progress';
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: white;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wip-item:hover::after {
  opacity: 1;
}

.wip-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(147, 51, 234, 0.12);
}

.wip-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
  cursor: pointer;
}

.wip-item:hover img {
  transform: scale(1.05);
}

/* --- WIP Responsive: Tablet --- */
@media (max-width: 1024px) {
  .wip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* --- WIP Responsive: Mobile --- */
@media (max-width: 768px) {
  .wip-section {
    padding: 60px 0;
  }

  .wip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .wip-item {
    border-radius: 12px;
  }
}

/* --- WIP Responsive: Small Mobile --- */
@media (max-width: 480px) {
  .wip-section {
    padding: 40px 0;
  }

  .wip-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wip-item {
    border-radius: 10px;
  }

  .wip-item::after {
    font-size: 0.6rem;
    padding: 3px 8px;
    top: 8px;
    left: 8px;
  }
}

/* --- Lightbox --- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 24px;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  transition: opacity 0.2s ease;
  z-index: 10001;
}

.lightbox-close:hover {
  opacity: 0.7;
}