/* Gallery page — supplements ../styles.css */

.page-gallery {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.gallery-page {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Controls */
.gallery-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

#gallery-search {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
  box-sizing: border-box;
}

#gallery-search::placeholder { color: rgba(255, 255, 255, 0.4); }

#gallery-search:focus {
  border-color: rgba(74, 163, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(74, 163, 255, 0.14);
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-count {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

/* Card */
.gallery-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-card:hover {
  border-color: rgba(74, 163, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.gallery-card-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.gallery-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-img-wrap img {
  transform: scale(1.05);
}

.gallery-card-category {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
}

.gallery-card-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gallery-card-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-card-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
}
