/* Navbar, dropdowns, menu sheet and search palette, shared look with option two.
   Generated from option-2/index.html; dropdown class renamed .panel -> .dd here. */
.nav, .mnav, .search {
  --card: #17110e;
  --pill: rgba(24, 22, 21, 0.82);
  --paper: #ffffff;
  --soft: rgba(255, 255, 255, 0.72);
  --dim: rgba(255, 255, 255, 0.42);
  --row: rgba(255, 255, 255, 0.08);
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 64px);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:where(.nav, .mnav, .search) button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
:where(.nav, .mnav, .search) ul { list-style: none; margin: 0; padding: 0; }
:where(.nav, .mnav, .search) a { color: inherit; text-decoration: none; }

/* Once the page turns white, the navbar swaps to dark ink */
    .nav { transition: color 0.4s; }

/* On the white section the pill stays dark, with a soft shadow to lift it off the page */
    .nav.on-light .bar { transition: max-width 1.1s var(--ease), background 0.2s, padding 1.1s var(--ease); background: rgb(24, 22, 21); box-shadow: 0 10px 34px rgba(10, 5, 2, 0.22); }

.mark, .contact, .item > .trigger, .item > a { transition: color 0.4s, background 0.4s; }

/* Top bar: loads as a compact dark pill, then opens out across the page */
    .nav {
      position: fixed;
      top: 18px;
      left: 50%;
      z-index: 10;
      width: min(100vw - 2 * var(--gutter), 1360px);
      transform: translateX(-50%);
    }

.bar {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 52px;
      margin: 0 auto;
      padding: 0 8px 0 18px;
      max-width: 1100px;
      background: var(--pill);
      border-radius: 16px;
      transition: max-width 1.1s var(--ease), background 0.9s var(--ease), padding 1.1s var(--ease);
      -webkit-backdrop-filter: blur(16px);
      backdrop-filter: blur(16px);
    }

.nav.is-wide .bar { max-width: 100%; background: rgba(255, 255, 255, 0); padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }

.brand { display: flex; align-items: center; flex-shrink: 0; }

.logo { height: 30px; width: auto; }

.logo + .mark { display: none; }

.mark { width: 15px; height: 15px; border-radius: 50%; background: var(--paper); flex-shrink: 0; }

.items { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }

.item > .trigger, .item > a {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 10px 0;
      font-size: 15px;
      line-height: 1;
      color: var(--paper);
      transition: color 0.35s;
    }

.caret {
      width: 7px; height: 7px;
      border-right: 1.5px solid currentColor;
      border-bottom: 1.5px solid currentColor;
      transform: translateY(-2px) rotate(45deg);
      transition: transform 0.4s var(--ease-out);
    }

.item.is-open .caret { transform: translateY(2px) rotate(225deg); }

/* While one menu is open, the other items step back */
    .nav.has-open .item:not(.is-open) > .trigger,
    .nav.has-open .item:not(.is-open) > a { color: var(--dim); }

/* Search: command palette */
    .search { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: max(12vh, 80px) 16px 16px; visibility: hidden; pointer-events: none; transition: visibility 0s 0.5s; }

.search.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }

.search-backdrop {
      position: absolute; inset: 0; background: rgba(12, 8, 6, 0.38);
      -webkit-backdrop-filter: blur(40px) saturate(1.15); backdrop-filter: blur(40px) saturate(1.15);
      opacity: 0; transition: opacity 0.5s var(--ease-out);
    }

.search.is-open .search-backdrop { opacity: 1; }

.palette {
      position: relative; width: min(680px, 100%); max-height: calc(100vh - max(12vh, 80px) - 24px);
      display: flex; flex-direction: column; overflow: hidden;
      border-radius: 26px; background: #fff; color: #14100c;
      box-shadow: 0 40px 100px rgba(8, 4, 2, 0.35);
      opacity: 0; transform: translateY(18px) scale(0.97);
      transition: opacity 0.3s, transform 0.55s var(--ease-out);
    }

.search.is-open .palette { opacity: 1; transform: none; transition: opacity 0.4s 0.06s, transform 0.75s var(--ease-out) 0.06s; }

.palette-top { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid #efede6; }

.palette-icon { width: 21px; height: 21px; flex-shrink: 0; fill: none; stroke: rgba(20, 16, 12, 0.55); stroke-width: 1.8; stroke-linecap: round; }

.palette-input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 19px; color: #14100c; }

.palette-input:focus-visible { outline: none; }

.palette-input::placeholder { color: rgba(20, 16, 12, 0.4); }

.palette kbd {
      display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px;
      border: 1px solid #e3e0d8; border-radius: 7px; background: #fff;
      font: inherit; font-size: 12.5px; font-weight: 500; color: rgba(20, 16, 12, 0.62);
    }

.palette-go {
      display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
      background: #14100c; color: #fff; transition: background 0.2s, transform 0.3s var(--ease-out);
    }

.palette-go:hover { background: #2a211c; }

.palette-go:active { transform: scale(0.95); }

.palette-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.palette-list { overflow-y: auto; padding: 8px 10px 10px; overscroll-behavior: contain; }

.palette-group { padding: 14px 12px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(20, 16, 12, 0.45); }

.palette-item {
      display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 14px; cursor: pointer;
      transition: background 0.15s;
    }

.palette-item.is-active { background: #f4f2ed; }

.palette-item .p-tile {
      display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: #f1efe8;
      color: rgba(20, 16, 12, 0.7); transition: background 0.15s, color 0.15s;
    }

.palette-item.is-active .p-tile { background: #fff; }

.palette-item .p-tile svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.palette-item.is-search .p-tile { background: #fcebe4; color: #c8402c; }

.palette-item .label { flex: 1; min-width: 0; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.palette-item .label em { font-style: normal; color: rgba(20, 16, 12, 0.5); }

.palette-item .hint { flex-shrink: 0; font-size: 14px; color: rgba(20, 16, 12, 0.45); }

.palette-foot { display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 14px 22px; border-top: 1px solid #efede6; font-size: 14px; color: rgba(20, 16, 12, 0.55); }

.palette-foot span { display: inline-flex; align-items: center; gap: 6px; }

.palette { overflow: visible; }

.palette-list { border-radius: 0 0 26px 26px; }

.scope { position: relative; flex-shrink: 0; }

.scope-btn { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 10px; background: #f1efe8; color: #14100c; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background 0.2s; }

.scope-btn:hover { background: #e8e5dc; }

.scope-btn .caret { width: 6px; height: 6px; }

.scope-btn[aria-expanded="true"] .caret { transform: translateY(2px) rotate(225deg); }

.scope-menu {
      position: absolute; left: 0; top: calc(100% + 8px); z-index: 3; min-width: 210px; padding: 6px; margin: 0; list-style: none;
      border-radius: 14px; background: #fff; color: #14100c; border: 1px solid #efede6; box-shadow: 0 24px 60px rgba(8, 4, 2, 0.2);
      opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98); transform-origin: top left;
      transition: opacity 0.2s, transform 0.35s var(--ease-out), visibility 0s 0.35s;
    }

.scope.is-open .scope-menu { opacity: 1; visibility: visible; transform: none; transition: opacity 0.25s, transform 0.45s var(--ease-out), visibility 0s; }

.scope-menu li { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 9px; font-size: 15px; cursor: pointer; transition: background 0.15s; }

.scope-menu li:hover, .scope-menu li.is-focus { background: #f4f2ed; }

.scope-menu li[aria-selected="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e2572f; }

/* Empty state: isometric drawing in the same style as the roles cards */
    .palette-empty { display: flex; flex-direction: column; align-items: center; padding: 26px 20px 30px; text-align: center; }

.pal-art { width: 170px; height: auto; overflow: visible; fill: none; stroke: #14100c; stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }

.pal-art polygon, .pal-art circle { fill: #fff; }

.pal-art .acc { stroke: #e2572f; }

.pal-art .dash { stroke-dasharray: 2 4; opacity: 0.6; }

.palette-empty h4 { margin: 18px 0 0; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }

.palette-empty h4 em { font-style: normal; color: #c8402c; }

.palette-empty p { margin: 6px 0 0; font-size: 14.5px; color: rgba(20, 16, 12, 0.55); }

.palette-cta {
      display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 11px 18px; border-radius: 999px;
      background: #14100c; color: #fff; font-size: 14.5px; font-weight: 500; transition: background 0.2s, transform 0.3s var(--ease-out);
    }

.palette-cta:hover { background: #2a211c; }

.palette-cta kbd { background: rgba(255, 255, 255, 0.14) !important; border-color: transparent !important; color: #fff !important; height: 20px !important; min-width: 20px !important; }

@media (max-width: 600px) {
      .search { padding-top: 70px; }
      .palette-item .hint, .palette-foot { display: none; }
    }

@media (prefers-reduced-motion: reduce) {
      .palette, .search-backdrop { transition-duration: 0.01s !important; transition-delay: 0s !important; }
    }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.search-btn {
      display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
      color: var(--paper); background: rgba(255, 255, 255, 0.1);
      transition: background 0.3s, transform 0.3s var(--ease-out);
    }

.search-btn:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.06); }

.search-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.contact {
      padding: 10px 16px;
      border-radius: 999px;
      background: var(--paper);
      color: var(--card);
      font-size: 14px;
      font-weight: 500;
      line-height: 1;
      flex-shrink: 0;
      transition: background 0.3s, transform 0.3s var(--ease-out);
    }

.contact:hover { background: #fff; transform: scale(1.04); }

:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; border-radius: 4px; }

/* Dropdown panels */
    .item { position: relative; }

.dd {
      position: absolute;
      top: calc(100% + 10px);
      left: -16px;
      /* Same neutral smoked glass as the navbar pill, so the two read as one piece */
      background: rgba(24, 22, 21, 0.94);
      -webkit-backdrop-filter: blur(28px) saturate(1.2);
      backdrop-filter: blur(28px) saturate(1.2);
      border-radius: 20px;
      overflow: hidden;
      box-shadow: 0 30px 80px rgba(10, 5, 2, 0.45);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-8px) scale(0.985);
      transform-origin: top left;
      clip-path: inset(0 0 100% 0 round 20px);
      transition: opacity 0.3s, transform 0.4s var(--ease-out), clip-path 0.4s var(--ease-out), visibility 0s 0.4s;
    }

.dd::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }

.item.is-open .dd {
      opacity: 1;
      visibility: visible;
      transform: none;
      clip-path: inset(0 0 0 0 round 20px);
      transition: opacity 0.4s, transform 0.7s var(--ease-out), clip-path 0.7s var(--ease-out), visibility 0s;
    }

/* Mega dropdowns: QNL's own menu, groups in columns */
    .panel-mega {
      width: max-content; max-width: min(calc(var(--cols) * 230px + 48px), calc(100vw - 32px));
      padding: 22px 24px 8px; columns: var(--cols) 190px; column-gap: 28px;
    }

.mg { break-inside: avoid; margin-bottom: 18px; }

.mg ul { list-style: none; margin: 0; padding: 0; }

.mg-head { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 500; color: #fff; }

.mg-list li + li { margin-top: 2px; }

.mg-list a { display: block; padding: 4px 0; font-size: 15px; color: #fff; }

.mg ul:not(.mg-list) a { display: block; padding: 4px 0; font-size: 13.5px; color: var(--soft); }

.mg a { transition: color 0.2s, transform 0.3s var(--ease-out); }

.mg a:hover { color: #fff; transform: translateX(3px); }

.mg-list a:hover { color: var(--soft); }

.nav .items { gap: clamp(12px, 1.5vw, 24px); }

.nav .item > .trigger { font-size: 14px; white-space: nowrap; }

/* Grouped dropdowns: small labelled groups side by side with room to breathe */
    .panel-grid.panel-grid {
      columns: auto; display: grid; grid-template-columns: repeat(var(--cols), minmax(170px, 210px));
      gap: 0 44px; width: max-content; max-width: calc(100vw - 32px); padding: 30px 36px 32px;
    }

.ng-title, .fy-title { margin: 0 0 16px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.42); }

.ng ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.ng a { display: inline-block; font-size: 15px; line-height: 1.3; color: rgba(255, 255, 255, 0.88); transition: color 0.2s, transform 0.3s var(--ease-out); }

.ng a:hover { color: #fff; transform: translateX(3px); }

.mn-in .ng { break-inside: avoid; margin-bottom: 22px; }

/* "For You" dropdown: three audiences in columns, plus a picture that follows Children / Young Adults */
    .panel-foryou.panel-foryou { columns: auto; display: grid; grid-template-columns: repeat(3, 200px) 320px; gap: 0 40px; width: max-content; max-width: calc(100vw - 32px); padding: 30px 8px 8px 36px; }

.fy-title { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }

.fy-col { min-width: 0; }

.pm-pics { position: relative; min-height: 340px; margin: -22px 0 0; border-radius: 16px; overflow: hidden; background: #262321; }

.pm-pics img {
      position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
      opacity: 0; transform: scale(1.05); transition: opacity 0.6s, transform 1.2s var(--ease-out);
    }

.pm-pics img.is-current { opacity: 1; transform: none; }

.panel-foryou .mg[data-show] { padding: 6px 10px; margin: 0 -10px 10px; border-radius: 12px; transition: background 0.3s; }

.panel-foryou .mg[data-show].is-current { background: var(--row); }

.mn-in .fy-title { column-span: all; margin-top: 6px; }

/* Narrow screens: one Menu button opens the full menu as a sheet */
    .menu-btn { display: none; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: var(--paper); font-size: 13.5px; font-weight: 500; }

.mnav {
      position: fixed; inset: 0; z-index: 9; padding: 92px var(--gutter) 32px; overflow-y: auto;
      background: rgba(15, 12, 10, 0.96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff;
      opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease-out), visibility 0s 0.4s;
    }

.mnav.is-open { opacity: 1; visibility: visible; transition: opacity 0.45s var(--ease-out), visibility 0s; }

.mn-list { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; }

.mn-list > li { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }

.mn-top { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 18px 0; font-size: clamp(20px, 4.6vw, 26px); letter-spacing: -0.02em; text-align: left; }

.mn-top[aria-expanded="true"] .caret { transform: translateY(2px) rotate(225deg); }

.mn-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }

.mn-sub > * { min-height: 0; overflow: hidden; }

.mn-top[aria-expanded="true"] + .mn-sub { grid-template-rows: 1fr; }

.mn-in { columns: 2 160px; column-gap: 20px; }

.mn-in > .mg:last-child { margin-bottom: 22px; }

.mn-sub .mg:first-child { padding-top: 2px; }

@media (max-width: 1000px) {
      .nav .items { display: none; }
      .menu-btn { display: inline-block; }
    }

@media (max-width: 860px) {
      .items { gap: 14px; }
      .item > .trigger, .item > a { font-size: 14px; }
      .dd { position: fixed; left: var(--gutter); right: var(--gutter); top: 80px; }
      .panel-split, .panel-cards, .panel-over { width: auto; }
      .panel-split { grid-template-columns: 1fr; }
      .stack { min-height: 180px; margin: 0 4px 4px; }
      .tile { height: 220px; }
    }

@media (max-width: 560px) {
      .bar, .nav.is-wide .bar { padding: 0 6px 0 14px; background: var(--pill); }
      .items { gap: 10px; }
      .item > .trigger, .item > a { font-size: 13px; gap: 4px; }
      .item-about { display: none; }
      /* Phones: show only the diamond mark, cropped from the left of the logo */
      .logo { height: 17px; width: 52px; object-fit: cover; object-position: left center; }
      .caret { display: none; }
      .items { gap: 12px; }
      .contact { padding: 9px 12px; font-size: 13px; }
      .search-btn { width: 32px; height: 32px; }
      .nav-actions { gap: 6px; }
    }

@media (prefers-reduced-motion: reduce) {
      .hero > img { animation: none; }
      .bar, .dd, .stack img, .tile img { transition-duration: 0.01s !important; }
    }

/* Language switcher (EN / Arabic) */
.lang { position: relative; display: flex; align-items: center; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.lang-opt { height: 30px; min-width: 38px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.72); transition: background 0.3s, color 0.3s; }
.lang-opt[lang="ar"] { font-family: "Noto Naskh Arabic", "Geeza Pro", serif; font-size: 14px; }
.lang-opt:hover { color: #fff; }
.lang-opt.is-current { background: #fff; color: #14100c; }
.lang-tip {
  position: absolute; top: calc(100% + 10px); right: 0; padding: 8px 12px; border-radius: 10px; white-space: nowrap;
  background: rgb(24, 22, 21); color: #fff; font-size: 12.5px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.25s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.lang-tip.is-on { opacity: 1; transform: none; }
@media (max-width: 560px) { .lang-opt { min-width: 32px; padding: 0 8px; font-size: 12px; height: 28px; } }
