.gpog {
  --gpog-gap: 25px;
  --gpog-columns: 2;
  --gpog-title-size: 22px;
  --gpog-title-weight: 700;
  --gpog-title-color: #171717;
  --gpog-accent: #c1272d;
  --gpog-text-size: 18px;
  --gpog-text-weight: 310;
  --gpog-text-color: #171717;
  --gpog-card-ratio: 4 / 5;
  --gpog-cover-ratio: 4 / 3;
  --gpog-fade-height: 60%;
  --gpog-text-pad: 25px;
  --gpog-dialog-title-size: 16px;
  --gpog-dialog-text-size: 14px;
  --gpog-media-title-size: 16px;
  --gpog-dialog-text-weight: 300;
  --gpog-fade-color: 255, 255, 255;
  width: 100%;
  min-width: 0;
  font-family: "Josefin Sans", sans-serif;
}
.gpog *, .gpog *::before, .gpog *::after { box-sizing: border-box; }
.gpog [hidden] { display: none !important; }
.gpog .gpog-grid { display: grid; grid-template-columns: repeat(var(--gpog-columns), minmax(0, 1fr)); align-items: stretch; gap: var(--gpog-gap); width: 100%; }
/* Shared card parts. */
.gpog .gpog-card { position: relative; display: flex; flex-direction: column; margin: 0; background: #fff; border-radius: 0; box-shadow: 10px 10px 20px 1px #00000012; overflow: hidden; }
.gpog .gpog-cover { display: block; width: 100%; max-width: none; margin: 0; object-fit: cover; object-position: center; }
.gpog h2.gpog-card-title { margin: 0; padding: 0; font-family: "Josefin Sans", sans-serif; font-size: var(--gpog-title-size); font-weight: var(--gpog-title-weight); line-height: 1.25; text-transform: uppercase; color: var(--gpog-title-color); transition: color 400ms ease; }
.gpog p.gpog-card-description { margin-bottom: 0; font-family: "Josefin Sans", sans-serif; font-size: var(--gpog-text-size); font-weight: var(--gpog-text-weight); line-height: 1.5; color: var(--gpog-text-color); }
/* Classic card: cover area of fixed ratio filled by the image, text below. */
.gpog--classic .gpog-cover { aspect-ratio: var(--gpog-cover-ratio); height: auto; flex: none; }
.gpog--classic .gpog-card-body { padding: 25px; }
.gpog--classic .gpog-card-title + .gpog-card-description { margin-top: 20px; }
/* Overlay card: cover fills the card, white fade at the bottom grows with the text. */
.gpog--overlay .gpog-card { justify-content: flex-end; aspect-ratio: var(--gpog-card-ratio); }
.gpog--overlay .gpog-cover { position: absolute; inset: 0; height: 100%; }
/* Solid white behind the text; the fade starts above it. */
.gpog--overlay .gpog-card-body { position: relative; display: flex; flex-direction: column; justify-content: flex-end; flex: none; padding: 5px var(--gpog-text-pad) var(--gpog-text-pad); background: rgb(var(--gpog-fade-color)); }
/* Long, soft fade above the text; height is a % of the card width (padding % uses the width). */
.gpog--overlay .gpog-card-body::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 0; padding-top: var(--gpog-fade-height); pointer-events: none; background: linear-gradient(to top, rgba(var(--gpog-fade-color), 1) 0%, rgba(var(--gpog-fade-color), 0.97) 10%, rgba(var(--gpog-fade-color), 0.91) 20%, rgba(var(--gpog-fade-color), 0.82) 30%, rgba(var(--gpog-fade-color), 0.7) 40%, rgba(var(--gpog-fade-color), 0.56) 50%, rgba(var(--gpog-fade-color), 0.42) 60%, rgba(var(--gpog-fade-color), 0.28) 70%, rgba(var(--gpog-fade-color), 0.16) 80%, rgba(var(--gpog-fade-color), 0.06) 90%, rgba(var(--gpog-fade-color), 0) 100%); }
.gpog--overlay .gpog-card-title + .gpog-card-description { margin-top: 10px; }
.gpog--overlay p.gpog-card-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.gpog .gpog-card:hover .gpog-card-title, .gpog .gpog-card:focus-within .gpog-card-title { color: var(--gpog-accent); }
.gpog .gpog-card-open { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; border-radius: 0; cursor: pointer; }
.gpog .gpog-card-open:focus-visible { outline: 3px solid var(--gpog-accent); outline-offset: -3px; }
.gpog dialog.gpog-dialog { position: fixed; inset: 0; margin: 0; padding: 20px; width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: 100dvh; background: #171717; color: #f6f6f6; border: 0; overflow: auto; font-family: "Josefin Sans", sans-serif; }
.gpog dialog.gpog-dialog[open] { display: grid; grid-template-rows: auto minmax(180px, 1fr) auto auto; gap: 12px; }
.gpog-dialog::backdrop { background: #171717; }
.gpog .gpog-dialog-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.gpog .gpog-dialog button { color: #f6f6f6; background: transparent; border: 0; padding: 8px; font: inherit; font-size: 30px; line-height: 1; cursor: pointer; min-width: 44px; min-height: 44px; transition: color 400ms ease; }
.gpog .gpog-dialog button:hover, .gpog .gpog-dialog button:focus-visible { color: #c1272d; }
.gpog .gpog-dialog button:focus-visible { outline: 2px solid currentColor; }
/* Counter hidden on screen, still read by screen readers. */
.gpog .gpog-counter { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Group title and description at the top left, next to the close button. */
/* Group title – description on one line, top left (max 2 lines). */
.gpog .gpog-dialog-group { flex: 1 1 auto; min-width: 0; max-width: 900px; padding-top: 8px; text-align: left; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.gpog .gpog-dialog h2, .gpog .gpog-dialog h3 { display: inline; color: #f6f6f6; font-family: "Josefin Sans", sans-serif; font-weight: 400; line-height: inherit; margin: 0; }
.gpog .gpog-dialog h2 { font-size: var(--gpog-dialog-title-size); }
.gpog .gpog-dialog h3 { font-size: var(--gpog-media-title-size); }
.gpog .gpog-dialog .gpog-group-description { display: inline; font-size: var(--gpog-dialog-text-size); font-weight: var(--gpog-dialog-text-weight); }
.gpog .gpog-dialog .gpog-group-description p { display: inline; }
.gpog .gpog-dialog .gpog-group-description p + p::before { content: " "; }
/* Dash between title and text, only when there is text. */
.gpog .gpog-dialog .gpog-group-description:not(:empty)::before, .gpog .gpog-dialog .gpog-media-caption:not(:empty)::before { content: " – "; }
.gpog .gpog-dialog p { margin: 0; }
.gpog .gpog-viewer { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; min-height: 0; gap: 10px; }
.gpog .gpog-stage { position: relative; height: 100%; min-height: 180px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gpog .gpog-stage img, .gpog .gpog-stage video { display: block; width: 100%; height: 100%; max-height: 100%; object-fit: contain; margin: 0; }
.gpog .gpog-stage .gpog-play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); font-size: 20px; background: #171717e6; border: 1px solid #f6f6f6; padding: 16px 24px; }
.gpog .gpog-caption { text-align: center; font-size: 16px; line-height: 1.4; }
.gpog .gpog-dialog p.gpog-media-caption { display: inline; font-weight: var(--gpog-dialog-text-weight); }
.gpog .gpog-error { text-align: center; font-size: 16px; }
@media (max-width: 1119px) { .gpog { --gpog-gap: 20px; } }
@media (max-width: 767px) {
  .gpog { --gpog-columns: 1; }
  .gpog--classic .gpog-card-body { padding: 20px; }
  .gpog--overlay { --gpog-text-pad: 20px; }
  .gpog dialog.gpog-dialog { padding: 10px; }
  .gpog .gpog-viewer { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 2px; }
  .gpog .gpog-viewer button { padding: 0; min-width: 36px; }
}
@media (prefers-reduced-motion: reduce) { .gpog *, .gpog *::before, .gpog *::after { transition: none !important; } }
