/**
 * 首頁專用樣式
 */

/* ========================================
   Decorative Animations
   ======================================== */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes floatX {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes rotate360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 0;
  display: block;
  overflow: hidden;
}

.hero-section::before,
.hero-section::after {
  display: none;
}

.hero-slide,
.hero-default {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.hero-bg-picture {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.hero-bg-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

.hero-actions .btn-outline:hover {
  background: #fff;
  color: var(--primary);
}

/* Hero Navigation - 修復輪播按鈕定位 */
.hero-swiper {
  position: relative;
  height: calc(100vh - var(--header-height, 80px) - var(--marquee-height, 34px));
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 64px;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 8px;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  transform: translateY(-50%);
}

.hero-prev {
  left: 12px;
}
.hero-next {
  right: 12px;
}

@media (max-width: 768px) {
  .hero-nav {
    width: 32px;
    height: 48px;
    font-size: 1rem;
  }
  .hero-prev {
    left: 6px;
  }
  .hero-next {
    right: 6px;
  }
}

.hero-pagination {
  position: absolute !important;
  bottom: 30px !important;
  left: 50% !important;
  transform: translateX(-50%);
  z-index: 10;
}

.hero-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(44, 62, 80, 0.3);
  opacity: 1;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.hero-pagination .swiper-pagination-bullet-active {
  background: var(--accent, #c0956c);
  width: 32px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .hero-swiper {
    height: auto;
  }

  .hero-slide {
    padding: 0;
    height: auto;
  }

  .hero-bg-picture img {
    height: auto;
    object-fit: contain;
  }

  .hero-default {
    height: 50vh;
    min-height: 280px;
    max-height: 400px;
    padding: 20px 0;
  }

  .section-divider svg {
    height: 24px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    line-height: 1.35;
    margin-bottom: 16px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: row;
    gap: 12px;
  }

  .hero-actions .btn {
    padding: 12px 20px;
    font-size: 0.875rem;
    flex: 0 0 auto;
  }

  .hero-nav {
    display: none;
  }

  .hero-pagination {
    display: none !important;
  }
}

/* ========================================
   Section Dividers
   ======================================== */
.section-divider {
  line-height: 0;
  margin-top: -1px;
  position: relative;
  z-index: 2;
}

.section-divider svg {
  display: block;
  width: 100%;
  height: 48px;
}

/* ========================================
   About Section
   ======================================== */
.about-section {
  background: var(--bg-white);
  position: relative;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%);
  animation: pulseGlow 6s ease-in-out infinite;
  pointer-events: none;
}

.about-section::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41,128,185,0.06) 0%, transparent 70%);
  animation: pulseGlow 8s ease-in-out infinite 2s;
  pointer-events: none;
}

.about-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.about-deco-dots {
  top: 20%;
  right: 8%;
  width: 80px;
  height: 80px;
  background-image: radial-gradient(circle, var(--primary) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  opacity: 0.06;
  animation: floatY 8s ease-in-out infinite;
}

.about-deco-ring {
  bottom: 15%;
  left: 5%;
  width: 100px;
  height: 100px;
  border: 2px solid var(--secondary-light);
  border-radius: 50%;
  opacity: 0.06;
  animation: floatX 10s ease-in-out infinite;
}

.about-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-image {
  position: relative;
  padding-bottom: 16px;
  padding-right: 16px;
}

.about-image::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  background: var(--primary-soft);
  z-index: 0;
}

.about-image::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  background: rgba(44, 62, 80, 0.06);
  z-index: 0;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.about-image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-soft);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image-placeholder i {
  font-size: 6rem;
  color: var(--text-light);
}

.about-image-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 10px 18px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: 24px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow:
    var(--shadow-md),
    0 1px 3px rgba(0, 0, 0, 0.1);
  border: none;
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 2;
  overflow: hidden;
}

.about-image-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  animation: badgeShimmer 3s ease-in-out infinite;
}

@keyframes badgeShimmer {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

.about-image-badge i {
  font-size: 0.85rem;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.about-quote {
  position: relative;
  padding-left: 24px;
  border-left: 3px solid var(--primary);
  font-size: 1.125rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 24px 0;
}

.about-quote i {
  position: absolute;
  top: -8px;
  left: 8px;
  font-size: 1.5rem;
  color: var(--primary-light);
  opacity: 0.25;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}

.about-detail-item h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.about-detail-item ul {
  list-style: none;
}

.about-detail-item li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.about-detail-item li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }

  .about-image-badge {
    top: 14px;
    left: 14px;
    padding: 8px 14px;
    font-size: 0.7rem;
    gap: 5px;
  }

  .about-image-badge i {
    font-size: 0.75rem;
  }
}

@media (max-width: 640px) {
  .about-details {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Philosophy Section
   ======================================== */
.philosophy-section {
  background: var(--bg-cream);
  overflow: hidden;
  position: relative;
}

.philosophy-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-light) 20%, var(--accent-light) 50%, var(--border-light) 80%, transparent 100%);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}

.philosophy-image {
  position: relative;
  padding: 24px 24px 40px 24px;
  display: flex;
  align-items: center;
}

.philosophy-image::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: calc(100% - 48px);
  height: calc(100% - 48px);
  background: var(--primary);
  border-radius: var(--radius-lg);
  opacity: 0.12;
}

.philosophy-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 64px;
  border-top: 4px solid var(--secondary);
  border-left: 4px solid var(--secondary);
  border-radius: 12px 0 0 0;
  opacity: 0.5;
}

.philosophy-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(44, 62, 80, 0.18);
}

.philosophy-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
}

.philosophy-tagline {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.15em;
  margin-bottom: 32px;
}

.tagline-line {
  display: block;
}

.tagline-divider {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  margin: 0 16px;
  align-self: center;
}

.philosophy-text {
  max-width: 420px;
}

.philosophy-icon {
  display: block;
  margin-bottom: 20px;
  flex-shrink: 0;
  opacity: 0.6;
}

.philosophy-text p {
  font-size: 1rem;
  line-height: 2;
  color: var(--text-secondary);
  margin: 0 0 32px;
}

.philosophy-signature {
  display: flex;
  align-items: center;
  gap: 16px;
}

.signature-line {
  display: block;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.signature-name {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.1em;
}

@media (max-width: 1024px) {
  .philosophy-grid {
    grid-template-columns: 1fr 1fr;
  }

  .philosophy-image {
    padding: 36px;
  }

  .philosophy-content {
    padding: 40px 36px;
  }

  .philosophy-tagline {
    font-size: 1.25rem;
  }

  .philosophy-text {
    max-width: 100%;
  }

  .philosophy-text p {
    font-size: 0.9375rem;
  }
}

@media (max-width: 768px) {
  .philosophy-grid {
    grid-template-columns: 1fr;
  }

  .philosophy-image {
    padding: 28px 24px 0;
  }

  .philosophy-image::before,
  .philosophy-image::after {
    display: none;
  }

  .philosophy-image img {
    border-radius: 12px;
    aspect-ratio: 16 / 10;
  }

  .philosophy-content {
    align-items: center;
    text-align: center;
    padding: 28px 24px 36px;
  }

  .philosophy-tagline {
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    justify-content: center;
    margin-bottom: 24px;
  }

  .tagline-divider {
    width: 20px;
    margin: 0 10px;
  }

  .philosophy-text {
    max-width: 100%;
  }

  .philosophy-icon {
    margin: 0 auto 12px;
  }

  .philosophy-text p {
    font-size: 0.9rem;
  }

  .philosophy-signature {
    justify-content: center;
  }
}

/* ========================================
   Treatments Section
   ======================================== */
.treatments-section {
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
}

.treatments-section::before {
  content: '';
  position: absolute;
  top: 60px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41,128,185,0.05) 0%, transparent 70%);
  animation: floatY 10s ease-in-out infinite;
  pointer-events: none;
}

.treatments-section::after {
  content: '';
  position: absolute;
  bottom: 40px;
  right: -80px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,149,108,0.06) 0%, transparent 70%);
  animation: floatY 12s ease-in-out infinite 3s;
  pointer-events: none;
}

.bg-soft {
  background: var(--bg-gradient);
}

/* ========================================
   Swiper 共用元件
   ======================================== */
.treatments-swiper .card:hover,
.articles-swiper .card:hover {
  transform: none;
  box-shadow: var(--shadow-md);
}

.treatments-swiper .swiper-wrapper,
.articles-swiper .swiper-wrapper {
  padding-bottom: 4px;
}

.swiper-nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-light, #e8e2da);
  background: var(--bg-white, #fff);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.swiper-nav:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
}

.card-image-placeholder i {
  font-size: 3.5rem;
  color: var(--primary-light);
  opacity: 0.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: var(--primary);
  transition: gap var(--transition-fast);
}

.card-link:hover {
  gap: 8px;
}

/* ── Homepage Section Header Enhancements ── */
.about-section .section-header,
.treatments-section .section-header,
.articles-section .section-header,
.reviews-section .section-header,
.schedule-home-section .section-header {
  position: relative;
}

.treatments-section .section-title,
.articles-section .section-title,
.reviews-section .section-title,
.schedule-home-section .section-title {
  position: relative;
  display: inline-block;
}

.treatments-section .section-title::after,
.articles-section .section-title::after,
.reviews-section .section-title::after,
.schedule-home-section .section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin: 12px auto 0;
}

.treatments-section .section-subtitle,
.articles-section .section-subtitle,
.reviews-section .section-subtitle,
.schedule-home-section .section-subtitle {
  background: linear-gradient(135deg, rgba(106,191,181,0.1), rgba(232,134,90,0.06));
  border: 1px solid rgba(106,191,181,0.12);
}

/* 首頁診療項目 Swiper + 翻轉卡片 */
.treatments-swiper-wrap {
  position: relative;
  padding: 0 48px;
}

.treatments-prev { left: 0; }
.treatments-next { right: 0; }

.treatments-swiper .swiper-slide {
  height: auto;
}

.treatments-swiper .swiper-slide .treatment-card {
  height: 100%;
}

.treatments-swiper .treatment-card {
  padding: 24px 14px 20px;
}

.treatments-swiper .treatment-card__image {
  background: #fff;
  border: 2px solid rgba(232, 134, 90, 0.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.articles-section {
  background: var(--bg-white);
}

/* 衛教專欄 Swiper */
.articles-swiper-wrap {
  position: relative;
  padding: 0 48px;
}

.articles-swiper .swiper-slide {
  height: auto;
}

.articles-swiper .swiper-slide .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.articles-swiper .card-image {
  position: relative;
  aspect-ratio: 16/10;
}

.articles-swiper .card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  z-index: 1;
}

.articles-swiper .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.articles-swiper .card-title {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.articles-swiper .card-text {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.articles-pagination {
  text-align: center;
  margin-top: 24px;
}

.articles-prev { left: 0; }
.articles-next { right: 0; }

@media (max-width: 768px) {
  .treatments-swiper .treatment-card {
    padding: 16px 8px 14px;
  }

  .treatments-swiper .treatment-card__image {
    width: 72px;
    height: 72px;
    padding: 14px;
    margin-bottom: 10px;
  }

  .treatments-swiper .treatment-card__title h2 {
    font-size: 0.75rem;
  }
}

@media (max-width: 640px) {
  .treatments-swiper-wrap,
  .articles-swiper-wrap {
    padding: 0 32px;
  }
  .swiper-nav {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
  }
}

@media (max-width: 1024px) {
  .about-image::before,
  .about-image::after {
    display: none;
  }

  .about-image {
    padding-bottom: 0;
    padding-right: 0;
  }
}

/* ========================================
   News Banner Section
   ======================================== */
.news-banner-section {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  position: relative;
}

.news-banner-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-light) 30%, transparent 100%);
  z-index: 1;
}

.news-banner-link {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.news-banner-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(44,62,80,0.02) 0%, transparent 30%, transparent 70%, rgba(44,62,80,0.04) 100%);
  pointer-events: none;
  transition: opacity 0.4s;
}

.news-banner-link:hover::after {
  opacity: 0;
}

.news-banner-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.news-banner-link:hover img {
  transform: scale(1.03);
}

/* ========================================
   News Section - Swiper 左圖右字卡片 (Legacy)
   ======================================== */
.news-swiper-wrap {
  position: relative;
  padding: 0 48px;
}

.news-swiper .swiper-slide {
  height: auto;
}

.news-swiper .card:hover {
  transform: none;
}

.news-card {
  display: flex;
  text-decoration: none;
  color: inherit;
  background: var(--bg-white, #fff);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--border-light);
  height: 100%;
  transition: box-shadow 0.3s;
}

.news-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.news-card-image {
  flex: 0 0 200px;
  width: 200px;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft, #f5f0eb);
}

.news-card-placeholder i {
  font-size: 2.5rem;
  color: var(--primary-light);
  opacity: 0.5;
}

.news-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  min-width: 0;
}

.news-card-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-card-date i {
  color: var(--primary);
  font-size: 0.75rem;
}

.news-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.5;
}

.news-card-text {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-pagination {
  text-align: center;
  margin-top: 24px;
}

.news-prev { left: 0; }
.news-next { right: 0; }

@media (max-width: 768px) {
  .news-card-image {
    flex: 0 0 150px;
    width: 150px;
  }
}

@media (max-width: 575px) {
  .news-swiper-wrap { padding: 0 32px; }
  .news-card {
    flex-direction: column;
  }
  .news-card-image {
    flex: none;
    width: 100%;
    aspect-ratio: 16/9;
  }
}

/* ========================================
   Reviews Section - Masonry Waterfall
   ======================================== */
.reviews-section {
  background: var(--bg-soft, #f9f6f2);
  overflow: hidden;
  position: relative;
}

.reviews-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-light) 20%, var(--secondary-light) 50%, var(--border-light) 80%, transparent 100%);
}

.reviews-section::after {
  content: '\201C';
  position: absolute;
  top: 80px;
  right: 5%;
  font-size: 16rem;
  font-family: Georgia, serif;
  color: var(--primary);
  opacity: 0.025;
  line-height: 1;
  pointer-events: none;
}

.masonry-grid {
  columns: 3;
  column-gap: 20px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.masonry-item.masonry-visible {
  opacity: 1;
  transform: translateY(0);
}

.masonry-featured .masonry-card {
  padding: 28px 28px 24px;
}

.masonry-featured .masonry-text {
  font-size: 1.0625rem;
  line-height: 1.85;
}

.masonry-quote-icon {
  margin-bottom: 8px;
}

.masonry-quote-icon i {
  font-size: 2rem;
  color: var(--primary);
  opacity: 0.2;
  line-height: 1;
}

.masonry-card {
  background: var(--bg-white, #fff);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border-light, #f0ece4);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  transition: box-shadow 0.3s, transform 0.3s;
}

.masonry-card:hover {
  box-shadow: 0 12px 36px rgba(44,62,80,0.1);
  transform: translateY(-4px);
}

.masonry-featured .masonry-card {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border-color: rgba(41,128,185,0.1);
}

.masonry-stars {
  display: flex;
  gap: 2px;
  color: #fbbf24;
  font-size: 0.875rem;
  margin-bottom: 14px;
}

.masonry-text {
  margin: 0 0 18px;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
  quotes: none;
}

.masonry-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light, #f0ece4);
}

.masonry-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft, #f5f0eb);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.masonry-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.masonry-avatar span {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
}

.masonry-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.reviews-mobile-wrap {
  display: none;
}

.reviews-mobile-pagination {
  display: none;
}

@media (max-width: 1200px) {
  .masonry-grid {
    columns: 2;
  }
}

@media (max-width: 768px) {
  .masonry-grid {
    display: none;
  }
  .reviews-mobile-wrap {
    display: block;
  }
  .reviews-mobile-swiper .swiper-slide {
    width: 220px;
    height: auto;
  }
  .reviews-mobile-swiper .masonry-card {
    padding: 16px;
    border-radius: 12px;
    height: 180px;
    display: flex;
    flex-direction: column;
  }
  .reviews-mobile-swiper .masonry-quote-icon {
    display: none;
  }
  .reviews-mobile-swiper .masonry-stars {
    flex-shrink: 0;
    font-size: 0.7rem;
    margin-bottom: 10px;
  }
  .reviews-mobile-swiper .masonry-text {
    flex: 1;
    min-height: 0;
    font-size: 0.8125rem !important;
    line-height: 1.65 !important;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .reviews-mobile-swiper .masonry-author {
    flex-shrink: 0;
    padding-top: 10px;
    gap: 8px;
  }
  .reviews-mobile-swiper .masonry-avatar {
    width: 28px;
    height: 28px;
  }
  .reviews-mobile-swiper .masonry-avatar span {
    font-size: 0.75rem;
  }
  .reviews-mobile-swiper .masonry-name {
    font-size: 0.75rem;
  }
}

/* 共用卡片元件 */
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full, 20px);
  z-index: 2;
}

.card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
  background: linear-gradient(
    135deg,
    #2a5a54 0%,
    #35796f 40%,
    #3d8b80 100%
  );
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.06) 0%, transparent 60%);
  animation: rotate360 30s linear infinite;
  pointer-events: none;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.04) 0%, transparent 60%);
  animation: rotate360 25s linear infinite reverse;
  pointer-events: none;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fff;
  margin-bottom: 8px;
}

.cta-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.125rem;
  margin: 0;
}

.cta-actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.cta-actions .btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: none;
}

.cta-actions .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .cta-card {
    flex-direction: column;
    text-align: center;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
  }
}

/* ========================================
   Schedule Section Enhancement
   ======================================== */
.schedule-home-section {
  position: relative;
  overflow: hidden;
}

.schedule-home-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-light) 30%, transparent 100%);
}

.schedule-home-section::after {
  content: '';
  position: absolute;
  bottom: 30px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(44,62,80,0.03) 0%, transparent 70%);
  animation: floatY 12s ease-in-out infinite;
  pointer-events: none;
}

/* ========================================
   Articles Section Enhancement
   ======================================== */
.articles-section {
  position: relative;
  overflow: hidden;
}

.articles-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-light) 20%, var(--accent-light) 50%, var(--border-light) 80%, transparent 100%);
}

.articles-section::after {
  content: '';
  position: absolute;
  top: 50px;
  right: -60px;
  width: 180px;
  height: 180px;
  border: 2px dashed var(--border-light);
  border-radius: 50%;
  opacity: 0.3;
  animation: rotate360 60s linear infinite;
  pointer-events: none;
}

/* ========================================
   Homepage Responsive Decorations
   ======================================== */
@media (max-width: 768px) {
  .about-section::before,
  .about-section::after,
  .about-deco,
  .treatments-section::before,
  .treatments-section::after,
  .reviews-section::after,
  .articles-section::after,
  .schedule-home-section::after {
    display: none;
  }

  .cta-section {
    padding: 60px 0;
  }
}
