.gm-albums,
.gm-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(18px, 2.5vw, 32px);
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 12px 0 40px;
}

.gm-album-card,
.gm-resource-card {
  display: block;
  overflow: hidden;
  background: #fff7ef;
  border-radius: 10px;
  color: #23130e;
  text-decoration: none;
  box-shadow: 0 3px 16px rgba(40, 20, 10, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.gm-album-card:hover,
.gm-album-card:focus-visible,
.gm-resource-card:hover,
.gm-resource-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(40, 20, 10, 0.18);
  color: #23130e;
}

.gm-album-cover {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ffb286;
}

.gm-album-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.gm-album-card:hover .gm-album-cover img {
  transform: scale(1.04);
}

.gm-album-cover--empty {
  background: linear-gradient(135deg, #ffb286, #f26536);
}

.gm-album-info {
  display: grid;
  gap: 6px;
  padding: 18px 20px 20px;
  font: inherit;
}

.gm-album-info strong,
.gm-resource-card strong {
  display: block;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.25;
}

.gm-album-description,
.gm-resource-description {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.75;
}

.gm-empty {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 28px 0 50px;
  color: inherit;
}

.gm-entry-heading {
  background: #fff1e3;
  padding: clamp(44px, 7vw, 96px) 20px;
}

.gm-entry-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.gm-entry-heading h1 {
  margin: 18px 0 0;
  color: #23130e;
  font-family: inherit;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.12;
}

.gm-entry-summary {
  margin: 18px 0 0;
  max-width: 65ch;
  color: #4c332a;
  font-size: clamp(16px, 1.7vw, 20px);
}

.gm-back-link {
  color: #d94b21;
  font-weight: 600;
  text-decoration: none;
}

.gm-back-link:hover,
.gm-back-link:focus-visible {
  color: #a83214;
  text-decoration: underline;
}

.gm-album-content,
.gm-resource-content {
  padding: clamp(32px, 5vw, 72px) 20px 90px;
}

.gm-album-content .wp-block-gallery,
.gm-album-content .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 20px;
}

.gm-album-content .wp-block-gallery figure,
.gm-album-content .gallery figure {
  width: 100% !important;
  margin: 0 !important;
}

.gm-album-content .wp-block-gallery img,
.gm-album-content .gallery img {
  display: block;
  width: 100% !important;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
}

.gm-album-content .wp-block-gallery figcaption,
.gm-album-content .gallery figcaption {
  position: static !important;
  padding: 8px 2px 0 !important;
  background: none !important;
  color: #4c332a !important;
  font-size: 14px;
  line-height: 1.4;
}

.gm-resource-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
}

.gm-resource-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 58px;
  border-radius: 5px;
  background: #f26536;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.gm-resource-content .wp-block-file object,
.gm-resource-content .wp-block-file iframe {
  width: 100%;
  min-height: min(75vh, 800px);
}

.gm-lightbox {
  position: fixed;
  inset: 0;
  width: min(96vw, 1200px);
  max-width: none;
  max-height: 96vh;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: #21130e;
  color: white;
}

.gm-lightbox::backdrop {
  background: rgba(20, 10, 6, 0.86);
}

.gm-lightbox-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: min(80vh, 750px);
}

.gm-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: auto;
  object-fit: contain;
}

.gm-lightbox button {
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-size: 26px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.gm-lightbox-close {
  display: block;
  margin-left: auto;
}

.gm-lightbox figcaption {
  min-height: 24px;
  padding: 8px 12px;
  text-align: center;
}

@media (max-width: 600px) {
  .gm-albums,
  .gm-resources {
    grid-template-columns: 1fr;
    padding-bottom: 28px;
  }

  .gm-album-content .wp-block-gallery,
  .gm-album-content .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .gm-lightbox-inner {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    min-height: 60vh;
  }

  .gm-lightbox button {
    width: 40px;
    height: 40px;
  }
}

/* Album explorer used on the existing Elementor Gallery page. */
.gm-explorer {
  display: grid;
  grid-template-columns: clamp(205px, 23%, 280px) minmax(0, 1fr);
  width: 100%;
  max-width: none;
  min-height: 520px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #fff8f1;
  color: #25150f;
  font: inherit;
  box-shadow: 0 6px 28px rgba(63, 25, 11, 0.12);
}
.gm-explorer button { font: inherit; cursor: pointer; }
.gm-album-nav { background: #fff1e4; border-right: 1px solid #f3d9c9; }
.gm-album-nav h2 { margin: 0; padding: 28px 22px 16px; color: #25150f; font-size: clamp(21px, 2vw, 26px); }
.gm-album-tabs { display: grid; }
.gm-album-tab {
  width: 100%; padding: 17px 22px; border: 0; border-left: 4px solid transparent;
  border-bottom: 1px solid #f3d9c9; background: transparent; color: #3e281e;
  text-align: left; line-height: 1.35;
}
.gm-album-tab:hover, .gm-album-tab:focus-visible { background: #ffe6d3; color: #25150f; }
.gm-album-tab[aria-selected="true"] { border-left-color: #f26536; background: #fff8f1; color: #b63d1b; font-weight: 700; }
.gm-explorer-main { min-width: 0; padding: clamp(18px, 3vw, 36px); }
.gm-explorer-controls { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.gm-layout-switch { display: inline-flex; padding: 3px; border: 1px solid #edc9b5; border-radius: 999px; background: white; }
.gm-layout-switch button { padding: 7px 15px; border: 0; border-radius: 999px; background: transparent; color: #5a3c2d; font-size: 14px; }
.gm-layout-switch button[aria-pressed="true"] { background: #f26536; color: white; }
.gm-album-panel[hidden] { display: none !important; }
.gm-album-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.gm-album-heading h3 { margin: 0; color: #25150f; font-size: clamp(22px, 2.5vw, 32px); line-height: 1.2; }
.gm-album-heading p { margin: 8px 0 0; color: #664d42; font-size: 15px; line-height: 1.5; }
.gm-media-count { flex: 0 0 auto; color: #72594b; font-size: 13px; }
.gm-media-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr)); gap: 17px; }
.gm-media-card {
  position: relative; display: block; width: 100%; min-width: 0; padding: 0; overflow: hidden;
  border: 0; border-radius: 8px; background: white; color: #25150f; text-align: left;
  box-shadow: 0 2px 12px rgba(63, 25, 11, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.gm-media-card:hover, .gm-media-card:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(63, 25, 11, 0.19); }
.gm-media-card img, .gm-video-placeholder { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gm-video-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, #472b21, #aa4727); color: white; font-size: 42px; }
.gm-play-icon { position: absolute; top: 14px; left: 14px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, 0.75); color: white; font-size: 14px; }
.gm-media-caption { display: block; min-height: 42px; padding: 10px 12px; color: #4d3226; font-size: 13px; line-height: 1.35; }
.gm-explorer[data-view="carousel"] .gm-media-list { display: flex; gap: 18px; overflow-x: auto; padding: 4px 4px 16px; scroll-snap-type: x mandatory; scrollbar-color: #f26536 transparent; }
.gm-explorer[data-view="carousel"] .gm-media-card { flex: 0 0 min(80%, 500px); scroll-snap-align: start; }
.gm-carousel-controls { display: none; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.gm-explorer[data-view="carousel"] .gm-carousel-controls { display: flex; }
.gm-explorer .gm-carousel-controls button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #edc9b5;
  border-radius: 50%;
  background: white;
  color: #b63d1b;
  font-size: 0;
  line-height: 1;
}
.gm-carousel-controls button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -5px 0 0 -5px;
  display: block;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateX(-2px) rotate(-45deg);
}
.gm-carousel-controls button[data-carousel-prev]::before {
  transform: translateX(2px) rotate(135deg);
}
.gm-viewer { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; max-width: 100%; max-height: 100dvh; margin: 0; padding: 60px clamp(10px, 2vw, 24px) 16px; border: 0; border-radius: 0; background: #1c130f; color: white; overflow: hidden; }
.gm-viewer[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; }
.gm-viewer, .gm-viewer *, .gm-explorer, .gm-explorer * { box-sizing: border-box; }
.gm-viewer::backdrop { background: rgba(0, 0, 0, 0.9); }
.gm-viewer-close { position: absolute; top: 10px; right: 15px; z-index: 2; }
.gm-viewer-stage { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; grid-template-rows: minmax(0, 1fr); align-items: center; gap: 12px; min-height: 0; min-width: 0; }
.gm-viewer button { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: white; font-size: 28px; line-height: 1; cursor: pointer; }
.gm-viewer-media { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; min-width: 0; overflow: hidden; }
.gm-viewer-media img, .gm-viewer-media video, .gm-viewer-media iframe { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.gm-viewer-media iframe, .gm-viewer-media video { width: min(100%, 1100px); aspect-ratio: 16 / 9; border: 0; }
.gm-viewer-caption { min-height: 32px; margin: 0; text-align: center; font-size: 15px; }

@media (max-width: 780px) {
  .gm-explorer { grid-template-columns: 1fr; }
  .gm-album-nav { border-right: 0; border-bottom: 1px solid #f3d9c9; }
  .gm-album-nav h2 { padding: 18px 18px 8px; }
  .gm-album-tabs { display: flex; overflow-x: auto; padding: 0 8px; }
  .gm-album-tab { flex: 0 0 auto; width: auto; max-width: 220px; border-left: 0; border-bottom: 3px solid transparent; }
  .gm-album-tab[aria-selected="true"] { border-bottom-color: #f26536; }
  .gm-media-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .gm-viewer-stage { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 3px; }
  .gm-viewer button { width: 36px; height: 36px; }
}
@media (max-width: 440px) { .gm-media-list { grid-template-columns: 1fr; } }
