.photo-gallery-page {
  background: #f3f4f6;
  padding: 2rem 0 3rem;
  margin-bottom: 1rem;
}

.photo-gallery-page > .container,
.photo-gallery-page.container {
  max-width: 1140px;
}

.photo-gallery-page h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1rem;
}

.photo-gallery-page__toolbar {
  margin: 0 0 1.5rem;
  background: #fff;
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.photo-gallery-page__toolbar .form-group {
  margin-bottom: 0.75rem;
}

.photo-gallery-page__toolbar .control-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.photo-gallery-page__toolbar .form-control {
  border-radius: 12px;
  border-color: #ddd;
}

.photo-gallery-album-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.photo-album-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  min-height: 100%;
}

.photo-album-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.photo-album-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e8e8e8;
  overflow: hidden;
}

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

.photo-album-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.9rem 1rem 1rem;
  text-decoration: none !important;
  color: inherit;
}

.photo-album-card__meta {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #e40000;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.photo-album-card__meta .photo-album-card__pin {
  color: #c90;
}

.photo-album-card__title {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  margin: 0;
}

.photo-album-card--manageable .photo-album-card__admin-tools {
  position: absolute;
  top: 8px;
  right: 8px;
  left: 8px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  pointer-events: none;
}

.photo-album-card__admin-btn {
  pointer-events: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 5px 6px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  opacity: 0.72;
  cursor: pointer;
  font-size: 9px;
  line-height: 1.1;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.photo-album-card:hover .photo-album-card__admin-btn,
.photo-album-card__admin-btn:focus {
  opacity: 1;
}

.photo-album-card__admin-btn.is-pinned {
  opacity: 0.92;
  background: rgba(240, 173, 78, 0.95);
  color: #222;
}

.photo-album-card__admin-btn--danger:hover {
  background: rgba(217, 83, 79, 0.92);
}

.photo-album-card__admin-icon {
  font-size: 14px;
  line-height: 1;
}

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

.photo-gallery-album-grid--preview {
  margin-bottom: 0.5rem;
}

@media (max-width: 575.98px) {
  .photo-gallery-page h1 {
    font-size: 1.75rem;
  }

  .photo-gallery-album-grid {
    grid-template-columns: 1fr;
  }
}
