/* 전체 포트폴리오 wrapper */
.qup-portfolio-wrapper {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding-bottom: 100px;
}

/* 필터 버튼 영역 */
.qup-filters {
  margin-top: 30px;
  text-align: center;
  margin-bottom: 10px;
}

.filter-button {
  background: #eee;
  border: none;
  padding: 10px 20px;
  margin: 0 5px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  border-radius: 20px;
}

.filter-button.active,
.filter-button:hover {
  background: #000;
  color: #fff;
}

/* Masonry 그리드 영역 */
.qup-portfolio-grid {
  width: 100%;
  padding: 0 0px; /* 좌우 여백 */
  box-sizing: border-box;
  overflow: hidden;
  clear: both;
}

/* 포트폴리오 항목 (masonry 아이템) */
.qup-item {
  float: left;
  width: 100%;
  margin: 5px;
  padding: 0px;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  /* background-color: #f9f9f9; */
  transition: transform 0.3s ease;
}
.video-background {
  padding: 5px;
}
.qup-item:hover {
  /* transform: scale(1.01); */
}
.ratio-box {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 비율 */
  height: 0;
  overflow: hidden;
}

.ratio-box iframe {
  /* position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100% !important;
  border: 0; */
}
.ratio-box {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: #000;
}

.ratio-box iframe,
.qup-youtube-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.qup-media iframe {
  transition: 0s !important;
}
/* 반응형 그리드 구성 */
@media (min-width: 640px) {
  .qup-item {
    width: calc(50% - 0px);
  }
}

@media (min-width: 1024px) {
  .qup-item {
    width: calc(33.3% - 15px);
  }
}
/* 
@media (min-width: 1440px) {
  .qup-item {
    width: calc(25% - 30px);
  }
} */

/* 미디어 (이미지, 비디오, 유튜브) */
.qup-media img,
.qup-media video,
.qup-media iframe {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  vertical-align: middle;
}

/* Hover 오버레이 (제목 + 설명) */
.qup-hover {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 20px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
}

.qup-item:hover .qup-hover {
  opacity: 1;
}

.qup-hover h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.qup-hover p {
  margin: 0;
  font-size: 14px;
}

/* 더보기 버튼 */
#qup-load-more {
  display: block;
  margin: 30px auto;
  padding: 10px 30px;
  font-size: 15px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#qup-load-more:hover {
  background-color: #000;
}
