.before-after-page {
  background: #f7f9fc;
  font-family: "Montserrat", sans-serif;
}
.ba-hero {
  padding: 190px 20px 85px;
  background: linear-gradient(135deg, #062552, #0d3674 68%, #d92735);
  color: #fff;
  text-align: center;
}
.ba-kicker {
  color: #ffccd0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.ba-hero h1 {
  margin: 14px 0 0;
  color: #fff;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  font-weight: 800;
}
.ba-hero p {
  max-width: 760px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.7;
}
.ba-gallery {
  padding: 85px 0 110px;
}
.ba-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.ba-image-button {
  display: block;
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #e8edf4;
  box-shadow: 0 12px 34px rgba(13, 54, 116, 0.09);
  cursor: zoom-in;
}
.ba-card {
  overflow: hidden;
  align-self: start;
  margin: 0;
  border-radius: 22px;
  text-align: center;
  background: #f0f0f0;
  box-shadow: 0 12px 34px rgba(13, 54, 116, 0.09);
}
.ba-card .ba-image-button {
  border-radius: 0;
  box-shadow: none;
}
.ba-card figcaption {
  padding: 18px 20px 20px;
  color: #0d3674;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}
.ba-image-button img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2160 / 1310;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.ba-image-button:hover img,
.ba-image-button:focus-visible img {
  transform: scale(1.025);
}
.ba-image-button:focus-visible {
  outline: 3px solid #d92735;
  outline-offset: 4px;
}
.ba-image-modal .modal-content {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #07172e;
}
.ba-image-modal .btn-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  padding: 12px;
  border-radius: 50%;
  background-color: #fff;
  opacity: 1;
}
.ba-image-modal img {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
}
@media (max-width: 991px) {
  .ba-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .ba-hero {
    padding: 145px 20px 65px;
  }
  .ba-gallery {
    padding: 55px 0 75px;
  }
  .ba-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .ba-image-button {
    border-radius: 16px;
  }
}
