/* Gallery page only. Existing fonts, header, forms and every other page are untouched. */
.tp18-gallery-page .tp18-photos,
.tp18-gallery-page .tp18-videos { --tp18-blue: #006eff; --tp18-ink: #111; width: 100%; max-width: 1300px; min-width: 0; margin: 64px auto; font-family: var(--tp-font, inherit); box-sizing: border-box; }
.tp18-gallery-page .tp18-photos *,
.tp18-gallery-page .tp18-videos * { box-sizing: border-box; }
.tp18-gallery-page .tp18-section-title { font-family: inherit; font-size: clamp(26px, 3vw, 42px); line-height: 1.2; color: #111; font-weight: 700; margin: 0 0 30px; text-transform: none; overflow-wrap: anywhere; }
.tp18-gallery-page ul.tp18-photo-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; width: 100%; margin: 0 !important; padding: 0 !important; list-style: none; }
.tp18-gallery-page .tp18-photo-grid > .tp18-photo { display: block; position: relative; grid-column: span 2; min-width: 0; width: auto; margin: 0 !important; padding: 0 !important; list-style: none; }
.tp18-gallery-page .tp18-photo-grid > .tp18-photo::before,
.tp18-gallery-page .tp18-photo-grid > .tp18-photo::after { display: none !important; }
.tp18-gallery-page .tp18-photo-grid > .tp18-photo:nth-child(7n + 1),
.tp18-gallery-page .tp18-photo-grid > .tp18-photo:nth-child(7n + 2),
.tp18-gallery-page .tp18-photo-grid > .tp18-photo:nth-child(7n + 6),
.tp18-gallery-page .tp18-photo-grid > .tp18-photo:nth-child(7n + 7) { grid-column: span 3; }
.tp18-gallery-page .tp18-photo-grid .tp18-photo__open { position: relative; display: block; width: 100%; aspect-ratio: 4/3; overflow: hidden; border-radius: 20px; background: #f1f3f6; color: #fff; text-decoration: none; cursor: zoom-in; }
.tp18-gallery-page .tp18-photo-grid .tp18-photo__open > img { display: block; width: 100% !important; max-width: 100% !important; height: 100% !important; max-height: none !important; margin: 0 !important; object-fit: cover !important; object-position: center !important; border-radius: 0 !important; transition: transform .2s ease; }
.tp18-gallery-page .tp18-photo__open:hover > img { transform: scale(1.025); }
.tp18-gallery-page .tp18-photo__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.65)); }
.tp18-gallery-page .tp18-photo__label { position: absolute; left: 24px; right: 24px; bottom: 22px; display: grid; gap: 6px; color: #fff !important; pointer-events: none; }
.tp18-gallery-page .tp18-photo__label strong { color: #fff !important; font: 700 clamp(16px, 1.5vw, 22px)/1.28 var(--tp-font, inherit); overflow-wrap: anywhere; }
.tp18-gallery-page .tp18-photo__label small { color: #fff; font-size: 13px; line-height: 1.4; }
.tp18-gallery-page .tp18-photo__zoom { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; opacity: 0; transition: opacity .15s; }
.tp18-gallery-page .tp18-photo__open:hover .tp18-photo__zoom,
.tp18-gallery-page .tp18-photo__open:focus-visible .tp18-photo__zoom { opacity: 1; }
.tp18-gallery-page .tp18-photo__zoom svg { display: block; width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.8; }
.tp18-gallery-page .tp18-photos__bottom { display: grid; justify-items: center; gap: 12px; margin-top: 30px; text-align: center; }
.tp18-gallery-page a.tp18-more { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-height: 50px; padding: 12px 28px; background: #006eff; color: #fff !important; border: 1px solid #006eff; border-radius: 999px; font: 700 15px/1.4 var(--tp-font, inherit); text-decoration: none !important; cursor: pointer; }
.tp18-gallery-page a.tp18-more:hover { background: #0058d4; }
.tp18-gallery-page a.tp18-more[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.tp18-gallery-page .tp18-status { margin: 0; color: #555; font: 400 13px/1.5 var(--tp-font, inherit); min-height: 20px; }
.tp18-gallery-page .tp18-gallery-admin-note { margin: 26px 0; padding: 18px; border-left: 4px solid #006eff; background: #f3f6fa; font-size: 14px; line-height: 1.6; }
/* v20: portrait 9:16 players, up to two rows per page.
   Only the local-video block changes; photo gallery and lightbox stay as in v19. */
.tp18-gallery-page .tp18-videos { --tp20-video-columns: 4; --tp20-video-gap: 20px; --tp20-side-space: 24px; }
.tp18-gallery-page .tp18-video-carousel { position: relative; min-width: 0; width: 100%; max-width: 100%; margin: 0 auto; padding: 0 var(--tp20-side-space); }
.tp18-gallery-page .tp18-video-track { display: grid; grid-template-columns: repeat(var(--tp20-video-columns), minmax(0, 1fr)); grid-auto-flow: row; grid-auto-columns: auto; gap: 20px var(--tp20-video-gap); align-items: start; width: 100%; min-width: 0; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
.tp18-gallery-page .tp18-video-slide { display: block; margin: 0; padding: 0; min-width: 0; width: 100%; }
.tp18-gallery-page video.tp18-video { display: block; width: 100% !important; min-width: 0; max-width: 100% !important; height: auto !important; min-height: 0; max-height: none !important; aspect-ratio: 9 / 16; margin: 0; background: #14171c; border-radius: 18px; object-fit: contain; object-position: center; }
.tp18-gallery-page video.tp18-video:fullscreen { width: 100% !important; height: 100% !important; aspect-ratio: auto; border-radius: 0; object-fit: contain; }
.tp18-gallery-page .tp18-video-slide figcaption { margin-top: 12px; color: #111; font: 700 16px/1.45 var(--tp-font, inherit); overflow-wrap: anywhere; }
.tp18-gallery-page .tp18-video-error { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.tp18-gallery-page .tp18-videos > .tp18-status { margin-top: 20px; text-align: center; }
.tp18-gallery-page .tp18-arrow { display: grid; place-items: center; flex: 0 0 auto; padding: 0 !important; margin: 0; width: 48px; height: 48px; min-width: 48px; border: 2px solid #fff; border-radius: 50%; background: #006eff; color: #fff; box-shadow: 0 3px 14px rgba(12,45,93,.15); cursor: pointer; appearance: none; }
.tp18-gallery-page .tp18-arrow svg { display: block; width: 24px; height: 24px; max-width: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.tp18-gallery-page .tp18-video-prev,
.tp18-gallery-page .tp18-video-next { position: absolute; top: calc(50% - 24px); z-index: 2; }
.tp18-gallery-page .tp18-video-prev { left: 0; }
.tp18-gallery-page .tp18-video-next { right: 0; }
.tp18-gallery-page .tp18-arrow:hover:not(:disabled) { background: #0057d3; }
.tp18-gallery-page .tp18-arrow:disabled { background: #d9e1ee; color: #687792; cursor: default; box-shadow: none; }
.tp18-gallery-page .tp18-photo__open:focus-visible,
.tp18-gallery-page .tp18-more:focus-visible,
.tp18-gallery-page .tp18-arrow:focus-visible { outline: 3px solid #80b4ff; outline-offset: 4px; }
.tp18-gallery-page .tp18-videos [hidden],
.tp18-gallery-page .tp18-photos [hidden],
.tp18-gallery-page .tp18-lightbox [hidden] { display: none !important; }
/* A native dialog is in the browser top layer, above the site's header/chat widgets. */
html.tp18-lightbox-open, body.tp18-lightbox-open { overflow: hidden !important; }
.tp18-gallery-page dialog.tp18-lightbox { position: fixed !important; inset: 0 !important; margin: auto !important; padding: 60px 76px 64px !important; width: 100vw !important; max-width: 100vw !important; height: 100vh !important; height: 100dvh !important; max-height: 100dvh !important; border: 0 !important; border-radius: 0 !important; background: rgba(10,14,21,.96) !important; color: #fff; overflow: hidden; box-sizing: border-box; z-index: 2147483647; font-family: var(--tp-font, Arial, sans-serif); }
.tp18-gallery-page dialog.tp18-lightbox:not([open]) { display: none !important; }
.tp18-gallery-page dialog.tp18-lightbox[open] { display: flex !important; flex-direction: column; }
.tp18-lightbox::backdrop { background: rgba(10,14,21,.92); }
.tp18-gallery-page .tp18-lightbox__figure { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; min-height: 0; width: 100%; margin: 0; }
.tp18-gallery-page .tp18-lightbox__image { display: block; width: 100% !important; height: 100% !important; min-height: 0; max-width: 100% !important; max-height: 100% !important; object-fit: contain; border-radius: 0; margin: 0; }
.tp18-gallery-page .tp18-lightbox__caption { color: #fff; font-size: 15px; line-height: 1.5; text-align: center; margin-top: 16px; max-width: 100%; overflow-wrap: anywhere; flex-shrink: 0; }
.tp18-gallery-page .tp18-lightbox__count { position: absolute; top: 24px; left: 28px; color: #fff; font-size: 14px; }
.tp18-gallery-page .tp18-lightbox__close { position: absolute; right: 18px; top: 14px; }
.tp18-gallery-page .tp18-lightbox__prev { position: absolute; left: 18px; top: calc(50% - 24px); }
.tp18-gallery-page .tp18-lightbox__next { position: absolute; right: 18px; top: calc(50% - 24px); }
.tp18-gallery-page .tp18-lightbox__message { position: absolute; left: 20px; right: 20px; bottom: 20px; text-align: center; color: #fff; font-size: 13px; }
.tp18-gallery-page .tp18-lightbox .tp18-arrow { border-color: rgba(255,255,255,.3); }
@media (max-width: 900px) {
    .tp18-gallery-page ul.tp18-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .tp18-gallery-page .tp18-photo-grid > .tp18-photo:nth-child(n) { grid-column: span 1; }
    .tp18-gallery-page .tp18-photo__label { left: 18px; right: 18px; bottom: 18px; }
}
@media (max-width: 1000px) {
    .tp18-gallery-page .tp18-videos { --tp20-video-columns: 2; --tp20-video-gap: 18px; }
}
@media (max-width: 600px) {
    .tp18-gallery-page .tp18-videos { --tp20-video-columns: 1; --tp20-video-gap: 16px; --tp20-side-space: 20px; }
    .tp18-gallery-page .tp18-video-track { row-gap: 24px; }
    .tp18-gallery-page .tp18-video-carousel .tp18-arrow { width: 42px; height: 42px; min-width: 42px; }
    .tp18-gallery-page .tp18-video-prev, .tp18-gallery-page .tp18-video-next { top: calc(50% - 21px); }
    .tp18-gallery-page .tp18-video-slide figcaption { font-size: 14px; }
}
@media (max-width: 600px) {
    .tp18-gallery-page .tp18-photos, .tp18-gallery-page .tp18-videos { margin: 40px auto; }
    .tp18-gallery-page .tp18-section-title { font-size: 26px; margin-bottom: 22px; }
    .tp18-gallery-page ul.tp18-photo-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .tp18-gallery-page .tp18-photo-grid .tp18-photo__open { border-radius: 16px; }
    .tp18-gallery-page .tp18-photo__label strong { font-size: 18px; }
    .tp18-gallery-page .tp18-photo__zoom { opacity: 1; width: 32px; height: 32px; top: 12px; right: 12px; }
    .tp18-gallery-page dialog.tp18-lightbox { padding: 64px 12px 92px !important; }
    .tp18-gallery-page .tp18-lightbox__prev { top: auto; bottom: max(18px, env(safe-area-inset-bottom)); left: calc(50% - 58px); }
    .tp18-gallery-page .tp18-lightbox__next { top: auto; bottom: max(18px, env(safe-area-inset-bottom)); right: calc(50% - 58px); }
    .tp18-gallery-page .tp18-lightbox__message { bottom: 72px; font-size: 11px; }
    .tp18-gallery-page .tp18-lightbox__caption { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .tp18-gallery-page .tp18-photo-grid img { transition: none; }
}

.tp18-gallery-page .tp18-lightbox__image { touch-action: pan-y pinch-zoom; }
