.modern-gallery {
  position: relative;
  overflow: hidden;
  padding: 82px 0 88px;
  background: linear-gradient(180deg, #fff 0%, #fafafd 100%);
}

.modern-gallery:before {
  position: absolute;
  top: 40px;
  right: -140px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(241, 75, 5, .045);
  content: "";
  pointer-events: none;
}

.modern-gallery .container {
  position: relative;
  z-index: 1;
}

.modern-gallery-intro {
  max-width: 990px;
  margin-bottom: 44px;
}

.modern-gallery-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #f14b05;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.modern-gallery-intro .sec-title h2 {
  margin-bottom: 14px;
  color: #171535;
  font-size: 39px;
  line-height: 1.15;
}

.modern-gallery-intro .sec-title p {
  max-width: 940px;
  color: #66656f;
  font-size: 16px;
  line-height: 1.75;
}

.modern-gallery-intro .sec-title .decor {
  margin-top: 19px;
}

.modern-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.modern-gallery .image-box.modern-gallery-card {
  float: none;
  width: auto;
  margin: 0;
  border: 0;
  min-width: 0;
}

.modern-gallery-card .inner-box {
  position: relative;
  padding: 10px;
  border: 1px solid #e8e7ed;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 21, 53, .09);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.modern-gallery-card:hover .inner-box {
  border-color: rgba(241, 75, 5, .3);
  box-shadow: 0 26px 55px rgba(23, 21, 53, .14);
  transform: translateY(-6px);
}

.modern-gallery-card .image {
  margin: 0;
  border-radius: 14px;
  background: #f5f4f8;
  overflow: hidden;
}

.modern-gallery-card .image a,
.modern-gallery-card .image img {
  display: block;
  width: 100%;
}

.modern-gallery-card .image img {
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}

.modern-gallery-card:hover .image img {
  transform: scale(1.025);
}

.modern-gallery-zoom {
  position: absolute;
  inset: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(23, 21, 53, .08), rgba(23, 21, 53, .78));
  color: #fff;
  opacity: 0;
  transition: opacity .25s ease;
}

.modern-gallery-zoom .fa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f14b05;
  box-shadow: 0 12px 26px rgba(241, 75, 5, .32);
  font-size: 21px;
}

.modern-gallery-zoom strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.modern-gallery-card:hover .modern-gallery-zoom,
.modern-gallery-zoom:focus {
  color: #fff;
  opacity: 1;
}

@media (max-width: 1199px) {
  .modern-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .modern-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .modern-gallery {
    padding: 62px 0 70px;
  }
  .modern-gallery-intro {
    margin-bottom: 30px;
    text-align: center;
  }
  .modern-gallery-intro .sec-title {
    text-align: center;
  }
  .modern-gallery-kicker {
    font-size: 11px;
  }
  .modern-gallery-intro .sec-title h2 {
    font-size: 30px;
  }
  .modern-gallery-intro .sec-title p {
    font-size: 15px;
    line-height: 1.65;
  }
  .modern-gallery-intro .sec-title .decor {
    margin-left: auto;
    margin-right: auto;
  }
  .modern-gallery-grid {
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .modern-gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) {
  .modern-gallery-zoom {
    top: auto;
    left: auto;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #f14b05;
    box-shadow: 0 10px 22px rgba(241, 75, 5, .3);
    opacity: 1;
  }
  .modern-gallery-zoom .fa {
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    font-size: 18px;
  }
  .modern-gallery-zoom strong {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modern-gallery-card .inner-box,
  .modern-gallery-card .image img,
  .modern-gallery-zoom {
    transition: none;
  }
  .modern-gallery-card:hover .inner-box,
  .modern-gallery-card:hover .image img {
    transform: none;
  }
}
