/* ==========================================================================
   Header and footer chrome
   Requires theme.css first. Load on EVERY page.
   ========================================================================== */

/* ==========================================================================
   Header
   ========================================================================== */

.hd-topbar {
  padding: 9px 0;
  background: var(--ims-deep);
}

.hd-topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hd-topbar__info,
.hd-topbar__social {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hd-topbar__info li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ims-ink-invert-soft);
}

.hd-topbar__info i {
  color: var(--ims-brand);
}

.hd-topbar__info a,
.hd-topbar__social a {
  color: var(--ims-ink-invert);
}

.hd-topbar__info a:hover,
.hd-topbar__info a:focus,
.hd-topbar__social a:hover,
.hd-topbar__social a:focus {
  color: var(--ims-brand);
  text-decoration: none;
}

.hd-topbar__social {
  gap: 14px;
  font-size: 15px;
}

/* ---- Main bar ----------------------------------------------------------- */

.hd-header {
  position: relative;
  z-index: 20;
  background: var(--ims-paper);
  border-bottom: 1px solid var(--ims-rule);
}

.hd-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
}

.hd-logo img {
  display: block;
  height: 50px;
  width: auto;
}

/* ---- Navigation --------------------------------------------------------- */

.hd-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hd-nav__link {
  display: block;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ims-ink);
  border-bottom: 2px solid transparent;
}

.hd-nav__link:hover,
.hd-nav__link:focus {
  color: var(--ims-brand);
  text-decoration: none;
}

/* Current page marker — the old header had no way to show where you were */
.hd-nav__link.is-current {
  color: var(--ims-brand);
  border-bottom-color: var(--ims-brand);
}

.hd-nav__item--cta {
  margin-left: 10px;
}

.hd-nav__cta {
  padding: 11px 20px;
}

/* ---- Mobile toggle ------------------------------------------------------ */

.hd-toggle.navbar-toggle {
  float: none;
  margin: 0;
  padding: 10px 9px;
  background: transparent;
  border: 1px solid var(--ims-rule);
  border-radius: 0;
}

.hd-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ims-ink);
}

.hd-toggle .icon-bar + .icon-bar {
  margin-top: 4px;
}

@media (max-width: 767px) {
  .hd-header__inner {
    flex-wrap: wrap;
    min-height: 0;
    padding: 14px 0;
  }

  .hd-nav.navbar-collapse {
    flex: 1 1 100%;
    padding: 0;
    border-top: 1px solid var(--ims-rule);
    margin-top: 12px;
  }

  .hd-nav__list {
    display: block;
  }

  .hd-nav__link {
    padding: 13px 0;
    border-bottom: 1px solid var(--ims-rule);
  }

  .hd-nav__link.is-current {
    border-bottom-color: var(--ims-rule);
  }

  .hd-nav__item--cta {
    margin: 14px 0 4px;
  }

  .hd-nav__cta {
    display: block;
    text-align: center;
  }

  .hd-topbar__inner {
    justify-content: center;
  }

  .hd-topbar__info {
    gap: 8px 18px;
    justify-content: center;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.ft-strip {
  padding: 26px 0;
  background: var(--ims-brand);
}

.ft-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ft-strip__lead {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  color: var(--ims-ink-invert);
}

.ft-strip__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin: 0;
}

.ft-strip__phone {
  font-size: 19px;
  font-weight: 700;
  color: var(--ims-ink-invert);
}

.ft-strip__phone:hover,
.ft-strip__phone:focus {
  color: var(--ims-deep);
  text-decoration: none;
}

.ft-strip .ims-btn--solid {
  background: var(--ims-deep);
}

.ft-strip .ims-btn--solid:hover,
.ft-strip .ims-btn--solid:focus {
  background: var(--ims-ink);
}

/* ---- Action boxes ------------------------------------------------------- */

.ft {
  background: var(--ims-deep);
}

.ft-top {
  border-bottom: 1px solid var(--ims-rule-dark);
}

.ft-top__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--ims-gap-lg);
  margin: 0;
  padding: 52px 0;
  list-style: none;
}

.ft-action__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  font-size: 17px;
  color: var(--ims-brand);
  border: 1px solid var(--ims-rule-dark);
}

.ft-action__title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ims-ink-invert);
}

.ft-action__body {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ims-ink-invert-soft);
}

.ft-action__body a {
  color: var(--ims-ink-invert);
}

.ft-action__body a:hover,
.ft-action__body a:focus,
.ft-action__link a:hover,
.ft-action__link a:focus {
  color: var(--ims-brand);
  text-decoration: none;
}

.ft-action__link {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.ft-action__link a {
  color: var(--ims-brand);
}

/* ---- Main columns ------------------------------------------------------- */

.ft-main__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--ims-gap-lg);
  padding: 52px 0;
}

.ft-col__title {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ims-ink-invert);
}

.ft-logo {
  display: block;
  height: 48px;
  width: auto;
  margin-bottom: 18px;
}

.ft-about {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ims-ink-invert-soft);
}

.ft-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ft-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 15px;
  color: var(--ims-ink-invert);
  border: 1px solid var(--ims-rule-dark);
  transition: background 180ms ease, border-color 180ms ease;
}

.ft-social a:hover,
.ft-social a:focus {
  color: var(--ims-ink-invert);
  background: var(--ims-brand);
  border-color: var(--ims-brand);
  text-decoration: none;
}

/* ---- Hours -------------------------------------------------------------- */

.ft-hours__note {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ims-ink-invert-soft);
}

.ft-hours {
  margin: 0;
}

.ft-hours__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 14px;
  border-top: 1px solid var(--ims-rule-dark);
}

.ft-hours__days {
  margin: 0;
  font-weight: 400;
  color: var(--ims-ink-invert-soft);
}

.ft-hours__time {
  margin: 0;
  font-weight: 600;
  color: var(--ims-ink-invert);
}

/* ---- Link lists --------------------------------------------------------- */

.ft-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ft-links li {
  padding: 7px 0;
  font-size: 14px;
}

.ft-links a {
  color: var(--ims-ink-invert-soft);
}

.ft-links a:hover,
.ft-links a:focus {
  color: var(--ims-brand);
  text-decoration: none;
}

/* ---- Base bar ----------------------------------------------------------- */

.ft-base {
  border-top: 1px solid var(--ims-rule-dark);
}

.ft-base__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 22px 0;
}

.ft-base__copy,
.ft-base__meta {
  margin: 0;
  font-size: 13px;
  color: var(--ims-ink-invert-soft);
}

/* ---- Back to top -------------------------------------------------------- */

.ft-top-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 18px;
  color: var(--ims-ink-invert);
  background: var(--ims-brand);
  border: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
}

.ft-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.ft-top-btn:hover,
.ft-top-btn:focus {
  background: var(--ims-brand-dark);
}

/* ---- Breakpoints -------------------------------------------------------- */

@media (max-width: 991px) {
  .ft-main__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .ft-strip__inner { justify-content: flex-start; }
  .ft-strip__lead { font-size: 18px; }

  .ft-top__grid,
  .ft-main__grid {
    padding: 40px 0;
    gap: var(--ims-gap-md);
  }

  .ft-main__grid {
    grid-template-columns: 1fr;
  }

  .ft-top-btn {
    right: 14px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ft-social a,
  .ft-top-btn {
    transition: none;
  }
}
