/**
 * Site chrome — top-bar + main-header + drawer
 * Constitutions #03 Al-Takfeel · #12 UX/UI · #22 Luxurious Simplicity
 */
:root {
  --chrome-space-1: 8px;
  --chrome-space-2: 16px;
  --chrome-space-3: 24px;
  --chrome-space-4: 32px;
  --chrome-gold: #c5a46f;
  --chrome-gold-bright: #d4af37;
  /* WCAG AA ≥4.5:1 on #000 / #111 header surfaces */
  --chrome-gold-contrast: #e8c97a;
  --chrome-nav-ink: #f5f5f5;
  --chrome-black: #000;
  --chrome-ink: #1a1a1a;
  --chrome-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --chrome-duration: 0.28s;
  --chrome-radius: 8px;
  --radius-md: 10px;
  --site-topbar-h: 40px;
  --site-header-h: 72px;
  --site-chrome-h: calc(var(--site-topbar-h) + var(--site-header-h));
  /* −15% vs legacy 48px circles (social + header phone) */
  --chrome-circle-icon: 41px;
  --chrome-circle-glyph: 14px;
  --chrome-phone-glyph: 19px;
}

html {
  scroll-padding-top: calc(var(--site-chrome-h) + 16px);
}

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 900;
}

.top-bar {
  background: #0a0a0a;
  border-bottom: 1px solid rgba(197, 164, 111, 0.28);
  color: #f5f5f5;
  font-size: 0.8rem;
  line-height: 1.25;
}

.top-bar--desktop {
  display: none;
}

.top-bar--mobile {
  display: block;
  overflow: hidden;
}

.top-bar__inner {
  width: min(100% - var(--chrome-space-4), 1200px);
  margin-inline: auto;
  min-height: var(--site-topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--chrome-space-2);
  padding-block: 8px;
}

.top-bar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
}

.top-bar__separator {
  display: inline-flex;
  align-items: center;
  margin-inline: 10px;
  color: var(--chrome-gold-bright);
  font-weight: 400;
  line-height: 1;
  user-select: none;
  flex: 0 0 auto;
}

/* Mobile marquee — Ajman order, AD namespace */
.top-bar-marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: 0.55rem 0;
}

.top-bar-marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  animation: siteChromeMarquee 28s linear infinite;
  min-width: 200%;
}

.top-bar-marquee__link {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 600;
  padding-inline: 0.35rem;
}

.top-bar-marquee__link:hover {
  color: var(--chrome-gold-contrast);
}

.top-bar-marquee__dot {
  color: var(--chrome-gold-bright);
  opacity: 0.7;
}

@keyframes siteChromeMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

[dir="rtl"] .top-bar-marquee__track {
  animation-name: siteChromeMarqueeRtl;
}

@keyframes siteChromeMarqueeRtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

@media (prefers-reduced-motion: reduce) {
  .top-bar-marquee__track {
    animation: none;
  }
}

.top-bar__link {
  color: #f5f5f5;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--chrome-duration) var(--chrome-ease);
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-block: 12px;
  padding-inline: 12px;
  margin-inline: 4px;
  text-decoration: none;
}

.top-bar__link:hover,
.top-bar__link--lang {
  color: #e8c97a;
}

.top-bar__link--lang {
  font-weight: 700;
}

.top-bar__social,
.site-footer__social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-bar__social-link,
.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(232, 201, 122, 0.45);
  color: var(--chrome-gold-contrast);
  background: rgba(255, 255, 255, 0.03);
  transition:
    transform var(--chrome-duration) var(--chrome-ease),
    background var(--chrome-duration) var(--chrome-ease),
    border-color var(--chrome-duration) var(--chrome-ease),
    color var(--chrome-duration) var(--chrome-ease);
}

.top-bar__social-link {
  width: var(--chrome-circle-icon);
  height: var(--chrome-circle-icon);
  min-width: var(--chrome-circle-icon);
  min-height: var(--chrome-circle-icon);
}

.site-footer__social-link {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
}

.top-bar__social-link svg {
  width: var(--chrome-circle-glyph);
  height: var(--chrome-circle-glyph);
}

.top-bar__social-link:hover,
.site-footer__social-link:hover {
  transform: translateY(-2px);
  background: var(--chrome-gold-contrast);
  border-color: var(--chrome-gold-contrast);
  color: #111;
}

.main-header {
  position: relative;
  z-index: 1;
  height: var(--site-header-h);
  background: #000;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(197, 164, 111, 0.35);
}

.main-header__inner {
  width: min(100% - var(--chrome-space-4), 1200px);
  margin-inline: auto;
  height: var(--site-header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--chrome-space-3);
}

.main-header__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}

.main-header__logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.main-header__nav {
  display: none;
  justify-content: center;
}

.main-header__list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-header__item {
  position: relative;
}

.main-header__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  min-width: 48px;
  padding: 12px 14px;
  margin: 0;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: var(--chrome-nav-ink);
  font: inherit;
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
}

.main-header__link:hover,
.main-header__link--active {
  color: #fff;
  font-weight: 700;
}

.main-header__link::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--chrome-gold-contrast);
  transform: scaleX(0);
  transition: transform var(--chrome-duration) var(--chrome-ease);
}

.main-header__link:hover::after,
.main-header__link--active::after {
  transform: scaleX(1);
}

.main-header__caret {
  width: 0;
  height: 0;
  border-inline: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.75;
}

.main-header__dropdown {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 4px);
  min-width: 220px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #111;
  border: 1px solid rgba(197, 164, 111, 0.35);
  border-radius: var(--chrome-radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity var(--chrome-duration) var(--chrome-ease),
    transform var(--chrome-duration) var(--chrome-ease),
    visibility var(--chrome-duration) var(--chrome-ease);
  z-index: 950;
}

.main-header__item--has-dropdown:hover .main-header__dropdown,
.main-header__item--has-dropdown:focus-within .main-header__dropdown,
.main-header__item--has-dropdown.is-open .main-header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-header__dropdown-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 6px;
  color: var(--chrome-nav-ink);
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
}

.main-header__dropdown-link:hover,
.main-header__dropdown-link:focus-visible {
  background: rgba(232, 201, 122, 0.16);
  color: var(--chrome-gold-contrast);
}

.main-header__help {
  display: flex;
  align-items: center;
  gap: var(--chrome-space-2);
  justify-self: end;
}

/* Desktop/mobile: no phone/help block — language pill only (Ajman order). */
.main-header__phone,
.main-header__phone-icon,
.main-header__phone-copy,
.main-header__phone-label,
.main-header__phone-number,
body.site-body--home .main-header__phone,
body.site-body--home .main-header__phone-icon {
  display: none !important;
}

.main-header__lang,
body.site-body--home .main-header__lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 201, 122, 0.55);
  color: var(--chrome-gold-contrast);
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.35);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--chrome-duration) var(--chrome-ease),
    color var(--chrome-duration) var(--chrome-ease),
    border-color var(--chrome-duration) var(--chrome-ease);
}

.main-header__lang:hover {
  background: var(--chrome-gold-contrast);
  border-color: var(--chrome-gold-contrast);
  color: #111;
}

.main-header__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(197, 164, 111, 0.4);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.main-header__toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--chrome-gold-bright);
  border-radius: 2px;
  transition: transform var(--chrome-duration) var(--chrome-ease), opacity var(--chrome-duration) var(--chrome-ease);
}

body.is-drawer-open .main-header__toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.is-drawer-open .main-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

body.is-drawer-open .main-header__toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-drawer__backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.5);
}

.site-drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 1000;
  width: min(320px, 88vw);
  height: 100dvh;
  overflow-y: auto;
  background: #111;
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  padding: 0;
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform var(--chrome-duration) var(--chrome-ease);
}

html[dir="rtl"] .site-drawer {
  transform: translateX(105%);
}

body.is-drawer-open .site-drawer {
  transform: none;
}

.site-drawer[hidden],
.site-drawer__backdrop[hidden] {
  display: none !important;
}

body.is-drawer-open .site-drawer__backdrop {
  display: block !important;
}

.site-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--chrome-space-2);
  padding: var(--chrome-space-3);
  background: #000;
  border-bottom: 1px solid rgba(197, 164, 111, 0.35);
}

.site-drawer__brand {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.site-drawer__logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: inline-start center;
}

.site-drawer__close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: var(--chrome-radius);
  border: 1px solid rgba(197, 164, 111, 0.45);
  font-size: 1.6rem;
  line-height: 1;
  background: #111;
  color: #fff;
}

.site-drawer__langs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px 16px 8px;
  background: #000;
  border-bottom: 1px solid rgba(197, 164, 111, 0.22);
}

.site-drawer__lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--chrome-radius);
  border: 1px solid rgba(197, 164, 111, 0.4);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  background: #141414;
  text-decoration: none;
}

.site-drawer__lang--active,
.site-drawer__lang:hover {
  background: var(--chrome-gold);
  border-color: var(--chrome-gold);
  color: #000;
}

.site-drawer__nav {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #111;
}

.site-drawer__link {
  position: relative;
  display: block;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: #111;
  transition:
    color var(--chrome-duration) var(--chrome-ease),
    background var(--chrome-duration) var(--chrome-ease);
}

.site-drawer__link:nth-child(even) {
  background: #181818;
}

.site-drawer__link:hover,
.site-drawer__link:focus-visible {
  color: var(--chrome-gold-bright);
  background: #161616;
}

.site-drawer__link:hover::before,
.site-drawer__link:focus-visible::before {
  content: "";
  position: absolute;
  inset-block: 30%;
  inset-inline-start: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--chrome-gold);
}

.site-drawer__actions {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: var(--chrome-space-3);
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-drawer__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  height: 52px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform var(--chrome-duration) var(--chrome-ease),
    box-shadow var(--chrome-duration) var(--chrome-ease),
    background var(--chrome-duration) var(--chrome-ease),
    border-color var(--chrome-duration) var(--chrome-ease);
}

.site-drawer__action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  line-height: 0;
}

.site-drawer__action-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.site-drawer__action--call {
  background: transparent;
  color: var(--chrome-gold) !important;
  border-color: rgba(197, 164, 111, 0.55);
}

.site-drawer__action--call:hover {
  background: rgba(197, 164, 111, 0.08);
  border-color: var(--chrome-gold);
}

.site-drawer__action--wa {
  background: #121a17;
  color: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(46, 125, 90, 0.45);
}

.site-drawer__action--wa .site-drawer__action-icon {
  color: #3dba7a;
}

.site-drawer__action--wa:hover {
  background: #152019;
  border-color: rgba(61, 186, 122, 0.55);
}

.site-drawer__action--consult {
  background: linear-gradient(180deg, #d4af37 0%, #c5a46f 100%);
  color: #111 !important;
  border-color: #c5a46f;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 8px 20px rgba(197, 164, 111, 0.22);
}

.site-drawer__action--consult:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 10px 24px rgba(197, 164, 111, 0.3);
}

.site-footer__social {
  margin-top: var(--chrome-space-3);
}

@media (min-width: 993px) {
  .top-bar--desktop {
    display: block;
  }

  .top-bar--mobile {
    display: none;
  }

  .main-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
  }

  .main-header__nav,
  body.site-body--home .main-header__nav {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    align-items: center;
  }

  .main-header__list {
    justify-content: center;
    flex-wrap: nowrap;
  }

  .main-header__toggle {
    display: none;
  }

  .site-drawer,
  .site-drawer__backdrop {
    display: none !important;
  }

  html[lang="en"] .main-header__list {
    flex-wrap: nowrap;
    gap: 8px;
  }

  html[lang="en"] .main-header__nav .main-header__link {
    padding-inline: 12px;
    white-space: nowrap;
    min-height: 48px;
    min-width: 48px;
  }
}

@media (max-width: 992px) {
  .main-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--chrome-space-2);
  }

  .main-header__brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .main-header__logo {
    max-width: min(315px, 52vw);
    width: auto;
    height: 48px;
    object-fit: contain;
    object-position: inline-start center;
  }

  .main-header__help {
    flex: 0 0 auto;
    gap: 0.55rem;
  }
}

.site-footer__social {
  gap: 10px;
  margin-top: var(--chrome-space-3);
}

/* Floating call FAB — −15% vs 52px base in gp-legal.css (inner pages: loads after gp) */
.gp-float__btn--call {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.gp-float__btn--call .gp-float__icon {
  width: var(--chrome-phone-glyph);
  height: var(--chrome-phone-glyph);
}

@media (prefers-reduced-motion: reduce) {
  .top-bar__social-link,
  .site-footer__social-link,
  .main-header__link::after,
  .main-header__dropdown,
  .site-drawer,
  .main-header__toggle-bar {
    transition: none;
  }

  .top-bar__social-link:hover,
  .site-footer__social-link:hover {
    transform: none;
  }
}
