/**
 * Copyright (c) 2025-2026 Let's Automate. All rights reserved.
 * This source code is proprietary and confidential.
 *
 * CANONICAL SITE NAV STYLES.
 *
 * Extracted verbatim from assets/css/website.css so the canonical nav can be
 * given to pages that do not load that stylesheet. On 2026-09-04 four pages
 * (terms, privacy, accessibility, lead-capture) had a different header
 * altogether: a TEXT wordmark and a "Back to Home" link, no site navigation and
 * no logo image, so a visitor arriving on the terms page from search had no way
 * into the site and never saw the brand mark.
 *
 * Linked ONLY on pages with no nav CSS of their own. The other 105 pages
 * already render the nav correctly from website.css or their own inline rules,
 * and restyling all of them to fix four would be a much larger change than the
 * problem deserves.
 */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 18, 0.95);
  backdrop-filter: blur(10px);
  /* Fallback first: the pages this file is added to define --text-secondary
     but not --game-color-rgb, and an unresolved var() drops the whole
     declaration, leaving the nav with no bottom edge. */
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  border-bottom: 1px solid rgba(var(--game-color-rgb, 0, 255, 255), 0.3);
  padding: 15px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-img {
  height: 40px;
  width: auto;
  max-width: 130px;
  border-radius: 8px;
  vertical-align: middle;
  display: block;
  object-fit: contain;
}

/* Hero & CTA logo images (centered block) */
.hero-logo-img,
.cta-logo-img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  height: auto;
  border-radius: 12px;
}
.hero-logo-img {
  max-width: 350px;
  width: 80%;
  margin-bottom: 25px;
}
.cta-logo-img {
  /* max-width must not be smaller than height x the master logo's aspect
     (940/788 = 1.193), or it clamps the auto width and squashes the logo.
     object-fit is the backstop: it letterboxes rather than distorts whatever
     box a page pins around it. */
  max-width: 100%;
  width: auto;
  height: 44px;
  object-fit: contain;
  margin-bottom: 20px;
}
.footer-logo-img {
  display: block;
  margin: 0 auto;
  max-width: 120px;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  gap: clamp(15px, 2vw, 30px);
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
  padding: 8px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover {
  color: var(--game-color);
}

/* Higher-specificity sibling so `.nav-links a { color: var(--text-secondary) }`
   doesn't override the pill text colour (specificity tie was leaving the
   gradient nav button text grey at 1.46:1 on neon backgrounds). */
.nav-links a.btn-nav,
.btn-nav {
  background: linear-gradient(135deg, var(--game-color), var(--game-color-end));
  color: #0a0a12;
  padding: 10px 25px;
  border-radius: 5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(var(--game-color-rgb), 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.btn-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 30px rgba(var(--game-color-rgb), 0.5);
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}
/* Infosheet feature cards (homepage + other promo placements) */
.infosheet-card {
  text-decoration: none;
  background: rgba(15, 15, 35, 0.92);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  display: block;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
}
.infosheet-card:hover {
  transform: translateY(-4px);
}
.infosheet-card .icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
}
.infosheet-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 6px;
}
.infosheet-card p {
  color: #a0a0b0;
  font-size: 0.9rem;
  line-height: 1.4;
}
.infosheet-card--pubs {
  border-color: rgba(255, 0, 255, 0.4);
}
.infosheet-card--pubs:hover {
  box-shadow: 0 10px 30px rgba(255, 0, 255, 0.25);
}
.infosheet-card--events {
  border-color: rgba(0, 255, 255, 0.4);
}
.infosheet-card--events:hover {
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.25);
}
.infosheet-card--holiday {
  border-color: rgba(0, 255, 136, 0.4);
}
.infosheet-card--holiday:hover {
  box-shadow: 0 10px 30px rgba(0, 255, 136, 0.25);
}
.infosheet-card--corporate {
  border-color: rgba(255, 215, 0, 0.4);
}
.infosheet-card--corporate:hover {
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.25);
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 18, 0.98);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  min-width: 160px;
  padding: 10px 0;
  margin-top: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1001;
}
.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown:focus-within .nav-dropdown-content {
  display: block;
}
.nav-dropdown-content a {
  display: block;
  padding: 10px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s;
}
.nav-dropdown-content a:hover,
.nav-dropdown-content a:focus-visible {
  color: var(--neon-cyan);
  background: rgba(0, 255, 255, 0.1);
  outline: 2px solid var(--neon-cyan);
  outline-offset: -2px;
}
.nav-dropdown > a::after {
  content: none;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--neon-cyan);
  font-size: 1.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .logo-img {
    height: 36px;
    max-width: 110px;
  }
}

/**
 * position:sticky, not fixed, on these pages only.
 *
 * The canonical nav is position:fixed, which takes it out of the flow and
 * leaves the page's first section underneath it. The obvious fix is a
 * body padding-top, and that is what this file did first, with 76px measured
 * from the homepage. It was wrong within a minute: on /terms the same nav
 * renders 98px tall because that page's type scale wraps the links onto a
 * second line, so the heading still sat behind the bar.
 *
 * Any hardcoded offset is a guess about a height that depends on the page it is
 * on. sticky keeps the bar pinned on scroll exactly like fixed, but leaves it
 * IN the flow so it occupies its own height whatever that turns out to be. It
 * is also what these four pages' own headers already did, so it restores the
 * behaviour rather than inventing one.
 */
nav {
  position: sticky;
}
