.im-gallery {
  position: relative;
  width: 100%;
}

.im-gallery-swiper {
  position: relative;
  width: 100%;
  height: 320px;
  padding: 0;
  box-sizing: border-box;
}

.im-gallery .swiper-wrapper {
  align-items: center;
}

.im-gallery .swiper-slide,
.im-gallery .im-gallery-slide {
  width: auto;
  height: 100%;
  display: flex;
  align-items: center;
}

.im-gallery .im-gallery-slide a {
  display: flex;
  align-items: center;
  height: 100%;
}

.im-gallery .im-gallery-slide img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

.im-gallery-controls {
  position: relative;
  width: fit-content;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 44px;
  margin: 20px 0 0 auto;
}

.im-gallery .im-gallery-control {
  position: static;
  inset: auto;
  width: 48px;
  height: 44px;
  min-width: 48px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  box-shadow: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.im-gallery .im-gallery-control::after {
  display: none;
  content: none;
}

.im-gallery .im-gallery-control svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.im-gallery .im-gallery-control:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
}

.im-gallery .im-gallery-button-prev:hover svg {
  transform: translateX(-2px);
}

.im-gallery .im-gallery-button-next:hover svg {
  transform: translateX(2px);
}

.im-gallery .im-gallery-control:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
}

.im-gallery .im-gallery-control.swiper-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

@media (min-width: 768px) {
  .im-gallery-swiper {
    height: 420px;
  }
}

@media (max-width: 767px) {
  .im-gallery-swiper {
    height: 260px;
  }

  .im-gallery-controls {
    gap: 12px;
    margin-top: 16px;
  }
}

.im-gallery[data-im-gallery-count="1"] .im-gallery-controls {
  display: none !important;
}
