:root{
  --rg-blue:#002b5c;
  --rg-blue-dark:#0f4c81;
  --rg-gold:#d4af37;
  --rg-muted:#6b7280;
  --rg-shadow:0 8px 24px rgba(2,10,30,0.08);
  --rg-shadow-strong:0 12px 32px rgba(2,10,30,0.15);
}

/* Page */
body.gallery-page{ background:#e6f0fa; overflow-x:hidden; }

/* Card */
.rg-gallery-card{
  background:#fff;
  padding:28px;
  border-radius:18px;
  box-shadow:var(--rg-shadow-strong);
  margin-bottom:36px;
}

/* Title */
.rg-gallery-title{
  font-size:24px;
  font-weight:900;
  color:var(--rg-blue-dark);
  margin-bottom:14px;
}

/* Wrapper (slideshow) */
.rg-gallery-wrapper{
  position:relative;
  width:100%;
  height:480px;
  border-radius:14px;
  overflow:hidden;
  background:#111;
  margin-bottom:12px;
  display:block;
}

/* Slide element uses background-image for crisp cover */
.rg-gallery-slide{
  width:100%;
  height:100%;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  transition:opacity .36s ease, transform .36s ease;
  opacity:0;
  transform:scale(1.01);
}
.rg-gallery-slide.visible{
  opacity:1;
  transform:scale(1);
}

/* Prev/Next buttons (inside edges) */
.rg-gallery-prev,
.rg-gallery-next{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(212,175,55,0.9);
  color:var(--rg-blue);
  border:none;
  font-size:28px;
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  z-index:20;
  box-shadow:var(--rg-shadow);
}
.rg-gallery-prev{ left:12px; }
.rg-gallery-next{ right:12px; }
.rg-gallery-prev:hover,
.rg-gallery-next:hover{ background:var(--rg-gold); }

/* Caption (gold text overlay at bottom) */
.rg-gallery-caption{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:12px 18px;
  background:linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 100%);
  color:var(--rg-gold);
  font-weight:800;
  font-size:16px;
  z-index:15;
  text-align:center;
}

/* Thumbnails strip */
.rg-gallery-thumbs{
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding:8px 0 0 0;
  margin-bottom:8px;
}
.rg-gallery-thumb{
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:transform .18s ease, box-shadow .18s ease;
  opacity:.7;
  border:3px solid transparent;
}
.rg-gallery-thumb img{
  width:90px;
  height:70px;
  object-fit:cover;
  border-radius:8px;
  display:block;
}
.rg-gallery-thumb.active{
  opacity:1;
  transform:translateY(-4px);
  border-color:var(--rg-gold);
  box-shadow:0 8px 24px rgba(212,175,55,0.12);
}

/* Grid for non-image media */
.rg-gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:20px;
  margin-top:18px;
}
.rg-gallery-video{
  width:100%;
  border-radius:12px;
  box-shadow:var(--rg-shadow);
}

/* Zoom overlay */
.rg-img-overlay{
  position:fixed;
  top:0; left:0; right:0; bottom:0;
  background:rgba(0,0,0,0.85);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:5000;
  padding:20px;
}
.rg-img-full-wrapper{
  position:relative;
  max-width:95%;
  max-height:90vh;
}
.rg-img-full{
  max-width:100%;
  max-height:85vh;
  border-radius:14px;
  box-shadow:var(--rg-shadow-strong);
  display:block;
}
.rg-zoom-close{
  position:absolute;
  top:-18px;
  right:-18px;
  background:var(--rg-gold);
  color:var(--rg-blue);
  border:none;
  width:44px;
  height:44px;
  border-radius:50%;
  font-size:22px;
  cursor:pointer;
  z-index:30;
  box-shadow:var(--rg-shadow);
}
.rg-zoom-btn{
  position:fixed;
  top:50%;
  transform:translateY(-50%);
  background:rgba(212,175,55,0.9);
  color:var(--rg-blue);
  border:none;
  width:48px;
  height:48px;
  border-radius:50%;
  font-size:26px;
  cursor:pointer;
  z-index:30;
  box-shadow:var(--rg-shadow);
}
#rg-zoom-prev{ left:18px; }
#rg-zoom-next{ right:18px; }

/* Responsive tweaks */
@media (max-width: 768px){
  .rg-gallery-wrapper{ height:360px; }
  .rg-gallery-thumb img{ width:72px; height:56px; }
}
@media (max-width: 480px){
  .rg-gallery-wrapper{ height:300px; }
  .rg-gallery-thumb img{ width:64px; height:48px; }
}
