/* Syrian Postal Institution – shared public footer V3
   Final cascade override; page functionality and scripts remain unchanged. */
body .site-footer {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  background: #031d2b !important;
  color: #d9e8ed !important;
  font-family: 'Cairo', Tahoma, Arial, sans-serif !important;
}
body .site-footer, body .site-footer * { box-sizing: border-box !important; }
body .site-footer .footer-main,
body .site-footer .footer-bottom {
  width: calc(100% - 40px) !important;
  max-width: none !important;
  margin-inline: auto !important;
}
body .site-footer .footer-main {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2.2fr) minmax(245px, 1fr) !important;
  grid-template-areas: 'brand description state' 'links links links' !important;
  gap: 15px 24px !important;
  align-items: center !important;
  justify-items: stretch !important;
  padding: 25px 0 18px !important;
  border-bottom: 1px solid rgba(255,255,255,.13) !important;
}
html[dir="rtl"] body .site-footer .footer-main { direction: rtl !important; }
html[dir="ltr"] body .site-footer .footer-main { direction: ltr !important; }
body .site-footer .footer-main > * { min-width: 0 !important; max-width: 100% !important; }
body .site-footer .footer-brand {
  grid-area: brand !important;
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  justify-self: start !important;
  gap: 11px !important;
  width: max-content !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body .site-footer .footer-brand .brand-mark {
  flex: 0 0 auto !important;
  margin: 0 !important;
}
body .site-footer .footer-brand .brand-copy {
  display: flex !important;
  flex-direction: column !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  line-height: 1.55 !important;
}
body .site-footer .footer-brand .brand-copy strong {
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  letter-spacing: 0 !important;
}
body .site-footer .footer-brand .brand-copy small {
  font-size: 13px !important;
  line-height: 1.6 !important;
  white-space: nowrap !important;
}
body .site-footer .footer-main > p {
  grid-area: description !important;
  justify-self: center !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.9 !important;
  text-align: center !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}
body .site-footer .footer-shortcuts {
  grid-area: links !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: stretch !important;
  gap: clamp(20px, 3vw, 50px) !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 6px 0 2px !important;
  border: 0 !important;
  direction: inherit !important;
}
body .site-footer .footer-shortcuts > a {
  display: inline-block !important;
  flex: 0 0 auto !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.7 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  padding: 3px 0 !important;
  margin: 0 !important;
}
body .site-footer .footer-state {
  grid-area: state !important;
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-self: end !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: max-content !important;
  white-space: nowrap !important;
  margin: 0 !important;
  padding-inline-start: 14px !important;
}
body .site-footer .footer-state img { flex: 0 0 auto !important; }
body .site-footer .footer-state span { flex: 0 0 auto !important; }
body .site-footer .footer-state b {
  font-size: 14px !important;
  line-height: 1.6 !important;
  white-space: nowrap !important;
}
body .site-footer .footer-state small { font-size: 12px !important; line-height: 1.5 !important; }
body .site-footer .footer-bottom {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 15px !important;
  padding-block: 12px 16px !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}
/* Intermediate screens: every phrase stays intact, while groups move to new rows. */
@media (max-width: 1600px) {
  body .site-footer .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas: 'brand state' 'description description' 'links links' !important;
    gap: 12px 18px !important;
  }
  body .site-footer .footer-main > p { justify-self: center !important; }
}
@media (max-width: 760px) {
  body .site-footer .footer-main,
  body .site-footer .footer-bottom { width: calc(100% - 28px) !important; }
  body .site-footer .footer-main {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: 'brand' 'description' 'links' 'state' !important;
    justify-items: start !important;
    gap: 13px !important;
    padding: 23px 0 18px !important;
  }
  body .site-footer .footer-brand { justify-self: start !important; max-width: 100% !important; }
  body .site-footer .footer-brand .brand-copy strong { font-size: clamp(14px, 3.6vw, 18px) !important; }
  body .site-footer .footer-brand .brand-copy small { font-size: 12px !important; }
  body .site-footer .footer-main > p {
    justify-self: stretch !important;
    width: auto !important;
    max-width: 100% !important;
    text-align: start !important;
    white-space: normal !important;
    text-wrap: balance !important;
    font-size: 15px !important;
    line-height: 1.9 !important;
  }
  body .site-footer .footer-shortcuts {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 8px 20px !important;
    padding: 0 !important;
  }
  body .site-footer .footer-shortcuts > a { font-size: 15px !important; }
  body .site-footer .footer-state {
    justify-self: start !important;
    width: auto !important;
    padding-inline-start: 0 !important;
    border-inline-start: none !important;
    white-space: normal !important;
  }
  body .site-footer .footer-state b { white-space: normal !important; }
  body .site-footer .footer-bottom { align-items: flex-start !important; flex-wrap: wrap !important; }
}
@media (max-width: 420px) {
  body .site-footer .footer-brand .brand-copy strong { font-size: 14px !important; }
  body .site-footer .footer-shortcuts > a { font-size: 14px !important; }
}
/* V81's existing JS intentionally splits the Arabic brand into two block spans.
   Rejoin them visually without altering scripts, translations or page behaviour. */
body .site-footer .footer-brand .brand-copy strong.v81-brand-two-line,
body .site-footer .footer-brand .brand-copy strong#footer-brand-name {
  display: inline-block !important;
  width: max-content !important;
  max-width: none !important;
}
body .site-footer .footer-brand .brand-copy strong.v81-brand-two-line > span {
  display: inline !important;
  white-space: nowrap !important;
}
body .site-footer .footer-brand .brand-copy strong.v81-brand-two-line > span + span::before {
  content: ' ' !important;
  white-space: pre !important;
}
