/* ─────────────────────────────────────────────────────────────────────────
   B GREEN Gallery — scoped design styling.
   Namespaced under .bgreen-gallery so nothing here affects the rest of the
   site (no global font/colour/token changes). Playfair is already loaded by
   the theme; used for the serif names.
   ───────────────────────────────────────────────────────────────────────── */
.bgreen-gallery {
    --bg-accent: #425034;
    --bg-ink-heading: #3E3E37;
    --bg-ink-body: #57564D;
    --bg-ink-soft: #85847A;
    --bg-ink-faint: #ABAA9F;
    --bg-hairline: #E6E3D9;
    --bg-sand: #EFEBE2;
    --bg-serif: 'Playfair Display', Georgia, serif;

    color: var(--bg-ink-body);
    padding-bottom: 96px;
}
.bgreen-gallery *, .bgreen-gallery *::before, .bgreen-gallery *::after { box-sizing: border-box; }
.bgreen-gallery a { color: inherit; text-decoration: none; }

.bgreen-gallery .bg-head { padding-top: 56px; display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.bgreen-gallery .bg-breadcrumbs { font-size: 13px; color: var(--bg-ink-soft); display: flex; gap: 8px; flex-wrap: wrap; }
.bgreen-gallery .bg-breadcrumbs a:hover { color: var(--bg-accent); text-decoration: underline; }
.bgreen-gallery .bg-breadcrumbs .sep { color: var(--bg-ink-faint); }
.bgreen-gallery .bg-display { font-family: var(--bg-serif); font-weight: 500; font-size: clamp(38px, 5vw, 58px); line-height: 1.05; color: var(--bg-ink-heading); }
.bgreen-gallery .bg-lead { font-size: 18px; line-height: 1.65; color: var(--bg-ink-body); max-width: 60ch; }

/* Transparent header: the theme makes #header position:absolute over this page
   (body.homepage-transparent-header). Zero the page-main top gap so the hero
   sits under the header. Scoped to this stylesheet, which only loads here. */
.homepage-transparent-header .page-main { margin-top: 0 !important; }
.homepage-transparent-header .columns,
.homepage-transparent-header .column.main { padding-top: 0 !important; }

/* Hero — matches the design's .page-hero exactly: a 2-column split with the copy
   left-aligned to the site container (not centred) on solid paper-warm, and the
   image on the right under a paper-warm veil (top + left) so the transparent
   header's dark text stays readable and the image blends into the copy column. */
.bgreen-gallery .bg-phero { position: relative; width: 100vw; margin-left: calc(50% - 50vw);
    display: grid; grid-template-columns: 1fr 1fr; min-height: min(56vh, 600px); background: #F7F5EF; }
.bgreen-gallery .bg-phero .ph-copy { position: relative; z-index: 3; display: flex; flex-direction: column;
    justify-content: center; gap: 22px;
    padding: 92px 3rem 92px max(3rem, calc((100vw - 1600px) / 2 + 3rem)); }
.bgreen-gallery .bg-phero .ph-media { position: relative; overflow: hidden; }
.bgreen-gallery .bg-phero .ph-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bgreen-gallery .bg-phero .ph-media::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background:
    linear-gradient(180deg, #F7F5EF 0%, rgba(247,245,239,0.96) 130px, rgba(247,245,239,0.66) 320px, rgba(247,245,239,0.28) 520px, rgba(247,245,239,0.08) 680px),
    linear-gradient(90deg, #F7F5EF 0%, #F7F5EF 18%, rgba(247,245,239,0.9) 40%, rgba(247,245,239,0.55) 58%, rgba(247,245,239,0.2) 76%, rgba(247,245,239,0) 92%); }
.bgreen-gallery .bg-phero .bg-display { color: var(--bg-ink-heading); max-width: 11em; }
.bgreen-gallery .bg-phero .bg-lead { color: var(--bg-ink-body); max-width: 44ch; }
.bgreen-gallery .bg-phero .bg-breadcrumbs { color: var(--bg-ink-soft); }
.bgreen-gallery .bg-phero .bg-breadcrumbs a:hover { color: var(--bg-accent); }
.bgreen-gallery .bg-phero .bg-breadcrumbs .sep { color: var(--bg-ink-faint); }
/* Keep the gallery content grid aligned to the same 1600px container as the hero copy. */
.bgreen-gallery .container { max-width: 1600px; padding-left: 3rem; padding-right: 3rem; margin-left: auto; margin-right: auto; }
@media (max-width: 1000px) {
    .bgreen-gallery .bg-phero { grid-template-columns: 1fr; }
    .bgreen-gallery .bg-phero .ph-copy { padding: 112px 24px 36px; }
    .bgreen-gallery .bg-phero .ph-media { min-height: 300px; }
    .bgreen-gallery .bg-phero .ph-media::after { background: linear-gradient(180deg, rgba(247,245,239,0.55) 0%, rgba(247,245,239,0) 55%); }
    .bgreen-gallery .container { padding-left: 24px; padding-right: 24px; }
}

/* Intro */
.bgreen-gallery .bg-intro { text-align: center; max-width: 720px; margin: 64px auto 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bgreen-gallery .bg-intro h2 { font-family: var(--bg-serif); font-size: clamp(28px, 3.5vw, 40px); color: var(--bg-ink-heading); }

/* Tiles */
.bgreen-gallery .gtiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.bgreen-gallery .gtiles.duo { grid-template-columns: repeat(2, 1fr); margin-bottom: 40px; }

.bgreen-gallery .gtile { position: relative; display: block; }
.bgreen-gallery .gtile .gt-img { display: block; position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-sand); }
.bgreen-gallery .gtile.wide .gt-img { aspect-ratio: 16 / 11; }
.bgreen-gallery .gtile .gt-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.16,1,.3,1); }
.bgreen-gallery .gtile:hover .gt-img img { transform: scale(1.045); }

/* Overlay treatment (featured) */
.bgreen-gallery .gtile.overlay .gt-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,24,16,.55) 0%, rgba(20,24,16,.04) 45%); }
.bgreen-gallery .gtile.overlay .gt-name { position: absolute; left: 26px; bottom: 22px; z-index: 2; color: #fff; font-family: var(--bg-serif); font-size: 27px; transition: transform .35s; }
.bgreen-gallery .gtile.overlay .gt-count { position: absolute; left: 26px; bottom: 16px; z-index: 2; color: rgba(255,255,255,.8); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; transform: translateY(100%); opacity: 0; transition: transform .35s, opacity .35s; }
.bgreen-gallery .gtile.overlay:hover .gt-name { transform: translateY(-22px); }
.bgreen-gallery .gtile.overlay:hover .gt-count { transform: translateY(0); opacity: 1; }

/* Caption treatment (regular) */
.bgreen-gallery .gtile.caption .gt-body { padding-top: 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--bg-hairline); }
.bgreen-gallery .gtile.caption .gt-name { font-family: var(--bg-serif); font-size: 22px; color: var(--bg-ink-heading); transition: color .2s; }
.bgreen-gallery .gtile.caption:hover .gt-name { color: var(--bg-accent); }
.bgreen-gallery .gtile.caption .gt-count { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--bg-ink-soft); }

@media (max-width: 1000px) { .bgreen-gallery .gtiles, .bgreen-gallery .gtiles.duo { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .bgreen-gallery .gtiles, .bgreen-gallery .gtiles.duo { grid-template-columns: 1fr; } }

/* ── Category view ────────────────────────────────────────────────────────── */
.bgreen-gallery .gcat-head { padding-top: 56px; display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.bgreen-gallery .mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.bgreen-gallery .mcell { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-sand); cursor: zoom-in; border: none; padding: 0; }
.bgreen-gallery .mcell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.16,1,.3,1); }
.bgreen-gallery .mcell:hover img { transform: scale(1.05); }
@media (max-width: 900px) { .bgreen-gallery .mgrid { grid-template-columns: 1fr 1fr; } }

/* ── Lightbox (light "Nordic" theme) ──────────────────────────────────────── */
.bg-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; }
.bg-lightbox .lb-backdrop { position: absolute; inset: 0; background: rgba(245,242,235,.97); }
.bg-lightbox .lb-inner { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.bg-lightbox .lb-top { display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(20px,3vw,42px); }
.bg-lightbox .lb-cat { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #6f7365; }
.bg-lightbox .lb-btn { width: 46px; height: 46px; display: grid; place-items: center; background: #fff; border: 1px solid #e4e3d8; color: #24291d; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.bg-lightbox .lb-btn:hover { border-color: #566644; color: #566644; }
.bg-lightbox .lb-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 clamp(64px,8vw,130px); min-height: 0; }
.bg-lightbox .lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 22px; }
.bg-lightbox .lb-arrow.prev { left: clamp(16px,3vw,42px); }
.bg-lightbox .lb-arrow.next { right: clamp(16px,3vw,42px); }
.bg-lightbox .lb-img { display: block; max-width: min(74vw, 1100px); max-height: 72vh; width: auto; height: auto; object-fit: contain; transition: opacity .3s, transform .35s cubic-bezier(.16,1,.3,1); transform-origin: center; }
.bg-lightbox .lb-img.sliding-left { opacity: 0; transform: translateX(-40px); }
.bg-lightbox .lb-img.sliding-right { opacity: 0; transform: translateX(40px); }
.bg-lightbox .lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(20px,3vw,42px) 26px; }
.bg-lightbox .lb-zoom { display: flex; align-items: center; }
.bg-lightbox .lb-zoom .lb-btn { width: 42px; height: 42px; font-size: 18px; }
.bg-lightbox .lb-zoom .lb-btn + .lb-btn { border-left: none; }
.bg-lightbox .lb-zoom .zlevel { min-width: 64px; text-align: center; font-size: 12px; letter-spacing: .08em; color: #6f7365; }
.bg-lightbox .lb-count { font-size: 13px; letter-spacing: .14em; color: #6f7365; }
.bg-lightbox .lb-share { display: flex; gap: 8px; }
.bg-lightbox .lb-share button { width: 42px; height: 42px; display: grid; place-items: center; background: #fff; border: 1px solid #e4e3d8; color: #4d5a3a; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.bg-lightbox .lb-share button:hover { border-color: #566644; color: #fff; background: #566644; }
@media (max-width: 700px) {
    .bg-lightbox .lb-bar { flex-direction: column; gap: 14px; }
    .bg-lightbox .lb-img { max-width: 88vw; }
    .bg-lightbox .lb-stage { padding: 0 12px; }
}

/* Lightbox image caption (translatable via i18n). */
.bgreen-gallery .lb-caption { text-align: center; color: #24291d; font-size: 14px; line-height: 1.5; padding: 12px 20px 0; max-width: 60ch; margin: 0 auto; }
