/* Header over the hero video; solid header after scrolling. */
#header{position:fixed;inset:0 0 auto;z-index:30;transition:background .3s ease,border-color .3s ease,box-shadow .3s ease}
#header:not(.scrolled){background:linear-gradient(180deg,#082b4770,#082b4720);border-bottom:1px solid #ffffff22;box-shadow:none;color:#fff}
#header:not(.scrolled)>nav:not(.mobile-nav)>a,#header:not(.scrolled)>nav:not(.mobile-nav)>.nav-projects>summary{color:#fff}
#header:not(.scrolled)>nav:not(.mobile-nav)>a:is(:hover,.active),#header:not(.scrolled)>nav:not(.mobile-nav)>.nav-projects>summary:is(:hover,.active),#header:not(.scrolled)>nav:not(.mobile-nav)>.nav-projects[open]>summary{background:#ffffff14!important;color:#fff}
#header:not(.scrolled) .nav-projects>summary>span{color:inherit}
#header:not(.scrolled) .header-tools .icon-button,#header:not(.scrolled) .menu-button{color:#fff}
#header:not(.scrolled) .header-tools .icon-button:hover{background:#ffffff14}
#header:not(.scrolled) .language-dropdown>summary{color:#fff;background:#ffffff0a;border-color:#ffffff40}
#header:not(.scrolled) .language-chevron{color:#fff}
#header:not(.scrolled) .header-tools>.button{background:#ffffff0a;border-color:#ffffff66;color:#fff;box-shadow:none}
#header .header-tools>.button:is(:hover,:focus-visible),#header:not(.scrolled) .header-tools>.button:is(:hover,:focus-visible){background:var(--blue);border-color:var(--blue);color:#fff}
#header.scrolled{background:#fff}
#home.hero-new.hero-video-layout{height:100svh;min-height:630px}
@media(max-width:760px){#home.hero-new.hero-video-layout{height:100svh;min-height:700px}#header:not(.scrolled) .mobile-nav{color:var(--ink)}}
@media(prefers-reduced-motion:reduce){#header{transition:none}}

/* Shared header controls across the homepage and project pages. */
#header .language-dropdown>summary{border:0!important;background:transparent!important;box-shadow:none!important}
#header .header-tools>.button{background:var(--blue)!important;border-color:var(--blue)!important;color:white!important;box-shadow:none}
#header .header-tools>.button:is(:hover,:focus-visible){background:#1266a7!important;border-color:#1266a7!important}

/* Identical arrow placement in both headers. */
#header .header-tools>.button>span{display:flex;align-items:center;justify-content:center!important;width:38px;min-width:38px;flex:0 0 38px;height:32px;transform:none!important;overflow:visible}
#header .header-tools>.button .direction-icon{width:27px;height:27px;transform:translateX(0)!important;transition:transform .25s ease!important}
#header .header-tools>.button:is(:hover,:focus-visible) .direction-icon{transform:translateX(4px)!important}
/* Primary hero actions share the brand blue surface. */
#home .actions>.button.green,.project-gallery-page .detail-hero .actions>.button.green{background:var(--blue)!important;border-color:var(--blue)!important;color:#fff!important}
#home .actions>.button.green:is(:hover,:focus-visible),.project-gallery-page .detail-hero .actions>.button.green:is(:hover,:focus-visible){background:#1266a7!important;border-color:#1266a7!important}
@media(prefers-reduced-motion:reduce){#header .header-tools>.button .direction-icon{transition:none!important}}

/* Shared ring arrows: only the arrowhead travels; holders and rings stay still. */
body :is(#header,#home,#contact,main,footer,#ecosystem,#projects) :is(a,button,summary)>span:has(>.direction-icon.direction-icon.direction-icon .arrow-ring){transform:none!important}
body :is(#header,#home,#contact,main,footer,#ecosystem,#projects) :is(a,button,summary) .direction-icon.direction-icon.direction-icon:has(.arrow-ring){transform:none!important;overflow:hidden!important}
body :is(a,button,summary):is(:hover,:focus-visible) .direction-icon .arrow-head{animation:news-arrow-pass .55s cubic-bezier(.22,.61,.36,1) both}
@media(prefers-reduced-motion:reduce){body :is(a,button,summary) .direction-icon .arrow-head{animation:none!important}}

/* Keep the investment contact action available in the mobile header. */
@media(max-width:1100px){
 #header .header-tools>.button:is([data-consult],[data-detail-consult]){display:inline-flex;flex:0 0 auto;white-space:nowrap;font-size:13px;min-height:42px;padding:8px 12px;gap:8px}
 #header .header-tools>.button:is([data-consult],[data-detail-consult])>span{width:24px;min-width:24px;flex-basis:24px;height:24px}
 #header .header-tools>.button:is([data-consult],[data-detail-consult]) .direction-icon{width:22px;height:22px}
}
@media(max-width:760px){
 #header,#header.scrolled{padding-inline:12px;gap:6px}
 #header .brand img.hz-brand-logo{width:60px;height:48px}
 #header .header-tools{gap:4px;flex:0 0 auto}
 #header .header-tools>.button:is([data-consult],[data-detail-consult]){font-size:12px;line-height:1.4;min-height:40px;padding:8px 10px;gap:0}
 #header .header-tools>.button:is([data-consult],[data-detail-consult])>span{display:none}
 #header .header-tools .icon-button{width:28px;height:36px;min-width:28px;padding:4px}
 #header .language-dropdown>summary{padding:6px 3px;gap:3px;font-size:12px}
 #header .menu-button{width:28px;min-width:28px;padding:0;font-size:24px}
}

/* Desktop header: reserve intrinsic width for the investment CTA. */
@media(min-width:1101px) and (max-width:1599px){
 #header,#header.scrolled{display:flex;justify-content:space-between;gap:16px;padding-inline:24px}
 #header>.brand{flex:0 0 auto}
 #header>nav{flex:0 1 auto;min-width:0;width:auto;margin-left:auto;padding:0;gap:2px;justify-content:center}
 #header>nav>a,#header>nav>.nav-projects>summary{font-size:14px;line-height:1.4;padding:11px 8px;white-space:nowrap}
 #header>.header-tools{display:flex;flex:0 0 auto;gap:8px}
 #header .header-tools>.button:is([data-consult],[data-detail-consult]){display:inline-flex;flex:0 0 auto;width:max-content;white-space:nowrap;font-size:14px;line-height:1.4;min-height:46px;padding:10px 12px;gap:10px}
 #header .header-tools>.button:is([data-consult],[data-detail-consult])>.button-label{flex:0 0 auto;white-space:nowrap}
 #header .header-tools>.button:is([data-consult],[data-detail-consult])>span{width:26px;min-width:26px;flex-basis:26px;height:26px}
 #header .header-tools>.button:is([data-consult],[data-detail-consult]) .direction-icon{width:24px;height:24px}
}
@media(min-width:1101px) and (max-width:1300px){
 #header,#header.scrolled{padding-inline:20px;gap:12px}
 #header .brand img.hz-brand-logo{width:80px;height:60px}
 #header>nav>a,#header>nav>.nav-projects>summary{font-size:13px;padding-inline:6px}
 #header .header-tools{gap:6px}
}

/* Center desktop navigation on the viewport, independently of side controls. */
@media(min-width:1101px){
 #header>nav{position:absolute;left:50%;transform:translateX(-50%);margin:0;width:max-content;max-width:none;flex:none}
 #header>.header-tools{margin-left:auto}
}
@media(min-width:1101px) and (max-width:1300px){
 #header>nav{gap:0}
 #header>nav>a,#header>nav>.nav-projects>summary{font-size:12px;padding-inline:5px}
 #header .header-tools .icon-button{width:30px;min-width:30px}
 #header .language-dropdown>summary{padding-inline:3px;gap:4px}
 #header .header-tools>.button:is([data-consult],[data-detail-consult]){font-size:13px;padding-inline:10px;gap:7px}
 #header .header-tools>.button:is([data-consult],[data-detail-consult])>span{width:22px;min-width:22px;flex-basis:22px}
}

@media(min-width:1101px){#header,#header.scrolled{display:flex;justify-content:space-between}#header>.header-tools{flex:0 0 auto;margin-left:auto}#header>.brand{flex:0 0 auto}}

/* Tablet and compact desktop: use a roomy collapsed navigation. */
@media(min-width:761px) and (max-width:1300px){
 #header,#header.scrolled{display:flex;height:88px;padding-inline:24px;gap:24px;justify-content:space-between}
 #header>.brand{flex:0 0 auto}
 #header .brand img.hz-brand-logo{width:88px;height:64px}
 #header>nav:not(.mobile-nav){display:none}
 #header>.header-tools{display:flex;flex:0 0 auto;margin-left:auto;gap:14px}
 #header .header-tools .icon-button{width:38px;height:38px;min-width:38px}
 #header .language-dropdown>summary{padding:8px 6px;gap:6px;font-size:14px}
 #header .header-tools>.button:is([data-consult],[data-detail-consult]){display:inline-flex;flex:0 0 auto;width:max-content;min-height:46px;padding:10px 14px;gap:12px;font-size:14px;line-height:1.4;white-space:nowrap}
 #header .header-tools>.button:is([data-consult],[data-detail-consult])>span{width:26px;min-width:26px;flex-basis:26px;height:26px}
 #header .menu-button{display:grid;place-items:center;width:40px;height:44px;padding:0;font-size:26px;flex:0 0 40px}
 #header>nav.mobile-nav{position:fixed;display:flex;left:0;right:0;top:88px;bottom:0;width:100%;max-width:none;margin:0;padding:28px 40px;transform:none;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:6px;background:#fff;color:var(--ink);overflow:auto;z-index:29}
 #header>nav.mobile-nav>a,#header>nav.mobile-nav>.nav-projects>summary{font-size:18px;line-height:1.5;padding:14px 16px;white-space:normal}
 #header>nav.mobile-nav>.nav-projects>summary{justify-content:space-between}
 #header .mobile-nav .mega-projects{position:static;width:100%;min-width:0;max-width:none;margin:0;padding:20px;border:0;box-shadow:none;transform:none}
 #header .mobile-nav .mega-menu-columns{grid-template-columns:1fr 1fr;gap:24px}
}

@media(min-width:761px) and (max-width:1300px){#header .mobile-nav .nav-projects .mega-projects[data-menu-layout]{position:static;width:100%;left:auto;right:auto;transform:none}}

@media(min-width:761px) and (max-width:1300px){#header>nav.mobile-nav{height:calc(100dvh - 88px);bottom:auto}}

/* Compact project dropdown on phones. */
@media(max-width:760px){
 #header>nav.mobile-nav{height:calc(100dvh - 76px);bottom:auto;padding:16px 20px 88px}
 #header .mobile-nav .nav-projects .mega-projects[data-menu-layout]{position:static;width:100%;min-width:0;left:auto;right:auto;transform:none;padding:14px 12px;margin-top:4px}
 #header .mobile-nav .mega-projects .mega-menu-title{font-size:14px;line-height:1.4;gap:10px;padding:0 0 12px!important}
 #header .mobile-nav .mega-menu-title svg{width:18px;height:18px}
 #header .mobile-nav .mega-menu-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding-top:12px}
 #header .mobile-nav .mega-menu-column p{font-size:10px;line-height:1.4;letter-spacing:.04em;margin:0 0 5px}
 #header .mobile-nav .mega-menu-column button{min-height:44px;padding:7px 3px;font-size:12px;line-height:1.4;white-space:normal}
 #header .mobile-nav .mega-menu-column .mega-project-label{gap:2px}
 #header .mobile-nav .mega-menu-column .mega-project-label strong{font-size:12px;line-height:1.4}
 #header .mobile-nav .mega-menu-column .mega-project-label small{font-size:10px;line-height:1.4}
 #header .mobile-nav .mega-menu-column [data-housing-project]{margin-top:0}
 #header .mobile-nav .mega-item-arrow{display:none}
}

/* Let the navigation scroll as one panel; never squeeze its flex children. */
@media(max-width:1300px){
 #header>nav.mobile-nav{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
 #header>nav.mobile-nav>*{flex:0 0 auto;min-width:0;width:100%}
 #header>nav.mobile-nav>a{display:flex;align-items:center;min-height:48px;margin:0}
 #header>nav.mobile-nav>.nav-projects{display:block;height:auto;min-height:48px;overflow:visible;position:relative;margin:0}
 #header>nav.mobile-nav>.nav-projects>summary{display:flex;align-items:center;justify-content:space-between;min-height:48px;width:100%;margin:0}
 #header .mobile-nav .nav-projects .mega-projects[data-menu-layout]{height:auto;max-height:none;overflow:visible;box-shadow:none;animation:none}
 #header .mobile-nav .mega-menu-columns{align-items:start}
 #header .mobile-nav .mega-menu-column{min-width:0}
 #header .mobile-nav .mega-menu-column button{height:auto;white-space:normal;overflow-wrap:anywhere}
 body:has(#header>nav.mobile-nav) .contact-rail{visibility:hidden;pointer-events:none}
}
@media(max-width:760px){
 #header>nav.mobile-nav{top:76px;height:calc(100dvh - 76px);bottom:auto;padding:12px 16px 28px;gap:2px;transform:none;left:0;right:0;width:100%;margin:0;background:#fff;color:var(--ink)}
 #header>nav.mobile-nav>a,#header>nav.mobile-nav>.nav-projects>summary{padding:12px 14px;font-size:16px;line-height:1.5}
 #header>nav.mobile-nav>.nav-projects>summary .project-nav-link{font-size:inherit;line-height:inherit;border:0;padding:0;flex:1}
 #header .mobile-nav .mega-menu-column button{min-height:48px;padding-block:8px}
}
