/* ==========================================================================
   Local broker hub, "Local broker hub (New Design)" (app/Views/hub/*.php).
   Loaded after ui.css, home.css and area.css: the hub reuses the area and
   homepage sections, this file only adds the "Where we work" directory and
   the hero's link down to it. Paper: "Local Hub", artboards "Local hub —
   desktop" and "Local hub — mobile".
   ========================================================================== */

/* Hero: "See all 28 areas we cover", under the call line. */
.mfs-hub-hero__areas { margin-top: 20px; font-size: 16px; line-height: 24px; }

/* Where we work ----------------------------------------------------------- */
.mfs-hub-where__head { display: grid; gap: 16px; }
.mfs-hub-where__title { margin-top: 16px; }
.mfs-hub-where__aside { display: grid; gap: 20px; }
.mfs-hub-where__chips { display: none; }
@media (min-width: 1024px) {
  .mfs-hub-where__head { grid-template-columns: 1fr 1fr; align-items: end; gap: 32px; }
  .mfs-hub-where__chips { display: flex; flex-wrap: wrap; gap: 8px; }
}
.mfs-hub-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 16px;
  border: 1px solid var(--mfs-line);
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  color: var(--mfs-navy);
  transition: border-color .2s var(--mfs-ease);
}
.mfs-hub-chip span { font-weight: 500; color: rgb(0 47 106 / 0.6); }
.mfs-ui a.mfs-hub-chip:hover { border-color: var(--mfs-navy); color: var(--mfs-navy); }

.mfs-hub-groups { display: grid; gap: 0; margin-top: 32px; }
@media (min-width: 768px) { .mfs-hub-groups { gap: 56px; margin-top: 56px; } }

.mfs-hub-group { scroll-margin-top: calc(var(--mfs-header-h) + 16px); border-top: 1px solid var(--mfs-navy); }
.mfs-hub-group:last-child { border-bottom: 1px solid var(--mfs-navy); }
@media (min-width: 768px) {
  .mfs-hub-group { display: grid; gap: 24px; padding-top: 32px; }
  .mfs-hub-group:last-child { border-bottom: 0; }
}
@media (min-width: 1024px) {
  .mfs-hub-group { grid-template-columns: 296px minmax(0, 1fr); gap: 32px; }
}

.mfs-hub-group__head { position: relative; padding-block: 24px; }
@media (min-width: 768px) { .mfs-hub-group__head { padding-block: 0; } }
.mfs-hub-group__n {
  display: none;
  margin-bottom: 8px;
  font-family: var(--mfs-font-heading);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.04em;
  color: var(--mfs-body);
}
.mfs-hub-group__title {
  font-family: var(--mfs-font-heading);
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.015em;
  color: var(--mfs-navy);
}
.mfs-hub-group__intro { display: none; margin-top: 8px; font-size: 15px; line-height: 24px; color: var(--mfs-body); }
.mfs-hub-group__count {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 19.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(0 47 106 / 0.75);
}
@media (min-width: 768px) {
  .mfs-hub-group__n, .mfs-hub-group__intro { display: block; }
  .mfs-hub-group__title { font-size: 26px; line-height: 31px; }
  .mfs-hub-group__count { margin-top: 16px; }
}

/* The toggle exists only on phones once ui.js has made the groups an
   accordion; it covers the whole head so the row is the tap target. */
.mfs-hub-group__toggle { display: none; }
.mfs-hub-group__icon {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  border: 1px solid var(--mfs-line);
  border-radius: 999px;
  background: #fff;
}
.mfs-hub-group__icon::before,
.mfs-hub-group__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--mfs-navy);
  transform: translate(-50%, -50%);
}
.mfs-hub-group__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .2s var(--mfs-ease); }
.mfs-hub-group__toggle[aria-expanded="true"] .mfs-hub-group__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
@media (max-width: 767.98px) {
  .is-accordion .mfs-hub-group__toggle {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .is-accordion .mfs-hub-group__head { padding-right: 52px; }
  .is-accordion .mfs-hub-areas[hidden] { display: none; }
}

.mfs-hub-areas { display: grid; padding-bottom: 8px; }
@media (min-width: 768px) {
  .mfs-hub-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; column-gap: 32px; padding-bottom: 0; }
}
@media (min-width: 1280px) { .mfs-hub-areas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Desktop: every group is open whatever the accordion last did. */
@media (min-width: 768px) { .mfs-hub-areas[hidden] { display: grid; } }

.mfs-hub-area {
  display: grid;
  gap: 6px;
  height: 100%;
  padding-block: 16px;
  border-bottom: 1px solid var(--mfs-line);
}
.mfs-hub-areas li:last-child .mfs-hub-area { border-bottom: 0; }
@media (min-width: 768px) { .mfs-hub-areas li:last-child .mfs-hub-area { border-bottom: 1px solid var(--mfs-line); } }
.mfs-hub-area__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.mfs-hub-area__row > span { display: grid; gap: 2px; }
.mfs-hub-area__label { font-size: 13px; font-weight: 500; line-height: 18px; color: var(--mfs-body); }
.mfs-hub-area__name { font-size: 19px; font-weight: 600; line-height: 26px; color: var(--mfs-navy); }
.mfs-hub-area__desc { font-size: 14px; line-height: 20px; color: var(--mfs-body); }
.mfs-hub-area__arrow { flex-shrink: 0; color: var(--mfs-navy); transition: transform .2s var(--mfs-ease); }
.mfs-ui a.mfs-hub-area:hover .mfs-hub-area__name { text-decoration: underline; text-underline-offset: 4px; }
.mfs-ui a.mfs-hub-area:hover .mfs-hub-area__arrow { transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) {
  .mfs-hub-area__arrow, .mfs-hub-group__icon::after { transition: none; }
}

/* London template (Paper: "London Template - Mariana"). */
.mfs-hub-where--london .mfs-lead { font-size: 17px; }
@media (max-width: 767.98px) {
  .mfs-hub-where--london .mfs-hub-where__title { line-height: 38px; letter-spacing: -0.015em; }
  .mfs-hub-where--london .mfs-hub-group__head { padding-block: 16px; }
  .mfs-hub-where--london .mfs-hub-group__title { font-size: 22px; line-height: 28px; }
  .mfs-hub-where--london .mfs-hub-areas { padding-bottom: 24px; }
}
/* The link holds only "Mortgage broker in [Area]" and the line sits outside it,
   so the link stretches to keep the whole cell clickable. */
.mfs-hub-area--split { position: relative; align-content: start; }
.mfs-hub-area__link::after { content: ""; position: absolute; inset: 0; }
.mfs-ui a.mfs-hub-area__link:hover .mfs-hub-area__name { text-decoration: underline; text-underline-offset: 4px; }
.mfs-ui a.mfs-hub-area__link:hover .mfs-hub-area__arrow { transform: translate(2px, -2px); }
.mfs-hub-where__foot .mfs-link-arrow { font-size: 16px; line-height: 24px; }

.mfs-hub-where__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 32px;
  font-size: 17px;
  line-height: 28px;
  color: var(--mfs-body);
}
.mfs-hub-where__foot strong { width: 100%; font-weight: 600; color: var(--mfs-navy); }
@media (min-width: 768px) {
  .mfs-hub-where__foot { margin-top: 56px; }
  .mfs-hub-where__foot strong { width: auto; }
}
