/* ===========================
   Album feature
   =========================== */
.album-feature {
  background-color: #fff;
  overflow-anchor: none;
  padding-block: clamp(2rem, 5vw, 4rem);
}

.album-feature-grid {
  align-items: center;
  column-gap: clamp(1.5rem, 3vw, 3rem);
  display: grid;
  grid-template-columns: minmax(18rem, .92fr) minmax(0, 1.28fr);
}

.album-feature-media {
  display: block;
  margin: 0;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.album-feature-media.js-lightbox {
  cursor: pointer;
}

.album-feature-media.js-lightbox:focus-visible {
  outline: 3px solid var(--aghc-red);
  outline-offset: 4px;
}

.album-feature-media .hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(20rem, 58vh, 42rem);
  object-fit: contain;
  object-position: left center;
  transition: transform .3s ease;
}

.album-feature-media:hover .hero-img,
.album-feature-media:focus-visible .hero-img {
  transform: scale(1.03);
}

.album-feature-media:hover,
.album-feature-media:focus-visible {
  z-index: 3;
}

.album-info-card {
  background: var(--aghc-beige);
  border: 0;
  border-left: 3px solid var(--aghc-red);
  border-radius: 0;
  box-shadow: none;
  padding: clamp(1.75rem, 4vw, 3.75rem);
  position: relative;
  z-index: 2;
}

.album-info-card-inner {
  max-width: 42rem;
}

@media (min-width: 1400px) {
  .album-feature-grid {
    align-items: center;
  }

  .album-feature-media .hero-img {
    height: auto;
    max-height: clamp(20rem, 58vh, 42rem);
    object-fit: contain;
    object-position: left center;
  }
}

.album-feature .card,
.album-feature .table {
  background-color: var(--aghc-beige);
}

.album-feature .table th,
.album-feature .table td {
  background-color: var(--aghc-beige);
  vertical-align: top;
}

.album-feature .table tbody tr:last-child > * {
  border-bottom-width: 0;
}

@media (min-width: 992px) {
  .album-feature-grid.is-description-expanded .album-feature-media {
    align-self: start;
    margin-top: var(--album-media-expanded-offset, clamp(3rem, 6vw, 5rem));
  }

  .album-feature-grid.is-description-expanded .album-feature-media .hero-img {
    height: auto;
    max-height: calc(100vh - 7rem);
    object-fit: contain;
    object-position: left top;
  }
}

@media (max-width: 991.98px) {
  .album-feature-grid {
    align-items: stretch;
    column-gap: 0;
    display: flex;
    flex-direction: column;
  }

  .album-feature-media {
    display: block;
    margin-left: 0;
    margin-top: 0;
    order: 1;
    overflow: hidden;
    z-index: 1;
  }

  .album-info-card {
    order: 2;
    width: 100%;
  }

  .album-feature-media .hero-img {
    height: auto;
    max-height: clamp(16rem, 48vh, 34rem);
    object-fit: contain;
    object-position: left center;
  }
}

@media (max-width: 575.98px) {
  .album-feature {
    padding-block: 0;
  }

  .album-feature > .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .album-feature-media {
    width: 100%;
  }

  .album-info-card {
    padding: 1.25rem;
    width: 100%;
  }

  .album-feature-media .hero-img {
    max-height: clamp(13rem, 40vh, 24rem);
  }
}

/* ===========================
   Image card previews
   =========================== */
.thumb-square-fw {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-square-fw-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-square-fw-file,
.file-card-preview,
.file-detail-preview {
  width: 100%;
  min-height: 100%;
  aspect-ratio: 3 / 2;
  background: var(--aghc-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  box-shadow: none;
  outline: 0;
}
.thumb-square-fw-file {
  aspect-ratio: auto;
  height: 100%;
  border: 0;
}
.file-detail-preview {
  aspect-ratio: 3 / 2;
}
.thumb-square-fw-file > span,
.file-card-preview > span,
.file-detail-preview > span {
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: 0;
  line-height: 1;
  text-shadow: none;
  text-transform: uppercase;
  -webkit-text-stroke: 0;
}
.thumb-square-fw-file > span {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}
.file-detail-preview > span {
  font-size: clamp(2rem, 4vw, 3.5rem);
}
.btn-file-open {
  border-color: var(--aghc-red);
  color: var(--aghc-red);
  background-color: transparent;
}
.btn-file-open:hover,
.btn-file-open:focus {
  border-color: var(--aghc-red);
  background-color: var(--aghc-red);
  color: #fff;
}

/* List cards open the preview modal directly */
.js-card-trigger {
  cursor: pointer;
}
.js-card-trigger:focus-visible {
  outline: 2px solid var(--aghc-gray);
  outline-offset: 2px;
}

.card-body-inner { padding: 1rem; }

/* Compact album list */
#albumViewList {
  --album-list-thumb-size: 5.75rem;
}

#albumViewList .album-list-grid {
  align-items: stretch;
}

#albumViewList .card {
  overflow: hidden;
  transition: border-color .18s ease;
}

#albumViewGallery .card {
  transition: border-color .18s ease;
}

#albumViewGallery .album-file-grid {
  border-top: 1px solid rgba(0, 0, 0, .16);
  margin-top: 1.5rem;
  padding-top: .5rem;
}

#albumViewGallery .album-file-card {
  overflow: hidden;
}

#albumViewGallery .album-file-card .file-card-preview {
  flex: 0 0 auto;
  min-height: 0;
}

#albumViewGallery .album-file-card .file-card-body {
  color: var(--bs-body-color);
}

#albumViewGallery .album-file-card .card-title {
  color: var(--aghc-red);
  font-size: 1rem;
  line-height: 1.25;
}

#albumViewGallery .album-file-card:hover .card-title,
#albumViewGallery .album-file-card:focus-visible .card-title {
  text-decoration: underline;
}

#albumViewGallery .card:hover,
#albumViewGallery .card:focus-visible {
  border-color: rgba(0, 0, 0, .14);
  box-shadow: none;
}

#albumViewList .card:hover,
#albumViewList .card:has(.js-card-trigger:focus-visible) {
  border-color: rgba(0, 0, 0, .14);
  box-shadow: none;
}

#albumViewList .js-card-trigger {
  min-height: var(--album-list-thumb-size);
}

#albumViewList .js-card-trigger > .col-4 {
  flex: 0 0 var(--album-list-thumb-size);
  display: flex;
  max-width: var(--album-list-thumb-size);
  width: var(--album-list-thumb-size);
}

#albumViewList .js-card-trigger > .col-8 {
  flex: 1 1 0;
  max-width: none;
  min-width: 0;
  width: auto;
}

#albumViewList .rounded-start {
  border-radius: 0 !important;
  width: 100%;
}

#albumViewList .thumb-square-fw {
  aspect-ratio: 1 / 1;
  height: 100%;
  width: 100%;
  min-height: var(--album-list-thumb-size);
}

#albumViewList .thumb-square-fw-file {
  align-self: stretch;
  flex: 1 1 auto;
  height: 100%;
  min-height: 100%;
}

#albumViewList .card-body {
  min-width: 0;
  padding: .625rem .75rem;
}

#albumViewList .card-title {
  max-width: 100%;
  font-size: .95rem;
  line-height: 1.2;
}

#albumViewList .small {
  font-size: .78rem;
  line-height: 1.25;
}

#albumViewList .thumb-square-fw-file > span {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
}

/* Album pagination */
.js-view-pagination[hidden] {
  display: none !important;
}

.js-view-pagination .page-link {
  color: var(--aghc-gray);
  background-color: transparent;
  border-color: var(--aghc-gray);
}
.js-view-pagination .page-link:hover,
.js-view-pagination .page-link:focus {
  color: #fff;
  background-color: var(--aghc-gray);
  border-color: var(--aghc-gray);
  box-shadow: none;
}
.js-view-pagination .page-item.active .page-link {
  color: #fff;
  background-color: var(--aghc-red);
  border-color: var(--aghc-red);
}
.js-view-pagination .page-item.disabled .page-link {
  color: #808080;
  background-color: transparent;
  border-color: var(--aghc-gray);
}

/* ===========================
   More collections
   =========================== */
.album-prevnext {
  position: static;
  background: #fff;
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  box-shadow: none;
}

.album-prevnext-group {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: .75rem;
}

.album-prevnext-link,
.album-prevnext-current,
.album-prevnext-spacer {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  padding: 0 1rem;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.album-prevnext-link:hover,
.album-prevnext-link:focus {
  color: var(--aghc-red);
  text-decoration: none;
}

.album-prevnext-link-next {
  margin-left: auto;
  text-align: right;
}

.album-prevnext-link-prev {
  margin-right: auto;
  padding-left: 0;
}

.album-prevnext-link-next {
  padding-right: 0;
}

.album-prevnext-current {
  text-align: center;
}

.album-prevnext-spacer {
  visibility: hidden;
}

.album-prevnext-group-split {
  gap: 0;
}

.album-prevnext-group-split .album-prevnext-link {
  margin: 0;
}

.album-prevnext-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
}

.album-prevnext-current-link {
  color: var(--aghc-red);
  text-decoration: none;
}

.album-prevnext-current-link:hover,
.album-prevnext-current-link:focus {
  color: var(--aghc-red);
  text-decoration: none;
}

body:has(.album-prevnext) .footer {
  border-top: 0 !important;
  margin-top: 0 !important;
}

/* ===========================
   Metadata tables
   =========================== */
.js-meta-table.hide-empty tr.is-empty { display: none; }
.table td, .table th { vertical-align: middle; }
.js-meta-table td,
.js-meta-table th {
  vertical-align: top;
}
.meta-plain-list { color: inherit; }

/* ===========================
   Export section
   =========================== */
.export-section { margin-top: 2rem; margin-bottom: 3rem; }
.export-section .card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0;
  overflow: hidden;
}
.export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: .75rem 1rem;
  background: #fff;
  border-bottom: 0;
}
.js-export-card.open > .export-header {
  border-bottom: 1px solid #dee2e6;
}
.export-title {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}
.js-export-details { display: none; border-top: 0 !important; }
.js-export-card.open > .js-export-details,
.js-export-details.open {
  display: block;
  border-top: 1px solid #dee2e6 !important;
}
.export-toolbar {
  margin-bottom: .375rem;
}

.export-section .card-body-inner {
  background: #fff;
  padding: .625rem;
}

.export-scroll {
  max-height: min(68vh, 46rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.export-table {
  min-width: 168rem;
  table-layout: fixed;
  font-size: .75rem;
  line-height: 1.15;
  margin-bottom: 0;
}

.export-table > :not(caption) > * > * {
  padding: .18rem .35rem;
}

.export-table th,
.export-table td {
  background-color: #fff;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}

.export-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #fff;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

.export-table th:first-child,
.export-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 15rem;
  background-color: #fff;
  box-shadow: inset -1px 0 0 rgba(0,0,0,.125);
}

.export-table thead th:first-child {
  z-index: 3;
  background-color: #fff;
}

@media (max-width: 575.98px) {
  .export-scroll {
    max-height: 70vh;
  }

  .export-table {
    font-size: .7rem;
    min-width: 150rem;
  }

  .export-table > :not(caption) > * > * {
    padding: .15rem .3rem;
  }
}
.table,
.table-bordered > :not(caption) > * > * {
  border-color: rgba(0,0,0,.125);
}
.js-export-card .caret { transition: transform .2s ease; }
.js-export-card.open .caret { transform: rotate(180deg); }

/* Export/metadata buttons */
.export-toolbar .btn,
.js-toggle-empty.btn,
.js-copy-table.btn,
.js-download-csv.btn {
  border: 1px solid var(--aghc-gray);
  color: var(--aghc-gray);
  background-color: transparent;
}
.export-toolbar .btn:hover,
.export-toolbar .btn:focus,
.js-toggle-empty.btn:hover,
.js-toggle-empty.btn:focus,
.js-copy-table.btn:hover,
.js-copy-table.btn:focus,
.js-download-csv.btn:hover,
.js-download-csv.btn:focus {
  background-color: var(--aghc-gray);
  color: #fff;
}

/* ===========================
   Search input group
   =========================== */
.input-group.input-group-sm .input-group-text {
  border: 1px solid var(--aghc-gray);
  border-right: 1px solid var(--aghc-gray);
  color: #808080;
  background-color: transparent;
}
.input-group.input-group-sm .form-control {
  border: 1px solid var(--aghc-gray);
  border-left: none;
  color: var(--aghc-gray);
  background-color: transparent;
}
.input-group.input-group-sm .form-control:focus {
  background-color: transparent;
  color: var(--aghc-gray);
  box-shadow: none;
  border-color: var(--aghc-gray);
}

/* ===========================
   Lightbox
   =========================== */
.lightbox-modal {
  --lightbox-modal-margin: .75rem;
  --lightbox-modal-width: min(92rem, calc(100vw - (var(--lightbox-modal-margin) * 2)));
}

.lightbox-modal .modal-dialog {
  width: var(--lightbox-modal-width);
  max-width: var(--lightbox-modal-width);
  min-height: auto;
  height: calc(100vh - (var(--lightbox-modal-margin) * 2));
  height: calc(100dvh - (var(--lightbox-modal-margin) * 2));
  margin: var(--lightbox-modal-margin) auto;
  display: flex;
  align-items: stretch;
}
.lightbox-modal .modal-content {
  background: #fff;
  border: 0;
  border-radius: .5rem;
  color: var(--bs-body-color);
  box-shadow: 0 1rem 3rem rgba(0,0,0,.35);
  height: 100%;
  max-height: 100%;
  overflow: auto;
  overflow-anchor: none;
}
.lightbox-modal .modal-body {
  position: relative;
  padding: 1rem;
  text-align: center;
}
.lightbox-actions {
  display: flex;
  justify-content: flex-end;
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -1rem -1rem .5rem;
  padding: .5rem .75rem 0;
  pointer-events: none;
}
.lightbox-modal .btn-close {
  box-sizing: border-box;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: .5rem;
  background-size: 1rem 1rem;
  pointer-events: auto;
}
.lightbox-nav {
  position: absolute;
  top: var(--lightbox-image-center, 28vh);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--aghc-gray);
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}
.lightbox-nav:hover,
.lightbox-nav:focus {
  color: #fff;
  background: var(--aghc-red);
  border-color: var(--aghc-red);
  outline: none;
}
.lightbox-nav:disabled {
  opacity: .35;
  cursor: default;
  color: var(--aghc-gray);
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.2);
}
.lightbox-nav-prev {
  left: 1rem;
}
.lightbox-nav-next {
  right: 1rem;
}
.lightbox-content {
  margin: 0;
  min-height: 0;
}
.lightbox-image-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56vh;
  max-height: 56vh;
  max-width: 100%;
}
.lightbox-image-frame.is-pdf-preview {
  align-items: stretch;
  height: min(72vh, 48rem);
  height: min(72dvh, 48rem);
  max-height: none;
}
.lightbox-image-frame.is-video-preview {
  height: min(68vh, 52rem);
  height: min(68dvh, 52rem);
  max-height: none;
}
.lightbox-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  max-width: 100%;
  width: 100%;
  text-decoration: none;
}
.lightbox-image-link:hover,
.lightbox-image-link:focus {
  text-decoration: none;
}
.lightbox-image-link.is-fullscreen-trigger {
  cursor: zoom-in;
}
.lightbox-image-link.is-fullscreen-trigger:focus-visible {
  outline: 3px solid var(--aghc-red);
  outline-offset: 4px;
}
.lightbox-img { max-width: 100%; max-height: 100%; border-radius: 0; }
.lightbox-pdf-preview {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
}
.lightbox-pdf-preview[hidden] {
  display: none !important;
}
.lightbox-pdf-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--aghc-red);
  text-decoration: underline;
}
.lightbox-video-embed {
  display: block;
  width: min(100%, 72rem);
  aspect-ratio: 16 / 9;
  max-height: 100%;
  border: 0;
  background: #000;
}
.lightbox-video-embed[hidden] {
  display: none !important;
}
.lightbox-file-preview {
  width: min(100%, 42rem);
  aspect-ratio: 3 / 2;
  background: var(--aghc-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-file-preview[hidden] {
  display: none !important;
}
.lightbox-file-preview > span {
  color: #fff;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 5rem);
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}
.lightbox-caption {
  color: var(--bs-secondary-color);
  margin-top: .5rem;
}
.lightbox-caption a {
  color: inherit;
}
.lightbox-metadata {
  margin-top: 1rem;
  color: var(--bs-body-color);
  text-align: left;
  overflow: visible;
}
.lightbox-metadata[hidden] {
  display: none !important;
}
.lightbox-meta-table.hide-empty tr.is-empty {
  display: none;
}
.lightbox-metadata-scroll {
  overflow-x: auto;
  overflow-y: visible;
}
.lightbox-meta-table th {
  width: 28%;
  min-width: 11rem;
  white-space: nowrap;
}
.lightbox-meta-table td {
  min-width: 18rem;
}

body.image-fullscreen-open {
  overflow: hidden;
}

.image-fullscreen-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(.75rem, 2vw, 2rem);
  background: rgba(0, 0, 0, .94);
  opacity: 0;
  transition: opacity .16s ease;
}

.image-fullscreen-lightbox.is-visible {
  opacity: 1;
}

.image-fullscreen-lightbox[hidden] {
  display: none !important;
}

.image-fullscreen-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.image-fullscreen-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-fullscreen-close {
  position: fixed;
  top: clamp(.75rem, 2vw, 1.25rem);
  right: clamp(.75rem, 2vw, 1.25rem);
  z-index: 1;
  box-sizing: border-box;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, .28);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1rem 1rem;
  opacity: 1;
}

.image-fullscreen-close:hover,
.image-fullscreen-close:focus {
  background-color: rgba(255, 255, 255, .72);
  outline: none;
}

.image-fullscreen-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 575.98px) {
  .lightbox-metadata-scroll {
    overflow-x: visible;
  }
  .lightbox-meta-table {
    table-layout: fixed;
    width: 100%;
  }
  .lightbox-meta-table th,
  .lightbox-meta-table td {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: normal;
  }
  .lightbox-meta-table th {
    width: 6.5rem;
  }
  .lightbox-img {
    max-height: 100%;
  }
  .lightbox-image-frame {
    height: 48vh;
    max-height: 48vh;
  }
  .lightbox-image-frame.is-pdf-preview {
    height: min(68vh, 34rem);
    height: min(68dvh, 34rem);
    max-height: none;
  }
  .lightbox-image-frame.is-video-preview {
    height: min(58vh, 30rem);
    height: min(58dvh, 30rem);
  }
  .lightbox-nav {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.6rem;
  }
  .lightbox-nav-prev {
    left: .5rem;
  }
  .lightbox-nav-next {
    right: .5rem;
  }
}


.rating-filter {
  max-width: 100%;
}

.rating-filter .btn-group {
  flex-wrap: wrap;
}

.rating-filter .btn {
  min-width: 2.25rem;
}

.rating-filter .btn[data-rating-filter="unrated"] {
  min-width: 4.75rem;
}
