/* Fotogalerie – rozšíření společného designu Veselsko.cz.
   Barvy, typografie, rozestupy a radiusy přebíráme z public.css/pages.css. */

.photo-gallery {
  min-width: 0;
}

.photo-gallery-header {
  margin-bottom: var(--space-5);
}

.photo-gallery-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 var(--space-4);
  color: var(--color-text-muted);
  font-size: 12px;
}

.photo-gallery-breadcrumbs a {
  color: var(--color-primary);
  font-weight: 700;
}

.photo-gallery-breadcrumb-separator {
  color: var(--color-text-light);
}

.photo-gallery-page-meta {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.photo-gallery-section {
  margin-top: var(--space-7);
}

.photo-gallery-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: var(--space-4);
}

.photo-gallery-section-count {
  color: var(--color-text-muted);
  font-size: 12px;
}

.photo-gallery-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--space-4);
}

.photo-gallery-album-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.photo-gallery-album-card:hover,
.photo-gallery-album-card:focus-within {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.photo-gallery-album-card__link {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.photo-gallery-album-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-bg-soft);
}

.photo-gallery-album-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.photo-gallery-album-card:hover .photo-gallery-album-card__media img {
  transform: scale(1.025);
}

.photo-gallery-album-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 700;
}

.photo-gallery-album-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  padding: 13px 14px 14px;
}

.photo-gallery-album-card__body h3 {
  margin: 0;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 750;
}

.photo-gallery-album-card__body p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.photo-gallery-album-card__meta {
  color: var(--color-text-light);
  font-size: 11px;
  line-height: 1.4;
}

.photo-gallery-album-card__count {
  margin-top: auto;
  padding-top: 5px;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
}

.photo-gallery-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: var(--space-3);
}

.photo-gallery-photo-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.photo-gallery-photo {
  display: flex;
  width: 100%;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg-soft);
  cursor: zoom-in;
}

.photo-gallery-photo:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.photo-gallery-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-gallery-photo-caption {
  padding: 7px 9px 8px;
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.photo-gallery-empty {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  text-align: center;
}

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

  .photo-gallery-album-card__body {
    padding: 10px;
  }

  .photo-gallery-album-card__body h3 {
    font-size: 14px;
  }

  .photo-gallery-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-gallery-album-card,
  .photo-gallery-album-card__media img {
    transition: none;
  }
}
