@charset "UTF-8";

/* ==========================================
   NEOK JAPAN - 施工事例 전용 스타일 (works.css)
   ========================================== */

/* ------------------------------------------
   1. 상단 브레드크럼 & 타이틀 Header
   ------------------------------------------ */
.page-header {
  padding: 40px 0 50px;
  background-color: var(--white);
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

.breadcrumb a {
  color: var(--text-gray);
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--main-navy);
}

.breadcrumb .separator {
  margin: 0 10px;
  color: #cbd5e0;
  font-weight: 300;
}

.breadcrumb .current {
  color: var(--main-navy);
  font-weight: 600;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--main-navy);
  letter-spacing: -0.5px;
}

/* ------------------------------------------
   2. 시공사례 컨텐츠 영역
   ------------------------------------------ */
.works-content-section {
  background-color: var(--white);
  padding-bottom: 100px;
}

.container {
  max-width: 1200px; /* 갤러리의 넓은 뷰를 위해 1200px 확장 */
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------
   3. 필터(Filter) 영역
   ------------------------------------------ */
.works-filter-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px 0;
  margin-bottom: 50px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

#sub-filters-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px dashed #e2e8f0;
}

.filter-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--main-navy);
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
  margin-top: 4px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.filter-btn {
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text-gray);
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--main-navy);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: bottom right;
}

.filter-btn:hover {
  color: var(--text-dark);
}

.filter-btn.active {
  color: var(--main-navy);
  font-weight: 600;
}

.filter-btn.active::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* ------------------------------------------
   4. 시공사례 그리드(Grid) 리스트
   ------------------------------------------ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 24px;
}

.works-item {
  display: block;
  cursor: pointer;
  animation: fadeIn 0.5s ease-out;
}

.works-img-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #f8fafc;
  border-radius: 8px;
  margin-bottom: 16px;
  position: relative;
}

.works-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.works-item:hover .works-img-box img {
  transform: scale(1.05);
}

.works-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.works-year {
  font-size: 13px;
  color: var(--text-gray);
  margin: 0;
}

.works-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--main-navy);
  margin: 0;
  line-height: 1.4;
}

.works-material {
  font-size: 14px;
  color: var(--text-dark);
  margin: 0;
}

/* ------------------------------------------
   5. 모달(Modal) 영역
   ------------------------------------------ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
  animation: modalFadeIn 0.3s ease-out forwards;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9); /* 반투명 배경 */
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.2s ease;
}

.modal-close:hover {
  transform: scale(1.1) rotate(90deg);
}

.modal-img-wrapper {
  width: min(85vw, calc(78vh * (4 / 3)));
  height: min(calc(85vw * (3 / 4)), 78vh);
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-caption {
  margin-top: 16px;
  text-align: center;
  color: var(--white);
}

.modal-caption p#modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.modal-caption p#modal-sub {
  font-size: 13px;
  color: #cbd5e0;
  margin: 0;
}

/* ------------------------------------------
   6. 모달(Modal) 다중 이미지 스크롤 스타일
   ------------------------------------------ */
.modal-img-wrapper.multi-scroll {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  justify-content: flex-start;
  scrollbar-width: thin;
  scrollbar-color: #64748b #1e293b;
}

.modal-img-wrapper.multi-scroll::-webkit-scrollbar {
  width: 6px;
}
.modal-img-wrapper.multi-scroll::-webkit-scrollbar-track {
  background: #1e293b;
}
.modal-img-wrapper.multi-scroll::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 3px;
}
.modal-img-wrapper.multi-scroll img {
  flex-shrink: 0;
  scroll-snap-align: center;
}

/* ------------------------------------------
   7. 애니메이션
   ------------------------------------------ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* ------------------------------------------
   8. 반응형 (모바일 768px 이하)
   ------------------------------------------ */
@media (max-width: 768px) {
  .page-header {
    padding: 25px 0 30px;
  }
  
  .page-title {
    font-size: 24px;
  }

  .works-filter-container {
    padding: 20px 0;
    margin-bottom: 30px;
    gap: 16px;
  }

  .filter-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .filter-label {
    text-align: left;
    min-width: auto;
    font-size: 13px;
    color: var(--text-gray);
  }

  .filter-buttons {
    gap: 12px;
  }

  .filter-btn {
    font-size: 13px;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .modal-img-wrapper {
    width: 90vw;
    height: calc(90vw * (3 / 4));
  }
}