/* ================================
   米芯微科技 - 企业官网样式
   现代化设计风格
   ================================ */

/* CSS Variables */
:root {
  --primary-color: #0066cc;
  --primary-dark: #004c99;
  --primary-light: #3399ff;
  --secondary-color: #00b894;
  --accent-color: #e74c3c;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-color: #f8f9fa;
  --bg-light: #fff;
  --border-color: #e1e5e9;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ================================
   Header & Navigation
   ================================ */
.header {
  background: var(--bg-light);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--primary-color);
  background: rgba(0, 102, 204, 0.08);
}

.nav-item.active {
  color: var(--primary-color);
  background: rgba(0, 102, 204, 0.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-color);
  transition: var(--transition);
}

/* ================================
   Hero Carousel
   ================================ */
.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  margin-top: 70px;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.85) 0%, rgba(0, 184, 148, 0.6) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-content {
  text-align: center;
  color: #fff;
  padding: 40px;
  max-width: 800px;
}

.carousel-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.carousel-content p {
  font-size: 20px;
  opacity: 0.95;
  margin-bottom: 32px;
}

.carousel-btn {
  display: inline-block;
  padding: 14px 40px;
  background: #fff;
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Carousel Controls */
.carousel-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.2);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.carousel-arrow.prev {
  left: 30px;
}

.carousel-arrow.next {
  right: 30px;
}

/* ================================
   Section Styles
   ================================ */
.section {
  padding: 80px 0;
}

.section-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.section-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(0, 102, 204, 0.1);
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 16px;
}

/* ================================
   Service Cards
   ================================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 28px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-color);
}

.service-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--primary-color);
  font-weight: 500;
  font-size: 15px;
}

.service-link:hover {
  gap: 12px;
}

/* ================================
   Product Grid
   ================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.product-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa, #e4e8ec);
}

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

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

.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  background: var(--primary-color);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.product-content {
  padding: 24px;
}

.product-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.product-content p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-tag {
  padding: 4px 10px;
  background: var(--bg-color);
  color: var(--text-light);
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* ================================
   About Section
   ================================ */
.about-section {
  background: var(--bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

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

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

.about-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-color);
}

.about-content p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

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

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
}

/* ================================
   Solution Cards
   ================================ */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.solution-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.solution-header {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
}

.solution-header img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.solution-body {
  padding: 28px;
}

.solution-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-color);
}

.solution-body p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
}

.solution-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.solution-feature {
  padding: 6px 14px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 13px;
  border-radius: 50px;
}

/* ================================
   Contact Section
   ================================ */
.contact-section {
  background: var(--bg-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-color);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(0, 102, 204, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-color);
}

.contact-item p {
  font-size: 15px;
  color: var(--text-light);
}

.contact-form {
  background: var(--bg-color);
  padding: 40px;
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ================================
   Footer
   ================================ */
.footer {
  background: #1a1f2e;
  color: #fff;
  padding: 60px 0 30px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.footer-column h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* ================================
   Content List Page
   ================================ */
.page-banner {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 120px 0 60px;
  margin-top: 70px;
  color: #fff;
  text-align: center;
}

.page-banner h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.page-banner p {
  font-size: 18px;
  opacity: 0.9;
}

.content-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.content-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.content-image {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa, #e4e8ec);
}

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

.content-body {
  padding: 24px;
}

.content-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-color);
}

.content-body p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

.content-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ================================
   Detail Page
   ================================ */
.detail-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.detail-header {
  text-align: center;
  margin-bottom: 40px;
}

.detail-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-color);
}

.detail-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.detail-image {
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: auto;
}

.detail-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color);
}

.detail-content h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text-color);
}

.detail-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-color);
}

.detail-content p {
  margin-bottom: 16px;
}

.detail-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.detail-content li {
  list-style: disc;
  margin-bottom: 8px;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    height: 60px;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-light);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    display: none;
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-item {
    width: 100%;
    padding: 12px 20px;
  }
  
  .hero-carousel {
    height: 400px;
    margin-top: 60px;
  }
  
  .carousel-content h1 {
    font-size: 32px;
  }
  
  .carousel-content p {
    font-size: 16px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-carousel {
    height: 350px;
  }
  
  .carousel-content h1 {
    font-size: 24px;
  }
  
  .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .carousel-arrow.prev {
    left: 10px;
  }
  
  .carousel-arrow.next {
    right: 10px;
  }
  
  .section-container {
    padding: 0 16px;
  }
}

/* ================================
   Utility Classes
   ================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

.hidden { display: none; }

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* ================================
   Solution Cards
   ================================ */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.solution-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

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

.solution-header {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.solution-header img {
  max-width: 60%;
  max-height: 100px;
  object-fit: contain;
}

.solution-body {
  padding: 24px;
}

.solution-body h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-color);
}

.solution-body p {
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.6;
}

.solution-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.solution-feature {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-color);
  border-radius: 20px;
  font-size: 12px;
  color: var(--primary-color);
}

/* ================================
   Contact Page
   ================================ */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.contact-detail h4 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text-color);
}

.contact-detail p {
  color: var(--text-light);
}

.contact-form {
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .solution-grid {
    grid-template-columns: 1fr;
  }
  
  .solution-header {
    height: 140px;
  }
}
