/* Shared header, loaded after page-specific styles. */
header.top{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;isolation:isolate;z-index:30}
.top .brand{flex:0 1 auto;min-width:0;max-width:100%;margin:0;gap:8px}
.top .brand-name{font-size:27px;line-height:1.2;font-weight:750;white-space:nowrap}
.top .brand-tag{font-size:12px;white-space:normal;max-width:150px}
.top .brand-bar{margin:0}
.top .nav{display:flex;flex:1 1 700px;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px;overflow:visible;width:auto;min-width:0}
.top .nav>a,.top .nav-account>a{font-size:20px;line-height:1.3;padding:6px;white-space:nowrap;margin:0;background:transparent;border:0;border-radius:8px}
.top .nav>a:last-child{margin-inline-start:0}
.top .nav-account{display:inline-flex;align-items:center;gap:8px;margin-inline-start:auto;flex:0 0 auto}
.top .nav .lang-select{position:static;margin:0;max-width:135px;min-width:0;width:auto;align-self:center}
.site-search{position:relative;flex:1 1 155px;max-width:240px;min-width:140px}
.site-search input{display:block;width:100%;min-width:0;min-height:38px;padding:8px 12px;font:inherit;font-size:14px;border:1px solid #a9b8a5;border-radius:10px;background:#fff;color:var(--ink)}
.site-search input:focus-visible,.search-results a:focus-visible{outline:3px solid var(--clay);outline-offset:2px}
.search-results{position:absolute;top:calc(100% + 6px);inset-inline-end:0;width:340px;max-width:calc(100vw - 40px);max-height:340px;overflow-y:auto;background:#fff;border:1px solid #a9b8a5;border-radius:12px;box-shadow:0 8px 24px #0002;z-index:100;padding:8px}
.search-results[hidden]{display:none}
.top .nav .search-results a{display:flex;flex-direction:column;align-items:flex-start;white-space:normal;padding:10px;font-size:16px;border-radius:8px;line-height:1.4}
.search-results small{font-size:12px;color:var(--ink-soft)}
.search-results p{margin:10px;font-size:14px}
.destination-group{margin:32px 0}.destination-group h2{font-size:23px;line-height:1.4}.destination-group .p1-grid{margin-top:12px}
@media(max-width:1000px){.top .nav{flex-basis:100%;justify-content:flex-start}.site-search{max-width:none}}
@media(max-width:640px){header.top{width:100%;left:auto;transform:none;gap:8px}.top .brand-name{font-size:25px}.top .brand-ico{height:48px}.top .brand-tag{font-size:11px;max-width:125px}.top .nav{gap:4px;flex:1 1 100%}.top .nav>a,.top .nav-account>a{font-size:18.2px;padding:5px}.top .nav-account{gap:6px;margin-inline-start:auto}.top .nav .lang-select{max-width:120px}.site-search{flex:1 1 100%;max-width:none;order:0}.search-results{width:100%;max-width:100%}.top .nav-account{order:1}.destination-group h2{font-size:21px}}
.site-search .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

.top .nav-account>a[data-auth="account"]{display:block;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:600px){.top .nav-account>a[data-auth="account"]{max-width:120px}}

/* Keep desktop menu geometry stable on wide screens. */
@media(min-width:1001px){header.top,.home-story header.top{width:min(1404px,calc(100% - 36px));max-width:1404px;margin-inline:auto;left:auto;transform:none}.top .brand{flex-shrink:0}.top .nav{gap:6px;justify-content:flex-end}.top .nav-account{margin-inline-start:12px}.top .site-search{flex:0 1 190px;max-width:190px}}

@media(min-width:1200px){header.top,.home-story header.top{width:min(1404px,calc(100vw - 36px));max-width:1404px;position:relative;left:50%;transform:translateX(-50%);margin-inline:0;flex-wrap:nowrap}.top .nav{flex:1 1 auto;flex-wrap:nowrap}.top .nav>a,.top .nav-account>a{font-size:18px}.top .nav .site-search{flex:0 1 170px;min-width:140px}.top .nav-account{margin-inline-start:8px}}
/* Homepage header: full-width background, left menu and right utility group. */
:is(.home-story,body) header.top{width:100%;max-width:none;left:0;transform:none;margin-inline:0;box-sizing:border-box;justify-content:space-between}
@media(min-width:1001px){
 :is(.home-story,body) header.top{flex-wrap:nowrap}
 :is(.home-story,body) .top .brand{flex:0 0 auto}
 :is(.home-story,body) .top .nav{flex:1 1 auto;flex-wrap:nowrap;justify-content:flex-start}
 :is(.home-story,body) .top .site-search{margin-inline-start:auto;flex:0 1 170px}
 :is(.home-story,body) .top .nav-account{flex:0 0 auto;margin-inline-start:8px}
}
@media(min-width:641px) and (max-width:1000px){
 :is(.home-story,body) .top .nav{justify-content:flex-start;gap:4px}
 :is(.home-story,body) .top .nav>a,:is(.home-story,body) .top .nav-account>a{font-size:16px;padding:5px}
 :is(.home-story,body) .top .site-search{margin-inline-start:auto}
}
/* The parent flex item has auto side margins and can shrink to content. */
.home-story header.top{width:100vw;left:50%;transform:translateX(-50%)}

/* AR W1 header centering: the old left:50% flow origin changes under RTL. */
@media(min-width:1001px){html[lang=ar] header.top{left:auto;right:auto;transform:none;margin-inline:auto;box-sizing:border-box;flex-wrap:wrap;inline-size:min(1404px,calc(100% - 36px))}html[lang=ar] .top .nav{flex-wrap:wrap;min-inline-size:0}html[lang=ar] .home-story header.top{inline-size:100%;margin-inline:0;flex-wrap:nowrap}}

/* Mobile UX 2026-10-19 */

.top .nav>a,.top .nav-account>a{display:inline-flex;align-items:center;justify-content:center;min-inline-size:44px;min-block-size:44px;box-sizing:border-box}
.top .site-search input,.top .nav .lang-select{font-size:16px;min-height:44px;height:auto;line-height:1.5}
.top .nav .lang-select{max-width:100%;width:auto;max-inline-size:12em}
@media(min-width:1200px){.top .nav{flex-wrap:wrap}.top .nav>a,.top .nav-account>a{white-space:normal}}


.top .nav-account{flex-wrap:wrap;max-width:100%;min-width:0}.top .nav .lang-select{flex-shrink:1;max-inline-size:min(100%,12em)}

/* Audit B02 2026-10-24: burger header for 641-1100px and short landscape phones; compact one-row header at 1101-1439px; shared full-width header container (RTL included). */
@media(min-width:641px) and (max-width:1100px),(min-width:641px) and (max-height:500px) and (orientation:landscape){
 html header.top,html body.home-story header.top{height:56px!important;min-height:56px!important;max-height:56px!important;padding:4px calc(8px + env(safe-area-inset-right,0px)) 4px calc(8px + env(safe-area-inset-left,0px))!important;display:flex!important;flex-wrap:nowrap!important;position:relative!important;box-sizing:border-box;z-index:100;gap:8px;width:100%!important;inline-size:100%!important;max-width:none!important;left:0!important;transform:none!important;margin-inline:0!important}
 html .top .brand-tag,html .top .brand-bar{display:none}
 html .top .brand-ico{height:36px}
 html .top .brand-name{font-size:23px}
 html .top .nav,html body.home-story header.top .nav{display:none!important}
 html .mobile-nav-toggle{display:block!important;margin-inline-start:auto;min-width:44px;min-height:44px;background:#fbf8f1;border:1px solid #a9b8a5;border-radius:8px;font-size:24px}
 html .top .nav.mobile-open,html body.home-story header.top .nav.mobile-open{display:flex!important;position:absolute;top:56px;inset-inline:0;max-height:70vh;overflow:auto;background:#fbf8f1;padding:12px;box-sizing:border-box;flex-wrap:wrap;justify-content:flex-start;gap:4px;box-shadow:0 8px 18px #0002}
 html .top .nav .site-search{flex:1 1 100%;max-width:none;order:0;margin:0}
 html .top .nav-account{order:1;margin-inline-start:auto}
 html .search-results{width:100%;max-width:100%}
}
@media(min-width:1101px) and (max-width:1439px){
 html .top .brand-tag,html .top .brand-bar{display:none}
 html .top .brand-name{font-size:24px}
 html .top .brand-ico{height:52px}
 html .top .nav{gap:2px}
 html .top .nav>a,html .top .nav-account>a{font-size:16px;padding:6px 4px;min-inline-size:0}
 html .top .nav .site-search{flex:0 1 130px;min-width:96px;max-width:130px}
 html .top .nav .lang-select{max-inline-size:min(100%,8.5em);max-width:112px;padding-inline:8px 22px}
 html .top .nav-account{gap:4px;margin-inline-start:4px}
 html header.top,html body.home-story header.top{gap:8px 10px}
}

/* Unified header 2026-10-24: every inner page wears the home header (full-bleed cream bar, menu left, search/login/language right). A 100vw box with symmetric negative margins escapes the centred .wrap without touching the page container. */
html body:not(.home-story) header.top{width:100vw!important;inline-size:100vw!important;max-width:none!important;margin-inline:calc(50% - 50vw)!important;margin-block-end:16px;left:auto!important;right:auto!important;transform:none;position:relative;box-sizing:border-box}
html body:not(.home-story){overflow-x:clip}
body:not(.home-story)>.wrap:has(>header.top:first-child){padding-top:0}
@media(min-width:641px){html body:not(.home-story) header.top{background:rgba(251,248,241,.94)}}
@media(max-width:640px){html body:not(.home-story) header.top .brand-name{font-size:16.5px}}
@media(min-width:1101px){
 html body:not(.home-story) header.top{padding:10px 24px;flex-wrap:nowrap;justify-content:space-between}
 html[lang=ar] body:not(.home-story) header.top{flex-wrap:nowrap}
}
