
/* Page frame and side artwork */
.gallery-page {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at top, rgba(123, 121, 80, 0.16), transparent 28%),
    linear-gradient(180deg, #d9dcc2 0%, #fdfaf7 30%, #e3e5d0 100%);
}

.gallery-page::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 16vw;
  min-width: 170px;
  max-width: 320px;
  z-index: 3;
  pointer-events: none;
  background: url("images/galleryrightphont.png") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to left, #000 0 82%, rgba(0, 0, 0, 0.82) 92%, transparent 100%);
  mask-image: linear-gradient(to left, #000 0 82%, rgba(0, 0, 0, 0.82) 92%, transparent 100%);
}

.gallery-page .page-shell {
  position: relative;
  z-index: 2;
}

/* Gallery navigation */
.gallery-page .nav {
  left: 0;
  top: 0;
  bottom: 0;
  width: 16vw;
  min-width: 170px;
  max-width: 320px;
  padding-left: 34px;
  transform: none;
  display: flex;
  align-items: center;
  overflow: visible;
  isolation: isolate;
  z-index: 3;
}

.gallery-page .nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url("images/galleryleftphont.png") left center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, #000 0 82%, rgba(0, 0, 0, 0.82) 92%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0 82%, rgba(0, 0, 0, 0.82) 92%, transparent 100%);
}

.gallery-page .nav::after {
  display: none;
}

.gallery-page .nav-inner {
  position: relative;
  z-index: 1;
}

.gallery-mega-title {
  position: relative;
  margin: 0;
  padding: 0 0 10px;
  color: #2e2f33;
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: 2px;
  text-align: right;
}

.gallery-mega-title::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48px;
  height: 1px;
  background: var(--gold);
}

.gallery-title-dark {
  display: inline-block;
  color: #2e2f33;
  font-family: inherit;
  font-size: 1em;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  margin-right: 5px;
  vertical-align: middle;
}

.gallery-title-gold {
  display: inline-block;
  color: var(--gold);
  vertical-align: middle;
}

/* Photo grid */
.gallery-page-section {
  padding-top: 4px;
}

.gallery-grid-section {
  width: calc(100vw - clamp(170px, 16vw, 320px) - clamp(170px, 16vw, 320px) - 48px);
  max-width: 1180px;
  padding-top: 6px;
}

.gallery-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 10px;
}

.gallery-collage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 118px;
  grid-auto-flow: dense;
  gap: 14px;
}

.gallery-tile {
  --gallery-pan-x: 0px;
  --gallery-pan-y: 0px;
  --gallery-light-x: 50%;
  --gallery-light-y: 50%;
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: #dde0c9;
  box-shadow: 0 3px 12px rgba(33, 28, 24, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-tile[data-shape="standard"]{
  grid-column:span 1;
  grid-row:span 2;
  border-radius:8px 22px 8px 22px;
}

.gallery-tile[data-shape="portrait"]{
  grid-column:span 1;
  grid-row:span 3;
  border-radius:24px 7px 24px 7px;
}

.gallery-tile[data-shape="landscape"]{
  grid-column:span 2;
  grid-row:span 2;
  border-radius:7px 28px 7px 28px;
}

.gallery-tile[data-shape="wide"]{
  grid-column:span 2;
  grid-row:span 3;
  border-radius:26px 7px 26px 7px;
}

.gallery-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle 160px at var(--gallery-light-x) var(--gallery-light-y), rgba(255,255,255,.18), transparent 70%),
    linear-gradient(to top, rgba(18,15,12,.7), transparent 48%);
  transition: opacity .4s ease;
}

.gallery-tile::after {
  content: "VIEW";
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
  font: 600 .55rem/1 "Montserrat", sans-serif;
  letter-spacing: .14em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.035) translate3d(var(--gallery-pan-x), var(--gallery-pan-y), 0);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .45s ease;
}

.gallery-tile:hover img {
  transform: scale(1.095) translate3d(var(--gallery-pan-x), var(--gallery-pan-y), 0);
  filter: saturate(1.08) contrast(1.03);
}

.gallery-tile:hover::before,
.gallery-tile:focus-visible::before{
  opacity:1;
  transform:translateY(0);
}

.gallery-tile:hover,
.gallery-tile:focus-visible {
  z-index: 1;
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(33, 28, 24, 0.2);
}

.gallery-collage .gallery-tile{
  transition:
    transform .38s cubic-bezier(.2,.7,.2,1),
    box-shadow .38s ease,
    opacity .35s ease;
}

.gallery-tile:active{
  transform:translateY(-1px) scale(.985);
}

.gallery-tile:hover::after,
.gallery-tile:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

/* Gallery filters */
.toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
  font-family: "Cinzel", serif;
}

.filter {
  position: relative;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: 600 0.92rem/1.2 "Cinzel", serif;
  letter-spacing: 0.8px;
  transition: color 0.2s ease;
}

.filter::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: var(--gold2);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.filter:hover,
.filter.active {
  color: var(--gold2);
}

.filter.active {
  font-weight: 600;
}

.filter.active::after {
  transform: scaleX(1);
}

.filter:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Full-screen photo viewer */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 28px;
  background: rgba(0, 0, 0, 0.82);
}

.lightbox.open {
  display: flex;
}

.lightbox.open .lb-inner {
  animation: galleryZoomIn 0.3s ease both;
}

@keyframes galleryZoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.lb-inner {
  position: relative;
  width: auto;
  max-width: 92vw;
  max-height: 92vh;
  padding: 0;
}

.lb-img {
  display: block;
  width: auto;
  max-width: 92vw;
  height: auto;
  max-height: 88vh;
  border-radius: 2px;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
  transition: opacity .22s ease, transform .3s ease;
}

.lb-img.is-changing{
  opacity:.25;
  transform:scale(.985);
}

.lb-nav{
  position:fixed;
  top:50%;
  z-index:2;
  width:52px;
  height:52px;
  border:1px solid rgba(255,255,255,.3);
  border-radius:50%;
  color:#fff;
  background:rgba(20,17,14,.36);
  backdrop-filter:blur(8px);
  cursor:pointer;
  font-size:1.25rem;
  transform:translateY(-50%);
  transition:background .25s ease, transform .25s ease;
}

.lb-nav:hover{
  background:rgba(185,140,93,.72);
  transform:translateY(-50%) scale(1.06);
}

.lb-prev{ left:24px; }
.lb-next{ right:24px; }

.lb-count{
  position:fixed;
  left:50%;
  bottom:18px;
  color:rgba(255,255,255,.78);
  font:500 .7rem/1 "Montserrat", sans-serif;
  letter-spacing:.2em;
  transform:translateX(-50%);
}

.lb-bar {
  position: absolute;
  top: 10px;
  right: 10px;
}

.lb-btn {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  font-size: 1rem;
}

.lb-btn:hover {
  background: rgba(0, 0, 0, 0.78);
}

/* Responsive gallery */
@media (max-width: 980px) {
  .gallery-collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 112px;
  }

  .gallery-tile[data-shape]{
    grid-column:span 1;
    grid-row:span 2;
  }

  .gallery-tile[data-shape="portrait"]{
    grid-row:span 3;
  }

  .gallery-tile[data-shape="landscape"],
  .gallery-tile[data-shape="wide"]{
    grid-column:span 2;
  }

  .gallery-tile[data-shape="wide"]{
    grid-row:span 3;
  }
}

@media (max-width: 720px) {
  html,
  body.gallery-page,
  .gallery-page .page-shell,
  .gallery-page .page-shell main{
    width:100%;
    min-width:0;
    max-width:none;
  }

  .gallery-grid-section {
    width:calc(100vw - 24px)!important;
    max-width:none;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-top:72px!important;
    padding-left:0;
    padding-right:0;
  }

  .gallery-heading-row {
    align-items: flex-end;
    gap: 10px;
  }

  .gallery-mega-title {
    flex: 0 0 auto;
    font-size: clamp(1.65rem, 8vw, 2.3rem);
  }

  .toolbar {
    gap: 10px 18px;
    margin-bottom: 0;
  }

  .filter {
    padding: 7px 0;
    font-size: 0.78rem;
  }

  .gallery-page .nav {
    left: 50%;
    top: auto;
    bottom: 18px;
    width: auto;
    min-width: 0;
    max-width: none;
    padding-left: 0;
    transform: translateX(-50%);
    box-shadow: none;
  }

  .gallery-page .nav::before,
  .gallery-page .nav::after,
  .gallery-page::after {
    display: none;
  }

  .gallery-collage {
    width:100%;
    grid-template-columns: 1fr;
    grid-auto-rows: 92px;
    gap:12px;
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    filter:none!important;
  }

  .gallery-tile[data-shape]{
    grid-column:1;
    grid-row:span 3;
    border-radius:8px 20px 8px 20px;
  }

  .gallery-tile[data-shape="portrait"]{
    grid-row:span 5;
  }

  .gallery-tile[data-shape="landscape"]{
    grid-row:span 3;
  }

  .gallery-tile[data-shape="wide"]{
    grid-row:span 4;
  }

}

/* Gallery information panel: light, centered and symmetrical. */
.gallery-page .details-section{
  width:100%;
  max-width:none;
  margin:12px 0 0;
  padding:58px 48px 62px;
  background:var(--bg);
  border-top:1px solid rgba(185,140,93,.28);
  border-bottom:1px solid rgba(185,140,93,.28);
}

.gallery-page .details-grid{
  width:min(1180px, 100%);
  max-width:1180px;
  margin:0 auto;
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.gallery-page .details-column{
  min-height:245px;
  padding:18px 48px;
  justify-content:center;
  text-align:center;
}

.gallery-page .details-column:not(:last-child)::after{
  background:linear-gradient(to bottom, transparent, rgba(185,140,93,.38), transparent);
}

.gallery-page .contact-block,
.gallery-page .direct-booking-block,
.gallery-page .quick-browse-block{
  width:100%;
  max-width:360px;
  margin:0 auto;
}

.gallery-page .details-title{
  color:#201e1b;
  font-size:clamp(1.8rem, 2.4vw, 2.45rem);
  letter-spacing:.08em;
  text-align:center;
}

.gallery-page .contact-list,
.gallery-page .quick-browse-links{
  margin-top:24px;
}

.gallery-page .contact-link{
  color:#292622;
  text-align:left;
}

.gallery-page .contact-icon{
  background:rgba(185,140,93,.09);
  color:#a8784c;
  border:1px solid rgba(185,140,93,.18);
}

.gallery-page .contact-link small{
  color:#a8784c;
  font-weight:600;
}

.gallery-page .contact-link strong{
  color:#292622;
}

.gallery-page .direct-booking-copy{
  max-width:360px;
  margin:24px auto 0;
  color:#514c46;
  text-align:center;
}

.gallery-page .quick-browse-links a{
  color:#292622;
  border-bottom-color:rgba(32,30,27,.1);
  text-align:left;
}

.gallery-page .quick-browse-links a:hover{
  color:#a8784c;
  border-color:rgba(185,140,93,.32);
}

.gallery-page .quick-browse-links svg{
  color:#a8784c;
}

@media (max-width:980px){
  .gallery-page .details-section{
    margin-top:8px;
    padding:54px 28px 60px;
  }

  .gallery-page .details-column{
    padding:20px 24px;
  }
}

@media (max-width:720px){
  .gallery-page .details-section{
    margin-top:6px;
    padding:48px 18px 56px;
  }

  .gallery-page .details-grid{
    grid-template-columns:1fr;
  }

  .gallery-page .details-column{
    min-height:0;
    padding:34px 16px 42px;
  }

  .gallery-page .details-column:not(:last-child)::after{
    left:24px;
    right:24px;
    bottom:0;
    width:auto;
    height:1px;
    background:linear-gradient(to right, transparent, rgba(185,140,93,.38), transparent);
  }
}

.gallery-page .gallery-grid-section{
  padding-bottom:22px;
}

/* Immersive gallery interaction */
.gallery-tile{cursor:zoom-in;perspective:1200px;transform:translateZ(0) scale(1);transition:transform .7s cubic-bezier(.16,.76,.18,1),box-shadow .7s ease,filter .65s ease,opacity .45s ease}
.gallery-tile::before{background:radial-gradient(circle at 50% 46%,transparent 25%,rgba(14,15,10,.08) 67%,rgba(14,15,10,.48) 118%);opacity:.68;transition:opacity .75s ease,transform .9s ease}
.gallery-tile:hover,.gallery-tile:focus-visible{z-index:10;transform:perspective(1200px) translateZ(30px) scale(1.035);filter:saturate(1.07) contrast(1.035) brightness(1.025);box-shadow:0 34px 68px rgba(28,29,20,.3)}
.gallery-tile:hover::before,.gallery-tile:focus-visible::before{opacity:.12;transform:scale(1.15)}
.gallery-tile img{transform:scale(1.002);transition:transform .65s cubic-bezier(.16,.76,.18,1),filter .5s ease}
.gallery-tile:hover img,.gallery-tile:focus-visible img{transform:scale(1.09)}
@media (hover:none){.gallery-tile:active{transform:perspective(1200px) translateZ(18px) scale(1.025)}}
@media (prefers-reduced-motion:reduce){.gallery-tile,.gallery-tile img,.gallery-tile::before{transition:none}}
