* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  background-color: #0d1b2a;
  color: white;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* ====================== HEADER ====================== */
.header {
  background: #D70C19;
  position: fixed;           /* FIX 1: changed sticky → fixed so it always stays on top */
  top: 0;
  left: 0;                   /* FIX 2: added left:0 / right:0 so fixed header spans full width */
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  padding: 0.8rem 0;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  max-height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Desktop Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.25s ease;
  position: relative;         /* FIX 3: needed for underline pseudo-element */
  padding-bottom: 4px;
}

/* Underline hover effect */
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.nav-active::after {
  width: 100%;
}

.nav-menu a:hover,
.nav-menu a.nav-active {
  color: #a0d8ff;
}

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  gap: 6px;
  z-index: 1100;              /* FIX 4: hamburger must sit above mobile menu overlay */
  position: relative;
}

.hamburger span {
  width: 26px;
  height: 2.5px;
  background: white;
  border-radius: 2px;
  display: block;             /* FIX 5: spans must be block-level to show correctly */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger to X Animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);       /* FIX 6: scaleX(0) is cleaner than translateX for hiding */
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ====================== MOBILE MENU ====================== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: #1a3a5c;        /* FIX 7: changed from sky-blue to dark navy matching site theme */
  z-index: 999;
  padding-top: 90px;
  padding-left: 2rem;
  padding-right: 2rem;        /* FIX 8: added right padding so text doesn't touch edge */
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);  /* FIX 9: shadow so menu feels layered */
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  color: white;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 500;
  padding: 1.2rem 0;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.mobile-menu a:hover {
  color: #a0d8ff;
  padding-left: 10px;         /* FIX 10: subtle slide-right on hover for mobile links */
}

/* FIX 11: Dark overlay behind mobile menu when open */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 998;               /* just below mobile-menu (999) */
  backdrop-filter: blur(2px);
  transition: opacity 0.4s ease;
}

.mobile-overlay.active {
  display: block;
}

/* Active link styling for both desktop and mobile */
.nav-menu a.active,
.mobile-menu a.active {
  color: #a0d8ff;
  font-weight: 600;
}

/* ====================== FIX 12: PUSH MAIN CONTENT BELOW FIXED HEADER ====================== */
main {
  padding-top: 76px;          /* matches header height so content isn't hidden behind it */
}

/* ====================== MOBILE RESPONSIVE ====================== */
@media (max-width: 992px) {
    .hamburger {
        display: flex;          /* Show hamburger on mobile */
    }

    .nav-menu {
        display: none;          /* Hide desktop nav on mobile */
    }

    /* Optional: make header padding nicer on small screens */
    .header {
        padding: 0.6rem 0;
    }
}

/* ====================== HERO SECTION ====================== */
.first-page {
  min-height: 100vh;
  background-image: url('images/byd-bgimage.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-color: #0d1b2a;
  padding: 120px 1.5rem 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.first-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 27, 42, 0.68);
  z-index: 1;
}

.first-page > * {
  position: relative;
  z-index: 2;
}

.first-page h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  max-width: 800px;
  line-height: 1.1;
}

.first-page p {
  font-size: 1.2rem;
  max-width: 700px;
  margin-bottom: 2rem;
}

/* EV Club Section */
.second-head {
  margin: 2.5rem 0 0.8rem;
  color: #a0d8ff;
  font-size: 1.8rem;
  max-width: 800px;
}

.second-para {
  font-style: italic;
  color: #a0d8ff;
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}

.register-button {
  background-color: #d11c1c;
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 3rem;
}

.register-button:hover {
  background-color: white;
  color: #d11c1c;
  transform: translateY(-3px);
}

.bcvm-button-container {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.bc-button,
.vm-button {
  background-color: #d11c1c;
  color: white;
  padding: 14px 36px;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.bc-button:hover,
.vm-button:hover {
  background-color: white;
  color: #d11c1c;
  transform: translateY(-3px);
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 880px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

  .first-page {
    padding-top: 100px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.6rem 0;
  }

  .header-logo {
    max-height: 40px;
  }

  .hamburger {
    width: 40px;
    height: 40px;
  }

  .hamburger span {
    width: 22px;
    height: 2.2px;
  }

  .first-page h1 {
    font-size: 2.2rem;
  }

  .second-head {
    font-size: 1.5rem;
  }

  .bcvm-button-container {
    flex-direction: column;
    align-items: center;
  }

  .bc-button,
  .vm-button {
    width: 100%;
    max-width: 280px;
    margin-right: 0;           /* FIX 13: removed stray margin-right from original */
  }
}

/* ====================== COUNTRIES ====================== */
.countries {
  padding: 80px 20px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.countries h2 {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.countries p {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #87b7ef;
}

.countries-grid {
  text-align: center;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.country-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 22px 24px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.country-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(209, 28, 28, 0.5);  /* FIX 14: fixed near-invisible border (0.03 → 0.5) */
  transform: translateY(-2px);
  color: #d11c1c;
}

/* ====================== SECOND PAGE ====================== */
.second-page {
  min-height: 100vh;
  background-image: url('images/bydearth.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-color: #0d1b2a;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;   /* FIX 15: center text vertically in the full-height section */
  text-align: center;
  font-size: 50px;
  position: relative;
}

/* FIX 16: dark overlay on second-page for text readability */
.second-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 42, 0.6);
  z-index: 1;
}

.second-page > * {
  position: relative;
  z-index: 2;
}

.safe-text {
  max-width: 800px;
  font-size: 1.25rem;
  line-height: 1.85;
  color: #e0eeff;
}

//DEALER SECTIONNN
 @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500&display=swap');
 
    .dealers-section {
      background: #0d1b2a;
      padding: 80px 24px;
      font-family: 'DM Sans', sans-serif;
    }
 
    .dealers-header {
      text-align: center;
      margin-bottom: 56px;
    }
 
    .dealers-header .eyebrow {
      font-size: 11px;
      letter-spacing: 4px;
      text-transform: uppercase;
      color: #e8001a;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }
 
    .dealers-header .eyebrow::before,
    .dealers-header .eyebrow::after {
      content: '';
      width: 32px;
      height: 1px;
      background: #e8001a;
    }
 
    .dealers-header h2 {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 3.2rem;
      color: #fff;
      letter-spacing: 2px;
      line-height: 1;
      margin-bottom: 16px;
    }
 
    .dealers-header p {
      color: #6b8aaa;
      font-size: 1rem;
      max-width: 600px;
      margin: 0 auto;
      font-weight: 300;
      line-height: 1.7;
    }
 
    /* ---- Summary Stats Bar ---- */
    .dealers-stats-bar {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
      max-width: 700px;
      margin: 0 auto 56px;
    }
 
    .dealers-summary-stat {
      text-align: center;
      padding: 20px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 12px;
    }
 
    .dealers-summary-stat .num {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 2.4rem;
      color: #e8001a;
      letter-spacing: 2px;
    }
 
    .dealers-summary-stat .lbl {
      font-size: 11px;
      color: #6b8aaa;
      text-transform: uppercase;
      letter-spacing: 2px;
      margin-top: 4px;
    }
 
    /* ---- Search Bar ---- */
    .dealers-search-bar {
      display: flex;
      justify-content: center;
      margin-bottom: 40px;
    }
 
    .dealers-search-bar input {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid #1f3a55;
      border-right: none;
      color: #fff;
      padding: 12px 20px;
      border-radius: 30px 0 0 30px;
      font-size: 14px;
      width: 320px;
      font-family: 'DM Sans', sans-serif;
      outline: none;
      transition: border-color 0.2s ease;
    }
 
    .dealers-search-bar input:focus {
      border-color: #e8001a;
    }
 
    .dealers-search-bar input::placeholder {
      color: #3a5a7a;
    }
 
    .dealers-search-bar button {
      background: #e8001a;
      border: none;
      color: #fff;
      padding: 12px 24px;
      border-radius: 0 30px 30px 0;
      font-size: 13px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      font-weight: 500;
      letter-spacing: 1px;
      text-transform: uppercase;
      transition: background 0.2s ease;
    }
 
    .dealers-search-bar button:hover {
      background: #b8000f;
    }
 
    /* ---- Filter Buttons ---- */
    .dealers-filters {
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
      margin-bottom: 40px;
    }
 
    .dealers-filter-btn {
      background: transparent;
      border: 1px solid #1f3a55;
      color: #6b8aaa;
      padding: 8px 20px;
      border-radius: 30px;
      font-size: 13px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.2s ease;
    }
 
    .dealers-filter-btn:hover,
    .dealers-filter-btn.active {
      background: #e8001a;
      border-color: #e8001a;
      color: #fff;
    }
 
    /* ---- Dealer Cards Grid ---- */
    .dealers-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 20px;
      max-width: 1200px;
      margin: 0 auto;
    }
 
    .dealer-card {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 16px;
      padding: 24px;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }
 
    .dealer-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 3px;
      height: 100%;
      background: #e8001a;
      opacity: 0;
      transition: opacity 0.3s ease;
    }
 
    .dealer-card:hover {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(232, 0, 26, 0.3);
      transform: translateY(-4px);
    }
 
    .dealer-card:hover::before {
      opacity: 1;
    }
 
    .dealer-card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 16px;
    }
 
    .dealer-badge {
      display: flex;
      align-items: center;
      gap: 8px;
    }
 
    .dealer-flag {
      font-size: 11px;
      background-color: #e8001a;
      color: white;
      font-weight: bold;
      padding: 2px 6px;
      border-radius: 4px;
      letter-spacing: 1px;

    }
 
    .dealer-country {
      font-size: 12px;
      color: #6b8aaa;
      letter-spacing: 1px;
      text-transform: uppercase;
      font-weight: 400;
    }
 
    /* Stock Status Badges */
    .stock-badge {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      font-weight: 500;
      padding: 4px 10px;
      border-radius: 20px;
    }
 
    .stock-high {
      background: rgba(29, 158, 117, 0.15);
      color: #1d9e75;
      border: 1px solid rgba(29, 158, 117, 0.3);
    }
 
    .stock-mid {
      background: rgba(186, 117, 23, 0.15);
      color: #ef9f27;
      border: 1px solid rgba(186, 117, 23, 0.3);
    }
 
    .stock-low {
      background: rgba(226, 75, 74, 0.15);
      color: #e24b4a;
      border: 1px solid rgba(226, 75, 74, 0.3);
    }
 
    .stock-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
    }
 
    .stock-high .stock-dot { background: #1d9e75; }
    .stock-mid .stock-dot { background: #ef9f27; }
    .stock-low .stock-dot { background: #e24b4a; }
 
    .dealer-name {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 1.5rem;
      color: #fff;
      letter-spacing: 1px;
      margin-bottom: 4px;
    }
 
    .dealer-id-tag {
      font-size: 11px;
      color: #3a5a7a;
      letter-spacing: 2px;
      text-transform: uppercase;
      margin-bottom: 16px;
    }
 
    /* Stats inside card */
    .dealer-card-stats {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 18px;
    }
 
    .dealer-stat {
      background: rgba(255, 255, 255, 0.03);
      border-radius: 8px;
      padding: 10px 12px;
    }
 
    .dealer-stat-label {
      font-size: 10px;
      color: #3a5a7a;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 4px;
    }
 
    .dealer-stat-value {
      font-size: 18px;
      font-family: 'Bebas Neue', sans-serif;
      color: #fff;
      letter-spacing: 1px;
    }
 
    .dealer-stat-value.accent { color: #e8001a; }
 
    /* Card Footer */
    .dealer-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 14px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
 
    .certified-tag {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      color: #1d9e75;
    }
 
    .cert-icon {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(29, 158, 117, 0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      color: #1d9e75;
    }
 
    .dealer-view-btn {
      background: transparent;
      border: 1px solid #e8001a;
      color: #e8001a;
      font-size: 11px;
      padding: 6px 14px;
      border-radius: 20px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      font-weight: 500;
      letter-spacing: 1px;
      text-transform: uppercase;
      transition: all 0.2s ease;
    }
 
    .dealer-view-btn:hover {
      background: #e8001a;
      color: #fff;
    }
 
    /* No results */
    .dealers-no-results {
      text-align: center;
      color: #3a5a7a;
      padding: 60px 0;
      font-size: 14px;
      display: none;
    }
 
    /* ---- Responsive ---- */
    @media (max-width: 600px) {
      .dealers-header h2 { font-size: 2.4rem; }
      .dealers-stats-bar { grid-template-columns: 1fr; max-width: 300px; }
      .dealers-search-bar input { width: 200px; }
      .dealers-grid { grid-template-columns: 1fr; }
    }



/* ====================== FOOTER ====================== */
footer {
  background: #0d0d0d;
  border-top: 1px solid #1f1f1f;
  padding: 64px 48px 32px;
  position: relative;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}

footer::before {
  content: 'BYD';
  font-family: 'Bebas Neue', sans-serif;
  font-size: 280px;
  color: rgba(255, 255, 255, 0.02);
  position: absolute;
  bottom: -30px;
  right: -20px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -4px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 42px;
  letter-spacing: 3px;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}

.brand-tagline {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #e8001a;
  margin-bottom: 20px;
}

.brand-desc {
  font-size: 13.5px;
  line-height: 1.75;
  color: #888;
  max-width: 300px;
  font-weight: 300;
}

.social-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  background: transparent;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.social-btn:hover {
  border-color: #e8001a;
  color: #fff;
  background: rgba(232, 0, 26, 0.08);
}

.footer-col h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  text-decoration: none;
  color: #777;
  font-size: 13.5px;
  font-weight: 300;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul li a::before {
  content: '';
  width: 0;
  height: 1px;
  background: #e8001a;
  transition: width 0.2s ease;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-col ul li a:hover::before {
  width: 12px;
}

.footer-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #222, #e8001a33, #222, transparent);
  margin-bottom: 28px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 12px;
  color: #444;
  font-weight: 300;
}

.footer-copy span {
  color: #e8001a;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 11.5px;
  color: #444;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 0, 26, 0.1);
  border: 1px solid rgba(232, 0, 26, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  color: #e8001a;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 20px;
  width: fit-content;
}

.dot {
  width: 6px;
  height: 6px;
  background: #e8001a;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

@media (max-width: 768px) {
  footer { padding: 48px 24px 28px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}