.album-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.beron-gallery [hidden], .beron-album [hidden], .beron-album dialog:not([open]) { display: none; }
.beron-gallery .album-card { color: #173e51; text-decoration: none; }
.beron-gallery .album-cover > :not(span), .beron-gallery .album-cover .field__item { height: 100%; }
.beron-album-images .field--name-field-image { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin: 0; float: none; }
.beron-album-images a { display: grid; width: 100%; aspect-ratio: 4/3; background: #edf2f4; border-radius: 3px; overflow: hidden; cursor: zoom-in; }
.beron-album-images a img { width: 100%; height: 100%; min-height: 0; object-fit: contain; margin: 0; }
.beron-album .album-lightbox button[data-close] { width: auto; padding-inline: 12px; }
.beron-album .album-lightbox-image img { height: 100%; }
@media (max-width: 850px) { .beron-album-images .field--name-field-image { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; } }
.album-toolbar p {
  margin: 0;
  color: #526778;
  font-size: 14px;
}
.album-search {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #becdd4;
  border-radius: 3px;
  padding: 0 14px;
  width: 340px;
  max-width: 100%;
}
.album-search input {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  height: 46px;
  padding: 10px 0;
  color: #173e51;
  font: inherit;
  font-size: 14px;
}
.album-search:focus-within {
  outline: 2px solid #007d89;
  outline-offset: 2px;
}
.album-search input:focus {
  outline: 0;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 26px;
}
.album-card {
  display: block;
  border: 1px solid #dce5e8;
  border-radius: 4px;
  overflow: hidden;
  background: white;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.album-card:hover {
  border-color: #007d89;
  box-shadow: 0 4px 16px #173e5110;
}
.album-cover {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #edf2f4;
}
.album-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.album-cover span {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #173e51ed;
  color: white;
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 12px;
}
.school-gallery .album-card h2 {
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
  padding: 18px 20px 22px;
}
.album-description {
  max-width: 850px;
  margin-bottom: 30px;
}
.album-description p {
  line-height: 1.8;
  margin: 0 0 14px;
}
.album-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.album-photo-grid button {
  display: block;
  padding: 0;
  border: 0;
  background: #edf2f4;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 3px;
  cursor: zoom-in;
}
.album-photo-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.album-photo-grid button:hover {
  outline: 2px solid #007d89;
  outline-offset: 3px;
}
.album-lightbox {
  width: min(1200px, 94vw);
  max-width: 94vw;
  max-height: 94dvh;
  margin: auto;
  border: 0;
  padding: 0;
  border-radius: 5px;
  background: #122c39;
  color: white;
}
.album-lightbox::backdrop {
  background: rgba(8, 21, 29, 0.88);
}
.album-lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
}
.album-lightbox button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff50;
  border-radius: 3px;
  background: transparent;
  color: white;
  cursor: pointer;
}
.album-lightbox button:hover {
  background: #ffffff20;
}
.album-lightbox button:focus-visible {
  outline: 2px solid #f2c34f;
  outline-offset: 2px;
}
.album-lightbox-image {
  height: min(68dvh, 800px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c202b;
}
.album-lightbox-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.album-lightbox-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
}
.album-lightbox-bottom p {
  margin: 0;
  color: white;
  font-size: 14px;
  line-height: 1.5;
}
.album-lightbox-bottom > div {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 850px) {
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .album-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 540px) {
  .album-toolbar {
    flex-wrap: wrap;
    gap: 16px;
  }
  .album-search {
    width: 100%;
  }
  .album-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .album-photo-grid {
    gap: 10px;
  }
  .album-lightbox-bottom {
    flex-direction: column-reverse;
    gap: 10px;
    padding: 10px 14px;
  }
  .album-lightbox-bottom p {
    font-size: 12px;
    max-height: 72px;
    overflow: auto;
  }
  .album-lightbox-image {
    height: 55dvh;
  }
}
