/* ============================================================================
   istqdam — Navbar + Footer (Phase 1.5). Arabic-first, RTL, modern.
   Uses tokens from assets/common/css/arabic-theme.css. Prefix: .ist-nav / .ist-ft
   ============================================================================ */

/* ---------------- NAVBAR ---------------- */
.ist-nav {
  position: sticky; top: 0; z-index: 1000;
  background: #fff; border-bottom: 1px solid var(--ist-border);
  font-family: var(--ist-font-ar); box-shadow: 0 2px 14px rgba(16,42,55,.05);
}
.ist-nav__bar {
  max-width: 1180px; margin-inline: auto; padding: 0 20px;
  height: 74px; display: flex; align-items: center; gap: 24px; justify-content: space-between;
}
.ist-nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.35rem; color: var(--ist-primary); }
.ist-nav__brand-mark {
  width: 40px; height: 40px; border-radius: 11px; background: var(--ist-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.ist-nav__brand small { display: block; font-size: .62rem; font-weight: 600; color: var(--ist-text-muted); letter-spacing: .5px; }

.ist-nav__menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.ist-nav__link {
  display: inline-block; padding: 10px 14px; border-radius: 8px; text-decoration: none;
  color: var(--ist-text); font-weight: 600; font-size: .98rem; transition: .15s;
}
.ist-nav__link:hover, .ist-nav__link.is-active { color: var(--ist-primary); background: var(--ist-primary-soft); }

.ist-nav__right { display: flex; align-items: center; gap: 10px; }
.ist-nav__lang { display: flex; gap: 2px; background: var(--ist-muted-soft); border-radius: 999px; padding: 3px; }
.ist-nav__lang a { padding: 5px 12px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .82rem; color: var(--ist-text-muted); }
.ist-nav__lang a.is-active { background: #fff; color: var(--ist-primary); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.ist-nav__btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 10px;
  font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: .15s; white-space: nowrap; }
.ist-nav__btn--ghost { color: var(--ist-primary); border-color: var(--ist-border); background: #fff; }
.ist-nav__btn--ghost:hover { border-color: var(--ist-primary); }
.ist-nav__btn--primary { background: var(--ist-primary); color: #fff; }
.ist-nav__btn--primary:hover { background: var(--ist-primary-dark); color: #fff; }

/* user dropdown */
.ist-nav__user { position: relative; }
.ist-nav__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--ist-primary-soft);
  color: var(--ist-primary); border: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; cursor: pointer; }
.ist-nav__dropdown { position: absolute; inset-inline-start: 0; top: 52px; background: #fff; border: 1px solid var(--ist-border);
  border-radius: 12px; box-shadow: 0 12px 30px rgba(16,42,55,.12); min-width: 200px; padding: 8px; display: none; }
.ist-nav__user.is-open .ist-nav__dropdown { display: block; }
.ist-nav__dropdown a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ist-text); font-weight: 600; }
.ist-nav__dropdown a:hover { background: var(--ist-primary-soft); color: var(--ist-primary); }

/* mobile */
.ist-nav__toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--ist-text); cursor: pointer; }
/* The mobile collapse panel is hidden by default on ALL sizes; shown only when
   the hamburger opens it on mobile. (Previously it lacked a desktop rule and
   rendered a duplicate menu on desktop.) */
.ist-nav__collapse { display: none; }
@media (max-width: 980px) {
  .ist-nav__toggle { display: block; }
  .ist-nav__collapse { position: absolute; inset-inline: 0; top: 74px; background: #fff; border-bottom: 1px solid var(--ist-border);
    flex-direction: column; align-items: stretch; gap: 6px; padding: 16px 20px; box-shadow: 0 12px 30px rgba(16,42,55,.08); }
  .ist-nav.is-open .ist-nav__collapse { display: flex; }
  .ist-nav__menu { flex-direction: column; align-items: stretch; }
  .ist-nav__right { flex-direction: column; align-items: stretch; }
  .ist-nav__lang { justify-content: center; }
}

/* ---------------- FOOTER ---------------- */
.ist-ft { background: #10312B; color: #cfe6e0; font-family: var(--ist-font-ar); }
.ist-ft__top { max-width: 1180px; margin-inline: auto; padding: 56px 20px 36px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; }
.ist-ft__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: #fff; margin-bottom: 14px; }
.ist-ft__brand-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--ist-primary); color:#fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.ist-ft p { color: #a9cfc7; line-height: 1.9; margin: 0 0 10px; }
.ist-ft__title { color: #fff; font-weight: 700; font-size: 1.05rem; margin: 0 0 16px; }
.ist-ft__links { list-style: none; padding: 0; margin: 0; }
.ist-ft__links li { margin-bottom: 10px; }
.ist-ft__links a { color: #a9cfc7; text-decoration: none; transition: .15s; }
.ist-ft__links a:hover { color: #fff; }
.ist-ft__contact-item { display: flex; gap: 10px; margin-bottom: 12px; color: #a9cfc7; }
.ist-ft__social { display: flex; gap: 10px; margin-top: 14px; }
.ist-ft__social a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff;
  display: flex; align-items: center; justify-content: center; text-decoration: none; transition: .15s; }
.ist-ft__social a:hover { background: var(--ist-primary); }
.ist-ft__bottom { border-top: 1px solid rgba(255,255,255,.1); }
.ist-ft__bottom-in { max-width: 1180px; margin-inline: auto; padding: 20px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px; color: #8fb8af; font-size: .9rem; }

@media (max-width: 860px) {
  .ist-ft__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .ist-ft__top { grid-template-columns: 1fr; }
}
