* {
 margin : 0;
 padding: 0;
 box-sizing: border-box;
}

body {
  background-color: snow;
  font-family: serif;
}

.marquee-header {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  background-color: snow;
  color: grey;
  padding: 10px 0;
  box-sizing: border-box;
  position: relative;
}

.marquee-container {
  font-size: 13px;
  letter-spacing: 3px;
  display: inline-block;
  padding-right: 50%; /* 오른쪽 바깥에서 시작하게 */
  animation: scroll-left-to-right 50s linear infinite;
}

@keyframes scroll-left-to-right {
  0% {
    transform: translateX(-50%); /* 왼쪽 바깥에서 시작 */
  }
  100% {
    transform: translateX(0%); /* 오른쪽 바깥으로 빠져나감 */
  }
}

h1 {
  font-size: 30px;
  writing-mode: vertical-rl;
  word-break: keep-all;
  white-space: nowrap;
  overflow-wrap: normal;
  letter-spacing: 4px;
  text-align: top;
  line-height: 1.5;
  margin: 50px auto 30px;
  padding: 20px;
  border-left: 1.5px solid black;
  border-right: 1.5px solid black;
}

h2{
  font-size: 13px;
  text-align: center;
  margin: 50px 0 50px;
}

.fadetext {
  font-weight: bold;
  color: inherit;
  text-decoration: none;
  animation: fade 2s ease-in-out infinite;
}

@keyframes fade {
  0%   { opacity: 1; }
  60%  { opacity: 0.01; } /* 사라짐 */
  80%  { opacity: 0.01; } /* 사라진 상태 유지 */
  100% { opacity: 1; }    /* 다시 나타남 */
}

.fadetext:hover {
  text-decoration: underline 1px;
  font-style: italic;
}

.small-text {
  font-size: 12px;
}

figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px;
}

figcaption {
  font-size: 12px;
  color: black;
  text-align: center;
  margin-top: 2px;
}

.info {
  color: white;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap; /* 줄바꿈 허용 */
  gap: 40px;        /* 이미지 간 간격 */
  margin: 0px 0;
  background-color: black;
  padding: 20px;
}

.image-gallery {
  line-height: 2;
  margin: 0;
  padding: 20px;
}

.image-gallery ul {
  border-bottom: 1.5px solid black;
  border-top: 1.5px solid black;
  display: grid;
  /* 각 이미지가 최소 220px 고정 폭을 갖도록 하고(figure과 img 모두 포함하는 칸의 개념), 컨테이너 안에서 전체 그리드를 가운데 정렬 */
  grid-template-columns: repeat(auto-fill, 220px);
  /* 가능한 많이 칸을 채우고, 남는 공간 있으면 한쪽으로 여백을 두는데 (지금은 센터로 설정)*/
  justify-content: center;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.gallery-korea {
  background-color: #ff9600;
}

.gallery-japan {
  background-color: #a569ff;
}

.gallery-thai {
  background-color: #55f21c;
}

.gallery-china {
  background-color: #554dff;
}

.gallery-germany {
  background-color: #ffff00;
}

.image-gallery img {
    max-height: 400px;
    max-width: 200px;
    padding: 5px;
  
}

.as-button, .as-button0 {
  margin:10px;
  cursor: pointer;
  padding: 0px 25px;
  text-align: center;
}

.as-button0:hover {
  color: black;
  background-color: white;
  letter-spacing: 8px;
  border-radius: 15px;
  transition-duration: 2s;
}

.as-button:hover {
  color: white;
  background-color: black;
  letter-spacing: 8px;
  border-radius: 15px;
  transition-duration: 2s;
}

summary.as-button {
    font-size: 15px;
}

/* 이미지 뜨는 기능 */
#preview-area{
  display:none;
  text-align:center;
  margin-bottom:40px;
}
#preview-caption{
  margin-top:8px;
  font-size:12px;
  color:black;
}
#preview-img{
  max-width:100%;
  max-height:600px;
}

footer {
  margin-top: 50px;
  margin-bottom: 50px;
  text-align: center;
  font-size: 12px;
  color: grey;
}

.footertext {
  color: inherit;
  font-style: italic;
}

.footertext:hover {
  text-decoration: underline 1px;
  font-style: normal;
}
