.calio-image-gallery {
  display: grid;
  gap: 12px;
}

.calio-image-gallery.calio-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calio-image-gallery.calio-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calio-image-gallery.calio-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calio-image-gallery-item {
  margin: 0;
  min-width: 0;
}

.calio-image-gallery-media {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f8fafc;
}

.calio-image-gallery-media a {
  display: block;
  color: inherit;
}

.calio-image-gallery-media img {
  width: 100%;
  height: 100%;
  display: block;
  -o-object-fit: cover;
     object-fit: cover;
  transition: transform .3s ease, opacity .25s ease, filter .25s ease;
}

.calio-image-gallery.ratio-auto .calio-image-gallery-media img {
  height: auto;
}

.calio-image-gallery.ratio-square .calio-image-gallery-media { aspect-ratio: 1 / 1; }
.calio-image-gallery.ratio-landscape .calio-image-gallery-media { aspect-ratio: 4 / 3; }
.calio-image-gallery.ratio-portrait .calio-image-gallery-media { aspect-ratio: 3 / 4; }

.calio-gallery-index,
.calio-gallery-zoom-hint {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
}

.calio-gallery-index {
  top: 12px;
  left: 12px;
}

.calio-gallery-zoom-hint {
  top: 12px;
  right: 12px;
  opacity: 0;
  transform: translateY(-4px) scale(.94);
  transition: opacity .25s ease, transform .25s ease;
}

.calio-image-gallery.has-zoom-hint .calio-image-gallery-item:hover .calio-gallery-zoom-hint {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.calio-image-gallery figcaption {
  position: relative;
  margin-top: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #59637a;
  border-radius: 10px;
  transition: opacity .25s ease, transform .25s ease;
}

.calio-gallery-caption-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calio-gallery-caption-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}

.calio-gallery-meta-inline {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}

.calio-gallery-caption-text {
  margin-top: 6px;
  line-height: 1.6;
}

.calio-gallery-meta-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #0f172a;
}

.calio-image-gallery.caption-skin-soft figcaption {
  background: rgba(255, 255, 255, 0.92);
}

.calio-image-gallery.caption-skin-solid figcaption {
  background: #0f172a;
  color: #fff;
}

.calio-image-gallery.caption-skin-solid .calio-gallery-caption-title,
.calio-image-gallery.caption-skin-solid .calio-gallery-meta-inline {
  color: #fff;
}

.calio-image-gallery.caption-skin-solid .calio-gallery-meta-badge {
  background: rgba(255, 255, 255, 0.16);
}

.calio-image-gallery.caption-skin-glass figcaption {
  background: rgba(255, 255, 255, 0.18);
  color: #0f172a;
  backdrop-filter: blur(12px);
}

.calio-image-gallery.caption-overlay figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  margin-top: 0;
}

.calio-image-gallery.caption-reveal-hover figcaption {
  opacity: 0;
  transform: translateY(8px);
}

.calio-image-gallery.caption-reveal-hover .calio-image-gallery-item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.calio-image-gallery.caption-hidden figcaption {
  display: none;
}

.calio-image-gallery.meta-inline .calio-gallery-caption-top {
  flex-direction: column;
  align-items: flex-start;
}

.calio-image-gallery.meta-hidden .calio-gallery-meta-badge,
.calio-image-gallery.meta-hidden .calio-gallery-meta-inline {
  display: none;
}

.calio-image-gallery.chrome-framed .calio-image-gallery-media {
  border-color: #dbe4f0;
}

.calio-image-gallery.chrome-shadowed .calio-image-gallery-item {
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.calio-image-gallery.skin-cards .calio-image-gallery-item {
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.calio-image-gallery.skin-overlay .calio-image-gallery-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.56));
  opacity: 0;
  transition: opacity .25s ease;
}

.calio-image-gallery.overlay-depth-soft .calio-image-gallery-media::after {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.34));
}

.calio-image-gallery.overlay-depth-strong .calio-image-gallery-media::after {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.78));
}

.calio-image-gallery.skin-overlay .calio-image-gallery-item:hover .calio-image-gallery-media::after {
  opacity: 1;
}

.calio-image-gallery.skin-overlay .calio-gallery-index,
.calio-image-gallery.skin-overlay .calio-gallery-zoom-hint {
  background: rgba(255, 255, 255, 0.18);
}

.calio-image-gallery.filter-grayscale img {
  filter: grayscale(1);
}

.calio-image-gallery.filter-warm img {
  filter: sepia(.22) saturate(1.05);
}

.calio-image-gallery.filter-cool img {
  filter: saturate(.92) hue-rotate(8deg);
}

.calio-image-gallery.hover-zoom .calio-image-gallery-item:hover img {
  transform: scale(1.04);
}

.calio-image-gallery.hover-fade .calio-image-gallery-item:hover img {
  opacity: 0.74;
}

.calio-image-gallery.hover-lift .calio-image-gallery-item {
  transition: transform .25s ease, box-shadow .25s ease;
}

.calio-image-gallery.hover-lift .calio-image-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

@media (max-width: 767px) {
  .calio-image-gallery.calio-cols-2,
  .calio-image-gallery.calio-cols-3,
  .calio-image-gallery.calio-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calio-image-gallery.caption-overlay figcaption {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  .calio-gallery-index,
  .calio-gallery-zoom-hint {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
  }
}

.calio-gallery-caption-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #64748b;
}

.calio-gallery-caption-divider {
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 10px;
  background: rgba(148, 163, 184, 0.28);
}

.calio-image-gallery.info-layout-compact figcaption {
  padding-top: 10px;
  padding-bottom: 10px;
}

.calio-image-gallery.info-layout-compact .calio-gallery-caption-text {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.calio-image-gallery.info-layout-split .calio-gallery-caption-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.calio-image-gallery.info-layout-split .calio-gallery-meta-inline,
.calio-image-gallery.info-layout-split .calio-gallery-meta-badge {
  justify-self: end;
}

.calio-image-gallery.skin-overlay.overlay-preset-spotlight .calio-image-gallery-media::after {
  background: radial-gradient(circle at top, rgba(255,255,255,0.08), rgba(15, 23, 42, 0.8));
}

.calio-image-gallery.skin-overlay.overlay-preset-spotlight figcaption {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(14px);
}

.calio-image-gallery.skin-overlay.overlay-preset-editorial .calio-gallery-caption-eyebrow {
  color: rgba(255,255,255,0.78);
}

.calio-image-gallery.skin-overlay.overlay-preset-editorial figcaption {
  left: 0;
  right: auto;
  bottom: 0;
  width: min(88%, 340px);
  padding: 16px 18px;
  border-radius: 0 18px 0 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.82));
  color: #fff;
}

.calio-image-gallery.skin-overlay.overlay-preset-editorial .calio-gallery-caption-title,
.calio-image-gallery.skin-overlay.overlay-preset-editorial .calio-gallery-meta-inline {
  color: #fff;
}

.calio-image-gallery.skin-overlay.overlay-preset-editorial .calio-gallery-meta-badge {
  background: rgba(255, 255, 255, 0.16);
}

.calio-image-gallery.has-zoom-hint .calio-image-gallery-item:focus-within .calio-gallery-zoom-hint {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.calio-image-gallery.caption-reveal-hover .calio-image-gallery-item:focus-within figcaption {
  opacity: 1;
  transform: translateY(0);
}

.calio-image-gallery.skin-overlay .calio-image-gallery-item:focus-within .calio-image-gallery-media::after {
  opacity: 1;
}

.calio-image-gallery-item:focus-within .calio-image-gallery-media a:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.7);
  outline-offset: -2px;
}

.calio-image-gallery.hover-lift .calio-image-gallery-item:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.calio-image-gallery-item {
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.calio-image-gallery-item:hover,
.calio-image-gallery-item:focus-within {
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.10);
}

.calio-image-gallery-item:hover .calio-image-gallery-media,
.calio-image-gallery-item:focus-within .calio-image-gallery-media {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.calio-image-gallery-item:hover figcaption,
.calio-image-gallery-item:focus-within figcaption {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.calio-image-gallery-item:focus-within .calio-gallery-index,
.calio-image-gallery-item:hover .calio-gallery-index {
  transform: translateY(-1px);
}

.calio-gallery-index,
.calio-gallery-meta-badge,
.calio-gallery-zoom-hint,
.calio-image-gallery figcaption {
  transition: opacity .25s ease, transform .25s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease;
}

