.portfolio-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.portfolio-modal.hidden {
  display: none;
}

.portfolio-modal-content {
  background: #fff;
  max-width: 800px;
  width: 90%;
  padding: 20px;
  border-radius: 10px;
  position: relative;
  text-align: center;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  background-color: #ffffff;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 10px;
  transition: 0.2s;
}

.close-btn:hover {
  background-color: #dbdbdb;
}

.close-btn:active {
  background-color: #c2c2c2;
}

.slider {
  position: relative;
  overflow: hidden;
}

.slides {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  flex: 0 0 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slides img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  font-size: 30px;
  border: none;
  cursor: pointer;
  padding: 10px 15px;
  z-index: 10;
  user-select: none;
}

.nav.prev {
  left: 10px;
}

.nav.next {
  right: 10px;
}

.indicators {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 5px;
}

.indicators div {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s;
}

.indicators .active {
  background: #0078D4;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOutScale {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

.portfolio-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.portfolio-modal.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.portfolio-modal-content {
  animation: fadeInScale 0.3s ease forwards;
  max-height: 90vh;
  overflow-y: auto;
}

.slide img {
  width: 100%;
  height: clamp(200px, 40vw, 400px);
  object-fit: cover;
  border-radius: 8px;
}

.portfolio-modal-content {
  overflow-y: auto;
}

.portfolio-modal-content::-webkit-scrollbar {
  width: 6px;
  background: transparent;
}

.portfolio-modal-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
}

.portfolio-modal-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}

#modal-post-title {
  padding-top: 30px;
  padding-bottom: 10px;
}

#modal-post-text {
  padding-top: 20px;
}