/* ==========================================================================
   Hotel Rivel — GALLERY template. Scoped to .rivel-gallery-template.
   Tokens come from global.css. Same construction as the other templates.
   ========================================================================== */
.rivel-gallery-template *,
.rivel-gallery-template *::before,
.rivel-gallery-template *::after{ box-sizing:border-box; }
.rivel-gallery-template .rgl-main{
	overflow-x:clip; --rgl-container:1280px; --rgl-line:rgba(24,58,43,.14);
	background:var(--clr-warm-ivory); color:var(--clr-text-primary);
}
.rivel-gallery-template .rgl-main a{ text-decoration:none; color:inherit; }

/* Hero */
.rivel-gallery-template .rgl-hero{
	position:relative; min-height:58vh; min-height:58dvh; display:flex; align-items:flex-end;
	padding:8rem 2rem 4rem; overflow:hidden; color:var(--clr-warm-ivory); isolation:isolate; background:var(--clr-deep-green);
}
.rivel-gallery-template .rgl-hero-bg{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; }
.rivel-gallery-template .rgl-hero-overlay{ position:absolute; inset:0; z-index:-1; background:linear-gradient(210deg,rgba(16,42,32,.10) 0%,rgba(16,42,32,.75) 60%,rgba(10,26,20,.95) 100%); }
.rivel-gallery-template .rgl-hero-container{ width:100%; max-width:var(--rgl-container); margin:0 auto; }
.rivel-gallery-template .rgl-hero-content{ display:flex; flex-direction:column; max-width:760px; }
.rivel-gallery-template .rgl-hero-eyebrow{ font-family:var(--font-primary); font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.15em; margin-bottom:1rem; }
.rivel-gallery-template .rgl-hero-title{
	font-family:var(--font-primary); font-size:clamp(1.8rem,4vw,3.5rem); font-weight:700; text-transform:uppercase;
	line-height:.98; letter-spacing:-.035em; margin-bottom:1.25rem; color:var(--clr-warm-ivory);
}
.rivel-gallery-template .rgl-hero-desc{ font-size:clamp(.9rem,1.2vw,1rem); line-height:1.6; color:rgba(245,242,233,.85); max-width:600px; }

/* Section */
.rivel-gallery-template .rgl-section{ padding:4.5rem 2rem 8rem; }
.rivel-gallery-template .rgl-container{ width:100%; max-width:var(--rgl-container); margin:0 auto; }

/* Filters */
.rivel-gallery-template .rgl-filters{ display:flex; flex-wrap:wrap; gap:.625rem; margin-bottom:3rem; padding-bottom:2rem; border-bottom:1px solid var(--rgl-line); }
.rivel-gallery-template .rgl-pill{
	min-height:44px; padding:.6rem 1.25rem; border-radius:50px; border:1px solid var(--rgl-line); background:transparent;
	font-family:var(--font-primary); font-size:.875rem; font-weight:600; color:var(--clr-primary-green); cursor:pointer;
	transition:background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.rivel-gallery-template .rgl-pill:hover{ border-color:var(--clr-primary-green); }
.rivel-gallery-template .rgl-pill.is-active{ background:var(--clr-deep-green); border-color:var(--clr-deep-green); color:var(--clr-warm-ivory); }
.rivel-gallery-template .rgl-pill:focus-visible{ outline:2px solid var(--clr-terracotta); outline-offset:3px; }

/* Masonry (CSS columns keep each photo's natural proportions) */
.rivel-gallery-template .rgl-grid{ column-count:3; column-gap:1.25rem; }
.rivel-gallery-template .rgl-item{
	display:block; margin:0 0 1.25rem; break-inside:avoid; overflow:hidden; border-radius:12px; background:var(--clr-soft-cream);
	cursor:zoom-in;
}
.rivel-gallery-template .rgl-item[hidden]{ display:none; }
.rivel-gallery-template .rgl-img{ width:100%; height:auto; display:block; transition:transform .8s cubic-bezier(.2,.8,.2,1); }
.rivel-gallery-template .rgl-item:hover .rgl-img{ transform:scale(1.04); }
.rivel-gallery-template .rgl-item:focus-visible{ outline:2px solid var(--clr-terracotta); outline-offset:3px; }
.rivel-gallery-template .rgl-empty{ font-size:1.0625rem; color:var(--clr-text-secondary); }

/* Lightbox */
.rivel-gallery-template .rgl-lightbox{
	position:fixed; inset:0; z-index:100000; background:rgba(10,26,20,.95);
	display:flex; align-items:center; justify-content:center; padding:4.5rem 5rem 5rem;
	opacity:0; transition:opacity .25s ease;
}
.rivel-gallery-template .rgl-lightbox[hidden]{ display:none; }
.rivel-gallery-template .rgl-lightbox.is-open{ opacity:1; }
.rivel-gallery-template .rgl-lb-figure{ margin:0; max-width:100%; max-height:100%; display:flex; flex-direction:column; align-items:center; gap:1rem; }
.rivel-gallery-template .rgl-lb-img{ max-width:100%; max-height:calc(100vh - 11rem); max-height:calc(100dvh - 11rem); width:auto; height:auto; object-fit:contain; border-radius:8px; }
.rivel-gallery-template .rgl-lb-caption{ display:flex; gap:1.25rem; align-items:baseline; justify-content:center; text-align:center; color:rgba(245,242,233,.85); font-size:.9375rem; line-height:1.5; max-width:60ch; }
.rivel-gallery-template .rgl-lb-count{ font-size:.8125rem; color:rgba(245,242,233,.55); white-space:nowrap; }
.rivel-gallery-template .rgl-lb-close,
.rivel-gallery-template .rgl-lb-nav{
	position:absolute; width:48px; height:48px; border-radius:50%; border:1px solid rgba(245,242,233,.4); background:rgba(245,242,233,.08);
	color:var(--clr-warm-ivory); display:flex; align-items:center; justify-content:center; cursor:pointer;
	transition:background-color var(--transition-fast), border-color var(--transition-fast);
}
.rivel-gallery-template .rgl-lb-close:hover,
.rivel-gallery-template .rgl-lb-nav:hover{ background:rgba(245,242,233,.18); border-color:var(--clr-warm-ivory); }
.rivel-gallery-template .rgl-lb-close:focus-visible,
.rivel-gallery-template .rgl-lb-nav:focus-visible{ outline:2px solid var(--clr-terracotta); outline-offset:3px; }
.rivel-gallery-template .rgl-lb-close{ top:1.25rem; right:1.25rem; }
.rivel-gallery-template .rgl-lb-prev{ left:1.25rem; top:50%; transform:translateY(-50%); }
.rivel-gallery-template .rgl-lb-next{ right:1.25rem; top:50%; transform:translateY(-50%); }
.rivel-gallery-template .rgl-lightbox.is-single .rgl-lb-nav{ display:none; }

@media (prefers-reduced-motion:reduce){
	.rivel-gallery-template .rgl-img,.rivel-gallery-template .rgl-lightbox{ transition:none; }
	.rivel-gallery-template .rgl-item:hover .rgl-img{ transform:none; }
}

/* Tablet */
@media (max-width:1024px){
	.rivel-gallery-template .rgl-section{ padding:4rem 2rem 6rem; }
	.rivel-gallery-template .rgl-grid{ column-count:2; }
}

/* Mobile */
@media (max-width:767px){
	.rivel-gallery-template .rgl-hero{ padding:7rem 1.5rem 3rem; min-height:54vh; min-height:54dvh; }
	.rivel-gallery-template .rgl-section{ padding:3rem 1.5rem 5rem; }
	.rivel-gallery-template .rgl-filters{
		flex-wrap:nowrap; overflow-x:auto; margin:0 -1.5rem 2rem; padding:0 1.5rem 1.5rem;
		scrollbar-width:none; -webkit-overflow-scrolling:touch;
	}
	.rivel-gallery-template .rgl-filters::-webkit-scrollbar{ display:none; }
	.rivel-gallery-template .rgl-pill{ flex-shrink:0; }
	.rivel-gallery-template .rgl-grid{ column-count:1; }
	.rivel-gallery-template .rgl-item{ margin-bottom:1rem; }
	.rivel-gallery-template .rgl-lightbox{ padding:4rem 1rem 6.5rem; }
	/* arrows move to the bottom so they don't cover the photo */
	.rivel-gallery-template .rgl-lb-prev,
	.rivel-gallery-template .rgl-lb-next{ top:auto; bottom:1.25rem; transform:none; }
	.rivel-gallery-template .rgl-lb-prev{ left:calc(50% - 60px); }
	.rivel-gallery-template .rgl-lb-next{ right:calc(50% - 60px); }
	.rivel-gallery-template .rgl-lb-img{ max-height:calc(100vh - 14rem); max-height:calc(100dvh - 14rem); }
}
