/* 기본 스타일 */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  padding-bottom: 80px;
  background: #fff;
  color: #333;
}

/* 헤더 */
header {
  position: relative;
  text-align: center; /* 내부 콘텐츠를 중앙 정렬 */
  padding: 60px 20px;
  overflow: hidden;
  background: #fff; /* 배경색이나 이미지 필요 시 추가 */
}

header img {
  display: inline-block;
  width: clamp(600px, 20vw, 200px);
  height: auto;
}



/* 내비게이션 (이미지 메뉴) */
nav {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 120px; /* 기본 너비 */
  background: #fff;
  padding: 10px 0;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

/* 메뉴 리스트를 세로로 정렬하고 가운데 정렬 */
.image-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
}

/* 각 메뉴 아이템 가운데 정렬 */
.image-menu li {
  width: 100%;
  text-align: center;
}

/* 메뉴 링크 및 이미지 기본 스타일 */
.image-menu li a {
  display: inline-block;
  text-decoration: none;
}

/* 이미지를 부모 요소에 맞춰 유동적으로 조절 */
.image-menu li img {
  /* clamp(최소값, 기준값(뷰포트에 비례), 최대값)으로 유동 크기 지정 */
  width: clamp(40px, 10vw, 80px);
  height: auto;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: width 0.5s ease, transform 0.3s, border 0.3s, box-shadow 0.3s;
}

.image-menu li img:hover {
  transform: translateY(-3px);
  border-color: #ff5500;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 메인 컨테이너 */
main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 푸터 */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 15px;
  width: 100%;
}

/* 슬라이더 컨테이너 (기존 슬라이더) */
.slider-container {
  position: relative;
  width: 600px;
  height: 400px;
  min-width: 300px;
  overflow: hidden;
  border: 2px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.slider {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.slide {
  min-width: 100%;
  box-sizing: border-box;
}
.slide img {
  width: 100%;       /* 슬라이더 셀의 너비에 맞춤 */
  height: 100%;      /* 슬라이더 셀의 높이에 맞춤 */
  object-fit: cover; /* 비율 유지하며 컨테이너를 채움 (잘릴 수 있음) */
}

/* 슬라이더 화살표 버튼 */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,85,0,0.8);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s;
}
.slider-arrow:hover {
  background: rgba(255,85,0,1);
}
.slider-arrow.prev {
  left: 10px;
}
.slider-arrow.next {
  right: 10px;
}


/* 우측 음원 리스트 */
#track-list {
  position: fixed;
  top: 0;
  right: 0;
  width: 220px;
  bottom: 0;
  background: #fff;
  border-left: 1px solid #ccc;
  box-shadow: -2px 0 5px rgba(0,0,0,0.05);
  overflow-y: auto;
  padding: 10px;
  z-index: 999;
}
#track-list h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}
#track-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#track-list li {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}
#track-list li:hover {
  background: #fafafa;
}
#track-list li.active {
  background: #ccc;
}

/* 하단 고정 오디오 플레이어 */
#audio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #f5f5f5;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  gap: 8px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  z-index: 9999;
}
#audio-player #currentTrack {
  margin: 0;
  font-weight: bold;
  font-size: 1rem;
}
.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #333;
  transition: color 0.3s;
}
.player-btn:hover {
  color: #ff5500;
}

/* 재생 스크롤 및 볼륨 스크롤 */
#seekBar {
  -webkit-appearance: none;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  cursor: pointer;
  margin: 0 5px;
  width: 500px;
}
#volumeBar {
  -webkit-appearance: none;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  cursor: pointer;
  margin: 0 5px;
  width: 100px;
}
#seekBar::-webkit-slider-thumb,
#volumeBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #ff5500;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid #fff;
}
#currentTime {
  width: 50px;
  text-align: center;
}

/* 볼륨 아이콘 */
.volume-icon {
  display: inline-flex;
  align-items: center;
  font-size: 1.2rem;
  margin-right: 5px;
  color: #333;
}

/* 카드 그리드 (플레이리스트 카드) */
.card-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding: 20px;
  grid-auto-rows: 250px;
}
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 250px;
}
.card:hover {
  transform: translateY(-10px) scale(1.03) rotateZ(0.5deg);
  box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}
.card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.card:hover img {
  transform: scale(1.05);
  filter: brightness(1.05);
}
.card-info {
  position: absolute;
  bottom: 0;       /* 예시: 카드 하단에 고정 */
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.8); /* 배경 반투명 처리로 이미지와 구분 */
  padding: 10px;
}
.card-title {
  margin: 0;
  font-size: 1.2rem;
  transition: color 0.3s ease, text-decoration 0.3s ease;
  cursor: pointer;
}
.card-title:hover {
  text-decoration: underline;
  color: #ff5500;
}
.card-creator {
  margin: 5px 0 0;
  font-size: 0.9rem;
  color: #666;
  transition: color 0.3s ease;
}
.card:hover .card-creator {
  color: #333;
}

/* Accordion */
.accordion {
  border: 1px solid #ddd;
  border-radius: 5px;
}
.accordion-item {
  border-bottom: 1px solid #ddd;
}
.accordion-header {
  background: #2575fc;
  color: #fff;
  padding: 15px;
  cursor: pointer;
  position: relative;
}
.accordion-header::after {
  content: '+';
  position: absolute;
  right: 20px;
  font-size: 1.5rem;
}
.accordion-header.active::after {
  content: '-';
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #f1f1f1;
  padding: 0 15px;
}
.accordion-content p {
  padding: 15px 0;
}

/* Directions */
.directions-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}
.map-container {
  width: 100%;
  height: 400px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

/* Swiper 슬라이더 */
.swiper {
  width: 100%;
  height: 500px;
}

.swiper-slide {
  background: #fff;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.swiper-slide img {
  width: 100%;       /* 슬라이더 셀의 너비에 맞춤 */
  height: 100%;      /* 슬라이더 셀의 높이에 맞춤 */
  object-fit: cover; /* 비율 유지하며 컨테이너를 채움 (잘릴 수 있음) */
}

.myDynamicSwiper {
  width: 100%;       /* 부모 너비 전체로 설정 */
  max-width: 1200px; /* 최대 너비를 1200px로 설정(원하는 크기로 조절) */
  height: 550px;     /* 원하는 높이로 설정 */
  margin-bottom: 100px;
  padding: auto;
}
.swiper-pagination-bullet {
  background: #ccc;
  opacity: 1;
}
.swiper-pagination-bullet-active {
  background: #ff5500;
}
.swiper-button-next, .swiper-button-prev {
  color: #ff5500;
}

/* 반응형 미디어 쿼리 */
@media (max-width: 1024px) {
  main {
    max-width: 90%;
    padding: 10px;
  }
  
  .slider-container {
    width: 100%;
    height: auto;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    padding: 10px;
  }
}

@media (max-width: 768px) {
   /* 네비게이션: 왼쪽에 숨김 상태에서 토글 */
   nav {
    position: fixed;
    top: 50%;
    left: -120px; /* 네비게이션 너비만큼 왼쪽으로 숨김 */
    transform: translateY(-50%);
    width: 120px;
    background: #fff;
    padding: 10px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 998;
    transition: left 0.3s ease;
  }
  
  /* 네비게이션 열렸을 때 */
  nav.open {
    left: 0;
  }
  
  /* 네비게이션 토글 버튼 (왼쪽 상단에 배치) */
  #nav-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    background: #ff5500;
    color: #fff;
    padding: 10px;
    border: none;
    border-radius: 5px;
    z-index: 1000;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  #nav-toggle:hover {
    background: #e04e00;
  }

  header img {
    height: 100px;
    width: 250px;
  }

  .myDynamicSwiper {
    height: 300px;
    padding: 10px;
  }
  
  /* 음원 리스트: 오른쪽에 숨김 */
  #track-list {
    position: fixed;
    top: 0;
    right: -220px; /* 패널 너비만큼 숨김 */
    width: 220px;
    bottom: 0;
    background: #fff;
    border-left: 1px solid #ccc;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
    overflow-y: auto;
    padding: 10px;
    z-index: 999;
    transition: right 0.3s ease;
  }
  
  /* 음원 리스트 열렸을 때 */
  #track-list.open {
    right: 0;
  }
  
  /* 음원 리스트 토글 버튼: 오른쪽 상단에 배치 */
  #track-list-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #ff5500;
    color: #fff;
    padding: 10px;
    border: none;
    border-radius: 5px;
    z-index: 1000;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  #track-list-toggle:hover {
    background: #e04e00;
  }
  /* 오디오 플레이어를 grid 레이아웃으로 3행 구성 */
#audio-player {
  display: grid;
  grid-template-areas:
    "prev play next vol-icon vol-slider"
    "title title title title title"
    "seek seek seek seek seek";
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: auto auto auto;
  gap: 5px;
  align-items: center;
  padding: 10px;
}

  
  /* 각 요소에 grid 영역 지정 */
  #prevBtn {
    grid-area: prev;
  }
  
  #playPauseBtn {
    grid-area: play;
  }
  
  #nextBtn {
    grid-area: next;
  }
  
  .volume-icon {
    grid-area: vol-icon;
  }
  
  #volumeBar {
    grid-area: vol-slider;
    width: 100%;
  }
  
  #currentTrack {
    grid-area: title;
    font-size: 0.9rem;
    text-align: center;
  }
  
  #seekBar {
    grid-area: seek;
    width: 100%;
    margin-top: 10px;
  }

}

  
@media (max-width: 480px) {
  nav {
    width: 60px;
  }
  
  .myDynamicSwiper {
    height: 150px;
    padding: 10px;
  } 

  header img {
    height: 50px;
    width: 125px;
  }

  #track-list {
    width: 150px;
  }
  
  .image-menu li img {
    width: clamp(30px, 12vw, 60px);
  }
  
  .card-title {
    font-size: 1rem;
  }
  
  .card-creator {
    font-size: 0.8rem;
  }

      /* 불필요한 요소는 숨김 */
      #currentTime {
        display: none;
      }
}



  