.ivn-design-gallery {
  --ivn-cyan: #57f7ff;
  --ivn-magenta: #d64cff;
  --ivn-purple: #8a65ff;
  --ivn-orange: #ff9d22;
  --ivn-bg: #050611;
  --ivn-panel: rgba(16, 20, 37, .72);
  --ivn-text: #f3f6ff;
  --ivn-muted: #aab3c7;
  position: relative;
  width: 100%;
  overflow: hidden;
  color: var(--ivn-text);
  border-radius: 30px;
  padding: clamp(32px, 5vw, 76px);
  background:
    radial-gradient(circle at 0% 10%, rgba(87, 247, 255, .18), transparent 26%),
    radial-gradient(circle at 95% 10%, rgba(214, 76, 255, .20), transparent 30%),
    linear-gradient(135deg, rgba(5, 10, 20, .98), rgba(17, 7, 34, .98));
  box-shadow: 0 30px 120px rgba(0, 0, 0, .45);
  isolation: isolate;
}

.ivn-gallery-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(87,247,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214,76,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 60% 25%, #000 0%, transparent 72%);
  opacity: .45;
  z-index: -1;
}

.ivn-gallery-head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 46px);
}

.ivn-gallery-eyebrow {
  color: var(--ivn-cyan);
  font-size: .78rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  font-weight: 800;
}

.ivn-gallery-title {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 5.8rem);
  line-height: .88;
  letter-spacing: -.055em;
  color: #fff;
  text-shadow: 0 0 38px rgba(87,247,255,.12);
}

.ivn-gallery-subtitle {
  max-width: 780px;
  margin: 0;
  color: var(--ivn-muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
}

.ivn-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.ivn-gallery-filter {
  border: 1px solid rgba(214, 76, 255, .42);
  color: var(--ivn-text);
  background: rgba(255, 255, 255, .035);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.ivn-gallery-filter:hover,
.ivn-gallery-filter.is-active {
  transform: translateY(-1px);
  border-color: var(--ivn-cyan);
  box-shadow: 0 0 24px rgba(87, 247, 255, .15), inset 0 0 18px rgba(214, 76, 255, .12);
}

.ivn-gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--ivn-gallery-cols), minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
}

.ivn-gallery-card {
  position: relative;
  min-width: 0;
  transition: opacity .25s ease, transform .25s ease;
}

.ivn-gallery-card.is-hidden {
  display: none;
}

.ivn-gallery-open {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(87, 247, 255, .24);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(6, 15, 30, .76), rgba(35, 9, 52, .78));
  padding: 0;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .025),
    0 16px 54px rgba(0,0,0,.25);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.ivn-gallery-open:hover {
  transform: translateY(-6px);
  border-color: rgba(87, 247, 255, .7);
  box-shadow:
    0 0 34px rgba(87, 247, 255, .15),
    0 24px 70px rgba(0,0,0,.36);
}

.ivn-gallery-imgwrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: rgba(255,255,255,.035);
}

.ivn-gallery-imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.06);
  transform: scale(1.01);
  transition: transform .35s ease, filter .35s ease;
}

.ivn-gallery-open:hover .ivn-gallery-imgwrap img {
  transform: scale(1.065);
  filter: saturate(1.18) contrast(1.08);
}

.ivn-gallery-glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 48%, rgba(5,6,17,.92)),
    radial-gradient(circle at 15% 0%, rgba(87,247,255,.25), transparent 30%),
    radial-gradient(circle at 92% 20%, rgba(214,76,255,.24), transparent 32%);
  pointer-events: none;
}

.ivn-gallery-meta {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
}

.ivn-gallery-number {
  flex: 0 0 auto;
  border: 1px solid rgba(255,157,34,.7);
  color: #ffb547;
  border-radius: 14px;
  padding: 8px 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.ivn-gallery-copy {
  display: grid;
  gap: 8px;
}

.ivn-gallery-cat {
  color: #ffb547;
  font-size: .76rem;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .24em;
}

.ivn-gallery-item-title {
  color: #fff;
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  line-height: 1.02;
  font-weight: 850;
  letter-spacing: -.035em;
}

.ivn-gallery-tag {
  color: var(--ivn-cyan);
  border: 1px solid rgba(87, 247, 255, .35);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .75rem;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ivn-gallery-empty {
  border: 1px dashed rgba(87, 247, 255, .28);
  border-radius: 22px;
  padding: 28px;
  color: var(--ivn-muted);
}

.ivn-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  place-items: center;
  padding: 24px;
}

.ivn-gallery-modal.is-open {
  display: grid;
}

.ivn-gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(12px);
}

.ivn-gallery-modal-dialog {
  position: relative;
  width: min(1180px, 94vw);
  max-height: 92vh;
  overflow: hidden;
  border: 1px solid rgba(87,247,255,.4);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 0%, rgba(87,247,255,.15), transparent 26%),
    radial-gradient(circle at 100% 30%, rgba(214,76,255,.22), transparent 32%),
    rgba(9, 13, 27, .96);
  box-shadow: 0 0 70px rgba(87,247,255,.14), 0 30px 120px rgba(0,0,0,.58);
}

.ivn-gallery-modal-close {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(214,76,255,.6);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ivn-gallery-modal-media {
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.35);
}

.ivn-gallery-modal-media img {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.ivn-gallery-modal-info {
  padding: 18px 22px 22px;
}

.ivn-gallery-modal-tag {
  color: var(--ivn-cyan);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin-bottom: 6px;
}

.ivn-gallery-modal-info h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 2.35rem);
  letter-spacing: -.045em;
}

.ivn-gallery-modal-info p {
  margin: 8px 0 0;
  color: var(--ivn-muted);
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .ivn-design-gallery {
    --ivn-gallery-cols: 2 !important;
  }
}

@media (max-width: 680px) {
  .ivn-design-gallery {
    --ivn-gallery-cols: 1 !important;
    border-radius: 22px;
    padding: 28px 18px;
  }

  .ivn-gallery-meta {
    padding: 16px;
  }

  .ivn-gallery-imgwrap {
    aspect-ratio: 4 / 3;
  }
}
