/* =====================================================
   PRICING CARDS — Modern UI Component
   ===================================================== */

/* --- Section --- */
.pricing-section {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, #f8f9fb 0%, #ffffff 100%);
}

.pricing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

/* --- Header --- */
.pricing-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}

.pricing-subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  margin: 0 auto 40px;
  max-width: 560px;
  line-height: 1.7;
}

/* --- Toggle --- */
.pricing-toggle {
  display: inline-flex;
  background: #f1f3f5;
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 48px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.toggle-btn {
  padding: 10px 32px;
  border: none;
  border-radius: 50px;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.toggle-btn:hover {
  color: #1a1a2e;
}

.toggle-btn.active {
  background: #f7931e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(247, 147, 30, 0.3);
}

/* --- Pane visibility --- */
.pricing-pane {
  display: none;
}

.pricing-pane.active {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  animation: fadeUp 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Card Base（白色背景 + 橘色邊框） --- */
.pricing-card {
  position: relative;
  background: #ffffff;
  border: 2px solid #f7931e;
  border-radius: 20px;
  padding: 36px 28px 32px;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover 浮動 */
.pricing-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 48px rgba(247, 147, 30, 0.15),
              0 8px 16px rgba(0, 0, 0, 0.06);
}

/* --- Featured Card (中間推薦) --- */
.pricing-card--featured {
  border-color: #f7931e;
  border-width: 3px;
  transform: scale(1.05);
  box-shadow: 0 12px 36px rgba(247, 147, 30, 0.18);
  z-index: 2;
}

.pricing-card--featured:hover {
  transform: scale(1.05) translateY(-12px);
  box-shadow: 0 24px 56px rgba(247, 147, 30, 0.25),
              0 8px 16px rgba(0, 0, 0, 0.06);
}

/* --- Dark Card (企業) --- */
.pricing-card--dark {
  background: #1a1a2e;
  border-color: #f7931e;
  color: #f3f4f6;
}

.pricing-card--dark:hover {
  box-shadow: 0 20px 48px rgba(247, 147, 30, 0.18),
              0 8px 16px rgba(0, 0, 0, 0.15);
}

.pricing-card--dark .plan-tier { color: #f7931e; }
.pricing-card--dark .plan-name { color: #f3f4f6; }
.pricing-card--dark .plan-desc { color: #9ca3af; }
.pricing-card--dark .price-amount { color: #f3f4f6; }
.pricing-card--dark .feature-yes::before { color: #f7931e; }
.pricing-card--dark .feature-no { color: rgba(255,255,255,0.35); }
.pricing-card--dark .feature-no::before { color: rgba(255,255,255,0.25); }
.pricing-card--dark .card-features li { border-bottom-color: rgba(255,255,255,0.06); }

/* --- Badge --- */
.card-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(247, 147, 30, 0.35);
  letter-spacing: 0.3px;
}

/* --- Card Header --- */
.card-header {
  margin-bottom: 20px;
}

.plan-tier {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #f7931e;
  margin-bottom: 8px;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 6px;
  line-height: 1.3;
}

.plan-desc {
  font-size: 0.88rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.5;
}

/* --- Price --- */
.card-price {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.price-amount {
  font-size: 2.75rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -1px;
  line-height: 1;
  /* 數字跑動動畫用 */
  display: inline-block;
  transition: opacity 0.15s, transform 0.15s;
}

.price-amount.counting {
  animation: countPulse 0.4s ease-out;
}

@keyframes countPulse {
  0%   { transform: translateY(8px); opacity: 0.3; }
  50%  { transform: translateY(-2px); opacity: 0.8; }
  100% { transform: translateY(0); opacity: 1; }
}

.price-period {
  font-size: 1rem;
  font-weight: 500;
  color: #9ca3af;
  margin-left: 2px;
}

.price-save {
  display: block;
  width: 100%;
  font-size: 0.8rem;
  color: #f7931e;
  font-weight: 600;
  margin-top: 6px;
}

/* --- CTA Button --- */
.card-cta {
  display: block;
  width: 100%;
  padding: 14px 0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 28px;
  background: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(247, 147, 30, 0.25);
}

.card-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 147, 30, 0.35);
  filter: brightness(1.05);
  color: #000;
}

.card-cta-outline {
  background: transparent;
  color: #f7931e;
  border: 2px solid #f7931e;
  box-shadow: none;
}

.card-cta-outline:hover {
  background: #f7931e;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(247, 147, 30, 0.25);
}

.card-cta-white {
  background: transparent;
  color: #f3f4f6;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.card-cta-white:hover {
  background: #f7931e;
  color: #ffffff;
  border-color: #f7931e;
  box-shadow: 0 6px 20px rgba(247, 147, 30, 0.3);
}

/* --- Feature List --- */
.card-features {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.card-features li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 0.92rem;
  line-height: 1.5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-features li:last-child {
  border-bottom: none;
}

.feature-yes::before,
.feature-no::before {
  position: absolute;
  left: 0;
  top: 8px;
  font-size: 1rem;
  line-height: 1.5;
}

.feature-yes { color: #374151; }
.feature-yes::before { content: "✓"; color: #f7931e; font-weight: 700; }

.feature-no { color: #c4c8cf; }
.feature-no::before { content: "×"; color: #d1d5db; font-weight: 700; }

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 1024px) {
  .pricing-card--featured { transform: scale(1); }
  .pricing-card--featured:hover { transform: translateY(-12px); }

  .pricing-pane.active { gap: 16px; }
  .pricing-card { padding: 28px 20px; }
  .price-amount { font-size: 2.25rem; }
}

@media (max-width: 768px) {
  .pricing-section { padding: 60px 0 80px; }
  .pricing-title { font-size: 2rem; }
  .pricing-subtitle { font-size: 1rem; }

  .pricing-pane.active {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 420px;
    margin: 0 auto;
  }

  .pricing-card--featured { order: -1; }
  .card-badge { top: -12px; }
}

@media (max-width: 480px) {
  .pricing-section { padding: 48px 0 64px; }
  .pricing-container { padding: 0 16px; }
  .pricing-title { font-size: 1.65rem; }
  .pricing-subtitle { font-size: 0.92rem; margin-bottom: 28px; }
  .toggle-btn { padding: 8px 24px; font-size: 0.9rem; }
  .pricing-pane.active { max-width: 100%; }
  .pricing-card { padding: 28px 20px; border-radius: 16px; }
  .plan-name { font-size: 1.25rem; }
  .price-amount { font-size: 2.2rem; }
}
