/* Infographics Gallery Styles */

/* Gallery Grid Layout */
.infographics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

/* Gallery Item Card */
.infographic-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
}

.infographic-card:hover {
  background: rgba(17, 24, 39, 0.8);
  border-color: rgba(251, 146, 60, 0.4);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(251, 146, 60, 0.1);
  transform: translateY(-8px) scale(1.02);
}

.infographic-card:focus {
  outline: 2px solid #fb923c;
  outline-offset: 2px;
}

/* Thumbnail Container */
.infographic-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.infographic-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.infographic-card:hover .infographic-thumbnail img {
  transform: scale(1.1);
}

/* Card Info */
.infographic-info {
  padding: 1rem;
}

.infographic-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.infographic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.infographic-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.infographic-card:hover .infographic-tag {
  border-color: rgba(251, 146, 60, 0.3);
  color: #e2e8f0;
}

/* Filter Tags Section */
.filter-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #9ca3af;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.filter-tag.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Full Page Lightbox View */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  display: flex;
  flex-direction: column;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Lightbox Header */
.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.lightbox-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: transparent;
  transform: rotate(90deg);
}

/* Lightbox Content Area */
.lightbox-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.lightbox-image-container {
  max-width: 90%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-image {
  transform: scale(1);
}

/* Lightbox Navigation */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fb923c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(251, 146, 60, 0.2);
  border-color: rgba(251, 146, 60, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
  left: 1.5rem;
}

.lightbox-nav.next {
  right: 1.5rem;
}

/* Lightbox Footer */
.lightbox-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.lightbox-counter {
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

/* Keyboard hint */
.keyboard-hint {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.75rem;
}

.keyboard-hint span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.keyboard-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.125rem 0.375rem;
  font-family: inherit;
  font-size: 0.7rem;
}

/* Loading State */
.infographic-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.infographic-loading .spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #fb923c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
.infographic-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.infographic-empty-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  opacity: 0.5;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .infographics-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .lightbox-nav {
    width: 2.5rem;
    height: 2.5rem;
  }

  .lightbox-nav.prev {
    left: 0.5rem;
  }

  .lightbox-nav.next {
    right: 0.5rem;
  }

  .lightbox-content {
    padding: 1rem;
  }

  .lightbox-image {
    max-height: calc(100vh - 200px);
  }

  .keyboard-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .infographics-grid {
    grid-template-columns: 1fr;
  }

  .filter-tags-container {
    padding: 0.75rem;
  }

  .filter-tag {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}
