.nd-hover-tiles {
  position: relative;
  width: 100%;
}

.nd-hover-tiles__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.nd-hover-tiles__tile {
  position: relative;
  min-height: 420px;
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 26px;
  cursor: pointer;
  text-align: left;
  background: #111;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: transform .25s ease, box-shadow .25s ease;
}

.nd-hover-tiles__tile:hover,
.nd-hover-tiles__tile.is-active {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
}

.nd-hover-tiles__bg,
.nd-hover-tiles__shade {
  position: absolute;
  inset: 0;
}

.nd-hover-tiles__bg {
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform .35s ease;
}

.nd-hover-tiles__tile:hover .nd-hover-tiles__bg,
.nd-hover-tiles__tile.is-active .nd-hover-tiles__bg {
  transform: scale(1.05);
}

.nd-hover-tiles__shade {
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.18) 45%, rgba(0,0,0,.62) 100%);
}

.nd-hover-tiles__title {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  color: #fff;
  font-size: clamp(22px, 2.1vw, 34px);
  line-height: 1.08;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}

.nd-hover-tiles__overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
}

.nd-hover-tiles__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.42);
  opacity: 0;
  transition: opacity .22s ease;
}

.nd-hover-tiles__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100vh;
  background: #0f0f10;
  color: #fff;
  transform: translateX(100%);
  transition: transform .28s ease;
  box-shadow: -14px 0 40px rgba(0,0,0,.3);
  display: grid;
  grid-template-rows: minmax(240px, 42vh) 1fr;
  overflow: hidden;
}

.nd-hover-tiles__overlay.is-open {
  pointer-events: auto;
}

.nd-hover-tiles__overlay.is-open .nd-hover-tiles__backdrop {
  opacity: 1;
}

.nd-hover-tiles__overlay.is-open .nd-hover-tiles__panel {
  transform: translateX(0);
}

.nd-hover-tiles__panel-image {
  background-size: cover;
  background-position: center;
  min-height: 220px;
}

.nd-hover-tiles__panel-content {
  overflow: auto;
  padding: 34px 34px 42px;
}

.nd-hover-tiles__panel-title {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(30px, 2.8vw, 48px);
  line-height: 1.05;
}

.nd-hover-tiles__panel-text {
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255,255,255,.92);
}

.nd-hover-tiles__panel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 14px 22px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

.nd-hover-tiles__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

body.nd-hover-tiles-no-scroll {
  overflow: hidden;
}

@media (max-width: 980px) {
  .nd-hover-tiles__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .nd-hover-tiles__tile {
    min-height: 260px;
    border-radius: 20px;
  }

  .nd-hover-tiles__panel {
    width: 100vw;
    height: 100vh;
    grid-template-rows: minmax(180px, 34vh) 1fr;
  }

  .nd-hover-tiles__panel-content {
    padding: 26px 20px 32px;
  }
}

@media (max-width: 640px) {
  .nd-hover-tiles__grid {
    grid-template-columns: 1fr;
  }

  .nd-hover-tiles__tile {
    min-height: 220px;
  }

  .nd-hover-tiles__title {
    font-size: 24px;
  }

  .nd-hover-tiles__panel-title {
    font-size: 34px;
  }

  .nd-hover-tiles__panel-text {
    font-size: 16px;
  }
}
