.work {
  padding: 80px 0;
  background-color: #f9f9f9;        
}

.work-field {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;  
}

.work-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 30px;
}

.work-title-bar h1 {
  font-size: 42px;
  margin: 0;
}

/* 검색 관련 */

.works-search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.works-search-inline input {
  flex: 1;
  min-width: 0; 
  width: 220px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

.search-reset {
  flex-shrink: 0;    
  margin-left: 8px;
  text-decoration: none;
  font-size: 18px;
  color: #666;
}

.no-result {
  grid-column: 1 / -1; /* 그리드 전체 폭 차지 */
  text-align: center;
  font-size: 16px;
  color: #666;
  padding: 60px 0;
}

/* 목록 */

.work-client {
  font-size: 0.9rem;
  opacity: 0.7;
  margin: 4px 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-item {
  text-align: center;
}

.work-item .thumb {
  width: 100%;
  aspect-ratio: 5 / 7;
  background: #eee;

}

.work-item .thumb img {
  transition: transform 0.3s ease;
}

.work-link:hover .thumb img {
  transform: scale(1.02);
}
.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-item h3 {
  margin-top: 10px;
  font-size: 16px;
}

.work-item p {
  font-size: 13px;
  color: #555;
}

/* 페이지네이션 */
.pagination {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

/* 기본 버튼 */
.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 38px;
  height: 38px;
  padding: 0 8px;

  border-radius: 999px;
  border: 0px solid #ddd;
  color: #333;
  text-decoration: none;

  transition: all 0.2s ease;
}

/* hover */
.pagination a:hover {
  background: #c5c5c5;
}

/* 현재 페이지 */
.pagination a.active {
  background: #111;
  color: white;
  border-color: #111;
  font-weight: 600;
}

/* ... 점 처리 */
.pagination .dots {
  padding: 0 6px;
  color: #aaa;
  font-size: 14px;
}

/* 페이지 버튼 */
.pagination a.nav-btn {
  font-size: 13px;
  padding: 0 14px;
  letter-spacing: 0.5px;
  color: #666;
}

.pagination a.nav-btn:hover {
  color: #111;
}

/* 클릭하면 링크 띄우는 */

#work-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

#work-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
}

.modal-content {
  position: relative;
  width: 90vw;
  max-width: 1280px;
  max-height: 90vh;
}

.modal-inner {
  width: 100%;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-inner.video {
  aspect-ratio: 16 / 9;
}

.modal-inner.video iframe {
  width: 100%;
  height: 100%;
}

.modal-inner.image img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.modal-inner.nodata {
  aspect-ratio: 16 / 9;
}

.modal-inner.nodata span {
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.1em;
}

.modal-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: none;
  color: #fff;
  font-size: 40px;
  border: none;
  cursor: pointer;
}


/* 반응형 */
@media (max-width: 800px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 360px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .pagination a {
    min-width: 24px;
    height: 24px;
    font-size: 12px;
    padding: 0 8px;
  }

  .pagination {
    gap: 5px;
  }
    
@media (max-width: 600px) {
  .work-title-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .works-search-inline input {
    width: 100%;
  }
}    