/* Gallery geometry follows the reference's 100:140 card and inset arch. */
.gallery-shell{max-width:none;perspective:none}
.gallery-track{height:531px;perspective:none;transform-style:flat}
.gallery-slide{
  top:40px;width:354px;margin-left:-177px;padding:0 16px;
  perspective:1100px;
  transform:translateX(calc(var(--position,0)*100%));
  opacity:.1;filter:none;transition:transform .7s cubic-bezier(.2,.68,.2,1),opacity .7s;
}
.gallery-slide.active,.gallery-slide.adjacent{opacity:1;pointer-events:auto;cursor:pointer}
.gallery-slide .gallery-frame{
  width:100%;aspect-ratio:100/140;filter:brightness(.55) saturate(.7) drop-shadow(0 14px 18px #3c190073);
  transform:translateZ(-280px) scale(.82) rotateY(calc(var(--position,0)*-64deg));
  transform-style:preserve-3d;transition:transform .7s cubic-bezier(.2,.68,.2,1),filter .7s;
}
.gallery-slide.adjacent .gallery-frame{
  filter:brightness(.7) saturate(.7) drop-shadow(0 14px 18px #3c190073);
  transform:translateZ(-140px) scale(.88) rotateY(calc(var(--position,0)*-32deg));
}
.gallery-slide.active .gallery-frame{filter:drop-shadow(0 14px 18px #3c190073);transform:none}
.gallery-frame .gallery-photo{
  left:13%;top:17.1429%;width:74%;height:72.8571%;object-fit:cover;
  transform:scale(1.08);
  -webkit-mask:url('assets/gallery-window-mask.svg') center/100% 100% no-repeat;
  mask:url('assets/gallery-window-mask.svg') center/100% 100% no-repeat;
}
.gallery-frame .gallery-overlay{display:none}
.gallery-frame::after{
  content:'';position:absolute;left:-2%;top:-4.3%;width:104%;height:110%;
  background:url('assets/gallery-frame-fidelity.svg') center/100% 100% no-repeat;pointer-events:none;
}
.gallery-caption{
  width:416px;height:82px;margin:-8px auto 0;padding:12px 18px 26px;
  background:radial-gradient(ellipse at 50% 30%,#a3172f,#5c0816);
  border:1px solid #f6d27a99;border-radius:3px;
  clip-path:polygon(0 0,100% 0,96% 50%,100% 100%,0 100%,4% 50%);
  font-size:36px;box-shadow:0 8px 12px #4c131a33;
}
.gallery-counter{position:relative;z-index:12;margin-top:-28px;color:#f6d27a;letter-spacing:4px;font-size:10px}
.gallery-controls{margin-top:56px}
.gallery-arrow{
  width:56px;height:56px;border:0;border-radius:50%;color:#f6d27a;
  background:radial-gradient(circle at 35% 30%,#a3172f 0 27%,#5c0816 54%,transparent 56%),
    repeating-conic-gradient(#f6d27a 0 15deg,#b98321 15deg 30deg);
  box-shadow:inset 0 0 0 2px #f6d27a,0 6px 14px #3c140059;
}
.gallery-arrow:hover{background:radial-gradient(circle at 35% 30%,#b62a44 0 27%,#5c0816 54%,transparent 56%),repeating-conic-gradient(#f6d27a 0 15deg,#b98321 15deg 30deg)}
@media(max-width:900px){
  .gallery-slide{width:330px;margin-left:-165px;padding:0 15px}
  .gallery-track{height:485px}
  .gallery-caption{width:350px}
}
@media(max-width:600px){
  .gallery-track{height:407px}
  .gallery-slide{top:40px;width:250px;margin-left:-125px;padding:0 10px}
  .gallery-slide.adjacent .gallery-frame{transform:translateZ(-140px) scale(.88) rotateY(calc(var(--position,0)*-32deg))}
  .gallery-caption{width:min(88vw,270px);height:65px;font-size:25px;padding:8px 12px}
  .gallery-counter{margin-top:-22px;font-size:8px}
  .gallery-controls{margin-top:45px}
  .gallery-arrow{width:48px;height:48px}
}
@media(max-width:360px){
  .gallery-slide{width:225px;margin-left:-112.5px}
  .gallery-track{height:375px}
  .gallery-caption{width:min(88vw,245px)}
}

/* Gallery navigation from the reference. */
/* Royal Gateway gallery ribbon and thumbnail navigation. */
.gallery-banner {
  position: relative;
  z-index: 11;
  width: min(88vw, 416px);
  min-height: 82px;
  margin: -120px auto 0;
  padding: 11px 25px 9px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 30%, #a3172f, #5c0816);
  color: #f6d27a;
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
  box-shadow: 0 8px 18px #51231640;
}
.gallery-banner::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px dashed #f6d27a80;
  pointer-events: none;
}
.gallery-banner .gallery-caption {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  clip-path: none;
  color: #f6d27a;
  font-size: 36px;
  line-height: 1.15;
  text-shadow: 0 1px 1px #4d0714;
}
.gallery-banner .gallery-counter {
  display: block;
  margin-top: 3px;
  color: #f6d27ae6;
  font: 10px/1.4 'Cinzel Decorative', serif;
  letter-spacing: .35em;
}
.gallery-progress {
  width: 160px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: #dea64540;
  overflow: hidden;
}
.gallery-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,#9e691d,#ffe19a,#bc8225);
  transform-origin: left center;
  transition: transform .7s ease;
}
.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin: 24px auto 0;
  padding: 0 12px;
}
.gallery-dots {
  display: flex;
  align-items: end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 60vw;
  margin: 0;
}
.gallery-dots button.gallery-dot {
  display: block;
  flex: 0 0 auto;
  width: 32px;
  height: 48px;
  padding: 0;
  border: 1px solid #d4a23a99;
  border-radius: 999px 999px 0 0;
  background: none;
  opacity: .6;
  overflow: hidden;
  box-shadow: none;
  transition: width .5s, height .5s, opacity .5s, box-shadow .5s;
}
.gallery-dots button.gallery-dot:hover { opacity: 1; }
.gallery-dots button.gallery-dot.active {
  width: 44px;
  height: 64px;
  border: 2px solid #d4a23a;
  opacity: 1;
  box-shadow: 0 4px 10px #783c0066;
}
.gallery-dot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-arrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #f6d27a;
}
.gallery-arrow:hover { background: none; }
.gallery-arrow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(#f6d27a 0deg 15deg,#b98321 15deg 30deg);
  -webkit-mask-image: radial-gradient(circle,transparent 58%,#000 60%,#000 70%,transparent 72%);
  mask-image: radial-gradient(circle,transparent 58%,#000 60%,#000 70%,transparent 72%);
  transition: transform .7s;
}
.gallery-arrow:hover::before { transform: rotate(90deg); }
.gallery-arrow::after {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#a3172f,#5c0816);
  box-shadow: inset 0 0 0 1.5px #f6d27a, 0 6px 14px #3c140059;
}
.gallery-arrow svg {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 600px) {
  .gallery-banner { min-height: 68px; margin-top: -100px; padding: 9px 20px 7px; }
  .gallery-banner .gallery-caption { font-size: 30px; }
  .gallery-banner .gallery-counter { font-size: 9px; }
  .gallery-controls { gap: 12px; margin-top: 12px; padding: 0 5px; }
  .gallery-dots { gap: 6px; }
  .gallery-dots button.gallery-dot { width: 24px; height: 36px; }
  .gallery-dots button.gallery-dot.active { width: 32px; height: 48px; }
  .gallery-arrow { flex-basis: 48px; width: 48px; height: 48px; }
  .gallery-arrow svg { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-dot, .gallery-progress i, .gallery-arrow::before { transition: none !important; }
}
