/**
 * Business Impact NW | About Our Loans — Two Equal Fund Cards (Option B)
 * LIVE page: WordPress page 60504
 * Location: child theme /assets/css/about-our-loans-two-cards.css
 * Depends on binw-system.css. Uses normal SiteOrigin Editor/Button widgets.
 * This is the side-by-side CARD layout, not the stacked fund sections.
 */

/* Three contiguous SiteOrigin rows present as one coherent section. */
#content .binw-page.binw-fund-cards-intro-row,
#content .binw-page.binw-fund-cards-pair-row,
#content .binw-page.binw-fund-cards-footer-row,
.binw-page.binw-fund-cards-intro-row,
.binw-page.binw-fund-cards-pair-row,
.binw-page.binw-fund-cards-footer-row {
  box-sizing: border-box;
  width: calc(100% - 40px) !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 0 !important;
  background: #fff;
  color: var(--binw-text, #343538);
}

.binw-page.binw-fund-cards-intro-row *,
.binw-page.binw-fund-cards-pair-row *,
.binw-page.binw-fund-cards-footer-row * {
  box-sizing: border-box;
}

/* Prevent default SiteOrigin panel spacing from separating each editable block. */
.binw-page.binw-fund-cards-intro-row .so-panel,
.binw-page.binw-fund-cards-pair-row .so-panel,
.binw-page.binw-fund-cards-footer-row .so-panel {
  margin-bottom: 0 !important;
}

/* ---------------- Header ---------------- */
#content .binw-page.binw-fund-cards-intro-row,
.binw-page.binw-fund-cards-intro-row {
  padding: 28px 26px 17px !important;
  border: 1px solid var(--binw-border, #D9DDD7);
  border-bottom: 0;
  border-radius: 15px 15px 0 0;
  margin-top: 32px !important;
}

#content .binw-page.binw-fund-cards-intro-row > .panel-grid-cell,
#content .binw-page.binw-fund-cards-intro-row > .panel-row-style > .panel-grid-cell {
  width: 100% !important;
}

.binw-page .binw-fc-intro p:first-child,
.binw-page .binw-fc-card-head p:first-child {
  margin: 0 0 9px !important;
  color: var(--binw-charcoal, #343538);
  font-size: 12px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.binw-page .binw-fc-intro p:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}
.binw-page .binw-fc-intro p:first-child::before {
  content: "";
  width: 27px;
  height: 3px;
  flex-shrink: 0;
  border-radius: 99px;
  background: var(--binw-green, #78A22F);
}

#content .binw-page .binw-fc-intro h2,
.binw-page .binw-fc-intro h2 {
  margin: 0 0 10px !important;
  padding: 0 !important;
  color: var(--binw-charcoal, #343538) !important;
  font-size: clamp(26px, 2.8vw, 34px) !important;
  line-height: 1.18 !important;
  letter-spacing: -.025em !important;
  font-weight: 600 !important;
  text-transform: none !important;
}
.binw-page .binw-fc-intro p:last-child {
  margin: 0 !important;
  max-width: 860px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--binw-charcoal, #343538);
}

/* ---------------- Side-by-side equal-height cards ---------------- */
#content .binw-page.binw-fund-cards-pair-row,
.binw-page.binw-fund-cards-pair-row {
  padding: 0 26px 19px !important;
  border-left: 1px solid var(--binw-border, #D9DDD7);
  border-right: 1px solid var(--binw-border, #D9DDD7);
}

/* SiteOrigin themes sometimes insert .panel-row-style between the row and cells.
   Five shared grid rows keep logos, dividers, and subsection headings aligned
   without hard-coded header heights. */
#content .binw-page.binw-fund-cards-pair-row,
#content .binw-page.binw-fund-cards-pair-row > .panel-row-style,
.binw-page.binw-fund-cards-pair-row,
.binw-page.binw-fund-cards-pair-row > .panel-row-style {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 17px !important;
  grid-template-rows: repeat(5, auto) !important;
  align-items: stretch !important;
}

/* Some SiteOrigin rows contain a .panel-row-style wrapper. In that case
   the wrapper owns the two-column grid; the outer row stays a block so
   the cards do not get squeezed into one of two phantom columns. */
#content .binw-page.binw-fund-cards-pair-row:has(> .panel-row-style),
.binw-page.binw-fund-cards-pair-row:has(> .panel-row-style) {
  display: block !important;
}

#content .binw-page.binw-fund-cards-pair-row > .panel-grid-cell,
#content .binw-page.binw-fund-cards-pair-row > .panel-row-style > .panel-grid-cell,
.binw-page.binw-fund-cards-pair-row > .panel-grid-cell,
.binw-page.binw-fund-cards-pair-row > .panel-row-style > .panel-grid-cell {
  display: grid !important;
  /* Subgrid shares logo, heading, funding, eligibility and uses heights. */
  grid-row: 1 / span 5;
  grid-template-rows: subgrid !important;
  row-gap: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: 100%;
  margin: 0 !important;
  padding: 22px 23px 24px !important;
  border: 1px solid var(--binw-border, #D9DDD7);
  border-radius: 12px;
  background: #fff;
}

/* ---------------- Editable partner logos ----------------
 * Each logo is a native SiteOrigin Image widget, centered and non-clickable.
 * The logo occupies the first shared subgrid row so both card headings
 * remain aligned even when the original image aspect ratios differ.
 */
#content .binw-page .binw-fc-card-logo,
.binw-page .binw-fc-card-logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 78px;
  margin: 0 !important;
  padding: 0 0 12px !important;
  text-align: center;
}

.binw-page .binw-fc-card-logo .so-widget-sow-image,
.binw-page .binw-fc-card-logo .sow-image-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
}

.binw-page .binw-fc-card-logo img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-height: 64px !important;
  max-width: min(240px, 100%) !important;
  margin: 0 auto !important;
  object-fit: contain;
  box-shadow: none !important;
  border: 0 !important;
}

#content .binw-page .binw-fc-card-head h3,
.binw-page .binw-fc-card-head h3 {
  margin: 0 0 12px !important;
  padding: 0 !important;
  color: var(--binw-charcoal, #343538) !important;
  font-size: 23px !important;
  line-height: 1.23 !important;
  font-weight: 700 !important;
  letter-spacing: -.02em !important;
  text-transform: none !important;
}

.binw-page .binw-fc-card-head p:not(:first-child),
.binw-page .binw-fc-card-detail p {
  margin: 0 !important;
  color: var(--binw-charcoal, #343538);
  font-size: 15.5px !important;
  line-height: 1.62 !important;
}

/* Terms are an internal divider within each card, not an additional card. */
.binw-page .binw-fc-highlight {
  margin: 16px 0 0 !important;
  padding: 18px 0 17px !important;
  border-top: 1px solid var(--binw-border, #D9DDD7);
}
.binw-page .binw-fc-highlight p { margin: 0 !important; }

.binw-page .binw-fc-vancouver-funding p:first-child,
.binw-page .binw-fc-tigard-terms p:nth-child(1),
.binw-page .binw-fc-tigard-terms p:nth-child(3) {
  color: var(--binw-gray, #707372);
  font-size: 13.5px;
  line-height: 1.45;
}
.binw-page .binw-fc-vancouver-funding p:nth-child(2) {
  margin: 2px 0 3px !important;
}
.binw-page .binw-fc-vancouver-funding strong,
.binw-page .binw-fc-tigard-terms strong {
  color: var(--binw-charcoal, #343538);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
.binw-page .binw-fc-vancouver-funding p:last-child {
  color: var(--binw-gray, #707372);
  font-size: 13px;
  line-height: 1.5;
}

/* Four staff-editable paragraphs, arranged as two columns through CSS. */
.binw-page .binw-fc-tigard-terms .textwidget,
.binw-page .binw-fc-tigard-terms .siteorigin-widget-tinymce {
  min-width: 0;
}
.binw-page .binw-fc-tigard-terms .textwidget {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  column-gap: 22px;
  row-gap: 1px;
}
.binw-page .binw-fc-tigard-terms p:nth-child(1){ grid-area:1/1; }
.binw-page .binw-fc-tigard-terms p:nth-child(2){ grid-area:2/1; }
.binw-page .binw-fc-tigard-terms p:nth-child(3){ grid-area:1/2; }
.binw-page .binw-fc-tigard-terms p:nth-child(4){ grid-area:2/2; }

.binw-page .binw-fc-card-detail { padding-bottom: 11px !important; }
/* Give the next subsection breathing room without changing the editable widgets. */
.binw-page .binw-fc-card-detail + .binw-fc-card-detail { padding-top: 17px !important; }
.binw-page .binw-fc-card-detail:last-child { padding-bottom: 0 !important; }
#content .binw-page .binw-fc-card-detail h4,
.binw-page .binw-fc-card-detail h4 {
  margin: 0 0 6px !important;
  padding: 0 !important;
  color: var(--binw-charcoal, #343538) !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* ---------------- One shared financing message / CTA ---------------- */
#content .binw-page.binw-fund-cards-footer-row,
.binw-page.binw-fund-cards-footer-row {
  padding: 15px 26px 27px !important;
  border: 1px solid var(--binw-border, #D9DDD7);
  border-top: 0;
  border-radius: 0 0 15px 15px;
  margin-bottom: 40px !important;
}
#content .binw-page.binw-fund-cards-footer-row > .panel-grid-cell,
#content .binw-page.binw-fund-cards-footer-row > .panel-row-style > .panel-grid-cell {
  width: 100% !important;
}
.binw-page .binw-fc-footer-copy {
  text-align: center;
  border-top: 1px solid var(--binw-border, #D9DDD7);
  padding: 20px 10px 0 !important;
}
#content .binw-page .binw-fc-footer-copy h3,
.binw-page .binw-fc-footer-copy h3 {
  margin: 0 0 7px !important;
  color: var(--binw-charcoal, #343538) !important;
  font-size: 23px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-transform: none !important;
}
.binw-page .binw-fc-footer-copy p {
  margin: 0 auto !important;
  max-width: 770px;
  font-size: 15px;
  line-height: 1.6;
}
.binw-page .binw-fc-footer-button {
  display: flex !important;
  justify-content: center;
  margin-top: 17px !important;
}
.binw-page .binw-fc-footer-button .ow-button-base a {
  border-radius: 999px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
.binw-page .binw-fc-footer-button .ow-button-base a:focus-visible {
  outline: 3px solid var(--binw-green, #78A22F) !important;
  outline-offset: 3px;
}

/* ---------------- Responsive ---------------- */
@media screen and (max-width: 820px) {
  #content .binw-page.binw-fund-cards-pair-row,
  #content .binw-page.binw-fund-cards-pair-row > .panel-row-style,
  .binw-page.binw-fund-cards-pair-row,
  .binw-page.binw-fund-cards-pair-row > .panel-row-style {
    grid-template-columns: minmax(0,1fr) !important;
    grid-template-rows: auto !important;
    row-gap: 15px !important;
  }
  #content .binw-page.binw-fund-cards-pair-row > .panel-grid-cell,
  #content .binw-page.binw-fund-cards-pair-row > .panel-row-style > .panel-grid-cell,
  .binw-page.binw-fund-cards-pair-row > .panel-grid-cell,
  .binw-page.binw-fund-cards-pair-row > .panel-row-style > .panel-grid-cell {
    display: flex !important;
    flex-direction: column !important;
    grid-row: auto;
    grid-template-rows: none !important;
    width: 100% !important;
  }
}
@media screen and (max-width: 520px) {
  #content .binw-page.binw-fund-cards-intro-row,
  #content .binw-page.binw-fund-cards-pair-row,
  #content .binw-page.binw-fund-cards-footer-row,
  .binw-page.binw-fund-cards-intro-row,
  .binw-page.binw-fund-cards-pair-row,
  .binw-page.binw-fund-cards-footer-row {
    width: calc(100% - 24px) !important;
  }
  #content .binw-page.binw-fund-cards-intro-row,
  .binw-page.binw-fund-cards-intro-row { padding: 22px 17px 15px !important; }
  #content .binw-page.binw-fund-cards-pair-row,
  .binw-page.binw-fund-cards-pair-row { padding: 0 15px 15px !important; }
  #content .binw-page.binw-fund-cards-pair-row > .panel-grid-cell,
  #content .binw-page.binw-fund-cards-pair-row > .panel-row-style > .panel-grid-cell,
  .binw-page.binw-fund-cards-pair-row > .panel-grid-cell,
  .binw-page.binw-fund-cards-pair-row > .panel-row-style > .panel-grid-cell {
    padding: 20px 18px 22px !important;
  }
  #content .binw-page.binw-fund-cards-footer-row,
  .binw-page.binw-fund-cards-footer-row { padding: 13px 15px 25px !important; }
  #content .binw-page .binw-fc-intro h2,
  .binw-page .binw-fc-intro h2 { font-size: 27px !important; }
  #content .binw-page .binw-fc-card-head h3,
  .binw-page .binw-fc-card-head h3 { font-size: 22px !important; }
}
