.gallery-intro,
.gallery-description {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.7;
  margin: -8px 0 28px;
}

.gallery-album-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-album-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.gallery-album-thumb {
  position: relative;
  aspect-ratio: 4/3;
  background: #e8eef4;
  overflow: hidden;
}

.gallery-album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-album-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 12px;
  color: var(--light);
}

.gallery-album-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

.gallery-album-body {
  padding: 14px 16px 16px;
  display: block;
}

.gallery-album-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--wing);
  background: var(--brand-muted);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.gallery-album-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 4px;
}

.gallery-album-meta,
.gallery-album-date {
  display: block;
  font-size: 11px;
  color: var(--light);
}

.gallery-photo-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.gallery-photo-item {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
}

.gallery-photo-item a {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.gallery-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.gallery-photo-item a:hover img {
  transform: scale(1.03);
}

.gallery-photo-item figcaption {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--mid);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .gallery-album-grid,
  .gallery-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .gallery-album-grid,
  .gallery-photo-grid {
    grid-template-columns: 1fr;
  }
}
