/* Aljeeraan Top Header
   Composed entirely in CSS from two media-library assets only:
   aljeeraan-logo.jpg (logo card) and aljeeraan-skyline.png (buildings strip),
   injected as CSS vars by modules/top-header.php.
   Background, buttons, dividers, icons spacing and the dropdown are pure CSS. */

.alj-topbar {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  /* Ignored inside the block wrapper; keeps the bar full-width when it has to
     attach to the theme's flex-row body instead. */
  flex: 0 0 100%;
  margin: 0;
  padding: 0;
  line-height: 1;
}
/* The theme lays body out as a flex row, so #c27-site-wrapper sizes to its
   content; pin its width so the page doesn't collapse. */
#c27-site-wrapper { width: 100%; }

.alj-topbar__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 88px;
  padding: 8px 20px;
  border-radius: 0;
  background:
    radial-gradient(120% 160% at 88% 0%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 42%),
    linear-gradient(255deg, #7a4ff0 0%, #5636d6 38%, #3a2aa8 72%, #322597 100%);
}
/* Buildings strip: centered, kept at its native 1595x262 proportions. */
.alj-topbar__bar::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  height: 72%;
  aspect-ratio: 1595 / 262;
  background: var(--alj-skyline) center bottom / 100% 100% no-repeat;
  border-radius: 0;
  opacity: .45;
  pointer-events: none;
}

/* Logo (tightly cropped raster, no surrounding white frame). */
.alj-logo {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 auto;
  line-height: 0;
  overflow: hidden;
  border-radius: 18px;
}
.alj-logo img {
  display: block;
  height: 84px;
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Nav row (RTL: first item sits at the right). */
.alj-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}
.alj-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  border: 0;
  background: none;
  color: #fff;
  font: 600 15px/1 inherit;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.alj-item svg { display: block; }
.alj-item:focus-visible,
.alj-logo:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  border-radius: 12px;
}
.alj-sep {
  flex: 0 0 auto;
  width: 1px;
  align-self: stretch;
  margin: 16px 2px;
  background: rgba(255,255,255,.35);
}

/* Add-business pill. */
.alj-add {
  background: #fff;
  color: #5b21b6;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 20px;
  box-shadow: 0 4px 14px rgba(20, 8, 60, .25);
}
.alj-add:hover { background: #f3ecff; }

/* Language dropdown: pure CSS, open while button or a link has focus. */
.alj-lang { position: relative; }
.alj-language-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  display: none;
  min-width: 140px;
  background: #fff;
  border-radius: 12px;
  padding: 7px;
  box-shadow: 0 8px 25px rgba(0,0,0,.18);
  line-height: 1.4;
  text-align: start;
}
.alj-lang:focus-within .alj-language-menu { display: block; }
.alj-language-menu a {
  display: block;
  padding: 9px 12px;
  color: #3e147e;
  text-decoration: none;
  border-radius: 8px;
}
.alj-language-menu a:hover,
.alj-language-menu a:focus { background: #f3ecff; }

@media (max-width: 700px) {
  .alj-topbar__bar { min-height: 64px; padding: 8px 12px; border-radius: 0; gap: 4px; }
  .alj-topbar__bar::after { border-radius: 0; }
  .alj-logo { border-radius: 12px; }
  .alj-logo img { height: 52px; }
  .alj-item { font-size: 13px; gap: 5px; padding: 8px 2px; }
  .alj-item .alj-label { display: none; }
  .alj-add .alj-label { display: inline; }
  .alj-add { padding: 9px 14px; }
  .alj-sep { margin: 10px 0; }
  .alj-language-menu { min-width: 105px; font-size: 13px; }
}
