.slider {
  position: relative;
  min-height: 300px;
}
.slider .slide {
  opacity: 0;
  transition: opacity var(--slider-speed, 500ms) ease;
  position: absolute;
  width: 100%;
  height: 320px;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
}
.slider .slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}
:root {
  --slider-speed: 900ms;
}
#portfolio img.responsive-img {
  width: 30%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.18);
  background: #fff;
  user-select: none;
  pointer-events: none;
}
#portfolio .gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
#portfolio img {
  -webkit-user-drag: none;
}
#portfolio {
  -webkit-user-select: none;
  user-select: none;
}
#portfolio {
  font-family: Arial, sans-serif;
  color: #222;
  font-size: 1rem;
  background: none;
  margin: 0;
  padding: 0;
}
.portfolio-section .slider,
.portfolio-section .slider-container {
  width: 100%;
  max-width: 90vw;
  box-sizing: border-box;
}
.portfolio-section .slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; 
  display: flex;
  align-items: center;
  justify-content: center;
}
.portfolio-section .slide-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
@media (min-width: 900px) {
  .portfolio-section .slide-img.portrait {
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
  object-position: center center;
    display: block;
  }
  .portfolio-section .slide-img.landscape {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
  }
}