/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Open Sans', sans-serif; color: #1a1a1a; background: #fff; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== VARIABLES ===== */
:root {
  --yellow: #F5C200;
  --yellow-dark: #d4a800;
  --blue: #0047AB;
  --blue-dark: #003380;
  --blue-light: #1a6fd4;
  --black: #111111;
  --dark: #1a1a1a;
  --gray: #555;
  --light: #f0f4ff;
  --white: #ffffff;
  --radius: 6px;
  --shadow: 0 4px 20px rgba(0,71,171,0.12);
  --transition: all 0.3s ease;
}

/* ===== UTILITIES ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-pad { padding: 80px 0; }
.bg-light { background: var(--light); }
.center-btn { text-align: center; margin-top: 40px; }

.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-family: 'Barlow', sans-serif; font-size: 2.2rem; font-weight: 900; color: var(--black); margin: 8px 0 12px; }
.section-header p { color: var(--gray); max-width: 600px; margin: 0 auto; }
.section-header.light h2 { color: var(--white); }
.section-header.light p { color: rgba(255,255,255,0.8); }

.section-tag { display: inline-block; background: var(--yellow); color: var(--black); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; padding: 4px 12px; border-radius: 20px; }
.section-header h2 span { color: var(--blue); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block; background: var(--blue); color: var(--white);
  font-weight: 700; padding: 12px 28px; border-radius: var(--radius);
  transition: var(--transition); font-family: 'Barlow', sans-serif; font-size: 0.95rem;
  border: 2px solid var(--blue);
}
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-2px); }
.btn-outline {
  display: inline-block; background: transparent; color: var(--blue);
  font-weight: 700; padding: 12px 28px; border-radius: var(--radius);
  border: 2px solid var(--blue); transition: var(--transition);
  font-family: 'Barlow', sans-serif; font-size: 0.95rem;
}
.btn-outline:hover { background: var(--blue); color: var(--white); transform: translateY(-2px); }
.btn-outline-white {
  display: inline-block; background: transparent; color: var(--white);
  font-weight: 700; padding: 12px 28px; border-radius: var(--radius);
  border: 2px solid var(--white); transition: var(--transition);
  font-family: 'Barlow', sans-serif; font-size: 0.95rem;
}
.btn-outline-white:hover { background: var(--white); color: var(--blue); }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }

/* ===== TOPBAR ===== */
.topbar { background: var(--blue-dark); color: rgba(255,255,255,0.85); font-size: 0.82rem; padding: 8px 0; }
.topbar-inner { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.topbar-inner span i { margin-right: 6px; color: var(--yellow); }
.topbar-right { margin-left: auto; }
.topbar-right a { color: var(--yellow); font-weight: 600; text-decoration: none; transition: var(--transition); }
.topbar-right a:hover { color: var(--white); text-decoration: underline; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--white); position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08); transition: var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.logo { font-family: 'Barlow', sans-serif; font-size: 1.4rem; font-weight: 900; display: flex; align-items: center; }
.logo-xcmg { color: var(--yellow); background: var(--black); padding: 2px 8px; border-radius: 3px; }
.logo-auto { color: var(--black); font-weight: 600; font-size: 1rem; }
.logo-img { height: 48px; width: auto; object-fit: contain; display: block; }
.logo-img-footer { height: 50px; width: auto; object-fit: contain; display: block; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 0.95rem; color: var(--dark); padding: 8px 12px; border-radius: var(--radius); transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.btn-nav { background: var(--yellow) !important; color: var(--black) !important; padding: 8px 20px !important; border-radius: var(--radius) !important; }
.btn-nav:hover { background: var(--yellow-dark) !important; color: var(--black) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 25px; height: 2px; background: var(--black); transition: var(--transition); }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  background: url('../images/banner/banner 1.png') center center / cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,51,128,0.82) 0%, rgba(0,71,171,0.65) 60%, rgba(0,71,171,0.3) 100%);
}
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); }
.hero-content { position: relative; z-index: 2; max-width: 700px; padding: 0 40px; }
.hero-sub { color: var(--yellow); font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 1rem; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 16px; }
.hero-content h1 { font-family: 'Barlow', sans-serif; font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; color: var(--white); line-height: 1.1; margin-bottom: 20px; }
.hero-content h1 span { color: var(--yellow); }
.hero-desc { color: rgba(255,255,255,0.8); font-size: 1.1rem; line-height: 1.7; margin-bottom: 36px; max-width: 560px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: var(--yellow); font-size: 1.4rem; animation: bounce 2s infinite; z-index: 2; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ===== STATS ===== */
.stats { background: var(--yellow); padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-item h2 { font-family: 'Barlow', sans-serif; font-size: 2.5rem; font-weight: 900; color: var(--black); }
.stat-item p { font-weight: 600; color: var(--black); font-size: 0.9rem; }
.stat-item { border-right: 1px solid rgba(0,0,0,0.15); }
.stat-item:last-child { border-right: none; }

/* ===== ABOUT SNIPPET ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img-placeholder {
  background: linear-gradient(135deg, var(--black), #333);
  border-radius: 12px; height: 380px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--yellow);
}
.about-img-placeholder i { font-size: 5rem; margin-bottom: 16px; }
.about-img-placeholder p { color: rgba(255,255,255,0.7); font-size: 1rem; }
.about-text .section-tag { margin-bottom: 12px; }
.about-text h2 { font-family: 'Barlow', sans-serif; font-size: 2rem; font-weight: 900; margin: 10px 0 20px; line-height: 1.2; }
.about-text p { color: var(--gray); line-height: 1.8; margin-bottom: 16px; }
.about-text .btn-primary { margin-top: 8px; }

/* ===== PRODUCTS ===== */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.15); }
.product-img { height: 180px; display: flex; align-items: center; justify-content: center; position: relative; font-size: 4rem; }
.product-img.ev { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); color: var(--yellow); }
.product-img.heavy { background: linear-gradient(135deg, #0d1b2a, var(--blue-dark)); color: var(--yellow); }
.badge { position: absolute; top: 12px; right: 12px; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; }
.badge-ev { background: #4caf50; color: #fff; }
.badge-heavy { background: var(--yellow); color: var(--black); }
.product-info { padding: 20px; }
.product-info h3 { font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.product-info p { color: var(--gray); font-size: 0.88rem; line-height: 1.6; margin-bottom: 14px; }
.specs { margin-bottom: 16px; }
.specs li { font-size: 0.82rem; color: var(--gray); padding: 3px 0; }
.specs li i { color: var(--yellow-dark); margin-right: 6px; width: 14px; }

/* ===== WHY XCMG ===== */
.why-xcmg { background: var(--blue-dark); }
.why-xcmg .section-tag { background: var(--yellow); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-card { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 32px 24px; text-align: center; transition: var(--transition); }
.why-card:hover { background: rgba(245,194,0,0.12); border-color: var(--yellow); transform: translateY(-4px); }
.why-card i { font-size: 2.5rem; color: var(--yellow); margin-bottom: 16px; }
.why-card h3 { font-family: 'Barlow', sans-serif; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.why-card p { color: rgba(255,255,255,0.7); font-size: 0.9rem; line-height: 1.6; }

/* ===== CTA BANNER ===== */
.cta-banner { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); padding: 60px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-inner h2 { font-family: 'Barlow', sans-serif; font-size: 2rem; font-weight: 900; color: var(--white); }
.cta-inner p { color: rgba(255,255,255,0.8); margin-top: 6px; }
.cta-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.cta-banner .btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--black); }
.cta-banner .btn-primary:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); }

/* ===== NEWS ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.news-card:hover { transform: translateY(-4px); }
.news-img { height: 160px; background: linear-gradient(135deg, var(--blue-dark), var(--blue)); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--yellow); }
.news-body { padding: 20px; }
.news-date { font-size: 0.78rem; color: var(--yellow-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.news-body h3 { font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 1rem; margin: 8px 0 10px; line-height: 1.4; }
.news-body p { color: var(--gray); font-size: 0.88rem; line-height: 1.6; margin-bottom: 14px; }
.news-body a { color: var(--yellow-dark); font-weight: 700; font-size: 0.88rem; transition: var(--transition); }
.news-body a:hover { color: var(--black); }
.news-body a i { margin-left: 4px; font-size: 0.75rem; }

/* ===== FOOTER ===== */
.footer { background: #001a4d; color: rgba(255,255,255,0.75); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; padding-bottom: 40px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; margin: 16px 0 20px; }
.social-links { display: flex; gap: 12px; }
.social-links a { width: 36px; height: 36px; background: rgba(255,255,255,0.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7); transition: var(--transition); font-size: 0.85rem; }
.social-links a:hover { background: var(--yellow); color: var(--black); }
.footer-links h4, .footer-contact h4 { font-family: 'Barlow', sans-serif; font-weight: 700; color: var(--white); margin-bottom: 16px; font-size: 1rem; }
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul li a { font-size: 0.88rem; color: rgba(255,255,255,0.65); transition: var(--transition); }
.footer-links ul li a:hover { color: var(--yellow); }
.footer-contact p { font-size: 0.88rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-contact p i { color: var(--yellow); width: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; text-align: center; font-size: 0.82rem; color: rgba(255,255,255,0.4); }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); padding: 80px 0 60px; text-align: center; }
.page-hero h1 { font-family: 'Barlow', sans-serif; font-size: 2.8rem; font-weight: 900; color: var(--white); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.7); font-size: 1.05rem; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.breadcrumb a { color: var(--yellow); }
.breadcrumb span { color: rgba(255,255,255,0.3); }

/* ===== RESPONSIVE ===== */

/* Tablet landscape / small desktop */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .about-grid { gap: 40px; }
  .section-header h2 { font-size: 1.9rem; }
  .hero-content { padding: 0 30px; }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12); gap: 2px;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 16px; border-radius: var(--radius); width: 100%; }
  .btn-nav { text-align: center; }
  .navbar { position: relative; }

  .topbar-inner { justify-content: center; gap: 16px; }
  .topbar-right { margin-left: 0; }

  .hero { min-height: 100svh; }
  .hero-content { padding: 80px 20px 40px; max-width: 100%; }
  .hero-sub { font-size: 0.85rem; letter-spacing: 2px; }
  .hero-desc { font-size: 1rem; }
  .hero-btns { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-btns .btn-primary, .hero-btns .btn-outline { width: 100%; text-align: center; }

  .stats { padding: 30px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.1); padding: 16px 0; }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(0,0,0,0.1); }
  .stat-item:last-child, .stat-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }

  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-img-placeholder { height: 260px !important; }
  .about-text h2 { font-size: 1.6rem; }

  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

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

  .cta-banner { padding: 40px 0; }
  .cta-inner { flex-direction: column; text-align: center; gap: 20px; }
  .cta-btns { justify-content: center; }
  .cta-inner h2 { font-size: 1.6rem; }

  .section-pad { padding: 50px 0; }
  .section-header { margin-bottom: 36px; }
  .section-header h2 { font-size: 1.7rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }

  .page-hero { padding: 60px 0 40px; }
  .page-hero h1 { font-size: 2rem; }
  .page-hero p { font-size: 0.95rem; }
}

/* Mobile */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .topbar { display: none; }

  .logo-img { height: 38px; }

  .hero-content h1 { font-size: 2rem; }
  .hero-sub { font-size: 0.78rem; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-item h2 { font-size: 2rem; }

  .products-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand { grid-column: auto; }

  .section-pad { padding: 40px 0; }
  .section-header h2 { font-size: 1.5rem; }

  .btn-primary, .btn-outline, .btn-outline-white { padding: 11px 22px; font-size: 0.9rem; }

  .page-hero h1 { font-size: 1.7rem; }
}

/* Small mobile */
@media (max-width: 360px) {
  .hero-content h1 { font-size: 1.7rem; }
  .stat-item h2 { font-size: 1.7rem; }
  .section-header h2 { font-size: 1.35rem; }
}
