/* Site footer — compact bar, frosted glass (blur), sticks to bottom in flex layouts */

.site-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  margin-top: auto;
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) 8px
    max(12px, env(safe-area-inset-left, 0px));
  /* خلفية خفيفة + بلور — ليست شفافة بالكامل */
  background: rgba(6, 8, 14, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid rgba(224, 49, 49, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 -4px 24px rgba(0, 0, 0, 0.15);
  color: rgba(196, 202, 214, 0.9);
}

.landing-body .site-footer {
  margin-top: 0;
}

.site-footer__inner {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  box-sizing: border-box;
}

/* أعمدة تمتد على كامل عرض الشريط (لا تتجمّد في الوسط) */
.site-footer__grid {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr)) minmax(200px, 1.1fr);
  gap: 8px clamp(10px, 2.4vw, 28px);
  align-items: start;
  justify-content: stretch;
  justify-items: stretch;
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }
}

@media (max-width: 520px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

.site-footer__brand {
  min-width: 0;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 4px;
}

.site-footer__logo img {
  display: block;
  width: 28px;
  height: auto;
  border-radius: 8px;
}

.site-footer__tagline {
  margin: 0 0 6px;
  font-size: 0.7rem;
  line-height: 1.35;
  color: rgba(180, 188, 202, 0.82);
  max-width: 42ch;
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-footer__soc {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(240, 242, 248, 0.85);
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}

.site-footer__soc:hover {
  border-color: rgba(224, 49, 49, 0.45);
  background: rgba(224, 49, 49, 0.12);
  color: #fff;
}

.site-footer__soc svg {
  width: 13px;
  height: 13px;
}

.site-footer__col {
  min-width: 0;
}

.site-footer__h {
  margin: 0 0 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 246, 252, 0.95);
}

.site-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-footer__list a {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(200, 206, 220, 0.88);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer__list a:hover {
  color: #ff6b6b;
}

.site-footer__news {
  min-width: 0;
}

.site-footer__news-lead {
  margin: 0 0 6px;
  font-size: 0.7rem;
  line-height: 1.35;
  color: rgba(180, 188, 202, 0.82);
}

.site-footer__form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
}

.site-footer__input {
  box-sizing: border-box;
  flex: 1 1 120px;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
}

.site-footer__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.site-footer__input:focus {
  outline: none;
  border-color: rgba(224, 49, 49, 0.5);
  box-shadow: 0 0 0 2px rgba(224, 49, 49, 0.1);
}

.site-footer__submit {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(224, 49, 49, 0.55);
  background: linear-gradient(180deg, rgba(160, 28, 28, 0.95), rgba(110, 18, 18, 0.98));
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}

.site-footer__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(224, 49, 49, 0.2);
}

.site-footer__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.site-footer__form-msg {
  flex: 1 0 100%;
  margin: 2px 0 0;
  font-size: 0.68rem;
  font-weight: 600;
}

.site-footer__form-msg.is-ok {
  color: #86efac;
}

.site-footer__form-msg.is-warn {
  color: #fde68a;
}


.site-footer__bottom {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}

.site-footer__bottom p {
  margin: 0;
  font-size: 0.68rem;
  color: rgba(160, 168, 184, 0.85);
}

.site-footer__contact {
  color: #cfcbe8;
  text-decoration: none;
  font-weight: 600;
}

.site-footer__contact:hover {
  color: #fff;
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.8);
}

.site-footer .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* RTL / عربي: التذييل يبقى بعرض الشاشة وفي آخر الصفحة */
html[dir="rtl"] .site-footer {
  width: 100%;
  margin-inline: 0;
}

body.page-shell:has(.site-footer) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body.page-shell:has(.site-footer) > main {
  flex: 1 1 auto;
}


/* الصفحة الرئيسية: التذييل بعد المحتوى — بعرض كامل */
.landing-body .site-footer {
  width: 100%;
}

/* Login / register: keep card centered, footer at bottom */
body.auth-with-site-footer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}
body.auth-with-site-footer .auth-main-fill {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 16px 12px;
  box-sizing: border-box;
}
