/* ============================================
   Shandong Beidian Electric Co., Ltd.
   Industrial Transformer Website - Main Stylesheet
   ============================================ */

:root {
  --primary: #1a3a5c;
  --primary-dark: #0f2440;
  --primary-light: #2b5a8c;
  --accent: #f7941d;
  --accent-hover: #e08510;
  --accent-light: #fff3e0;
  --white: #ffffff;
  --light-bg: #f0f2f5;
  --warm-bg: #f9f8f5;
  --cool-bg: #f4f6f9;
  --gray-100: #edf0f4;
  --gray-200: #dfe3e8;
  --gray-300: #c5cdd8;
  --gray-600: #6b7280;
  --gray-800: #2d3748;
  --gray-900: #1a202c;
  --success: #10b981;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(26,58,92,0.04);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.1), 0 4px 8px rgba(26,58,92,0.06);
  --shadow-card: 0 2px 8px rgba(26,58,92,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-sm: 4px;
  --max-width: 1200px;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  color: var(--gray-800);
  background: linear-gradient(180deg, #fafaf8 0%, #f5f4f0 30%, #f0f2f5 100%);
  background-attachment: fixed;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ Header ============ */
.site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26,58,92,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 8px rgba(26,58,92,0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 42px; height: 42px;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  font-weight: 800;
  flex-shrink: 0;
}

.logo-text span { display: block; font-size: 0.7rem; font-weight: 400; color: var(--gray-600); letter-spacing: 1px; text-transform: uppercase; }

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gray-800);
  transition: all 0.2s;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--primary);
  color: var(--white);
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; }

.lang-switch {
  margin-left: 12px;
  display: flex;
  gap: 4px;
}
.lang-switch a {
  padding: 4px 10px;
  font-size: 0.8rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.lang-switch a.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* Header Social Icons */
.header-social {
  display: flex;
  gap: 6px;
  margin-left: 10px;
  align-items: center;
}
.header-social .social-icon {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  transition: all 0.2s;
  text-decoration: none;
}
.header-social .social-icon.fb { background: #1877f2; }
.header-social .social-icon.fb:hover { background: #0e5fc2; transform: translateY(-1px); }
.header-social .social-icon.li { background: #0077b5; }
.header-social .social-icon.li:hover { background: #005d8f; transform: translateY(-1px); }

/* Footer Social Links */
.footer-social {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gray-300);
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--accent); }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
}

/* ============ Hero ============ */
.hero {
  background: linear-gradient(155deg, #0a1a30 0%, var(--primary-dark) 25%, var(--primary) 55%, #1e4a70 100%);
  color: var(--white);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -15%;
  width: 600px; height: 600px;
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 50%;
  animation: heroPulse 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -25%; left: -8%;
  width: 400px; height: 400px;
  border: 1.5px solid rgba(255,255,255,0.04);
  border-radius: 50%;
  animation: heroPulse 10s ease-in-out infinite reverse;
}

/* Subtle dot pattern overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 1; }
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero h1 { font-size: 2.8rem; line-height: 1.2; margin-bottom: 20px; font-weight: 800; }
.hero p { font-size: 1.15rem; line-height: 1.8; opacity: 0.9; margin-bottom: 32px; }

.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,0.4); color: var(--white); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

/* ============ Section Common ============ */
.section { padding: 80px 0; }
.section-gray { background: var(--warm-bg); position: relative; }
.section-gray::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(247,148,29,0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(26,58,92,0.02) 0%, transparent 50%);
  pointer-events: none;
}
.section-cool { background: var(--cool-bg); position: relative; }
.section-cool::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(43,90,140,0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(26,58,92,0.02) 0%, transparent 40%);
  pointer-events: none;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 700;
}
.section-title p {
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============ Stats ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.stat-card {
  text-align: center;
  padding: 30px 20px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  transition: all 0.3s;
}
.stat-card:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}
.stat-card .stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-card .stat-label { font-size: 0.9rem; opacity: 0.8; margin-top: 6px; }

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

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(26,58,92,0.06);
}
.product-card:hover { 
  transform: translateY(-6px); 
  box-shadow: var(--shadow-lg);
  border-color: rgba(247,148,29,0.15);
}

.product-image {
  height: 220px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary-light);
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}
.product-image .product-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--accent);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-info { padding: 20px; }
.product-info h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 600;
}
.product-info .specs {
  color: var(--gray-600);
  font-size: 0.88rem;
  margin-bottom: 14px;
  line-height: 1.6;
}
.product-info .specs span {
  display: inline-block;
  background: linear-gradient(135deg, var(--warm-bg) 0%, var(--gray-100) 100%);
  padding: 4px 12px;
  border-radius: 4px;
  margin: 2px 4px 2px 0;
  font-size: 0.8rem;
  border: 1px solid rgba(26,58,92,0.04);
  color: var(--gray-600);
}

/* ============ Features ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}

.feature-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(26,58,92,0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(26,58,92,0.12);
}

.feature-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent-light) 0%, rgba(247,148,29,0.08) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  border: 2px solid rgba(247,148,29,0.12);
}

.feature-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.feature-card p { color: var(--gray-600); font-size: 0.92rem; }

/* ============ Market Section ============ */
.markets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.market-tag {
  background: var(--white);
  border: 1px solid rgba(26,58,92,0.08);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}
.market-tag:hover { 
  border-color: var(--accent); 
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(247,148,29,0.12);
  transform: translateY(-2px);
}

/* ============ CTA Section ============ */
.cta-section {
  background: linear-gradient(155deg, var(--primary-dark) 0%, #0f2d50 30%, var(--primary) 60%, var(--primary-light) 100%);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(247,148,29,0.12) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(43,90,140,0.15) 0%, transparent 40%);
  pointer-events: none;
}
.cta-section h2 { font-size: 2rem; margin-bottom: 14px; }
.cta-section p { font-size: 1.05rem; opacity: 0.9; margin-bottom: 28px; max-width: 550px; margin-left: auto; margin-right: auto; }
.cta-section .btn-primary {
  background: var(--accent);
  font-size: 1rem;
  padding: 16px 36px;
}

/* ============ Contact Section ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-info h2 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 16px;
}
.contact-info > p { color: var(--gray-600); margin-bottom: 24px; }

.contact-item {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  align-items: flex-start;
}
.contact-item .icon {
  width: 44px; height: 44px;
  background: var(--light-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-item h4 { font-size: 0.95rem; color: var(--primary); margin-bottom: 2px; }
.contact-item p { color: var(--gray-600); font-size: 0.9rem; }

.contact-form {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(26,58,92,0.06);
}

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--gray-800);
  font-size: 0.9rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s;
  background: #fafbfc;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247,148,29,0.1);
  background: var(--white);
}
.form-group textarea { min-height: 120px; resize: vertical; }

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}
.form-submit:hover { background: var(--accent-hover); }

/* ============ About Page ============ */
.about-hero {
  background: linear-gradient(155deg, #0a1a30 0%, var(--primary-dark) 30%, var(--primary) 65%, var(--primary-light) 100%);
  color: var(--white);
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.about-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.about-hero h1 { font-size: 2.5rem; margin-bottom: 10px; }

.about-content { padding: 60px 0; }
.about-content .container { max-width: 900px; }
.about-content h2 { color: var(--primary); font-size: 1.5rem; margin: 32px 0 14px; }
.about-content p { margin-bottom: 16px; color: var(--gray-800); line-height: 1.8; }

.cert-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.cert-item {
  background: linear-gradient(135deg, var(--white) 0%, var(--warm-bg) 100%);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(26,58,92,0.06);
  box-shadow: var(--shadow-sm);
}

/* ============ Footer ============ */
.site-footer {
  background: linear-gradient(180deg, #0a1a2e 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 60px 0 24px;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--accent);
}
.footer-col p, .footer-col a {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 2;
  display: block;
}
.footer-col a:hover { opacity: 1; color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ============ MIC Link Badge ============ */
.mic-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e53935;
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.mic-badge:hover { background: #c62828; transform: translateY(-1px); }

/* ============ Products Page ============ */
.products-hero {
  background: linear-gradient(155deg, #0a1a30 0%, var(--primary-dark) 30%, var(--primary) 65%, var(--primary-light) 100%);
  color: var(--white);
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.products-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.products-hero h1 { font-size: 2.5rem; margin-bottom: 10px; }

.product-category {
  margin-bottom: 50px;
}
.product-category h2 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}
.product-category > p { color: var(--gray-600); margin-bottom: 24px; }

/* ============ Page Header (Arabic) ============ */
[dir="rtl"] .hero-content { text-align: right; }
[dir="rtl"] .hero-buttons { justify-content: flex-end; }
[dir="rtl"] .contact-item { text-align: right; }
[dir="rtl"] .form-group label { text-align: right; }

/* ============ Responsive ============ */
@media (max-width: 768px) {
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }

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

  .contact-grid { grid-template-columns: 1fr; }

  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--white);
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }

  .mobile-menu-btn { display: block; }

  .header-inner { position: relative; }

  .section { padding: 50px 0; }
  .section-title h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .btn { justify-content: center; }
}

/* ============================================
   Video Section
   ============================================ */

.video-wrapper {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}

.video-wrapper video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-caption {
  background: var(--white);
  padding: 16px 20px;
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
  border-top: 3px solid var(--accent);
}

/* Print */
@media print {
  .site-header, .site-footer, .mobile-menu-btn { display: none; }
  .video-wrapper { display: none; }
}
