/* =============================================
   米方立舒抑菌膏 — 官网自定义样式
   基于 Tailwind CSS CDN 的补充样式
   ============================================= */

/* === 品牌字体 === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* === 导航栏 === */
.nav-link {
  position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #4ecdc4;
  transition: all 0.3s;
  transform: translateX(-50%);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* === 手机菜单面板 === */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
#mobile-menu.open {
  max-height: 400px;
}

/* === Hero 区域 === */
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(78, 205, 196, 0.9) 0%,
    rgba(45, 168, 159, 0.85) 100%
  );
}

/* Hero 标题"红痒"星星闪烁 */
.hero-title-star {
  animation: star-glow 2s ease-in-out infinite;
}
@keyframes star-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* === 功效卡片 === */
.feature-card {
  transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(78, 205, 196, 0.15);
}

/* === 案例卡片 === */
.case-card {
  transition: transform 0.3s, box-shadow 0.3s;
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* === 轮播 (Carousel) === */
.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}
.carousel-slide {
  min-width: 100%;
}

/* === 评价星星 === */
.star-rating {
  color: #fbbf24;
  letter-spacing: 2px;
}

/* === 案例筛选标签 === */
.filter-tab {
  cursor: pointer;
  transition: all 0.25s;
  border: 1.5px solid #e5e7eb;
}
.filter-tab.active {
  background: #4ecdc4;
  color: white;
  border-color: #4ecdc4;
}
.filter-tab:hover:not(.active) {
  border-color: #4ecdc4;
  color: #4ecdc4;
}

/* === 步骤编号 === */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4ecdc4, #2da89f);
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* === 表单样式 === */
.form-input:focus {
  border-color: #4ecdc4;
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
  outline: none;
}

/* === 按钮涟漪效果 === */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.btn-ripple::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10%);
  background-position: center;
  background-size: 0;
  transition: background-size 0.5s;
}
.btn-ripple:active::after {
  background-size: 200%;
}

/* === 数字增长（统计区） === */
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #4ecdc4, #2da89f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === 图片占位（替换为真实产品图） === */
.img-placeholder {
  background: linear-gradient(135deg, #e0f7f5 0%, #b2dfdb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2da89f;
  font-size: 0.875rem;
  border-radius: 0.75rem;
}

/* === 时间线/品牌故事 === */
.timeline-line {
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #4ecdc4, #b2dfdb);
}

/* === 页脚 === */
.footer-link {
  transition: color 0.2s;
}
.footer-link:hover {
  color: #4ecdc4;
}

/* === 滚动淡入动画 === */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === 首页产品图浮动动画 === */
@keyframes product-float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes product-glow {
  0%, 100% {
    box-shadow: 0 20px 60px rgba(78, 205, 196, 0.2);
  }
  50% {
    box-shadow: 0 30px 80px rgba(78, 205, 196, 0.35);
  }
}

@keyframes product-spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.product-image-wrapper {
  animation: product-float 4s ease-in-out infinite;
}

.product-image-shadow {
  animation: product-glow 4s ease-in-out infinite;
}

/* 产品图背景装饰旋转圆 */
.product-bg-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.1), transparent 70%);
  animation: product-spin-slow 20s linear infinite;
  pointer-events: none;
}

.product-bg-circle:nth-child(1) {
  width: 120%;
  height: 120%;
  top: -10%;
  left: -10%;
}

.product-bg-circle:nth-child(2) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  animation-direction: reverse;
  animation-duration: 15s;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.08), transparent 70%);
}

/* === 浮动标签动画 === */
@keyframes tag-float-1 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-6px) translateX(3px); }
}

@keyframes tag-float-2 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(6px) translateX(-3px); }
}

.animate-tag-1 {
  animation: tag-float-1 5s ease-in-out infinite;
}

.animate-tag-2 {
  animation: tag-float-2 5s ease-in-out infinite;
}

/* === 回到顶部 === */
#back-to-top {
  transition: opacity 0.3s, transform 0.3s;
}
#back-to-top.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

/* === 响应式微调 === */
@media (max-width: 768px) {
  .stat-number {
    font-size: 2rem;
  }
}
