/* Image Management Styles */

/* Base image styles */
.image-container {
  position: relative;
  overflow: hidden;
}

.image-container img {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Responsive image styles */
.responsive-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Lazy loading styles */
.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy.loaded {
  opacity: 1;
}

/* Loading placeholder */
.image-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Image gallery styles */
.image-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.image-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.image-gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.image-gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.image-gallery-item:hover .image-gallery-overlay {
  transform: translateY(0);
}

/* Profile image styles */
.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #e5e7eb;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-image-large {
  width: 300px;
  height: 300px;
}

/* Research image styles */
.research-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.research-image-caption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
  font-style: italic;
}

/* Publication image styles */
.publication-cover {
  width: 100px;
  height: 140px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.publication-cover-large {
  width: 200px;
  height: 280px;
}

/* Achievement image styles */
.achievement-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Icon styles */
.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.icon-small {
  width: 16px;
  height: 16px;
}

.icon-large {
  width: 32px;
  height: 32px;
}

/* Thumbnail styles */
.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.thumbnail:hover {
  transform: scale(1.05);
}

/* Responsive breakpoints */
@media (max-width: 640px) {
  .image-gallery {
    grid-template-columns: 1fr;
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  .profile-image-large {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Print styles */
@media print {
  .image-gallery-overlay {
    display: none;
  }

  .lazy {
    opacity: 1 !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .image-placeholder {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    color: #d1d5db;
  }

  .profile-image {
    border-color: #374151;
  }

  .research-image-caption {
    color: #9ca3af;
  }
}