/* PSM publieke fotoalbums — sluit aan bij blog/pagina-stijl per site */

[data-psm-site="eurofly"] {
  --psm-g-accent: #0ea5e9;
  --psm-g-accent-dark: #0284c7;
  --psm-g-heading: #1a3a5c;
  --psm-g-text: #1a1a18;
  --psm-g-muted: #6b6b67;
  --psm-g-surface: #ffffff;
  --psm-g-bg: #f7f8fa;
  --psm-g-border: rgba(26, 58, 92, 0.12);
  --psm-g-card-top: 3px solid #0ea5e9;
  --psm-g-radius: 0.5rem;
  --psm-g-title-font: 'Montserrat', 'DM Sans', system-ui, sans-serif;
}

[data-psm-site="vechtdal"] {
  --psm-g-accent: #e8820a;
  --psm-g-accent-dark: #c96f08;
  --psm-g-heading: #1a2d5a;
  --psm-g-text: #2a2a28;
  --psm-g-muted: #6b6b67;
  --psm-g-surface: #ffffff;
  --psm-g-bg: #f5f0e8;
  --psm-g-border: rgba(26, 45, 90, 0.1);
  --psm-g-card-top: 3px solid #e8820a;
  --psm-g-radius: 0;
  --psm-g-title-font: 'DM Sans', system-ui, sans-serif;
}

/* Fallback vóór data-psm-site (Eurofly-site) */
.psm-gallery-page {
  --psm-g-accent: #0ea5e9;
  --psm-g-accent-dark: #0284c7;
  --psm-g-heading: #1a3a5c;
  --psm-g-text: #1a1a18;
  --psm-g-muted: #6b6b67;
  --psm-g-surface: #ffffff;
  --psm-g-bg: #f7f8fa;
  --psm-g-border: rgba(26, 58, 92, 0.12);
  --psm-g-card-top: 3px solid #0ea5e9;
  --psm-g-radius: 0.5rem;
  --psm-g-title-font: 'Montserrat', 'DM Sans', system-ui, sans-serif;
}

.psm-gallery-page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

@media (min-width: 1024px) {
  .psm-gallery-page {
    padding-top: 5rem;
    padding-bottom: 6rem;
  }
}

[data-psm-site="vechtdal"] .psm-gallery-page {
  background: var(--psm-g-bg);
}

[data-psm-site="eurofly"] .psm-gallery-page {
  background: var(--psm-g-bg);
}

.psm-gallery-intro {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--psm-g-muted);
  max-width: 42rem;
  margin-bottom: 2rem;
}

.psm-gallery-intro p {
  margin: 0 0 0.75em;
}

.psm-gallery-intro p:last-child {
  margin-bottom: 0;
}

.psm-gallery-intro ul,
.psm-gallery-intro ol {
  margin: 0 0 0.75em;
  padding-left: 1.25em;
}

.psm-gallery-intro h2,
.psm-gallery-intro h3 {
  font-family: var(--psm-g-font-display, inherit);
  color: var(--psm-g-text);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

.psm-gallery-intro h2 {
  font-size: 1.125rem;
}

.psm-gallery-intro h3 {
  font-size: 1rem;
}

.psm-gallery-intro a {
  color: var(--psm-g-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.psm-gallery-intro a:hover {
  opacity: 0.85;
}

.psm-gallery-intro blockquote {
  margin: 0 0 0.75em;
  padding: 0.25em 0 0.25em 1em;
  border-left: 3px solid var(--psm-g-border);
  color: var(--psm-g-muted);
}

.psm-gallery-loading,
.psm-gallery-empty {
  color: var(--psm-g-muted);
  font-size: 0.9375rem;
  padding: 2rem 0;
  text-align: center;
}

.psm-gallery-loading::before {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  vertical-align: -0.15em;
  border: 2px solid var(--psm-g-border);
  border-top-color: var(--psm-g-accent);
  border-radius: 50%;
  animation: psm-gallery-spin 0.7s linear infinite;
}

@keyframes psm-gallery-spin {
  to { transform: rotate(360deg); }
}

.psm-gallery-section-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--psm-g-accent);
  margin: 2rem 0 1rem;
}

.psm-gallery-section-label:first-child {
  margin-top: 0;
}

.psm-gallery-index-year {
  margin-bottom: 2.5rem;
}

.psm-gallery-index-year:last-child {
  margin-bottom: 0;
}

.psm-gallery-count {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--psm-g-muted);
  margin-bottom: 1.25rem;
}

/* Albumkaarten — blog-card patroon */
.psm-gallery-album-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .psm-gallery-album-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .psm-gallery-album-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.psm-gallery-album-card {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--psm-g-surface);
  border-top: var(--psm-g-card-top);
  border-radius: var(--psm-g-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

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

.psm-gallery-album-cover {
  aspect-ratio: 16 / 10;
  min-height: 10rem;
  background: var(--psm-g-bg);
  overflow: hidden;
  position: relative;
}

.psm-gallery-album-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.psm-gallery-album-card:hover .psm-gallery-album-cover img {
  transform: scale(1.05);
}

.psm-gallery-album-body {
  padding: 1.25rem 1.25rem 1.5rem;
}

.psm-gallery-album-count {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--psm-g-muted);
  margin: 0 0 0.5rem;
}

.psm-gallery-album-title {
  display: block;
  font-family: var(--psm-g-title-font);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--psm-g-heading);
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.psm-gallery-album-card:hover .psm-gallery-album-title {
  color: var(--psm-g-accent);
}

.psm-gallery-album-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--psm-g-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Fotogrid — GalleryGrid patroon */
.psm-gallery-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .psm-gallery-photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
  }
}

@media (min-width: 1024px) {
  .psm-gallery-photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.psm-gallery-photo {
  display: block;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--psm-g-radius);
  background: var(--psm-g-bg);
  cursor: zoom-in;
}

.psm-gallery-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.psm-gallery-photo:hover img {
  transform: scale(1.05);
}

.psm-gallery-photo-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.psm-gallery-photo:hover .psm-gallery-photo-zoom {
  opacity: 1;
}

.psm-gallery-photo-zoom svg {
  width: 2rem;
  height: 2rem;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.psm-gallery-back {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--psm-g-border);
}

.psm-gallery-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--psm-g-accent);
  text-decoration: none;
}

.psm-gallery-back a:hover {
  text-decoration: underline;
  color: var(--psm-g-accent-dark);
}

.psm-gallery-more {
  margin: 2rem 0 0;
  text-align: center;
}

.psm-gallery-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.5rem;
  border: 1.5px solid var(--psm-g-heading);
  border-radius: var(--psm-g-radius);
  background: transparent;
  color: var(--psm-g-heading);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.psm-gallery-more-btn:hover:not(:disabled) {
  background: var(--psm-g-heading);
  color: #fff;
}

.psm-gallery-more-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

[data-psm-site="vechtdal"] .psm-gallery-more-btn {
  border-radius: 0;
}

/* Broodkruimels */
.psm-gallery-breadcrumb {
  margin-bottom: 1.25rem;
}

.psm-gallery-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
}

.psm-gallery-breadcrumb li {
  display: inline-flex;
  align-items: center;
  color: var(--psm-g-muted);
}

.psm-gallery-breadcrumb li + li::before {
  content: '›';
  margin: 0 0.4rem;
  color: var(--psm-g-muted);
  opacity: 0.7;
}

.psm-gallery-breadcrumb a {
  color: var(--psm-g-accent);
  text-decoration: none;
  font-weight: 600;
}

.psm-gallery-breadcrumb a:hover {
  text-decoration: underline;
}

.psm-gallery-breadcrumb [aria-current="page"] {
  color: var(--psm-g-heading);
  font-weight: 600;
}

/* Hero cover op albumpagina */
.psm-gallery-hero-cover {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 10rem;
  max-height: 22rem;
  margin: 0 0 1.5rem;
  overflow: hidden;
  border-radius: var(--psm-g-radius);
  background: var(--psm-g-bg);
}

.psm-gallery-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.psm-gallery-hero-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 55%);
  pointer-events: none;
}

/* Deelknop */
.psm-gallery-share-bar {
  margin-bottom: 1.25rem;
}

.psm-gallery-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0 0.85rem;
  border: 1px solid var(--psm-g-border);
  border-radius: var(--psm-g-radius);
  background: var(--psm-g-surface);
  color: var(--psm-g-heading);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.psm-gallery-share-btn svg {
  width: 1rem;
  height: 1rem;
}

.psm-gallery-share-btn:hover {
  border-color: var(--psm-g-accent);
  color: var(--psm-g-accent);
}

[data-psm-site="vechtdal"] .psm-gallery-share-btn {
  border-radius: 0;
}

/* Zoeken + jaarspring op overzicht */
.psm-gallery-index-tools {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.psm-gallery-search-wrap {
  display: block;
}

.psm-gallery-search {
  width: 100%;
  max-width: 24rem;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border: 1px solid var(--psm-g-border);
  border-radius: var(--psm-g-radius);
  background: var(--psm-g-surface);
  color: var(--psm-g-text);
  font-family: inherit;
  font-size: 0.875rem;
}

[data-psm-site="vechtdal"] .psm-gallery-search {
  border-radius: 0;
}

.psm-gallery-year-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.psm-gallery-year-btn {
  min-height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--psm-g-border);
  border-radius: 999px;
  background: transparent;
  color: var(--psm-g-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.psm-gallery-year-btn:hover {
  border-color: var(--psm-g-accent);
  color: var(--psm-g-accent);
}

.psm-gallery-year-btn.active {
  background: var(--psm-g-heading);
  border-color: var(--psm-g-heading);
  color: #fff;
}

[data-psm-site="vechtdal"] .psm-gallery-year-btn {
  border-radius: 0;
}

.psm-gallery-year-btn.active {
  border-radius: var(--psm-g-radius);
}

[data-psm-site="vechtdal"] .psm-gallery-year-btn.active {
  border-radius: 0;
}

.psm-gallery-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Flash toast */
.psm-gallery-flash {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 10050;
  max-width: min(90vw, 22rem);
  padding: 0.65rem 1rem;
  border-radius: var(--psm-g-radius);
  background: var(--psm-g-heading);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.psm-gallery-flash.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* PhotoSwipe accent */
.pswp__button--arrow,
.pswp__button--close {
  color: var(--psm-g-accent, #0ea5e9) !important;
}

/* YouTube-tegels in unified media-raster */
.psm-gallery-video {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--psm-g-radius);
  aspect-ratio: 4 / 3;
}

[data-psm-site="vechtdal"] .psm-gallery-video {
  border-radius: 0;
}

.psm-gallery-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.psm-gallery-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.08));
  color: #fff;
  pointer-events: none;
}

.psm-gallery-video-play svg {
  width: 3rem;
  height: 3rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.psm-gallery-video:hover img {
  transform: scale(1.03);
}

.psm-gallery-video:focus-visible {
  outline: 2px solid var(--psm-g-accent);
  outline-offset: 2px;
}

/* YouTube modal */
.psm-gallery-video-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.82);
}

.psm-gallery-video-modal[hidden] {
  display: none !important;
}

body.psm-gallery-video-open {
  overflow: hidden;
}

.psm-gallery-video-dialog {
  position: relative;
  width: min(960px, 100%);
}

.psm-gallery-video-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.psm-gallery-video-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.psm-gallery-video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

