@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --bg-color: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --accent-color: #2563eb;
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  margin: 0;
  padding: 40px 20px;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1100px;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

h1 + p { /* Optional subtitle styling if added later */
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

/* Back Link */
.back {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin-bottom: 24px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  background: #fff;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.back:hover {
  color: var(--accent-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Gallery Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding-bottom: 40px;
}

/* Sub-page galleries can be slightly tighter if needed, or use the same */
.gallery-tight {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.caption {
  padding: 16px;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.subcaption {
  display: block;
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(5px);
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.active img {
  transform: scale(1);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  body {
    padding: 20px 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .gallery {
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
  }
}

