/* HSG footer — 3-column brand / support / policy. Scoped to .hsg-footer only. */

.hsg-footer {
  --hsg-footer-bg: #0b1f4d;
  --hsg-footer-text: #c5d0e6;
  --hsg-footer-muted: #8d9bbb;
  --hsg-footer-line: rgba(255, 255, 255, 0.12);
  --hsg-footer-icon-bg: rgba(255, 255, 255, 0.08);
  font-family: var(--hsg-font);
  background: var(--hsg-footer-bg);
  color: var(--hsg-footer-text);
}

/*
 * Neutralize legacy Additional CSS brand/copyright pseudos.
 * WHY !important: Customizer Additional CSS loads after this sheet and sets
 * content/display on the same selectors.
 */
.footer-bottom.hsg-footer #bottom-wrap .border-wrap::before,
.footer-bottom.hsg-footer #bottom-wrap .border-wrap::after,
.footer-bottom.hsg-footer #bottom-wrap .container::before,
.footer-bottom.hsg-footer::after {
  content: none !important;
  display: none !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  position: static !important;
}

.hsg-footer #bottom-wrap.footer {
  background: transparent;
  color: inherit;
  padding: 40px 0 28px;
}

/*
 * WHY !important on display: Additional CSS sets
 * `.footer-bottom #bottom-wrap .border-wrap{display:flex}` later.
 */
.footer-bottom.hsg-footer #bottom-wrap .border-wrap.hsg-footer__grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px 32px;
  align-items: start;
  margin: 0;
  width: 100%;
  flex-wrap: unset;
  row-gap: 24px;
}

.hsg-footer__widgets {
  display: contents;
}

.hsg-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.hsg-footer__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 12px;
  border-radius: var(--hsg-radius);
  background: var(--hsg-surface);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hsg-footer__logo:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.hsg-footer__logo img {
  display: block;
  width: auto;
  height: 56px;
  max-width: 140px;
  object-fit: contain;
}

.hsg-footer__tagline {
  margin: 0;
  max-width: 34ch;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--hsg-footer-text);
}

.hsg-footer .bottom-widget {
  margin: 0;
  min-width: 0;
}

.hsg-footer .bottom-widget .widget {
  margin: 0;
}

.hsg-footer .bottom-widget .widget + .widget {
  margin-top: 0;
}

.hsg-footer .bottom-widget .widget-title {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: #fff;
  font-family: var(--hsg-font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}

.hsg-footer .bottom-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.hsg-footer .bottom-widget ul li {
  margin: 0;
  padding: 0;
  line-height: 1.45;
}

.hsg-footer .bottom-widget ul li a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 0;
  color: var(--hsg-footer-text);
  font-family: var(--hsg-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 160ms ease;
}

.hsg-footer .bottom-widget ul li a:hover,
.hsg-footer .bottom-widget ul li a:focus-visible {
  color: #fff;
}

/* Social icons (match existing Additional CSS behavior, scoped). */
.hsg-footer a[href*="facebook.com"]::before,
.hsg-footer a[href*="youtube.com"]::before {
  content: "";
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-color: var(--hsg-footer-icon-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px;
  transition: background-color 160ms ease;
}

.hsg-footer a[href*="facebook.com"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M14 8h3V4h-3c-2.8 0-4 1.8-4 4.3V10H7v4h3v8h4v-8h3l1-4h-4V8.6c0-.4.3-.6.6-.6z'/%3E%3C/svg%3E");
}

.hsg-footer a[href*="youtube.com"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M23 7.2a3 3 0 00-2.1-2.1C19 4.6 12 4.6 12 4.6s-7 0-8.9.5A3 3 0 001 7.2 31 31 0 00.6 12 31 31 0 001 16.8a3 3 0 002.1 2.1c1.9.5 8.9.5 8.9.5s7 0 8.9-.5a3 3 0 002.1-2.1 31 31 0 00.4-4.8 31 31 0 00-.4-4.8zM9.7 15.1V8.9l5.8 3.1z'/%3E%3C/svg%3E");
}

.hsg-footer a[href*="facebook.com"]:hover::before,
.hsg-footer a[href*="youtube.com"]:hover::before,
.hsg-footer a[href*="facebook.com"]:focus-visible::before,
.hsg-footer a[href*="youtube.com"]:focus-visible::before {
  background-color: var(--hsg-primary);
}

.hsg-footer__copy {
  border-top: 1px solid var(--hsg-footer-line);
  padding: 14px 0;
}

.hsg-footer__copy-text {
  margin: 0;
  text-align: center;
  color: var(--hsg-footer-muted);
  font-family: var(--hsg-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

@media (max-width: 991px) {
  .hsg-footer #bottom-wrap.footer {
    padding: 36px 0 24px;
  }

  .footer-bottom.hsg-footer #bottom-wrap .border-wrap.hsg-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 28px;
  }

  .hsg-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575px) {
  .hsg-footer #bottom-wrap.footer {
    padding: 32px 0 20px;
  }

  .footer-bottom.hsg-footer #bottom-wrap .border-wrap.hsg-footer__grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hsg-footer__brand {
    grid-column: auto;
  }

  .hsg-footer__tagline {
    max-width: none;
  }

  .hsg-footer__copy {
    padding: 12px 0;
  }
}

/*
 * Additional CSS still uses !important on a few footer rules.
 * Match those locks with equal/higher specificity so the compact layout wins.
 */
.footer-bottom.hsg-footer #bottom-wrap.footer {
  background: var(--hsg-footer-bg) !important;
  padding: 40px 0 28px !important;
}

.footer-bottom.hsg-footer .bottom-widget .widget h3.widget-title {
  color: #fff !important;
}

.footer-bottom.hsg-footer .bottom-widget ul li a {
  color: var(--hsg-footer-text) !important;
}

.footer-bottom.hsg-footer .bottom-widget ul li a:hover,
.footer-bottom.hsg-footer .bottom-widget ul li a:focus-visible {
  color: #fff !important;
}

@media (max-width: 991px) {
  .footer-bottom.hsg-footer #bottom-wrap.footer {
    padding: 36px 0 24px !important;
  }
}

@media (max-width: 575px) {
  .footer-bottom.hsg-footer #bottom-wrap.footer {
    padding: 32px 0 20px !important;
  }
}
