.site-footer {
  background: #0b2d53;
  color: #ffffff;
  border-top: 1px solid #16487e;
  padding: 32px 16px 16px;
}

.footer-inner {
  width: 100%;
}

.site-footer .footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 20px;
  align-items: start;
}

.site-footer .footer-brand {
  max-width: 360px;
}

.site-footer .footer-cols {
  display: contents;
}

.site-footer .footer-logo {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
}

.site-footer .footer-logo img {
  display: block;
  width: auto;
  height: 38px;
}

.site-footer .footer-brand p {
  max-width: 340px;
  margin: 0;
  color: #d4e4f7;
  font-size: 14px;
  line-height: 1.6;
}

.site-footer .footer-col {
  min-width: 0;
}

.site-footer .footer-col h4 {
  margin: 2px 0 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.site-footer .footer-icon {
  display: inline-block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  vertical-align: -3px;
}

.site-footer .footer-icon-brand {
  stroke-width: 1.5;
}

.site-footer .footer-col a {
  display: block;
  width: fit-content;
  margin: 0 0 8px;
  color: #d4e4f7;
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.site-footer .footer-contact {
  display: block;
}

.site-footer .footer-contact h4 {
  margin-bottom: 12px;
}

.site-footer .footer-contact p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: #d4e4f7;
  font-size: 14px;
  line-height: 1.45;
}

.site-footer .footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
}

.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 20px;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(212, 228, 247, 0.24);
  color: #d4e4f7;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

@media (max-width: 1024px) {
  .site-footer {
    padding: 26px 14px 16px;
  }

  .site-footer .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer .footer-contact {
    grid-column: auto;
  }

  .site-footer .footer-bottom {
    justify-content: flex-start;
    gap: 6px 24px;
  }
}

@media (max-width: 600px) {
  .site-footer .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer .footer-contact {
    grid-column: 1 / -1;
  }

  .site-footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ============================================================
   FOLDABLE DEVICE SUPPORT
   ============================================================ */

/* Galaxy Fold / ultra-narrow foldables (closed-fold state) */
@media (max-width: 280px) {
  .site-footer {
    padding: 20px 10px 12px;
  }
  .site-footer .footer-top {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .site-footer .footer-brand {
    grid-column: 1;
  }
  .site-footer .footer-contact {
    grid-column: 1;
  }
  .site-footer .footer-col h4 {
    font-size: 11px;
  }
  .site-footer .footer-col a {
    font-size: 13px;
  }
  .site-footer .footer-brand p {
    font-size: 13px;
  }
  .site-footer .footer-bottom {
    font-size: 11px;
  }
}

/* Landscape foldables (phone-like device rotated) */
@media (max-height: 500px) and (orientation: landscape) {
  .site-footer {
    padding: 16px 12px 12px;
  }
  .site-footer .footer-top {
    gap: 12px;
  }
}

/* Dynamic viewport units for notched/foldable screens */
@supports (height: 100dvh) {
  .site-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-col a {
    transition: none;
  }
}

/* Keep every page footer aligned with the index layout. */
.site-footer {
  padding: 48px 48px 32px;
  background: linear-gradient(160deg, #061a32 0%, #0b2d53 100%);
  border-top: 0;
  color: #fff;
}

.site-footer .footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
  margin: 0 0 60px;
}

.site-footer .footer-brand {
  max-width: 360px;
  grid-column: auto;
}

.site-footer .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.site-footer .footer-brand p {
  max-width: 320px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.site-footer .footer-cols {
  display: flex;
  gap: 60px;
}

.site-footer .footer-col {
  min-width: 0;
  grid-column: auto;
}

.site-footer .footer-col h4 {
  margin: 0 0 18px;
  color: #9cc0ea;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: left;
  text-transform: uppercase;
}

.site-footer .footer-col a {
  display: block;
  width: fit-content;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: normal;
}

.site-footer .footer-col a:hover {
  color: var(--orange-light, #ff7e42);
}

.site-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 32px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.55);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: normal;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .site-footer {
    padding: 48px 32px 32px;
  }

  .site-footer .footer-top {
    flex-direction: column;
    gap: 40px;
  }
}

@media (max-width: 700px) {
  .site-footer {
    padding: 44px 20px 28px;
  }

  .site-footer .footer-top {
    gap: 32px;
    margin-bottom: 40px;
  }

  .site-footer .footer-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .site-footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.6;
  }
}

@media (max-width: 380px) {
  .site-footer .footer-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 280px) {
  .site-footer {
    padding: 20px 10px 12px;
  }

  .site-footer .footer-col h4 {
    font-size: 11px;
  }

  .site-footer .footer-col a,
  .site-footer .footer-brand p {
    font-size: 13px;
  }

  .site-footer .footer-bottom {
    font-size: 11px;
  }
}