/* ========================================
   好芯友科技官网 - 页面组件样式
   ======================================== */

/* 页面头部通用样式 */
.page-header {
  background: url('../images/banner1.jpg') center/cover no-repeat;
  min-height: 496px;
  padding: 80px 0;
  text-align: center;
  display: flex;
  align-items: center;
  margin-top: 80px;
}

.page-title {
  font-size: 36px;
  color: #fff;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: #fff;
}

.separator {
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb span {
  color: #fff;
}

/* 通用容器 */
.page-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 通用标签样式 */
.section-label {
  font-size: 14px;
  color: #0066cc;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 28px;
  color: #333;
  margin-bottom: 40px;
}

/* ========================================
   轮播图样式
   ======================================== */
.banner-section {
  position: relative;
  width: 100%;
  margin-top: 80px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .banner-section {
    margin-top: 70px;
  }
}

.swiper-container {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .swiper-container {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .swiper-container {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .swiper-container {
    height: 300px;
  }
}

.swiper-wrapper {
  display: flex;
  height: 100%;
}

.swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.slide-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.15) 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

/* ========================================
   Banner 左侧文字内容 - 绿色样式
   ======================================== */
.slide-content {
  position: absolute;
  left: 10%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  max-width: 550px;
  animation: slideInLeft 0.8s ease forwards;
}

.slide-content .banner-accent {
  width: 60px;
  height: 4px;
  background: var(--green-color);
  margin-bottom: 24px;
  border-radius: 2px;
}

.slide-content .banner-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.slide-content .banner-title .highlight {
  color: var(--green-light);
}

.slide-content .banner-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin-bottom: 30px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.slide-content .banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--green-color);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(22, 163, 74, 0.4);
}

.slide-content .banner-btn:hover {
  background: var(--green-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(22, 163, 74, 0.5);
}

.slide-content .banner-btn svg {
  fill: white;
  transition: transform 0.3s ease;
}

.slide-content .banner-btn:hover svg {
  transform: translateX(4px);
}

/* Banner 文字响应式 */
@media (max-width: 1024px) {
  .slide-content {
    left: 6%;
    max-width: 420px;
  }

  .slide-content .banner-title {
    font-size: 2.2rem;
  }

  .slide-content .banner-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .slide-content {
    left: 5%;
    right: 5%;
    max-width: none;
    text-align: center;
  }

  .slide-content .banner-accent {
    margin: 0 auto 20px;
  }

  .slide-content .banner-title {
    font-size: 1.6rem;
  }

  .slide-content .banner-subtitle {
    font-size: 0.9rem;
  }

  .slide-content .banner-btn {
    padding: 12px 28px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .slide-content .banner-title {
    font-size: 1.3rem;
  }

  .slide-content .banner-subtitle {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .slide-content .banner-btn {
    padding: 10px 24px;
    font-size: 0.85rem;
  }
}

/* 分页器 */
.swiper-pagination {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet.active {
  background: white;
  transform: scale(1.2);
}

/* 导航按钮 */
.swiper-button-prev,
.swiper-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  opacity: 0;
  border: none;
}

.swiper-button-prev {
  left: 30px;
}

.swiper-button-next {
  right: 30px;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.swiper-button-prev svg,
.swiper-button-next svg {
  fill: var(--text-primary);
}

.banner-section:hover .swiper-button-prev,
.banner-section:hover .swiper-button-next {
  opacity: 1;
}

@media (max-width: 768px) {
  .swiper-button-prev,
  .swiper-button-next {
    width: 40px;
    height: 40px;
    opacity: 1;
  }

  .swiper-button-prev {
    left: 15px;
  }

  .swiper-button-next {
    right: 15px;
  }

  .swiper-pagination {
    bottom: 20px;
  }
}

/* ========================================
   关于我们区域
   ======================================== */
.about-section {
  padding: 100px 0;
  background: var(--bg-white);
}

@media (max-width: 768px) {
  .about-section {
    padding: 60px 0;
  }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 1024px) {
  .about-grid {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.about-content {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.about-content.animated {
  opacity: 1;
  transform: translateX(0);
}

.about-content .section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.about-content .section-subtitle {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.about-content .section-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .about-content .section-title {
    font-size: 2rem;
  }

  .about-content .section-subtitle {
    font-size: 1.25rem;
  }

  .about-content .section-desc {
    font-size: 1rem;
  }
}

.learn-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.learn-more-btn svg {
  fill: white;
  transition: transform 0.3s ease;
}

.learn-more-btn:hover svg {
  transform: translateX(5px);
}

.about-image {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease 0.2s;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.about-image.animated {
  opacity: 1;
  transform: translateX(0);
}

.about-image img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.about-image:hover img {
  transform: scale(1.05);
}

/* ========================================
   产品区域
   ======================================== */
.products-section {
  padding: 100px 0;
  background: var(--bg-light);
}

@media (max-width: 768px) {
  .products-section {
    padding: 60px 0;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.section-header.animated {
  opacity: 1;
  transform: translateY(0);
}

.section-header .section-title {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-header .section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .section-header .section-title {
    font-size: 2rem;
  }

  .section-header .section-desc {
    font-size: 1rem;
  }

  .section-header {
    margin-bottom: 40px;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.product-item {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  text-align: center;
  opacity: 1;
  transform: none;
  transition: all 0.6s ease;
}

.product-item.animated {
  opacity: 1;
  transform: translateY(0);
}

.product-item.delay-1 {
  transition-delay: 0.1s;
}

.product-item.delay-2 {
  transition-delay: 0.3s;
}

.product-item:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.product-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-item:hover .product-image img {
  transform: scale(1.1);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: none;
}

.overlay-title {
  font-size: 2rem;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.view-more {
  position: absolute;
  bottom: 20px;
  left: 20px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.product-item:hover .view-more {
  opacity: 1;
  transform: translateX(0);
}

.view-more span {
  display: inline-block;
  padding: 8px 20px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 25px;
}

@media (max-width: 768px) {
  .product-image {
    min-height: 250px;
  }

  .overlay-title {
    font-size: 1.5rem;
  }

  .image-overlay,
  .view-more {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========================================
   销售网络区域
   ======================================== */
.network-section {
  padding: 100px 0;
  background: var(--bg-white);
}

@media (max-width: 768px) {
  .network-section {
    padding: 60px 0;
  }
}

.network-image {
  border-radius: 20px;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.8s ease 0.2s;
}

.network-image.animated {
  opacity: 1;
  transform: scale(1);
}

.network-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   核心优势区域
   ======================================== */
.core-section {
  padding: 100px 0;
  background: var(--bg-light);
}

@media (max-width: 768px) {
  .core-section {
    padding: 60px 0;
  }
}

.core-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 1024px) {
  .core-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .core-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.core-item {
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.core-item.animated {
  opacity: 1;
  transform: translateY(0);
}

.core-item.delay-1 {
  transition-delay: 0.1s;
}

.core-item.delay-2 {
  transition-delay: 0.3s;
}

.core-item.delay-3 {
  transition-delay: 0.5s;
}

.core-image {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  height: 200px;
}

.core-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.core-item:hover .core-image img {
  transform: scale(1.1);
}

.core-content {
  padding: 1.5rem;
  text-align: center;
}

.core-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  padding: 15px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.core-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.core-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.core-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .core-image {
    height: 180px;
  }

  .core-icon {
    width: 70px;
    height: 70px;
  }

  .core-title {
    font-size: 1.25rem;
  }

  .core-desc {
    font-size: 0.95rem;
  }
}

/* ========================================
   我们的优势区域
   ======================================== */
.advantages-section {
  padding: 100px 0;
  background: var(--bg-white);
}

@media (max-width: 768px) {
  .advantages-section {
    padding: 60px 0;
  }
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 1024px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .advantages-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.advantage-card {
  background: var(--bg-light);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.advantage-card.animated {
  opacity: 1;
  transform: translateY(0);
}

.advantage-card.delay-1 { transition-delay: 0.1s; }
.advantage-card.delay-2 { transition-delay: 0.15s; }
.advantage-card.delay-3 { transition-delay: 0.2s; }
.advantage-card.delay-4 { transition-delay: 0.25s; }
.advantage-card.delay-5 { transition-delay: 0.3s; }
.advantage-card.delay-6 { transition-delay: 0.35s; }

.advantage-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 25px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.advantage-card:hover .advantage-icon {
  transform: scale(1.1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.advantage-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.advantage-title {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.advantage-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.advantage-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

@media (max-width: 768px) {
  .advantage-card {
    padding: 30px 20px;
  }

  .advantage-icon {
    width: 80px;
    height: 80px;
  }

  .advantage-icon img {
    width: 40px;
    height: 40px;
  }

  .advantage-title {
    font-size: 1.1rem;
  }

  .advantage-desc {
    font-size: 0.9rem;
  }
}

/* ========================================
   自定义弹窗组件
   ======================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.show .modal-content {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 30px 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.modal-icon.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.modal-icon.error {
  background: #ffebee;
  color: #c62828;
}

.modal-icon.info {
  background: #e3f2fd;
  color: #1565c0;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.modal-message {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
}

.modal-btn {
  display: inline-block;
  padding: 10px 30px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Toast 轻提示 */
.toast-container {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: rgba(46, 125, 50, 0.9);
}

.toast.error {
  background: rgba(198, 40, 40, 0.9);
}

.toast.info {
  background: rgba(21, 101, 192, 0.9);
}
