/* 隱藏 Slick 預設樣式 */
.patient-story-slick-carousel .slick-list,
.patient-story-slick-carousel .slick-track {
  display: none !important;
}

/* Patient Story 輪播新結構 */
.patient-story-carousel-container {
  display: flex;
  align-items: flex-end;
  gap: 40px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

/* 切換動畫 */
.patient-story-main-card {
  /* flex: 1; */
  width: 60%;
  min-width: 0;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.patient-story-previews {
  width: 40%;
  padding-top: 80px;
  display: flex;
  flex-direction: row;

  gap: 20px;
  /* width: 30%; */
  flex-shrink: 0;
}

.patient-story-preview-item {
  border-radius: 12px;
  overflow: hidden;
  filter: grayscale(100%);
  transition: filter 0.3s, transform 0.3s;
  cursor: pointer;
}

.patient-story-preview-item img {
  height: 350px;
}

.patient-story-preview-item:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* Patient Story 卡片樣式 */
.patient-story-card {
  display: flex !important;
  flex-direction: row !important;
  padding: 12px 8px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  min-width: 600px;
  max-width: 900px;
  width: 100%;
  min-height: 420px;
  position: relative;
}

/* 內容淡入動畫 */
.patient-story-image,
.patient-story-info {
  transition: opacity 0.5s ease-in-out;
}

.patient-story-image.fade-in,
.patient-story-info.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* 移除舊的滑動動畫 */
.patient-story-card.slide-in-left,
.patient-story-card.slide-in-right,
.patient-story-card.slide-out-left,
.patient-story-card.slide-out-right {
  animation: none;
}

/* 控制區覆蓋層 */
.patient-story-controls-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10;
  /* background: rgba(255, 255, 255, 0.9); */
  padding: 8px 12px;
}

.patient-story-arrow {
  font-size: 24px;
  color: #a98b7c;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0 8px;
  display: flex;
  align-items: center;
  font-weight: normal;
  width: auto;
  height: auto;
  justify-content: center;
}

.patient-story-arrow:hover {
  color: #7c5c4a;
  transform: scale(1.05);
}

.patient-story-pagination {
  font-size: 16px;
  color: #a98b7c;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 1px;
}

.patient-story-image {
  flex: 0 0 320px;
  min-width: 320px;
  max-width: 320px;
  height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f3ef;
}

.patient-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.patient-story-info {
  flex: 1 1 0;
  padding: 40px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fff;
  transition: opacity 0.3s;
  text-align: center;
}

.patient-story-quote-top {
  font-family: "Cantata One", serif;
  font-size: 2.5rem;
  color: #a98b7c;
  margin-bottom: 6px;
  font-weight: 300;
  height: 28px;
  text-align: center;
}

.patient-story-title {
  font-size: 18px;
  margin-bottom: 8px;
  color: #694b40;
  font-weight: normal;
}

.patient-story-quote-bottom {
  font-family: "Cantata One", serif;
  font-size: 2.5rem;
  color: #a98b7c;
  margin-bottom: 10px;
  font-weight: 300;
  height: 28px;
  text-align: center;
}

.patient-story-review-label {
  width: fit-content;
  border: #a98b7c 1px solid;
  border-radius: 20px;
  font-size: 14px;
  color: #a98b7c;
  margin-bottom: 16px;
  margin-top: 24px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 4px 16px;
}

.patient-story-meta {
  font-size: 18px;
  color: #694b40;
  margin-bottom: 16px;
}

.patient-story-excerpt {
  font-size: 14px;
  background-color: #f9f5ef;
  color: #694b40;
  margin-bottom: 70px;
  padding: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.7;
  /* 移除 min-height，讓 -webkit-line-clamp 正確工作 */
  word-wrap: break-word;
  word-break: break-word;
  /* 確保省略號正確顯示 */
  white-space: normal;
  max-height: 7em; /* 3行 * 1.4行高 */
  /* 強制省略號顯示 */
  text-overflow: ellipsis !important;
  -webkit-line-clamp: 3 !important;
}

.patient-story-more {
  font-size: 18px;
  color: #694b40;
  text-decoration: none;
  border-bottom: 1px solid #a98b7c;
  align-self: center;
  margin-top: auto;
  letter-spacing: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.patient-story-more:hover {
  color: #7c5c4a;
  border-color: #7c5c4a;
}

/* 響應式 */
@media (max-width: 1024px) {
  .patient-story-carousel-container {
    flex-direction: column;
    gap: 20px;
    padding: 15px;
  }

  .patient-story-main-card {
    width: 100%;
    padding-top: 60px;
  }

  .patient-story-previews {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
  }

  .patient-story-preview-item {
    width: 100px;
    height: 100px;
  }

  .patient-story-card {
    min-width: auto;
    max-width: 100%;
    min-height: auto;
  }

  .patient-story-image {
    width: 40%;
    min-width: 200px;
    max-width: 40%;
    height: 280px;
  }

  .patient-story-info {
    width: 60%;
    padding: 20px;
  }
}

@media (max-width: 900px) {
  .patient-story-card {
    min-width: 90vw;
    max-width: 98vw;
  }
  .patient-story-image {
    min-width: 180px;
    max-width: 180px;
    height: 220px;
  }
  .patient-story-previews {
    width: 180px;
  }
  .patient-story-preview-item {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 768px) {
  .patient-story-carousel-container {
    flex-direction: column !important;
    gap: 16px !important;
    padding: 8px !important;
  }

  .patient-story-main-card {
    width: 100% !important;
    padding-top: 60px !important;
  }

  .patient-story-previews {
    display: none !important; /* 手機版隱藏預覽圖片 */
  }

  .patient-story-card {
    flex-direction: row !important; /* 強制保持左圖右文的佈局 */
    min-width: auto !important;
    max-width: 100% !important;
    min-height: auto !important;
    width: 100% !important;
  }

  .patient-story-image {
    width: 55% !important; /* 進一步增加圖片寬度 */
    min-width: 180px !important;
    max-width: 55% !important;
    height: 320px !important; /* 保持高度 */
    flex-shrink: 0 !important;
  }

  .patient-story-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .patient-story-info {
    width: 45% !important; /* 減少文字寬度 */
    padding: 8px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .patient-story-title {
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.2;
  }

  .patient-story-meta {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .patient-story-quote-top {
    font-size: 2rem;
    margin-bottom: 4px;
    height: 24px;
  }

  .patient-story-quote-bottom {
    font-size: 2rem;
    margin-bottom: 8px;
    height: 24px;
  }

  .patient-story-review-label {
    margin-bottom: 8px;
    margin-top: 12px;
    font-size: 12px;
    padding: 3px 12px;
  }

  .patient-story-excerpt {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 6px;
    padding: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 移除 min-height，讓 -webkit-line-clamp 正確工作 */
    word-wrap: break-word;
    word-break: break-word;
    /* 確保省略號正確顯示 */
    white-space: normal;
    max-height: 3.9em; /* 3行 * 1.3行高 */
  }

  .patient-story-more {
    font-size: 0.85rem;
    padding: 6px 12px;
    margin-top: auto;
  }
}

@media (max-width: 480px) {
  .patient-story-carousel-container {
    padding: 4px;
  }

  .patient-story-card {
    flex-direction: row !important; /* 超小螢幕也保持左圖右文 */
  }

  .patient-story-image {
    width: 60% !important; /* 增加圖片寬度 */
    min-width: 0 !important; /* 移除固定最小寬度 */
    height: 300px !important; /* 保持高度 */
    flex-shrink: 0;
  }

  .patient-story-info {
    width: 40% !important;
    padding: 8px;
    flex: 1;
  }

  .patient-story-title {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .patient-story-meta {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .patient-story-quote-top {
    font-size: 1.8rem;
    margin-bottom: 3px;
    height: 22px;
  }

  .patient-story-quote-bottom {
    font-size: 1.8rem;
    margin-bottom: 6px;
    height: 22px;
  }

  .patient-story-review-label {
    margin-bottom: 6px;
    margin-top: 8px;
    font-size: 11px;
    padding: 2px 10px;
  }

  .patient-story-excerpt {
    line-height: 2;
    font-size: 0.75rem;
    padding: 6px;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 移除 min-height，讓 -webkit-line-clamp 正確工作 */
    word-wrap: break-word;
    word-break: break-word;
    /* 確保省略號正確顯示 */
    white-space: normal;
    max-height: 3.9em;
  }

  .patient-story-more {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

/* 針對 390px 左右的手機裝置 */
@media (max-width: 390px) {
  .patient-story-carousel-container {
    padding: 2px;
  }

  .patient-story-card {
    gap: 8px;
  }

  .patient-story-image {
    width: 60% !important; /* 增加圖片寬度 */
    min-width: 0 !important; /* 移除固定最小寬度 */
    height: 300px !important;
    flex-shrink: 0;
  }

  .patient-story-info {
    width: 40% !important; /* 使用百分比 */
    padding: 6px;
    min-width: 0; /* 允許文字區域縮小 */
  }

  .patient-story-title {
    font-size: 0.95rem;
    margin-bottom: 3px;
    line-height: 1.2;
  }

  .patient-story-meta {
    font-size: 0.75rem;
    margin-bottom: 3px;
  }

  .patient-story-quote-top {
    font-size: 1.6rem;
    margin-bottom: 2px;
    height: 20px;
  }

  .patient-story-quote-bottom {
    font-size: 1.6rem;
    margin-bottom: 4px;
    height: 20px;
  }

  .patient-story-review-label {
    margin-bottom: 4px;
    margin-top: 6px;
    font-size: 10px;
    padding: 2px 8px;
  }

  .patient-story-excerpt {
    font-size: 0.7rem;
    padding: 6px;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 移除 min-height，讓 -webkit-line-clamp 正確工作 */
    word-wrap: break-word;
    word-break: break-word;
    /* 確保省略號正確顯示 */
    white-space: normal;
    max-height: 3.6em; /* 3行 * 1.2行高 */
  }

  .patient-story-more {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}
