/* ============================================
   Om Automobile — navbar.css
   Base layout, logo, links, actions, hamburger
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Inter:wght@400;500;600&display=swap');

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

:root {
  --red:        #E63012;
  --red-dark:   #c0270f;
  --dark:       #0D0D0D;
  --dark-2:     #141414;
  --white:      #ffffff;
  --gray-1:     #f7f7f7;
  --gray-text:  #aaaaaa;
  --nav-h:      68px;
  --radius:     6px;
  --transition: 0.22s ease;
  --font-main:  'Inter', sans-serif;
  --font-brand: 'Rajdhani', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: #0a0a16;
  color: var(--white);
  min-height: 100vh;
  padding-top: var(--nav-h);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition), box-shadow var(--transition);
}

/* Scrolled state — added via JS */
.header.scrolled {
  background: rgba(13, 13, 13, 0.96);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------- Navbar container ---------- */
.navbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* ---------- Logo ---------- */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-box {
  width: 38px;
  height: 38px;
  background: var(--red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.logo-accent {
  color: var(--red);
}

/* ---------- Nav Links (desktop) ---------- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: #c0c0c0;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover,
.nav-item.active > .nav-link {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

/* Chevron icon */
.chevron {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav-item.dropdown-open > .nav-link .chevron {
  transform: rotate(180deg);
}

/* ---------- Right Actions ---------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  transition: color var(--transition);
}

.nav-phone:hover { color: #ff6b4a; }

.nav-phone svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.btn-book {
  background: var(--red);
  color: var(--white);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
  white-space: nowrap;
}

.btn-book:hover  { background: var(--red-dark); }
.btn-book:active { transform: scale(0.97); }

/* ---------- Hamburger ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.hamburger:hover { border-color: rgba(255, 255, 255, 0.35); }

.hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

/* Hamburger → X animation */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile Overlay ---------- */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 900;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* ---------- Demo Hero (page context) ---------- */
.demo-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 2rem 4rem;
  background: radial-gradient(ellipse at 70% 30%, rgba(230, 48, 18, 0.12) 0%, transparent 60%),
              linear-gradient(135deg, #08080f 0%, #0f0f25 60%, #0d0d0d 100%);
  text-align: center;
}

.demo-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(230, 48, 18, 0.3);
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 1.4rem;
}

.demo-content h1 {
  font-family: var(--font-brand);
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.demo-sub {
  font-size: 16px;
  color: #888;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.demo-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: border-color var(--transition), background var(--transition);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-phone { display: none; }
}

@media (max-width: 860px) {
  .nav-links  { display: none !important; }
  .nav-actions { display: none; }
  .hamburger  { display: flex; }

  /* Ensure hamburger sits at the right edge on mobile */
  .hamburger {
    margin-left: auto;
    position: relative;
    z-index: 1002; /* above mobile nav */
  }

  /* Prevent the hidden nav panel from intercepting taps when closed */
  .nav-links { pointer-events: none; }
  .nav-links.mobile-open { pointer-events: auto; display: flex !important; }

  /* Mobile nav slide-in */
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: min(340px, 90vw);
    height: calc(100vh - var(--nav-h));
    background: var(--dark-2);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    overflow-y: auto;
    z-index: 950;
    padding: 1rem 0 2rem;
    animation: slideIn 0.3s ease;
  }

  @keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
  }

  .nav-links.mobile-open .nav-link {
    padding: 13px 1.4rem;
    font-size: 15px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
  }

  .nav-links.mobile-open .nav-link:hover { background: rgba(255,255,255,0.04); }

  /* Mobile dropdown accordion */
  .nav-links.mobile-open .dropdown {
    position: static !important;
    display: none;
    flex-direction: column;
    gap: 0;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 0;
    pointer-events: all !important;
    padding: 0.4rem 0;
  }

  .nav-links.mobile-open .nav-item.dropdown-open .dropdown {
    display: flex;
  }

  .nav-links.mobile-open .dropdown-col { 
    padding: 8px 1.4rem 8px 2.8rem; 
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }
  
  .nav-links.mobile-open .dropdown-col:last-of-type {
    border-bottom: none;
  }

  .nav-links.mobile-open .dropdown-heading { 
    padding-left: 0; 
    margin-bottom: 8px; 
    margin-top: 6px;
    font-size: 11px;
  }

  .nav-links.mobile-open .dropdown-link { 
    padding: 10px 0; 
    border-bottom: none;
    margin-bottom: 0;
  }

  .nav-links.mobile-open .dropdown-cta { 
    margin: 12px 1.4rem; 
    width: auto;
  }

  .nav-links.mobile-open .dropdown-cta-btn {
    width: 100%;
    padding: 10px 12px;
  }

  /* Mobile chevron rotation */
  .nav-links.mobile-open .nav-item.dropdown-open > .nav-link .chevron {
    transform: rotate(180deg);
  }

  /* Improve mobile spacing */
  .nav-links.mobile-open .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links.mobile-open .nav-item:last-child {
    border-bottom: none;
  }

  /* Hide nav actions and show on mobile as needed */
  @media (max-width: 480px) {
    .nav-links.mobile-open {
      width: 100vw;
      left: 0;
    }

    .nav-links.mobile-open .dropdown-col {
      padding: 8px 1rem 8px 2rem;
    }

    .nav-links.mobile-open .dropdown-cta {
      margin: 12px 1rem;
    }
  }
}

/* ---------- Additional responsive adjustments ---------- */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    gap: 1rem;
  }

  .logo-text {
    font-size: 18px;
  }

  .logo-box {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

.dropdown-col a:hover {
  color: #e11d48;
}

.dropdown-btn {
  display: inline-block;
  margin-top: 10px;
  background: #e11d48;
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 8px;
}