.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1280px;
  overflow: hidden;
  margin-top: 3rem;

  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

.carousel-track {
  display: flex;
  gap: 16px; /* 카드 간격 */
  transition: transform 0.5s;
  will-change: transform;
  padding-right: calc((100% / 3.3) * 0.3);
}


.carousel-card {
  flex: 0 0 calc((100% / 3.3) - (16px * 2.3 / 3.3));
  max-width: calc((100% / 3.3) - (16px * 2.3 / 3.3));
  min-width: 0;
  width: 20rem;
  text-align: center;
  transition: box-shadow 0.3s;
  cursor: pointer;
}

.carousel-card-top h3 {
  color: #334155;
  font-size: 1.25rem;
  line-height: 1.75rem;
  margin-bottom: 3px;
  font-weight: 700;
}

.carousel-card-top h4 {
  color: #475569;
  font-size: 1rem;
  line-height: 1.5rem;
  transition: color 0.3s;
  margin-top: calc(.25rem * calc(1 - 0));
  margin-bottom: calc(.25rem * 0);
  font-weight: 600;
}

/* 카드 전체 hover 시 h4만 색상 변경 */
.carousel-card:hover .carousel-card-top h4 {
  color: rgb(217 119 6)
}

.carousel-card img {
  width: 100% !important;
  height: 20rem !important;
  object-fit: cover;
  margin: 12px 0 14px 0;
  border: 2px solid #ffe484 !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10) !important;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  box-sizing: border-box;
}

/* 카드 전체 hover 시 이미지 확대 + 효과 */
.carousel-card:hover img {
  transform: scale(1.06) translateY(-10px);
  box-shadow: 0 12px 48px #ffe48455;
  border-color: #ffc900;
}

.carousel-card-top p{
  font-size: .75rem;
  line-height: 1rem;
  color: #64748b;
  margin-top: calc(.25rem * calc(1 - 0));
  margin-bottom: calc(.25rem * 0);
  font-weight: 500;
}

.carousel-card-bottom p {
    font-size: .875rem;
    line-height: 1.25rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: calc(.25rem * 0);

}
.carousel-card-bottom span {
    color: #d97706;
    font-size: .75rem;
    line-height: 1rem;
    font-weight: 600;
}




.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  background: #334155;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 2em;
  transform: translateY(-50%);
  opacity: 0.9;

  padding:0px;

  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-arrow.left { left: -38px; }
.carousel-arrow.right { right: -38px; }
.carousel-arrow:hover { background: #1e293b; }





@media (max-width: 900px) {
  .carousel-card, .carousel-card { flex-basis: 70%; max-width: 70%; }
}
@media (max-width: 600px) {
  .carousel-card, .carousel-card { flex-basis: 100%; max-width: 100%; }
}



/* Popup */
.carousel-popup {
  display: none;
  position: fixed; z-index: 1000;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  align-items: center; 
  justify-content: center;
}

.carousel-popup-content {
  background: #fff;
  border-radius: 18px;
  border: 4px solid #ffe484;
  box-shadow: 0 6px 32px #0003;
  padding: 4rem 2rem 2rem 2rem;
  min-width: 340px;
  max-width: 42rem;
  max-height: 90vh;
  text-align: center;
  position: relative;

  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;


}

.carousel-popup-close {
  position: absolute; top: 16px; right: 18px;
  font-size: 2em; color: #6b7280;
  cursor: pointer;
  background: #fff;
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px #0001;
  transition: background 0.2s;
}
.carousel-popup-close:hover {
  background: #ffe484;
}

.popup-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-family: "Cinzel","Cinzel Fallback";
  font-weight: 700;
  color: #ca8a04;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.popup-subtitle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* 간격 조절 */


  margin-bottom: 1.5rem;
}

.popup-subtitle {
  font-size: 1.125rem;
  line-height: 1.625;
  font-weight: 600;
  color: #eab308;
}
.popup-subtitle-wrapper span {
  font-size: 1.125rem;
  line-height: 1.625;
  font-weight: 600;
  color: #9ca3af;
}
.popup-divider {
  border: none;
  border-top: 1px solid #fef08a;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}
.popup-desc {
  color: #1f293c;
  font-size: 1.0rem;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.625;
  text-align: left;
  margin: 0 auto;
  white-space: pre-line;
  letter-spacing: 0.01em;
  max-width: 92%;
}




/* 태블릿 */
@media (max-width: 1024px) {
  .carousel-popup-content {
    max-width: 32rem;
    padding: 3rem 1.5rem 1.5rem;
  }
  .popup-title {
    font-size: 1.5rem;
    line-height: 2rem;
  }
  .popup-subtitle,
  .popup-subtitle-wrapper span {
    font-size: 1rem;
  }
  .popup-desc {
    font-size: 0.95rem;
  }
}

/* 모바일 */
@media (max-width: 640px) {
  .carousel-popup-content {
    width: 90%;
    max-width: 28rem;
    padding: 2rem 1rem 1rem;
  }
  .popup-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
  .popup-subtitle,
  .popup-subtitle-wrapper span {
    font-size: 0.9rem;
  }
  .popup-desc {
    font-size: 0.875rem;
  }
}
