/* ===== Affiliate logos + buttons row (FINAL) ===== */

/* Row container */
.we-affiliate-buttons-row{
  align-items:center;
  margin: 10px auto;
}

/* IMPORTANT: match the NEW column widths in your page code (24 / 52 / 24) */
.we-affiliate-buttons-row > .wp-block-column:nth-child(2){
  flex-basis:52% !important;
}
.we-affiliate-buttons-row > .wp-block-column:nth-child(1),
.we-affiliate-buttons-row > .wp-block-column:nth-child(3){
  flex-basis:24% !important;
}

/* base left/right logo groups */
.we-affiliate-row{
  display:flex;
  align-items:center;
  justify-content:space-evenly;
  gap:18px;
  flex-wrap:nowrap;
  width:100%;
}

/* LEFT SIDE: a little more breathing room */
.we-affiliate-row.we-left{
  justify-content:center;
  gap:24px;
}

/* RIGHT SIDE: keep as-is */
.we-affiliate-row.we-right{
  justify-content:center;
  gap:18px;
}

/* kill Gutenberg figure spacing and prevent weird stretching */
.we-affiliate-row .wp-block-image{
  margin:0 !important;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

/* uniform logo sizing (keeps VSBE + PEI from taking over) */
.we-affiliate-row img{
  height:36px !important;
  width:auto !important;
  max-height:36px !important;
  max-width:110px !important;
  object-fit:contain !important;
  display:block !important;
  opacity:.95;
  filter:grayscale(100%);
}

.we-affiliate-row img:hover{
  opacity:1;
  filter:none;
}

/* Center buttons: keep clean spacing, NO overlap */
.we-affiliate-buttons-row .wp-block-buttons{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;              /* if space gets tight, wrap instead of bleeding */
}

.we-affiliate-buttons-row .wp-block-button__link{
  white-space:nowrap !important;  /* keep text on one line on desktop */
}

/* Mobile: stack */
@media (max-width: 900px){
  .we-affiliate-buttons-row{
    flex-direction:column;
  }

  .we-affiliate-buttons-row > .wp-block-column:nth-child(1),
  .we-affiliate-buttons-row > .wp-block-column:nth-child(2),
  .we-affiliate-buttons-row > .wp-block-column:nth-child(3){
    flex-basis:auto !important;
  }

  .we-affiliate-row{
    flex-wrap:wrap;
    justify-content:center;
    gap:12px;
  }

  .we-affiliate-buttons-row .wp-block-button__link{
    white-space:normal !important;
    text-align:center;
  }
}