/**
 * Mees Metsast - Combined Design System
 * Ported from original Kalmer photoblog
 */

:root {
  --mm-orange: #ea580c;
  --mm-orange-light: #fb923c;
  --mm-bg-dark: #000;
  --mm-border: rgba(255, 255, 255, 0.1);
}

/* Instagram-style Gallery Grid */
.instagram-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .instagram-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
}

@media (min-width: 1024px) {
  .instagram-grid { grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
}

@media (min-width: 1280px) {
  .instagram-grid { grid-template-columns: repeat(5, 1fr); gap: 1rem; }
}

.grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #111;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-item:hover {
  transform: scale(1.02);
  z-index: 10;
}

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

.grid-item:hover img {
  transform: scale(1.1);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.grid-title {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Slideshow Enhancements */
#photo-img {
  transition: opacity 0.6s ease-in-out;
  border: 1px solid var(--mm-border);
}

/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(90deg, #111 25%, #222 50%, #111 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #000;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* Photoswipe Customization */
.pswp__bg {
  background: #000 !important;
}
.pswp__caption {
  background: rgba(0,0,0,0.8) !important;
  backdrop-filter: blur(8px);
}
