/* ==========================================================================
   NYE 2027 — global header, footer and shared tokens (loaded on every page)
   Everything is prefixed nye- so it can sit next to Bootstrap and main.css.
   ========================================================================== */

@font-face { font-family: "NYE Dubai"; font-weight: 300; font-display: swap; src: url("../fonts/dubai/Dubai-Light.woff2") format("woff2"); }
@font-face { font-family: "NYE Dubai"; font-weight: 400; font-display: swap; src: url("../fonts/dubai/Dubai-Regular.woff2") format("woff2"); }
@font-face { font-family: "NYE Dubai"; font-weight: 500; font-display: swap; src: url("../fonts/dubai/Dubai-Medium.woff2") format("woff2"); }
@font-face { font-family: "NYE Dubai"; font-weight: 700; font-display: swap; src: url("../fonts/dubai/Dubai-Bold.woff2") format("woff2"); }

:root {
  --nye-font: "NYE Dubai", "Segoe UI", system-ui, -apple-system, sans-serif;

  --nye-bg: #fffff9;
  --nye-ink: #03060e;
  --nye-ink-2: #302e30;
  --nye-ink-3: #282828;
  --nye-muted: #6b6b6b;
  --nye-sand: #e2d4ba;
  --nye-sand-2: #e3d5bb;
  --nye-line: #4a4a48;
  --nye-white: #fffffa;

  --nye-zone-a: #5d6bb1;
  --nye-zone-b: #df5a8d;
  --nye-zone-c: #35b6a4;
  --nye-zone-d: #b5d167;
  --nye-zone-e: #55b6e7;

  --nye-admin-bar: var(--wp-admin--admin-bar--height, 0px);
  --nye-header-h: 64px;
  --nye-gutter: clamp(16px, 4vw, 56px);
  --nye-container: 1320px;
  --nye-section-space: clamp(64px, 8.5vw, 120px);
  --nye-radius: 16px;
  --nye-radius-sm: 12px;
  --nye-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Shared utilities -------------------------------------------------------- */
.nye-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nye-skip-link {
  position: fixed; top: 8px; inset-inline-start: 8px; z-index: 1000;
  padding: 10px 16px; background: var(--nye-ink); color: #fff; border-radius: 4px;
  font-family: var(--nye-font); text-decoration: none;
  transform: translateY(-200%); transition: transform .2s;
}
.nye-skip-link:focus { transform: none; color: #fff; }

.nye-container { width: 100%; max-width: calc(var(--nye-container) + var(--nye-gutter) * 2); margin-inline: auto; padding-inline: var(--nye-gutter); }
.nye-container--wide { max-width: calc(1400px + var(--nye-gutter) * 2); }

.nye-icon { display: block; width: 20px; height: 20px; flex: none; }
.nye-icon--sm { width: 12px; height: 12px; }

/* Buttons ----------------------------------------------------------------- */
.nye-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 42px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 3px;
  font-family: var(--nye-font); font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .25s var(--nye-ease), color .25s var(--nye-ease), border-color .25s var(--nye-ease);
}
.nye-btn:hover, .nye-btn:focus { text-decoration: none; }
.nye-btn--sm { min-height: 38px; padding: 0 18px; }
.nye-btn--sand { background: var(--nye-sand); color: var(--nye-ink); }
.nye-btn--sand:hover { background: #d6c4a3; color: var(--nye-ink); }
.nye-btn--light { background: #fff; color: var(--nye-ink); }
.nye-btn--light:hover { background: var(--nye-sand); color: var(--nye-ink); }
.nye-btn--ghost-light { border-color: rgba(255,255,255,.85); color: #fff; background: transparent; }
.nye-btn--ghost-light:hover { background: #fff; color: var(--nye-ink); }
.nye-btn--dark { background: var(--nye-ink); color: #fff; }
.nye-btn--dark:hover { background: #2a2c33; color: #fff; }
.nye-btn--ghost-dark { border-color: var(--nye-ink); color: var(--nye-ink); background: transparent; }
.nye-btn--ghost-dark:hover { background: var(--nye-ink); color: #fff; }

/* Header ------------------------------------------------------------------ */
/* #masthead beats main.css's header / header.sticky rules on inner pages */
#masthead.nye-header {
  position: sticky; top: var(--nye-admin-bar); z-index: 50;
  background: var(--nye-bg); color: var(--nye-ink);
  box-shadow: none;
  font-family: var(--nye-font);
  transition: box-shadow .3s;
}
/* Inner pages already leave room for a fixed header, so keep it out of the flow there */
#masthead.nye-header--fixed { position: fixed; inset-inline: 0; }
#masthead.nye-header.is-scrolled { box-shadow: 0 1px 0 rgba(3,6,14,.08), 0 8px 24px -16px rgba(3,6,14,.25); }

.nye-header-inner {
  display: flex; align-items: center; gap: 24px;
  height: var(--nye-header-h);
  max-width: calc(1440px + var(--nye-gutter) * 2); margin-inline: auto; padding-inline: var(--nye-gutter);
}
.nye-brand { display: block; flex: none; }
.nye-brand img { display: block; height: 40px; width: auto; max-width: none; }
.nye-nav { flex: 1; }
.nye-nav ul.nye-nav-list { display: flex; justify-content: center; gap: clamp(20px, 4.6vw, 86px); list-style: none; margin: 0; padding: 0; }
.nye-nav-list li { margin: 0; padding: 0; }
.nye-nav-list a {
  position: relative; display: block; padding: 8px 0;
  color: var(--nye-ink); text-decoration: none;
  font-size: 12.5px; font-weight: 400; line-height: 1.5; letter-spacing: .05em; text-transform: uppercase;
}
.nye-nav-list a:hover, .nye-nav-list a:focus { color: var(--nye-ink); text-decoration: none; }
.nye-nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--nye-ease);
}
[dir="rtl"] .nye-nav-list a::after { transform-origin: right; }
.nye-nav-list a:hover::after,
.nye-nav-list a[aria-current]::after,
.nye-nav-list .current-menu-item > a:not([href*="#"])::after { transform: scaleX(1); }

/* Dropdowns (second menu level) */
.nye-nav-list .menu-item-has-children { position: relative; display: flex; align-items: center; gap: 2px; }
.nye-submenu-toggle {
  display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 4px; background: none; color: var(--nye-ink); cursor: pointer;
}
.nye-submenu-toggle .nye-icon { width: 14px; height: 14px; transition: transform .25s var(--nye-ease); }
.nye-nav-list .is-open > .nye-submenu-toggle .nye-icon { transform: rotate(180deg); }
.nye-nav ul.sub-menu {
  position: absolute; top: 100%; inset-inline-start: -16px; z-index: 5;
  min-width: 230px; margin: 0; padding: 8px 0; list-style: none;
  background: var(--nye-bg); border-radius: 8px;
  box-shadow: 0 1px 0 rgba(3,6,14,.06), 0 18px 40px -16px rgba(3,6,14,.35);
  visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity .2s, transform .2s var(--nye-ease), visibility 0s .2s;
}
.nye-nav-list .is-open > .sub-menu { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s var(--nye-ease); }
.nye-nav ul.sub-menu a { padding: 10px 16px; white-space: nowrap; font-size: 12px; }
.nye-nav ul.sub-menu a::after { display: none; }
.nye-nav ul.sub-menu a:hover, .nye-nav ul.sub-menu .current-menu-item > a { background: rgba(226,212,186,.45); }
@media (min-width: 1081px) and (hover: hover) {
  .nye-nav-list .menu-item-has-children:hover > .sub-menu { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s var(--nye-ease); }
}
.nye-header-actions { display: flex; align-items: center; gap: 12px; }
.nye-header-cta { min-height: 40px; }
.nye-menu-toggle {
  display: none; width: 42px; height: 42px; place-items: center; padding: 0;
  border: 0; border-radius: 4px; background: none; color: var(--nye-ink); cursor: pointer;
}
.nye-menu-toggle .nye-icon { width: 24px; height: 24px; }
.nye-menu-toggle .nye-icon--close { display: none; }
.nye-header :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

/* WPML language switcher */
.nye-lang { font-size: 12.5px; letter-spacing: .04em; }
.nye-lang .wpml-ls { padding: 0; border: 0; margin: 0; }
.nye-lang .wpml-ls ul { margin: 0; padding: 0; }
.nye-lang .wpml-ls a { color: var(--nye-ink); text-decoration: none; }
.nye-lang img { display: inline-block; }
.nye-lang--mobile { display: none; }

@media (max-width: 1080px) {
  .nye-menu-toggle { display: grid; }
  .nye-header-actions { margin-inline-start: auto; }
  .nye-lang--desktop { display: none; }
  .nye-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--nye-bg); border-top: 1px solid rgba(3,6,14,.08);
    box-shadow: 0 24px 40px -24px rgba(3,6,14,.35);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--nye-ease), visibility 0s .25s;
  }
  .nye-nav ul.nye-nav-list { flex-direction: column; gap: 0; padding: 8px var(--nye-gutter) 16px; }
  .nye-nav { max-height: calc(100dvh - var(--nye-header-h) - var(--nye-admin-bar)); overflow-y: auto; }
  .nye-nav-list > li + li { border-top: 1px solid rgba(3,6,14,.08); }
  .nye-nav-list a { padding: 16px 0; font-size: 15px; }
  .nye-nav-list a::after { display: none; }
  /* Sub-menus expand inside the mobile menu */
  .nye-nav-list .menu-item-has-children { flex-wrap: wrap; gap: 0; }
  .nye-nav-list .menu-item-has-children > a { flex: 1; }
  .nye-submenu-toggle { width: 44px; height: 44px; }
  .nye-submenu-toggle .nye-icon { width: 18px; height: 18px; }
  .nye-nav ul.sub-menu {
    position: static; flex-basis: 100%; display: none; min-width: 0;
    padding: 0 0 12px; padding-inline-start: 16px;
    background: none; box-shadow: none; border-radius: 0;
    visibility: visible; opacity: 1; transform: none; transition: none;
  }
  .nye-nav-list .is-open > .sub-menu { display: block; }
  .nye-nav ul.sub-menu a { padding: 10px 0; font-size: 14px; white-space: normal; }
  .nye-nav ul.sub-menu a:hover, .nye-nav ul.sub-menu .current-menu-item > a { background: none; }
  .nye-lang--mobile { display: block; padding: 0 var(--nye-gutter) 24px; font-size: 15px; }
  .nye-header.is-open .nye-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .25s var(--nye-ease); }
  .nye-header.is-open .nye-icon--open { display: none; }
  .nye-header.is-open .nye-icon--close { display: block; }
}
@media (max-width: 420px) {
  .nye-brand img { height: 34px; }
  .nye-header-cta { padding: 0 12px; font-size: 11px; min-height: 36px; }
}

/* Footer ------------------------------------------------------------------ */
/* footer.nye-footer beats main.css's footer rules on inner pages */
footer.nye-footer {
  display: block;
  color: #fff;
  font-family: var(--nye-font);
  background:
    radial-gradient(55% 80% at 0% 100%, #b08744 0%, rgba(176,135,68,0) 70%),
    radial-gradient(50% 75% at 100% 0%, #84491c 0%, rgba(132,73,28,0) 72%),
    radial-gradient(45% 65% at 100% 100%, #030201 0%, rgba(3,2,1,0) 72%),
    radial-gradient(42% 60% at 22% 8%, rgba(20,14,11,.95) 0%, rgba(20,14,11,0) 72%),
    #3a220e;
}
.nye-footer-inner { padding-top: clamp(64px, 7vw, 100px); }
.nye-footer img.nye-footer-logo { display: block; width: clamp(200px, 18vw, 260px); height: auto; margin-inline: auto; filter: none; }
.nye-footer-nav { max-width: 860px; margin: clamp(56px, 6.5vw, 96px) auto 0; padding-bottom: clamp(56px, 6vw, 84px); }
.nye-footer ul.nye-footer-cols { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 36px 24px; list-style: none; margin: 0; padding: 0; }
.nye-footer ul.nye-footer-links { list-style: none; margin: 0; padding: 0; }
.nye-footer li { margin: 0; font-size: 15px; font-weight: 300; line-height: 1.55; }
.nye-footer .nye-footer-heading { margin: 0 0 10px; color: #fff; font-family: var(--nye-font); font-size: 15px; font-weight: 400; line-height: 1.4; letter-spacing: .02em; text-transform: uppercase; }
.nye-footer a { color: #fff; opacity: .92; text-decoration: none; transition: opacity .2s; }
.nye-footer a:hover, .nye-footer a:focus { color: #fff; opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.nye-footer :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
.nye-footer-legal { padding: 22px var(--nye-gutter); border-top: 1px solid rgba(255,255,255,.18); text-align: center; font-size: 13.5px; font-weight: 300; }
.nye-footer-legal p { margin: 0; color: inherit; font: inherit; }
@media (max-width: 700px) {
  .nye-footer ul.nye-footer-cols { grid-template-columns: repeat(2, 1fr); max-width: 420px; margin-inline: auto; }
}

/* Arabic: no tracking on uppercase-styled Latin labels */
[dir="rtl"] .nye-btn,
[dir="rtl"] .nye-nav-list a,
[dir="rtl"] .nye-footer .nye-footer-heading { letter-spacing: 0; }
