/* TTP Styled Gallery v1.1.0 */
.ttp-styled-gallery,
.ttp-styled-gallery *{ box-sizing:border-box; }

.ttp-styled-gallery{
  --ttp-gallery-gap: 10px;
  max-width:760px;
  margin:20px auto;
  color:#172033;
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ttp-styled-gallery.alignwide{ max-width:980px; }
.ttp-styled-gallery.alignfull{ max-width:none; }
.ttp-styled-gallery.is-gap-compact{ --ttp-gallery-gap: 6px; }
.ttp-styled-gallery.is-gap-comfortable{ --ttp-gallery-gap: 10px; }
.ttp-styled-gallery.is-gap-airy{ --ttp-gallery-gap: 16px; }

.ttp-styled-gallery.is-frame-card{
  padding:18px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow:0 16px 36px rgba(15,23,42,.08), 0 2px 8px rgba(15,23,42,.05);
}

.ttp-styled-gallery.is-frame-minimal{
  padding:10px;
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#fff;
}

.ttp-styled-gallery.is-frame-bare{ padding:0; }

.ttp-styled-gallery-eyebrow{
  display:inline-flex;
  width:fit-content;
  margin:0 0 12px;
  padding:5px 12px;
  border:1px solid #bfdbfe;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:700;
  line-height:1;
}

.ttp-styled-gallery-grid{
  display:grid;
  gap:var(--ttp-gallery-gap);
}

.ttp-styled-gallery-item{
  position:relative;
  overflow:hidden;
  min-height:150px;
  border:1px solid #dbe3ef;
  border-radius:12px;
  background:#eff6ff;
}

.ttp-styled-gallery-img{
  display:block;
  width:100%;
  height:100%;
  object-position:center;
  transition:filter .24s ease, transform .24s ease;
}

.ttp-styled-gallery-caption{
  margin:12px 2px 0;
  color:#475569;
  font-size:.95rem;
  line-height:1.45;
}

.ttp-styled-gallery-placeholder{
  display:grid;
  min-height:240px;
  place-items:center;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  background:#f8fafc;
  color:#64748b;
  font-weight:650;
}

/* Auto layout by image count */
.ttp-styled-gallery.is-layout-auto[data-count="1"] .ttp-styled-gallery-grid{ grid-template-columns:1fr; }
.ttp-styled-gallery.is-layout-auto[data-count="1"] .ttp-styled-gallery-item{ aspect-ratio:16 / 9; }
.ttp-styled-gallery.is-layout-auto[data-count="2"] .ttp-styled-gallery-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
.ttp-styled-gallery.is-layout-auto[data-count="2"] .ttp-styled-gallery-item{ aspect-ratio:4 / 3; }
.ttp-styled-gallery.is-layout-auto[data-count="3"] .ttp-styled-gallery-grid{ grid-template-columns:1.35fr 1fr; }
.ttp-styled-gallery.is-layout-auto[data-count="3"] .ttp-styled-gallery-item:first-child{ grid-row:span 2; }
.ttp-styled-gallery.is-layout-auto[data-count="3"] .ttp-styled-gallery-item{ aspect-ratio:4 / 3; }
.ttp-styled-gallery.is-layout-auto[data-count="3"] .ttp-styled-gallery-item:first-child{ aspect-ratio:auto; }
.ttp-styled-gallery.is-layout-auto[data-count="4"] .ttp-styled-gallery-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
.ttp-styled-gallery.is-layout-auto[data-count="4"] .ttp-styled-gallery-item{ aspect-ratio:4 / 3; }
.ttp-styled-gallery.is-layout-auto:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]):not([data-count="4"]) .ttp-styled-gallery-grid{
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
}
.ttp-styled-gallery.is-layout-auto:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]):not([data-count="4"]) .ttp-styled-gallery-item{ aspect-ratio:1 / 1; }

/* Forced layouts */
.ttp-styled-gallery.is-layout-grid .ttp-styled-gallery-grid{ grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); }
.ttp-styled-gallery.is-layout-grid .ttp-styled-gallery-item{ aspect-ratio:1 / 1; }

.ttp-styled-gallery.is-layout-feature .ttp-styled-gallery-grid{ grid-template-columns:1.35fr 1fr; }
.ttp-styled-gallery.is-layout-feature .ttp-styled-gallery-item{ aspect-ratio:4 / 3; }
.ttp-styled-gallery.is-layout-feature .ttp-styled-gallery-item:first-child{
  grid-row:span 2;
  aspect-ratio:auto;
}

.ttp-styled-gallery.is-layout-mosaic .ttp-styled-gallery-grid{
  grid-template-columns:repeat(6, minmax(0, 1fr));
  grid-auto-rows:92px;
  grid-auto-flow:dense;
}
.ttp-styled-gallery.is-layout-mosaic .ttp-styled-gallery-item{ min-height:0; }
.ttp-styled-gallery.is-layout-mosaic .ttp-styled-gallery-item:nth-child(1){ grid-column:span 3; grid-row:span 3; }
.ttp-styled-gallery.is-layout-mosaic .ttp-styled-gallery-item:nth-child(2){ grid-column:span 3; grid-row:span 2; }
.ttp-styled-gallery.is-layout-mosaic .ttp-styled-gallery-item:nth-child(3){ grid-column:span 2; grid-row:span 2; }
.ttp-styled-gallery.is-layout-mosaic .ttp-styled-gallery-item:nth-child(4){ grid-column:span 2; grid-row:span 2; }
.ttp-styled-gallery.is-layout-mosaic .ttp-styled-gallery-item:nth-child(n+5){ grid-column:span 2; grid-row:span 2; }

.ttp-styled-gallery.is-layout-filmstrip .ttp-styled-gallery-grid{
  display:flex;
  gap:var(--ttp-gallery-gap);
  overflow-x:auto;
  padding-bottom:4px;
  scroll-snap-type:x proximity;
}
.ttp-styled-gallery.is-layout-filmstrip .ttp-styled-gallery-item{
  flex:0 0 min(72%, 360px);
  aspect-ratio:4 / 3;
  scroll-snap-align:start;
}

.ttp-styled-gallery-item.is-sensitive-content{
  isolation:isolate;
}
.ttp-styled-gallery-item.is-sensitive-content:not(.is-sensitive-revealed) .ttp-styled-gallery-img{
  filter:blur(16px) saturate(.72) brightness(.72);
  transform:scale(1.04);
}
.ttp-sensitive-reveal{
  position:absolute;
  inset:0;
  z-index:3;
  display:grid;
  align-content:center;
  justify-items:center;
  gap:7px;
  width:100%;
  padding:16px;
  border:0;
  background:
    radial-gradient(circle at 30% 18%, rgba(96,165,250,.28), transparent 24%),
    linear-gradient(135deg, rgba(15,23,42,.78), rgba(30,41,59,.66));
  color:#fff;
  cursor:pointer;
  font:inherit;
  text-align:center;
  transition:opacity .2s ease, visibility .2s ease;
}
.ttp-sensitive-title{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 9px;
  border:1px solid rgba(255,255,255,.32);
  border-radius:999px;
  background:rgba(15,23,42,.52);
  font-size:11px;
  font-weight:800;
  line-height:1;
}
.ttp-sensitive-message{
  display:-webkit-box;
  overflow:hidden;
  max-width:260px;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  color:#f8fafc;
  font-size:13px;
  font-weight:750;
  line-height:1.3;
  text-shadow:0 1px 10px rgba(0,0,0,.3);
}
.ttp-sensitive-action{
  display:inline-flex;
  min-height:32px;
  align-items:center;
  justify-content:center;
  margin-top:2px;
  padding:7px 11px;
  border-radius:999px;
  background:#fff;
  color:#172033;
  font-size:12px;
  font-weight:850;
  box-shadow:0 10px 24px rgba(0,0,0,.24);
}
.ttp-sensitive-reveal:hover .ttp-sensitive-action,
.ttp-sensitive-reveal:focus-visible .ttp-sensitive-action{
  background:#eff6ff;
  color:#1d4ed8;
}
.ttp-styled-gallery-item.is-sensitive-revealed .ttp-sensitive-reveal{
  visibility:hidden;
  opacity:0;
  pointer-events:none;
}

@media (max-width: 720px){
  .ttp-styled-gallery.is-frame-card{ padding:14px; border-radius:12px; }
  .ttp-styled-gallery-grid,
  .ttp-styled-gallery.is-layout-auto[data-count="2"] .ttp-styled-gallery-grid,
  .ttp-styled-gallery.is-layout-auto[data-count="3"] .ttp-styled-gallery-grid,
  .ttp-styled-gallery.is-layout-auto[data-count="4"] .ttp-styled-gallery-grid,
  .ttp-styled-gallery.is-layout-feature .ttp-styled-gallery-grid{
    grid-template-columns:1fr;
  }
  .ttp-styled-gallery.is-layout-feature .ttp-styled-gallery-item:first-child,
  .ttp-styled-gallery.is-layout-auto[data-count="3"] .ttp-styled-gallery-item:first-child{
    grid-row:auto;
    aspect-ratio:4 / 3;
  }
  .ttp-styled-gallery.is-layout-mosaic .ttp-styled-gallery-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    grid-auto-rows:120px;
  }
  .ttp-styled-gallery.is-layout-mosaic .ttp-styled-gallery-item:nth-child(n){
    grid-column:span 1;
    grid-row:span 1;
  }
  .ttp-styled-gallery-item{ border-radius:10px; }
}
