.list {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 600px;
}

.item-wrapper {
  position: absolute;
  will-change: transform, width, height, opacity;
  padding: 6px;
  cursor: pointer;
  top: 0;
  left: 0;
}

.item-wrapper > .item-img {
  position: relative;
  background-size: cover;
  background-position: center center;
  width: 100%;
  height: 100%;
  text-transform: uppercase;
  font-size: 10px;
  line-height: 10px;
  border-radius: 10px;
  box-shadow: 0px 10px 50px -10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 35px 16px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(13, 26, 15, 0.9) 100%);
  color: #ffffff;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}

.item-caption .item-title {
  font-family: "Helvena", sans-serif;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
  margin: 0;
  text-transform: none;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Modal Styles */
.masonry-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(13, 26, 15, 0.88);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  overscroll-behavior: contain;
  transform: translateZ(0);
}

.masonry-modal-content {
  background-color: #ffffff;
  background-size: cover;
  background-position: center center;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  position: relative;
  opacity: 0;
  display: block;
  text-align: center;
  transform: translateZ(0);
}

.masonry-modal-text-container {
  padding: 60px 40px;
  width: 100%;
}

.masonry-modal-title {
  font-family: "Helvena", sans-serif;
  color: #0D1A0F;
  font-size: 32px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.masonry-modal-text {
  font-family: "Helvena", sans-serif;
  color: #505050;
  font-size: 16px;
  line-height: 1.8;
}

.masonry-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #F5C800;
  color: #0D1A0F;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s, background 0.2s;
  z-index: 10;
}

.masonry-modal-close:hover {
  background: #1E8449;
  color: #ffffff;
  transform: scale(1.1);
}
