diff --git a/src/app/globals.css b/src/app/globals.css index 70a14df..f4aa767 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -184,7 +184,11 @@ body { } #masthead .elementor-element.elementor-element-466de1b.dm-header-scrolled { - top: 0 !important; + top: 15px !important; + left: 20px !important; + right: 20px !important; + border-radius: 24px !important; + width: auto !important; } } diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index 435c6c7..a404bbf 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -30,11 +30,13 @@ const CURRENT_PAGE_ALIASES: Record = { home: ["home"], "how-it-works": ["how-it-works", "how-its-works"], miletruth: ["miletruth"], - // Solutions is a normal nav page and also owns the Wings/Express dropdown. - solutions: ["solutions", "doormile-wings", "express"], + // Solutions is now a plain top-level link — no child pages own its active state. + solutions: ["solutions"], "doormile-wings": ["doormile-wings"], about: ["about", "about-us", "women"], blogs: ["blogs"], + // Company is the dropdown parent for Blogs + How It Works — active if either is. + company: ["blogs", "how-it-works"], }; export default function Header() { @@ -82,20 +84,20 @@ export default function Header() { const [visibleScrolled, setVisibleScrolled] = useState(false); const [isScrolled, setIsScrolled] = useState(false); - // Solutions dropdown (desktop) / accordion (mobile). Local to Header — + // Company dropdown (desktop) / accordion (mobile). Local to Header — // unlike isMenuOpen/isSidebarOpen (HeaderUIProvider), no sibling component // needs to read this. - const [isDesktopSolutionsOpen, setDesktopSolutionsOpen] = useState(false); - const [isMobileSolutionsOpen, setMobileSolutionsOpen] = useState(false); + const [isDesktopCompanyOpen, setDesktopCompanyOpen] = useState(false); + const [isMobileCompanyOpen, setMobileCompanyOpen] = useState(false); // Collapse the accordion whenever the off-canvas menu closes, so it isn't // left expanded the next time the menu opens. const closeMobileMenu = () => { - setMobileSolutionsOpen(false); + setMobileCompanyOpen(false); closeAll(); }; const toggleMobileMenu = () => { - setMobileSolutionsOpen(false); + setMobileCompanyOpen(false); toggleMenu(); }; @@ -457,56 +459,70 @@ export default function Header() { - - - @@ -541,45 +557,51 @@ export default function Header() {
  • handleNavClick(event, "/", "home", true)}>Home
  • -
  • - handleNavClick(event, "/how-it-works", "how-it-works", true)}>How It Works +
  • + Doormile Wings
  • handleNavClick(event, "/miletruth", "miletruth", true)}>MileTruth™ AI
  • +
  • + Solutions +
  • +
  • + handleNavClick(event, "/about-us", "about", true)}>About +
  • - - Solutions - + { + event.preventDefault(); + setMobileCompanyOpen((open) => !open); + }} + > + Company +
  • -
  • - handleNavClick(event, "/about-us", "about", true)}>About -
  • -
  • - handleNavClick(event, "/blog", "blogs", true)}>Blogs -
  • @@ -768,7 +790,10 @@ export default function Header() { -webkit-backdrop-filter: blur(14px) !important; backdrop-filter: blur(14px) !important; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22) !important; - top: 0 !important; + top: 15px !important; + left: 20px !important; + right: 20px !important; + border-radius: 24px !important; } #masthead .elementor-element.elementor-element-466de1b.dm-header-scrolled .elementor-element.elementor-element-e052838 { @@ -899,9 +924,15 @@ export default function Header() { to the top once scrolled past 50px, matching desktop behaviour. */ #masthead .elementor-element.elementor-element-466de1b.dm-header-scrolled { position: fixed !important; - top: 18px !important; - left: 0 !important; - right: 0 !important; + background: rgba(26, 26, 26, 0.92) !important; + -webkit-backdrop-filter: blur(14px) !important; + backdrop-filter: blur(14px) !important; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22) !important; + top: 15px !important; + left: 20px !important; + right: 20px !important; + border-radius: 20px !important; + width: auto !important; } #masthead .elementor-element.elementor-element-e052838 { @@ -959,12 +990,15 @@ export default function Header() { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='5' y1='5' x2='19' y2='19'/%3E%3Cline x1='19' y1='5' x2='5' y2='19'/%3E%3C/svg%3E"); } - /* ── Solutions dropdown (desktop) / accordion (mobile) ── - Solutions remains linked to /solutions while the nested menu opens - independently. It reuses site.css's dead .menu-item-has-children chevron (fontello - glyph, already coloured white for this exact header widget) instead - of inventing a new arrow, so it matches the site's existing premium - nav styling. Desktop opens on hover/focus; mobile is a + /* ── Company dropdown (desktop) / accordion (mobile) ── + Company (Blogs + How It Works) is a non-navigating parent — + its trigger is a plain anchor with no href target, only a + dropdown toggle. Class names below (.dm-solutions-dropdown, + .dm-mobile-solutions*) are unchanged from when this same + component/markup belonged to Solutions, reusing site.css's dead + .menu-item-has-children chevron (fontello glyph, already + coloured white for this exact header widget) instead of + inventing a new arrow. Desktop opens on hover/focus; mobile is a height-collapsing accordion controlled by the chevron button. */ @media (min-width: 1025px) { #masthead .header-menu-container nav {