/*
 * FB Companies We Love widget.
 * Values taken from Faith-Be.fig, frame "Faithbe-inner > Company" (220:103)
 * at 1440px: rail 248px @x102, divider @x383, content column 916px @x420.
 */

.fb-cwl {
  --fb-cwl-accent: #ed184b;
  --fb-cwl-ink: #392a30;
  --fb-cwl-body: #000000;
  --fb-cwl-rule: #c7cdbf;
  --fb-cwl-card-border: rgba(196, 196, 196, .5);
  --fb-cwl-stripe: rgba(125, 152, 103, .09);
  --fb-cwl-pill-bg: rgba(196, 196, 196, .5);
  --fb-cwl-pill-border: rgba(196, 196, 196, .3);
  --fb-cwl-count: #8ca88a;
  --fb-cwl-badge-bg: rgba(255, 219, 111, .1);
  --fb-cwl-badge-border: #be9540;

  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  column-gap: 33px;
  max-width: 1276px; /* 1236 content + 2x20 gutter */
  margin: 0 auto;
  padding: 24px 20px 0;
  font-family: "Jost", sans-serif;
  color: var(--fb-cwl-ink);
}

.fb-cwl,
.fb-cwl *,
.fb-cwl *::before,
.fb-cwl *::after { box-sizing: border-box; }

/* ---------- filter rail ---------- */
/* Mobile control: hidden until the 1100px breakpoint swaps it in for the rail.
   Borrows the pill's shape so the two read as the same control. */
.fb-cwl__select {
  display: none;
  width: 100%;
  height: 44px;
  padding: 0 42px 0 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--fb-cwl-ink);
  background-color: var(--fb-cwl-pill-bg);
  /* Chevron in --fb-cwl-ink (#392a30); appearance:none drops the native one. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23392a30' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  border: 1px solid var(--fb-cwl-pill-border);
  border-radius: 22px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.fb-cwl__select:focus-visible {
  outline: 2px solid var(--fb-cwl-accent);
  outline-offset: 2px;
}

.fb-cwl__rail-inner {
  /* ponytail: sticky, not the static Figma placement — the page is 5000px tall. */
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fb-cwl__pill {
  display: block;
  width: 100%;
  height: 33px;
  padding: 0 16px;
  text-align: left;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: .02em;
  color: var(--fb-cwl-ink);
  background: var(--fb-cwl-pill-bg);
  border: 1px solid var(--fb-cwl-pill-border);
  border-radius: 5px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.fb-cwl__pill:hover { border-color: var(--fb-cwl-ink); }

.fb-cwl__pill.is-active {
  background: var(--fb-cwl-ink);
  border-color: transparent;
  color: #fff;
}

.fb-cwl__pill:focus-visible {
  outline: 2px solid var(--fb-cwl-accent);
  outline-offset: 2px;
}

/* ---------- content column ---------- */
.fb-cwl__main {
  border-left: 1px dashed var(--fb-cwl-rule);
  padding-left: 37px;
	padding-bottom:50px;
}

.fb-cwl__group:not([hidden]) ~ .fb-cwl__group:not([hidden]) { margin-top: 80px; }

.fb-cwl__ghead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}

.fb-cwl__eyebrow {
  /* flex, not inline-flex: an inline line box adds stray leading above the title. */
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  font-family: var(--fb-script-font, "Segoe Script", cursive);
  font-size: var(--fb-script-size, 32px);
  line-height: 24px;
  letter-spacing: .01em;
  color: var(--fb-cwl-accent);
}

.fb-cwl__eyebrow::after {
  content: "";
  width: 44px;
  height: 1px;
  background: var(--fb-cwl-accent);
  opacity: .2;
}

.fb-cwl__eyebrow--plain::after { content: none; }

.fb-cwl__gtitle {
  margin: 14px 0 0;
  font-family: "Inria Serif", serif;
  font-size: clamp(30px, 2.78vw, 40px);
  font-weight: 400;
  line-height: 46px;
  letter-spacing: .01em;
  color: var(--fb-cwl-ink);
}

.fb-cwl__count {
  flex: none;
  font-size: 15px;
  line-height: 24px;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--fb-cwl-count);
  white-space: nowrap;
}

/* ---------- cards ---------- */
.fb-cwl__list {
  display: grid;
  gap: 18px;
}

.fb-cwl__card {
  position: relative;
  display: grid;
  grid-template-columns: 161px minmax(0, 1fr);
  grid-template-areas:
    "logo body"
    "logo desc";
  align-items: start;
  column-gap: 18px;
  row-gap: 8px;
  /* Figma holds every row at exactly 136 and centres the block inside it. */
  min-height: 136px;
  padding: 30px 70px 30px 26px;
  background: transparent;
  border: 1px solid var(--fb-cwl-card-border);
  border-radius: 10px;
}

.fb-cwl__logo { grid-area: logo; }
.fb-cwl__body { grid-area: body; }
.fb-cwl__desc { grid-area: desc; }
.fb-cwl__arrow { grid-area: arrow; }

/* Figma tints every second row in a group. */
.fb-cwl__card:nth-child(even) { background: var(--fb-cwl-stripe); }

.fb-cwl__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 161px;
  height: 94px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.fb-cwl__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.fb-cwl__name {
  margin: 0;
  font-family: "Inria Serif", serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: .01em;
  color: var(--fb-cwl-body);
}

.fb-cwl__badge {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: auto;
  margin-top: 12px;
  padding: 0 11px;
  height: 32px;
  font-size: 15px;
  line-height: 30px;
  letter-spacing: .01em;
  color: var(--fb-cwl-body);
  background: var(--fb-cwl-badge-bg);
  border: 1px solid var(--fb-cwl-badge-border);
  border-radius: 5px;
  white-space: nowrap;
}

.fb-cwl__desc {
  margin: 0;
  max-width: 423px;
  font-size: 17px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: .01em;
  color: var(--fb-cwl-body);
}

/* Inset to match the 26px logo gutter on the left. */
.fb-cwl__arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: rgba(237, 24, 75, .2);
  background: transparent;
  transition: color .2s ease;
}

.fb-cwl__arrow svg {
  width: 32px;
  height: 32px;
  display: block;
}

.fb-cwl__arrow-ring { fill: none; }

/* Hover only brings the ring up to full accent — no filled circle. */
.fb-cwl__card:hover .fb-cwl__arrow,
.fb-cwl__card:focus-within .fb-cwl__arrow,
.fb-cwl__arrow:hover { color: var(--fb-cwl-accent); }

.fb-cwl__arrow:focus-visible {
  color: var(--fb-cwl-accent);
  outline: 2px solid var(--fb-cwl-accent);
  outline-offset: 3px;
}

/* ---------- bottom CTA ---------- */
.fb-cwl__cta {
  position: relative;
  grid-column: 1 / -1;
  margin-top: 54px;
  padding-top: 69px;
  text-align: center;
}

/* Full-bleed rule, as drawn at 1440 in Figma. */
.fb-cwl__cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background: var(--fb-cwl-rule);
}

.fb-cwl__cta .fb-cwl__eyebrow {
  margin: 0 auto;
  justify-content: center;
}

.fb-cwl__cta-title {
  max-width: 737px;
  margin: 14px auto 0;
  font-family: "Inria Serif", serif;
  font-size: clamp(30px, 2.78vw, 40px);
  font-weight: 400;
  line-height: 46px;
  letter-spacing: .01em;
  color: var(--fb-cwl-ink);
}

.fb-cwl__cta-text {
  max-width: 624px;
  margin: 14px auto 0;
  font-size: 17px;
  line-height: 24px;
  letter-spacing: .01em;
  color: var(--fb-cwl-body);
}

.fb-cwl__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 216px;
  height: 50px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  color: #fff;
  background: var(--fb-cwl-accent);
  border-radius: 5px;
  text-decoration: none;
  transition: opacity .2s ease;
}

.fb-cwl__btn:hover,
.fb-cwl__btn:focus { color: #fff; opacity: .88; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .fb-cwl {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
  }

  /* The pill rail becomes a native <select>: no horizontal scrollbar to
     discover, and the OS picker is a better target than a cramped row. */
  .fb-cwl__rail-inner { display: none; }
  .fb-cwl__select { display: block; }

  .fb-cwl__main { border-left: 0; padding-left: 0; }

  .fb-cwl__card {
    grid-template-columns: 161px minmax(0, 1fr);
    grid-template-areas:
      "logo body"
      "logo desc";
  }
}

@media (max-width: 640px) {
  .fb-cwl__ghead { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 36px; }
  .fb-cwl__gtitle { line-height: 38px; }
  .fb-cwl__group:not([hidden]) ~ .fb-cwl__group:not([hidden]) { margin-top: 56px; }

  .fb-cwl__card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "body"
      "desc";
    row-gap: 14px;
    padding: 20px;
  }

  .fb-cwl__arrow { position: static; transform: none; }
  .fb-cwl__logo { width: 100%; max-width: 161px; }
  .fb-cwl__badge { white-space: normal; height: auto; padding: 4px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-cwl__arrow,
  .fb-cwl__btn,
  .fb-cwl__pill { transition: none; }
}
