/* Google Fonts 적용 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;700&display=swap');

.popup-layout .image-gallery {
  max-width: 1200px;
  margin: 0 auto;
}

/* 기본 스타일 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    padding: 50px;
    background-color: #f4f1ee;
    color: #333;
    text-align: left;
}
a {
    color: #aa0000;        /* 링크 색상 */
    text-decoration: none; /* 밑줄 제거 */
  }
  
/* 제목 가운데 정렬 */
h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
}

/* 본문 컨테이너 (가운데 정렬) */
.container {
    max-width: 800px;
    width: 80%;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.8;
    text-align: left;
}

/* 클릭 가능한 링크 (문장 내 배치) */
.toggle-link {
    color: #7d1a1a;
    font-weight: normal;
    text-decoration: none;
    cursor: pointer;
    display: inline;
    word-spacing: 0.1rem;
    transition: color 0.3s;
}

.toggle-link:hover {
    text-decoration: none;
    color: #a83232;
}

/* 숨겨진 콘텐츠 */
.hidden-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, max-height 0.4s ease-in-out;
    max-height: 0;
    overflow: hidden;
    margin: 5px 0;
    padding: 5px;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 5px;
}

/* 콘텐츠가 표시될 때 */
.hidden-content.show {
    display: block;
    opacity: 1;
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
}
.image-gallery img {
  border-radius: 3px;
}
.image-gallery + div {
   margin-top: 3px;
}
.image-gallery.one {
  display: center;
  grid-template-columns: repeat(1, 1fr);
  gap: 3px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.image-gallery.one img { 
  max-width: 100%;
  object-fit: cover;    
}
.image-gallery.two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.image-gallery.two img { 
  max-width: 100%;
  object-fit: cover;    
}
  .image-gallery.three  {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 3px;
      max-width: 100%;
      box-sizing: border-box;
      overflow-x: hidden;
}
  .image-gallery.three img { 
      max-width: 100%;
      object-fit: cover;    
}
  .image-gallery.four  {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .image-gallery.four img { 
    max-width: 100%;
    object-fit: cover;    
}
  .image-gallery.five  {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 3px;
      max-width: 100%;
      box-sizing: border-box;
      overflow-x: hidden;
  }
  .image-gallery.five img { 
      max-width: 100%;
      object-fit: cover;
  }
  .image-gallery.six  {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}
.image-gallery.six img { 
    max-width: 100%;
    object-fit: cover;
}
  .image-gallery.seven {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .image-gallery.seven img { 
    max-width: 100%;
    object-fit: cover;
  }
  
/* 이미지 로드 실패 시 기본 이미지 표시 */
.hidden-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px auto;
}

.hidden-content img[src="default.jpg"] {
    opacity: 0.5;
    filter: grayscale(50%);
}

/* 프로젝트 선택 드롭다운 */
.footer {
    margin-top: 50px;
    text-align: center;
}

#project-select {
    font-size: 1rem;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    background-color: white;
}
  
/* 반응형 (화면 크기에 따라 이미지 갤러리 열 개수 조정) */
@media (max-width: 1024px) {
    .image-gallery {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 480px) {
    .image-gallery {
        grid-template-columns: repeat(5, 1fr);
    }
}
.footer {
  margin-top: 50px;
  text-align: center;
}

#project-select {
  font-size: 1rem;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  background-color: white;
}

.hidden-gallery {
  display: none;
}