/* Header Redesign: Crafty AI Hero + Data Craftsman Company Branding */

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 auto;
  padding: 0px 3%;
  min-height: inherit;
}

/* Three-column layout */
.header-left, 
.header-right {
  display: flex;
  align-items: center;
  flex: 1; /* Both sides take equal space */
  min-width: 200px;
}

.header-left {
  justify-content: flex-start;
}

.header-right {
  justify-content: flex-end;
}

/* Product Logo (Hero) */
#product-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Bebas Neue", serif;
  color: white;
  text-decoration: none;
  line-height: 1;
  transition: all 0.3s ease;
  white-space: nowrap;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-logo-img {
  width: 80px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

#product-logo:hover {
  transform: scale(1.05);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

#product-logo:hover .hero-logo-img {
  transform: translateY(-2px);
}

/* Navigation Container */
#navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 2; /* Nav takes more space in center */
}

/* Nav Groups */
.nav-group {
  display: flex;
  align-items: center;
}

.nav-group ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Nav Links Styling */
nav#navbar a {
  color: white;
  font-weight: 400;
  font-size: 1.25rem; /* Adjusted from x-large for better fit */
  letter-spacing: 1.5px;
  transition: all 0.2s ease;
  padding: 5px 10px;
  border-radius: 4px;
  text-decoration: none;
}

nav#navbar a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-theme-1);
}

#navbar li[aria-current="page"] a {
  color: var(--color-theme-1);
  font-weight: bold;
}

/* Company Logo (Secondary) */
#company-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

#company-logo img {
  width: 80px;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

#company-logo:hover img {
  opacity: 1;
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

/* Responsive Overrides */
@media (max-width: 1200px) {
  nav#navbar a {
    font-size: 1.1rem;
    letter-spacing: 1px;
  }
}

/* Mobile specific - Horizontal Scroll Layout */
@media (max-width: 768px) {
  .header-content {
    justify-content: space-between !important;
    padding: 0 15px !important;
    height: 64px !important;
  }

  /* Show Hamburger */
  .hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    order: 3;
    margin-left: auto !important;
    z-index: 1201 !important;
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
  }

  /* Hamburger to X Animation */
  #nav-toggle:checked ~ .hamburger .hamburger-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  #nav-toggle:checked ~ .hamburger .hamburger-bar:nth-child(2) {
    opacity: 0;
  }
  #nav-toggle:checked ~ .hamburger .hamburger-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hamburger-bar {
    transition: all 0.3s ease;
    width: 24px !important;
    height: 2px !important;
  }

  /* Force header background when menu is open */
  header:has(#nav-toggle:checked) {
    background: transparent !important; /* Let overlay handle background */
  }

  .header-left {
    flex: 0 0 auto; /* Only take needed space */
    justify-content: flex-start;
    min-width: 0;
    order: 1;
  }

  .header-right {
    display: none !important; /* Hide from header bar on mobile */
    transition: all 0.3s ease;
  }

  /* Move Company Logo to Top of Nav when open */
  #nav-toggle:checked ~ .header-right {
    display: flex !important;
    position: fixed !important;
    top: 5vh !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    justify-content: center !important;
    transform: none !important;
    z-index: 1200 !important; /* Above navbar */
    margin: 0 !important;
  }

  /* Hide left logo when menu is open */
  #nav-toggle:checked ~ .header-left {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #nav-toggle:checked ~ .header-right img {
    width: 160px !important; /* Large and prominent */
  }

  #product-logo {
    font-size: 1.1rem !important;
    flex-direction: row !important;
    gap: 5px !important;
    align-items: center !important;
    text-shadow: none !important;
  }

  .hero-logo-img {
    width: 44px !important; /* Increased size */
    height: auto !important;
  }

  #product-logo span {
    display: block !important;
    font-size: 1.1rem !important;
    white-space: nowrap;
  }

  #company-logo img {
    width: 70px !important; /* Increased size */
    opacity: 1 !important;
    display: block !important;
  }

  .hamburger-bar {
    background-color: white !important;
  }

  /* Full-screen Menu Overlay */
  #navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(10, 28, 42, 0.98) !important; /* Slightly transparent */
    backdrop-filter: blur(15px); /* Premium feel */
    -webkit-backdrop-filter: blur(15px);
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 0 !important;
    padding-top: 30vh !important; /* Increased spacing to avoid link overlap */
    transform: scale(1.1) !important; /* Zoom out effect */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    z-index: 1100 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
  }

  #nav-toggle:checked ~ #navbar {
    transform: scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .nav-group {
    width: 100% !important;
    justify-content: center !important;
  }

  .nav-group ul {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  .nav-group li {
    width: auto !important;
    text-align: center !important;
  }

  nav#navbar a {
    display: block !important;
    font-size: 2.5rem !important; /* Larger for full-screen */
    padding: 10px 20px !important;
    border-radius: 8px !important;
    letter-spacing: 2px !important;
    border-bottom: none !important;
  }

  .nav-toggle {
    display: none !important;
  }
}
