/* ===== SITE FOOTER ===== */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;600;700;800&family=Inter:wght@400;600;700&display=swap');

.site-footer {
  background: var(--card, #161b22);
  border-top: 1px solid var(--border, #30363d);
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
  font-family: 'Heebo', 'Inter', system-ui, -apple-system, sans-serif;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Top section: brand + columns */
.site-footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.site-footer-brand .footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text, #c9d1d9);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.site-footer-brand p {
  font-size: 0.88rem;
  color: var(--text-dim, #8b949e);
  line-height: 1.65;
  max-width: 260px;
}

.footer-social-wrap {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 100%;
}

.footer-fb-follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #1877f2;
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  line-height: 1.3;
}

.footer-fb-follow:hover {
  background: #166fe5;
  transform: translateY(-1px);
}

.footer-fb-follow .footer-fb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  max-height: 20px;
  flex-shrink: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  font-family: system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.footer-fb-follow svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0;
}

/* Footer language toggles (injected FB labels + legal pages) */
.site-footer .en-content { display: block; }
.site-footer .he-content { display: none; }
html[dir="rtl"] .site-footer .en-content { display: none; }
html[dir="rtl"] .site-footer .he-content { display: block; }
html[dir="rtl"] .site-footer .footer-fb-follow .he-content { display: inline; }
html[dir="ltr"] .site-footer .footer-fb-follow .en-content { display: inline; }

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text, #c9d1d9);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: var(--text-dim, #8b949e);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col ul li a:hover {
  color: var(--blue, #58a6ff);
}

/* Divider */
.site-footer-divider {
  border: none;
  border-top: 1px solid var(--border, #30363d);
  margin: 0 0 1.25rem;
}

.footer-appstore-row .google-play-badge,
.footer-appstore-row a.footer-play-link,
.footer-appstore-row a.nav-play-link {
  display: none !important;
}

.app-store-badge--official {
  display: inline-block;
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  height: auto;
  min-height: 0;
  max-height: none;
  max-width: none;
  line-height: 0;
}
.app-store-badge__img {
  display: block;
  width: 135px;
  height: 40px;
  max-width: min(135px, 72vw);
  height: auto;
  aspect-ratio: 135 / 40;
}

.footer-appstore-row .app-store-badge--official {
  min-width: 0;
}

.footer-appstore-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
  padding-top: 0.15rem;
  width: 100%;
}

.footer-appstore-row .app-store-badge:not(.app-store-badge--official) {
  display: none !important;
}

.footer-appstore-row .app-store-badge--official {
  width: auto;
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  max-width: none;
  padding: 0;
}

.footer-appstore-row .app-store-badge {
  width: auto;
  flex: 0 0 auto;
  max-width: 10rem;
  min-width: 8.35rem;
  min-height: 40px;
  height: 40px;
  max-height: 40px;
  justify-content: flex-start;
  padding: 0.35rem 0.65rem 0.35rem 0.52rem;
  border-radius: 9px;
  border-color: rgba(255, 255, 255, 0.35);
}

.footer-appstore-row .app-store-badge__apple {
  width: 1.625rem !important;
  height: 1.625rem !important;
  max-width: 26px !important;
  max-height: 26px !important;
}

.footer-appstore-row .app-store-badge__line1 {
  font-size: 0.5rem;
}

.footer-appstore-row .app-store-badge__line2 {
  font-size: 1rem;
}

/* Bottom bar */
.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-footer-bottom .footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim, #8b949e);
}

.footer-lang-toggle {
  display: flex;
  gap: 0.4rem;
}

.footer-lang-btn {
  background: var(--card2, #21262d);
  border: 1px solid var(--border, #30363d);
  color: var(--text-dim, #8b949e);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.footer-lang-btn:hover,
.footer-lang-btn.active {
  border-color: var(--blue, #58a6ff);
  color: var(--blue, #58a6ff);
}

/* RTL support */
html[dir="rtl"] .site-footer-brand p {
  text-align: right;
}

/* Mobile */
@media (max-width: 768px) {
  .site-footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .site-footer-brand {
    grid-column: 1 / -1;
  }
  .site-footer-brand p {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 2rem 1.25rem 1.25rem;
  }
  .site-footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
