.portfolio-section {
  margin: 100px auto;
  position: relative;
  width: 95%;
}

.portfolio-grid {
  column-count: 4;
  column-gap: 7px;
}

.title-title {
  display: flex;
  font-size: 5vw;
}

.title-title .title-text {
  color: #e1e1e1;
}

.portfolio-item {
  border-radius: 7px;
  cursor: pointer;
  display: inline-block;
  margin-bottom: 7px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
  width: 100%;
}

.portfolio-item .overlay-wrapper {
  display: block;
  position: relative;
  width: 100%;
}

.portfolio-item .overlay-wrapper img {
  border-radius: 7px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.portfolio-item .overlay-wrapper .overlay {
  background: rgba(0,0,0,0.1);
  border-radius: 7px;
  inset: 0;
  pointer-events: none;
  position: absolute;
  transition: background 0.3s ease;
}

.portfolio-item .overlay-wrapper:hover .overlay {
  background: rgba(0,0,0,0);
}

.portfolio-item:hover {
  transform: scale(1.05);
  z-index: 10;
}

.modal {
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  height: 100%;
  inset: 0;
  justify-content: center;
  left: 0;
  opacity: 0;
  padding: 20px;
  pointer-events: none;
  position: fixed;
  top: 0;
  transition: opacity 0.3s ease;
  width: 100%;
  z-index: 1000;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-content img {
  border-radius: 7px;
  display: block;
  height: auto;
  max-height: 80vh;
  max-width: 90vw;
  object-fit: contain;
  width: 100%;
}

.close-btn {
  position: absolute;
  color: #e6007d;
  cursor: pointer;
  font-size: 30px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 10px;
  transition: all 0.3s ease;
  z-index: 10;
}

.close-btn:hover {
  transform: scale(1.50);
  transition: all 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

body.gallery-hover::before {
  opacity: 1;
}

@media screen and (max-width: 890px) {
  .portfolio-grid {
    column-count: 2;
  }

     .title-title {
  display: flex;
  font-size: 10vw;
}

  .portfolio-item:hover {
    transform: scale(1);
  }

}

@media screen and (max-width: 500px) {
  .portfolio-grid {
    column-count: 2;
  }
}
