/* ========================================
   杜巴化学 - 主样式文件
   ======================================== */

@import 'variables.css';
@import 'reset.css';
@import 'components.css';
@import 'animations.css';
@import 'header.css';
@import 'footer.css';
@import 'floating-ui.css';
@import 'pages.css';

/* ========================================
   Hero 轮播区域
   ======================================== */
.hero-slider {
  position: relative;
  height: 100vh;
  min-height: 700px;
  max-height: 900px;
  overflow: hidden;
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 71, 42, 0.92) 0%, rgba(45, 122, 77, 0.85) 50%, rgba(26, 71, 42, 0.9) 100%);
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 0 4rem;
  color: var(--white);
  max-width: 700px;
}

.hero-slide.active .hero-badge,
.hero-slide.active .hero-title,
.hero-slide.active .hero-desc,
.hero-slide.active .hero-buttons {
  animation: fadeInUp 0.8s ease forwards;
}

.hero-slide.active .hero-title {
  animation-delay: 0.2s;
}

.hero-slide.active .hero-desc {
  animation-delay: 0.4s;
}

.hero-slide.active .hero-buttons {
  animation-delay: 0.6s;
}

/* 轮播控制 */
.hero-slider-controls {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero-slider-btn {
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: var(--white);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.hero-slider-btn:hover {
  background-color: var(--white);
  color: var(--primary);
  border-color: var(--white);
  transform: scale(1.1);
}

.hero-slider-dots {
  display: flex;
  gap: 0.75rem;
}

.hero-slider-dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.hero-slider-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 20px;
  height: 20px;
  border: 2px solid var(--white);
  border-radius: 50%;
  transition: transform var(--transition-normal);
}

.hero-slider-dot.active {
  background-color: var(--white);
}

.hero-slider-dot.active::before {
  transform: translate(-50%, -50%) scale(1);
}

.hero-slider-dot:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

/* 轮播进度条 */
.hero-slider-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.hero-slider-progress-bar {
  height: 100%;
  background: var(--primary-light);
  width: 0%;
  transition: width 0.1s linear;
}

/* 旧的Hero样式保留 */
.hero {
  position: relative;
  min-height: 700px;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}

.hero-text {
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title span {
  color: var(--primary-light);
}

.hero-desc {
  font-size: 1.125rem;
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background-color: var(--white);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
}

.hero-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background-color: transparent;
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
}

.hero-btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary);
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-light);
}

.hero-stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.hero-image {
  position: relative;
}

.hero-image-main {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-image-main img {
  width: 100%;
  border-radius: var(--radius-2xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

.hero-image-float {
  position: absolute;
  background-color: var(--white);
  border-radius: var(--radius-xl);
  padding: 1rem;
  box-shadow: var(--shadow-xl);
}

.hero-image-float-1 {
  top: 10%;
  right: -20px;
  animation: float 3s ease-in-out infinite;
}

.hero-image-float-2 {
  bottom: 20%;
  left: -30px;
  animation: float 3s ease-in-out infinite 0.5s;
}

.hero-image-float-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.hero-image-float-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ========================================
   关于我们区域
   ======================================== */
.about {
  padding: 6rem 0;
  background: var(--gradient-light);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-images {
  position: relative;
}

.about-image-main {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.about-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-float {
  position: absolute;
  bottom: -30px;
  right: -30px;
  background-color: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
}

.about-experience {
  text-align: center;
}

.about-experience-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.about-experience-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.about-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.about-text h2 span {
  color: var(--primary);
}

.about-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.about-feature-icon {
  width: 48px;
  height: 48px;
  background-color: var(--primary-lighter);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.about-feature-text h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.about-feature-text p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.about-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* ========================================
   产品中心区域
   ======================================== */
.products {
  padding: 6rem 0;
  background-color: var(--white);
}

.products-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.products-tab {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--bg-light);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.products-tab:hover,
.products-tab.active {
  background-color: var(--primary);
  color: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* 产品面板 - 默认隐藏，active时显示 */
.products-panel {
  display: none;
}

.products-panel.active {
  display: grid;
}

.product-card {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-light);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--bg-light);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.375rem 0.875rem;
  background-color: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.product-body {
  padding: 1.5rem;
}

.product-category {
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.product-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.product-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  transition: gap var(--transition-fast);
}

.product-link:hover {
  gap: 0.5rem;
}

/* ========================================
   为什么选择我们
   ======================================== */
.why-us {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--primary-lightest) 0%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

.why-us::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  background: var(--gradient-primary);
  opacity: 0.03;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.why-us-card {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-light);
}

.why-us-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.why-us-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--white);
  font-size: 2rem;
  transition: transform var(--transition-normal);
}

.why-us-card:hover .why-us-icon {
  transform: scale(1.1) rotate(5deg);
}

.why-us-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.why-us-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.why-us-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary-lighter);
  opacity: 0.5;
  line-height: 1;
}

/* ========================================
   数据展示区域
   ======================================== */
.stats {
  padding: 4rem 0;
  background: var(--gradient-primary);
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
  color: var(--white);
  padding: 1rem;
}

.stat-icon {
  width: 64px;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
  backdrop-filter: blur(10px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* ========================================
   合作品牌
   ======================================== */
.partners {
  padding: 5rem 0;
  background-color: var(--bg-light);
}

/* 合作伙伴滚动展示 */
.partners-slider {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.partners-slider::before,
.partners-slider::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.partners-slider::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-light) 0%, transparent 100%);
}

.partners-slider::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-light) 0%, transparent 100%);
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  animation: scrollPartners 30s linear infinite;
  width: max-content;
}

.partners-slider:hover .partners-track {
  animation-play-state: paused;
}

@keyframes scrollPartners {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.partner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  padding: 0 2rem;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  filter: grayscale(100%);
  opacity: 0.7;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.partner-item:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.partner-item img {
  max-height: 50px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

/* 旧版兼容 */
.partners-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
}

/* ========================================
   新闻动态
   ======================================== */
.news {
  padding: 6rem 0;
  background-color: var(--white);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-card {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-light);
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.news-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card:hover .news-image img {
  transform: scale(1.1);
}

.news-date {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--primary);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  text-align: center;
  min-width: 60px;
}

.news-date-day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.news-date-month {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.9;
}

.news-body {
  padding: 1.5rem;
}

.news-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-lighter);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.news-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-excerpt {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary);
  transition: gap var(--transition-fast);
}

.news-link:hover {
  gap: 0.75rem;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1023px) {
  .hero-slider {
    height: auto;
    min-height: 600px;
  }
  
  .hero-slides {
    height: 600px;
  }
  
  .hero-slide {
    height: 600px;
  }
  
  .hero-slide-content {
    padding: 5rem 0 6rem;
    text-align: center;
    max-width: 100%;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-slider-controls {
    bottom: 1.5rem;
  }
  
  .hero-slider-btn {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
  }
  
  .hero {
    min-height: auto;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-image {
    order: -1;
  }
  
  .hero-image-main {
    max-width: 400px;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-images {
    order: -1;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .why-us-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .hero-slider {
    min-height: 500px;
  }
  
  .hero-slides {
    height: 500px;
  }
  
  .hero-slide {
    height: 500px;
  }
  
  .hero-slide-content {
    padding: 4rem 0 5rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-desc {
    font-size: 0.9375rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-btn-primary,
  .hero-btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }
  
  .hero-slider-controls {
    gap: 1rem;
  }
  
  .hero-slider-btn {
    width: 36px;
    height: 36px;
  }
  
  .hero-slider-dot {
    width: 10px;
    height: 10px;
  }
  
  .hero {
    padding: 3rem 0;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .hero-image-float {
    display: none;
  }
  
  .about,
  .products,
  .why-us,
  .news {
    padding: 4rem 0;
  }
  
  .about-text h2 {
    font-size: 1.875rem;
  }
  
  .about-features {
    grid-template-columns: 1fr;
  }
  
  .about-image-float {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1rem;
  }
  
  .products-tabs {
    gap: 0.5rem;
  }
  
  .products-tab {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
  
  .products-grid,
  .why-us-grid,
  .stats-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .partners-grid {
    gap: 1.5rem;
  }
  
  .partner-item {
    height: 60px;
    padding: 0 1.25rem;
  }
  
  .partner-item img {
    max-height: 40px;
    max-width: 120px;
  }
  
  .partners-track {
    gap: 2rem;
    animation-duration: 25s;
  }
  
  .partners-slider::before,
  .partners-slider::after {
    width: 60px;
  }
}
