/* ===================================================================
   Public site chrome — header & footer (templates/components/site_*.html)
   and the dashboard brand mark. Colours come from the Ameen logo.
   =================================================================== */

:root {
  --ameen-site-navy: #091729;
  --ameen-site-ink: #0d1a2b;
  --ameen-site-blue: #1a66db;
  --ameen-site-orange: #f57829;
  --ameen-site-muted: #617082;
  --ameen-site-line: #e3eaf3;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.ameen-site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--ameen-site-line);
  box-shadow: 0 6px 24px rgba(9, 23, 41, 0.05);
}

.ameen-site-header .navbar {
  padding: 10px 0;
}

.ameen-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.ameen-site-brand__mark {
  width: 38px;
  height: auto;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ameen-site-brand:hover .ameen-site-brand__mark {
  transform: rotate(-6deg) scale(1.06);
}

.ameen-site-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.ameen-site-brand__name {
  font-family: 'Almarai', 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--ameen-site-navy);
}

.ameen-site-brand__tagline {
  font-size: 11px;
  font-weight: 600;
  color: var(--ameen-site-muted);
}

.ameen-site-toggler {
  border: 1px solid var(--ameen-site-line);
  border-radius: 12px;
  padding: 6px 12px;
  color: var(--ameen-site-navy);
}

.ameen-site-toggler:focus {
  box-shadow: 0 0 0 3px rgba(26, 102, 219, 0.2);
}

.ameen-site-nav .nav-link {
  position: relative;
  font-weight: 700;
  font-size: 14px;
  color: var(--ameen-site-ink);
  padding: 8px 14px !important;
  transition: color 0.2s ease;
}

.ameen-site-nav .nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--ameen-site-orange);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.ameen-site-nav .nav-link:hover,
.ameen-site-nav .nav-link.active {
  color: var(--ameen-site-blue);
}

.ameen-site-nav .nav-link:hover::after,
.ameen-site-nav .nav-link.active::after {
  transform: scaleX(1);
}

.ameen-site-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ameen-site-lang {
  margin: 0;
}

.ameen-site-lang button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--ameen-site-line);
  border-radius: 18px;
  background: #fff;
  color: var(--ameen-site-ink);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ameen-site-lang button:hover {
  border-color: var(--ameen-site-blue);
  color: var(--ameen-site-blue);
}

.ameen-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ameen-site-btn--primary {
  background: var(--ameen-site-blue);
  border: 1px solid var(--ameen-site-blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(26, 102, 219, 0.25);
}

.ameen-site-btn--primary:hover {
  background: #1555b8;
  color: #fff;
  transform: translateY(-1px);
}

.ameen-site-btn--ghost {
  border: 1px solid transparent;
  color: var(--ameen-site-ink);
}

.ameen-site-btn--ghost:hover {
  border-color: var(--ameen-site-line);
  color: var(--ameen-site-blue);
}

@media (max-width: 991.98px) {
  .ameen-site-nav {
    padding: 8px 0;
  }

  .ameen-site-actions {
    padding: 8px 0 12px;
    border-top: 1px solid var(--ameen-site-line);
  }
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.ameen-site-footer {
  background: var(--ameen-site-navy);
  color: #b8cce6;
  padding: 56px 0 24px;
  margin-top: auto;
}

.ameen-site-footer__brand img {
  width: 88px;
  height: auto;
  transition: transform 0.3s ease;
}

.ameen-site-footer__brand:hover img {
  transform: translateY(-3px);
}

.ameen-site-footer__about {
  margin: 16px 0 0;
  max-width: 340px;
  font-size: 14px;
  line-height: 1.8;
}

.ameen-site-footer__title {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.ameen-site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ameen-site-footer__links a {
  color: #b8cce6;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease, padding 0.2s ease;
}

.ameen-site-footer__links a:hover {
  color: var(--ameen-site-orange);
  padding-inline-start: 4px;
}

.ameen-site-footer__lang {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}

.ameen-site-footer__lang button {
  padding: 0;
  border: 0;
  background: none;
  color: #b8cce6;
  font-size: 14px;
}

.ameen-site-footer__lang button[aria-current="true"],
.ameen-site-footer__lang button:hover {
  color: #fff;
  font-weight: 700;
}

.ameen-site-footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(184, 204, 230, 0.18);
  font-size: 13px;
}

/* Pages with the site chrome: footer sits at the bottom of short pages. */
body.ameen-site-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.ameen-site-page > main {
  flex: 1 0 auto;
}

/* ── Dashboard brand (logged-in web app) ───────────────────────────── */
.ameen-dashboard-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.ameen-dashboard-brand img {
  width: 34px;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .ameen-site-header *,
  .ameen-site-footer * {
    transition: none !important;
  }
}

/* Welcome hero (02.01): the brand mark in place of the generic shield icon. */
.ameen-welcome-hero-logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(9, 23, 41, 0.25));
}
