/* ========== VIP Junket & Index 共用樣式 ========== */

.vip-desc {
  transition: all 0.3s ease;
}

.vip-desc.active {
  background-color: #1f2937;
}

.vip-desc.active .vip-text {
  color: #c8a178;
}

.vip-desc.active .vip-icon img:first-child {
  display: none;
}

.vip-desc.active .vip-icon img:last-child {
  display: block;
}

/* 新增全域 H2 漸層效果 */
h2 {
  background: linear-gradient(181deg, #C8A178 28.63%, #F6D9B3 56.01%, #C8A178 84.55%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ========== Index.astro 專用樣式 ========== */
.trends-content {
  position: relative;
}

.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trends-desc-swich {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.left-btn, .right-btn {
  cursor: pointer;
  transition: opacity 0.3s ease;
  background: none;
  border: none;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.left-btn:hover, .right-btn:hover {
  opacity: 0.8;
}

.left-btn img, .right-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.left-btn, .right-btn {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

#storyImage {
  transition: opacity 0.3s ease;
}

.relax-item {
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.relax-item:hover {
  transform: translateY(-5px);
}

.relax-item-img {
  position: relative;
  overflow: hidden;
  height: 240px;
}

.relax-item-img img {
  transition: transform 0.3s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.relax-item:hover .relax-item-img img {
  transform: scale(1.05);
}

.relax-item-desc {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.relax-item-span {
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.relax-item-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.relax-item-button .link {
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
}

.relax-item-button .button {
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

/* Main Business 樣式 */
.slides-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 50px 0;
}

.slides-inner {
  display: flex;
  transition: transform 0.3s ease;
  gap: 20px;
}

.slide {
  flex: 0 0 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.controls button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.controls button:hover {
  background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 1024px) {
  .slide {
    flex: 0 0 100%;
  }
  .vip-content {
    flex-direction: column;
  }
  .vip-tabs, .vip-details {
    width: 100%;
  }
  .vip-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .vip-desc {
    flex: 0 0 calc(33.333% - 7px);
  }
}

@media (max-width: 1200px) {
  .partner-items {
    grid-template-columns: repeat(4, 194px);
  }
}

@media (max-width: 800px) {
  .partner-items {
    grid-template-columns: repeat(2, 194px);
  }
}

@media (max-width: 768px) {
  .vip-desc {
    flex: 0 0 calc(50% - 5px);
  }
  .cta-section .flex {
    flex-direction: column;
  }
  .stories-card {
    flex-direction: column;
  }
}
.cta-section .w_1_2 {
  width: 50%;
}
.cta-section .w_1_2:first-child {
  padding-right: 2rem;
}
.cta-section img {
  height: 300px;
}
.stories-card .w_1_3,
.stories-card .w_2_3 {
  width: 100%;
}
.stories-card .w_1_3 {
  margin-bottom: 1rem;
}
.stories-card .w_2_3 {
  padding-left: 1rem;
}
.mission-image {
  height: 400px;
}

@media (max-width: 640px) {
  .slide {
    flex: 0 0 100%;
  }
}

@media (max-width: 480px) {
  .vip-desc {
    flex: 0 0 100%;
  }
}

/* Partner Merchants 樣式 */
.partner-items {
  display: grid;
  grid-template-columns: repeat(8, 194px);
  gap: 2px;
  justify-content: center;
}

.partner-item {
  width: 194px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background-color: #252525;
  border: none;
  position: relative;
  overflow: hidden;
}

.partner-item .img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.3s ease;
  filter: grayscale(100%);
}

.partner-item:hover .img {
  filter: grayscale(0%);
}

/* 淡入動畫相關樣式 */
.fadein-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fadein-section.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* 確保動畫在頁面載入時不會立即觸發 */
.fadein-section:not(.fade-in) {
  visibility: hidden;
}

/* ========== vip-plus.astro 專用樣式 ========== */
.item {
  transition: transform 0.3s ease;
}
.item:hover {
  transform: translateY(-5px);
}
.item .show-image {
  overflow: hidden;
  border-radius: 0.5rem;
}
.item .show-image img {
  transition: transform 0.3s ease;
}
.item:hover .show-image img {
  transform: scale(1.05);
}
.desc-card {
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(200,161,120,0.15);
  left: 50%;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  min-width: 260px;
}
.desc-card-left {
  right: 50%;
  left: auto;
  transform: translateY(-50%);
}
@media (max-width: 1024px) {
  .desc-card {
    left: 35%;
    width: 60%;
  }
  .desc-card-left {
    right: 35%;
    width: 60%;
  }
  .show-image {
    width: 100% !important;
  }
}
@media (max-width: 768px) {
  .item {
    flex-direction: column !important;
    min-height: unset !important;
  }
  .show-image {
    width: 100% !important;
    position: static !important;
  }
  .desc-card, .desc-card-left {
    position: static !important;
    width: 100% !important;
    min-width: unset;
    margin-top: 1rem;
    transform: none !important;
    left: unset !important;
    right: unset !important;
    top: unset !important;
  }
}
.card-bg-img {
  pointer-events: none;
}
.card-bg-right img {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.card-bg-left img {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
@media (max-width: 1024px) {
  .card-bg-img {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    transform: none !important;
    height: 100% !important;
  }
  .card-bg-img img {
    border-radius: 1rem !important;
  }
}
@media (max-width: 768px) {
  .card-bg-img {
    display: none;
  }
} 

/* 會員卡片樣式 */
.item {
  transition: transform 0.3s ease;
}

.item:hover {
  transform: translateY(-5px);
}

.item .show-image {
  overflow: hidden;
  border-radius: 0.5rem;
}

.item .show-image img {
  transition: transform 0.3s ease;
}

.item:hover .show-image img {
  transform: scale(1.05);
}

/* 響應式設計 */
@media (max-width: 768px) {
  .item .flex {
    flex-direction: column;
  }

  .item .show-image {
    width: 100%;
    height: 200px;
  }

  .item .desc {
    width: 100%;
    margin-top: 1rem;
  }
}

.desc-card {
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(200,161,120,0.15);
  left: 50%;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  min-width: 260px;
}
.desc-card-left {
  right: 50%;
  left: auto;
  transform: translateY(-50%);
}
@media (max-width: 1024px) {
  .desc-card {
    left: 35%;
    width: 60%;
  }
  .desc-card-left {
    right: 35%;
    width: 60%;
  }
  .show-image {
    width: 100% !important;
  }
}
@media (max-width: 768px) {
  .item {
    flex-direction: column !important;
    min-height: unset !important;
  }
  .show-image {
    width: 100% !important;
    position: static !important;
  }
  .desc-card, .desc-card-left {
    position: static !important;
    width: 100% !important;
    min-width: unset;
    margin-top: 1rem;
    transform: none !important;
    left: unset !important;
    right: unset !important;
    top: unset !important;
  }
}

.card-bg-img {
  pointer-events: none;
}
.card-bg-right img {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.card-bg-left img {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
@media (max-width: 1024px) {
  .card-bg-img {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    transform: none !important;
    height: 100% !important;
  }
  .card-bg-img img {
    border-radius: 1rem !important;
  }
}
@media (max-width: 768px) {
  .card-bg-img {
    display: none;
  }
}