/* ==========================================================================
   Tawak site chrome — the shared header nav and footer for every public page
   (everything except the Hub, which has its own signed-in shell).

   Class-based on purpose: every page already ships older bare `nav {}` rules
   and some carry `.nav-link` / `.nav-btn` / `.logo` rules of their own, and
   `nav.site-nav .x` outranks all of them without needing `!important`.
   ========================================================================== */

nav.site-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 1000;
  background: rgba(0, 19, 31, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

nav.site-nav .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

nav.site-nav .logo svg {
  height: 36px;
  width: auto;
}

nav.site-nav .nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

nav.site-nav .nav-link {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

nav.site-nav .nav-link:hover {
  color: #ffffff;
}

nav.site-nav .nav-btn {
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

nav.site-nav .nav-btn:hover {
  border-color: #59ED97;
  color: #59ED97;
  background: rgba(89, 237, 151, 0.05);
}

/* ----- Footer ----- */
footer.site-footer {
  margin-top: 72px;
  padding: 22px 24px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

/* The page's own bare `nav {}` rule would otherwise float this landmark. */
footer.site-footer nav {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  width: auto;
  max-width: none;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  z-index: auto;
}

footer.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

footer.site-footer a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease;
}

footer.site-footer a:hover {
  color: #ffffff;
}

footer.site-footer p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

/* ----- Typography safety net (shared by every page) ----- */
/* Stops a lone word or two being stranded on the last line of a paragraph or
   heading, which reads as broken formatting.
   Measured, not guessed: across contact / about / privacy / islamicdate,
   `text-wrap: pretty` produced EXACTLY the same line breaks as normal (4 short
   last lines on /islamicdate alone), while `text-wrap: balance` removed all of
   them (0 of 40 paragraphs). Chrome only balances blocks up to ~6 lines and
   silently falls back to normal wrapping beyond that, so long paragraphs are
   unaffected. Content and structure are untouched. */
p, li, h1, h2, h3, h4, summary {
  text-wrap: balance;
}

@media (max-width: 768px) {
  nav.site-nav {
    top: 12px;
    width: calc(100% - 24px);
    padding: 10px 14px;
  }

  nav.site-nav .logo svg {
    height: 22px;
  }

  nav.site-nav .nav-links {
    gap: 14px;
  }

  nav.site-nav .nav-link {
    font-size: 12.5px;
  }

  nav.site-nav .nav-btn {
    padding: 5px 10px;
  }

  footer.site-footer {
    margin-top: 56px;
  }
}
