.ev-journal-gallery {
  width: 100%;
  max-width: 100%;
  margin: 42px 0 24px;
  box-sizing: border-box;
}

.ev-journal-gallery,
.ev-journal-gallery * {
  box-sizing: border-box;
}

.ev-journal-gallery__title {
  margin: 0 0 18px;
  color: #10233f;
  font-size: 28px;
  line-height: 1.25;
}

.ev-journal-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.ev-gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #e9f1f6;
  box-shadow: 0 6px 18px rgba(16, 35, 63, 0.12);
  cursor: zoom-in;
}

.ev-gallery-item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  object-fit: cover;
  object-position: center;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.ev-gallery-item:hover img,
.ev-gallery-item:focus img {
  transform: scale(1.04);
  filter: brightness(0.92);
}

.ev-gallery-item:focus-visible {
  outline: 3px solid #0875b5;
  outline-offset: 3px;
}

.ev-gallery-zoom {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #10233f;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 12px rgba(16, 35, 63, 0.22);
  font-size: 18px;
  pointer-events: none;
}

.ev-global-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px 82px;
  background: rgba(4, 16, 30, 0.95);
}

.ev-global-lightbox.is-open {
  display: flex;
}

.ev-global-lightbox__image {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 92vw !important;
  max-height: 86vh !important;
  object-fit: contain !important;
  border-radius: 12px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.ev-global-lightbox__close,
.ev-global-lightbox__prev,
.ev-global-lightbox__next {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #10233f;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
}

.ev-global-lightbox__close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  font-size: 28px;
}

.ev-global-lightbox__prev,
.ev-global-lightbox__next {
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translateY(-50%);
  font-size: 32px;
}

.ev-global-lightbox__prev { left: 18px; }
.ev-global-lightbox__next { right: 18px; }

.ev-global-lightbox__counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  padding: 8px 15px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 35, 63, 0.82);
  font-weight: 700;
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  .ev-journal-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .ev-journal-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .ev-journal-gallery__title {
    font-size: 24px;
  }

  .ev-global-lightbox {
    padding: 15px 48px;
  }

  .ev-global-lightbox__prev { left: 5px; }
  .ev-global-lightbox__next { right: 5px; }
  .ev-global-lightbox__close { top: 7px; right: 7px; }
}
