/* AI-Genics — the few styles Elementor Free cannot express. Everything else is set in the Elementor editor. */

/* Links inside running text: give the paragraph the class "ag-text-links" (Style tab → Classes) and write the link
   with the paragraph's inline link tool. Used for the e-mail addresses on Privacy Policy / Terms & Conditions. */
/* (doubled class: Elementor resets `.e-paragraph-base a` inline, after this file, with the same weight) */
.e-paragraph-base.ag-text-links a, .e-heading-base.ag-text-links a { color: var(--ag-red, #a2262d); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.e-paragraph-base.ag-text-links a:hover, .e-paragraph-base.ag-text-links a:focus-visible { color: var(--ag-red-deep, #911825); }

/* Header menu: Figma's "Active" item (Home on Home, Company on Company) is bold as well as red (#a2262d, weight 700). */
header .hfe-nav-menu > li.current-menu-item:not(.menu-item-has-children) > a.hfe-menu-item { font-weight: 700; }

/* Header menu that keeps working when more items are added (Appearance → Menus → Primary Menu). Above 1024 px:
   1. menu labels never wrap onto two lines;
   2. mu-plugins/aigenics/nav-fit.js measures the menu: while the items fit nothing changes (the designed header stays
      pixel-identical); when they do not, the pill first grows into the free space between logo and button (inline width),
      then the gaps (and then the item padding) shrink (.ag-nav-fit + --ag-nav-gap / --ag-nav-pad), and when even that is not
      enough the header switches to the hamburger menu (.ag-nav-compact) — the same dropdown as on tablets, under the button.
   The script marks the parts: .ag-nav-row = the header row, .ag-nav-pill = the box around the menu. ≤ 1024 px is untouched
   (Header Footer Elementor's own tablet/mobile menu). */
@media (min-width: 1025px) {
	header .elementor-widget-navigation-menu .hfe-nav-menu__layout-horizontal > ul.hfe-nav-menu { flex-wrap: nowrap; }
	header .elementor-widget-navigation-menu .hfe-nav-menu__layout-horizontal > ul.hfe-nav-menu > li { flex-shrink: 0; }
	header .elementor-widget-navigation-menu a.hfe-menu-item { white-space: nowrap; }

	/* tighter spacing (values set by nav-fit.js) */
	body .ag-nav-fit .elementor-widget-navigation-menu .hfe-nav-menu__layout-horizontal > ul.hfe-nav-menu > li.menu-item:not(:last-child) { margin-right: var(--ag-nav-gap, 24px) !important; }
	body .ag-nav-fit.ag-nav-fit-pad .elementor-widget-navigation-menu ul.hfe-nav-menu > li > a.hfe-menu-item,
	body .ag-nav-fit.ag-nav-fit-pad .elementor-widget-navigation-menu ul.hfe-nav-menu > li > div > a.hfe-menu-item { padding-left: var(--ag-nav-pad, 8px) !important; padding-right: var(--ag-nav-pad, 8px) !important; }

	/* hamburger mode: logo … [Request a Demo] [☰]; the menu opens as the tablet dropdown, right-aligned under the header */
	.ag-nav-row.ag-nav-compact { justify-content: flex-start !important; }
	.ag-nav-row.ag-nav-compact > .ag-nav-btn { order: 1; margin-left: auto !important; }
	.ag-nav-row.ag-nav-compact > .ag-nav-pill { order: 2; position: static !important; width: auto !important; flex: 0 0 auto; margin-left: 16px; padding: 10px !important; }
	.ag-nav-compact .elementor-widget-navigation-menu, .ag-nav-compact .elementor-widget-navigation-menu .elementor-widget-container,
	.ag-nav-compact .elementor-widget-navigation-menu .hfe-nav-menu { position: static !important; width: auto !important; }
	.ag-nav-compact .elementor-widget-navigation-menu .hfe-nav-menu__toggle { display: block !important; visibility: visible !important; opacity: 1 !important; margin: 0 !important; line-height: 0; }
	.ag-nav-compact .elementor-widget-navigation-menu nav.hfe-nav-menu__layout-horizontal {
		position: absolute !important; top: calc(100% + 12px) !important; right: 0 !important; left: auto !important; z-index: 9999 !important;
		width: min(420px, calc(100vw - 48px)) !important; max-height: calc(100vh - 140px); overflow-y: auto;
		visibility: hidden; opacity: 0; height: 0; border-radius: 15px; background-color: var(--ag-navy, #282e4d);
	}
	.ag-nav-compact .elementor-widget-navigation-menu .hfe-active-menu + nav.hfe-nav-menu__layout-horizontal { visibility: visible; opacity: 1; height: auto; }
	.ag-nav-compact .elementor-widget-navigation-menu nav ul.hfe-nav-menu { flex-direction: column; flex-wrap: nowrap; align-items: stretch; width: 100% !important; visibility: visible; opacity: 1; }
	body .ag-nav-compact .elementor-widget-navigation-menu nav ul.hfe-nav-menu li.menu-item { width: 100%; margin: 0 !important; }
	/* items as in the tablet dropdown */
	body .ag-nav-compact .elementor-widget-navigation-menu nav a.hfe-menu-item, body .ag-nav-compact .elementor-widget-navigation-menu nav a.hfe-sub-menu-item {
		justify-content: flex-start; white-space: normal; font-size: 18px; line-height: 25px; padding: 14px 24px !important;
	}
	body .ag-nav-compact .elementor-widget-navigation-menu nav a.hfe-sub-menu-item { padding-left: 44px !important; }
	.ag-nav-compact .elementor-widget-navigation-menu .menu-item-has-children .sub-menu,
	.ag-nav-compact .elementor-widget-navigation-menu .hfe-nav-menu .menu-item-has-children:hover > .sub-menu {
		position: relative !important; top: 0 !important; left: 0 !important; width: auto !important; height: 0; overflow: hidden;
		visibility: hidden; opacity: 0; box-shadow: none; border-radius: 0; transition: none;
	}
	.ag-nav-compact .elementor-widget-navigation-menu .hfe-nav-menu li.ag-sub-open > .sub-menu { height: auto; visibility: visible; opacity: 1; }
}

/* Hamburger menu taps (phones, tablets, narrow-desktop hamburger) — see nav-fit.js "Hamburger menu". The parent's NAME
   ("Services", "Resources") goes to its page; its "+" / "−" expands / collapses the sub-items (class .ag-sub-open) and has a
   finger-sized tap area (padding offset by negative margins: nothing moves). The sub-items show exactly while the parent is
   open (a stuck touch :hover no longer keeps them open). */
@media (max-width: 1024px) {
	header .elementor-widget-navigation-menu .hfe-nav-menu li.menu-item-has-children:not(.ag-sub-open) > .sub-menu { visibility: hidden !important; opacity: 0 !important; height: 0 !important; overflow: hidden !important; }
	header .elementor-widget-navigation-menu .hfe-nav-menu li.menu-item-has-children.ag-sub-open > .sub-menu { display: block !important; position: relative !important; visibility: visible !important; opacity: 1 !important; height: auto !important; }
	header .elementor-widget-navigation-menu .hfe-has-submenu-container { -webkit-tap-highlight-color: transparent; }
	header .elementor-widget-navigation-menu .ag-sub-ico { padding: 14px 20px; margin: -14px -20px -14px 0; cursor: pointer; }
}
.ag-nav-compact .elementor-widget-navigation-menu .ag-sub-ico { padding: 14px 20px; margin: -14px -20px -14px 0; cursor: pointer; }
.ag-nav-compact .elementor-widget-navigation-menu .hfe-nav-menu li.menu-item-has-children:not(.ag-sub-open) > .sub-menu { visibility: hidden !important; opacity: 0 !important; height: 0 !important; overflow: hidden !important; }
.ag-nav-compact .elementor-widget-navigation-menu .hfe-nav-menu li.menu-item-has-children.ag-sub-open > .sub-menu { display: block !important; visibility: visible !important; opacity: 1 !important; height: auto !important; }
.ag-sub-ico { display: inline-block; }
.ag-sub-ico::before { content: "\00a0"; } /* the space of "Services +" (a plain space would be dropped next to the separate "+") */
