/* ───────── 반응형 카드 너비 ───────── */
:root {
  --carousel-card-width: 75%;
}
@media (min-width: 480px) {
  :root { --carousel-card-width: 55%; }
}
@media (min-width: 640px) {
  :root { --carousel-card-width: 40%; }
}
@media (min-width: 768px) {
  :root { --carousel-card-width: 33.333%; }
}
@media (min-width: 1024px) {
  :root { --carousel-card-width: 20%; }
}

/* ───────── 섹션 ───────── */
.carousel-section {
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 2.5rem 0;
  background:
    radial-gradient(120% 100% at 50% 100%, rgba(240, 245, 255, 0.4) 0%, transparent 80%),
    #f8fafc;
  outline: none;
  font-family: 'Pretendard', 'Noto Sans', 'Nanum Gothic', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ───────── 섹션 헤더 ───────── */
.section-header {
  position: relative;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  text-align: center;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
}

/* ───────── 캐러셀 래퍼 ───────── */
.carousel-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

/* ───────── 페이드 마스크 ───────── */
.fade-mask {
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 30;
  width: 5rem;
}

@media (min-width: 640px) {
  .fade-mask { width: 10rem; }
}

.fade-mask--left {
  left: 0;
  background: linear-gradient(to right, #f8fafc 10%, transparent);
}

.fade-mask--right {
  right: 0;
  background: linear-gradient(to left, #f8fafc 10%, transparent);
}

/* ───────── 네비게이션 버튼 ───────── */
.nav-btn {
  position: absolute;
  top: 50%;
  z-index: 40;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: rgba(15, 23, 42, 0.6);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: all 300ms ease-out;
}

.nav-btn:hover {
  transform: translateY(-50%) scale(1.1);
  border-color: #fff;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.nav-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 300ms ease-out;
}

.nav-btn--prev { left: 0.5rem; }
.nav-btn--next { right: 0.5rem; }

@media (min-width: 640px) {
  .nav-btn--prev { left: 1.5rem; }
  .nav-btn--next { right: 1.5rem; }
}

.nav-btn--prev:hover svg { transform: translateX(-2px); }
.nav-btn--next:hover svg { transform: translateX(2px); }

/* ───────── 카드 트랙 ───────── */
.track-container {
  overflow: visible;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 1rem 0 2rem;
}

.track-container::-webkit-scrollbar {
  display: none;
}

.track {
  display: flex;
  will-change: transform;
}

.track--transitioning {
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ───────── 카드 슬롯 ───────── */
.card-slot {
  flex: none;
  padding: 0.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  width: var(--carousel-card-width);
  transition: z-index 0s;
}

/* ───────── 카드 ───────── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 280px;
  margin: 0 auto;
  padding-top: 1rem;
  cursor: pointer;
  will-change: transform, opacity;
  user-select: none;
  height: 100%;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.08);
  opacity: 0.3;
  transform: scale(0.7);
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 600ms cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card--active {
  border-color: #fff;
  box-shadow:
    0 10px 30px -8px rgba(0, 0, 0, 0.1),
    0 0 12px rgba(0, 0, 0, 0.03);
  outline: 1px solid rgba(15, 23, 42, 0.05);
}

/* ───────── 카드 이미지 ───────── */
.card-image-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 50%;
}

.card-image-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.card-image-inner img {
  position: relative;
  z-index: 10;
  height: 100%;
  width: 100%;
  object-fit: contain;
}

/* ───────── 분리선 ───────── */
.card-divider {
  margin: 0 1.25rem;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.08), transparent);
}

/* ───────── 카드 텍스트 ───────── */
.card-text,
.card-bottom {
  position: relative;
  z-index: 1;
}

.card-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.875rem 1rem 0;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.375;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.card-desc {
  margin-top: 0.25rem;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  color: #334155;
}

/* ───────── 카드 하단 버튼 영역 ───────── */
.card-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem 1.5rem;
}

/* ───────── 수상내역 확인 버튼 ───────── */
.redirect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 0.25rem 0.75rem;
  font-size: 10px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  box-shadow: none;
  transition: all 200ms;
  cursor: pointer;
}

.redirect-btn:hover {
  border-color: #9ca3af;
  background: #f9fafb;
  color: #111827;
  box-shadow: none;
}

.redirect-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ───────── 카드 포커스 스타일 ───────── */
.card:focus {
  outline: none;
}

.card:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

