/* ============================================================
   BE SCORECARD – FINAL, STABLE, NO-JUMP STYLES (FULL)
   Includes:
   - Desktop image full 200x200 + IUCN full width
   - Mobile wrap + IUCN not interfering
   - BE Responsive Table mobile stacking patch
   - Read More pill with BioExplorer button styling (yellow/black + green/white hover)
   ============================================================ */

/* ---------- Container ---------- */
.be-scorecard{
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

/* ---------- Table ---------- */
.be-scorecard__table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 12px;
}

.be-scorecard__table thead th{
  background: var(--be-scorecard-head-bg, #0b7f3a);
  color: var(--be-scorecard-head-fg, #ffffff);
  font-weight: 700;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.be-scorecard__table tbody td{
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  vertical-align: top;
}

.be-scorecard--zebra .be-scorecard__table tbody tr:nth-child(even) td{
  background: #fafafa;
}

.be-scorecard--hover .be-scorecard__table tbody tr:hover td{
  background: rgba(11,127,58,.06);
}

/* ---------- Image + Text Wrap ---------- */
/* contain floats */
.be-scorecard__body{
  display: flow-root;
  margin-top: 16px;
}

/* Desktop: wrap with FULL 200px image stack */
.be-scorecard__img-wrap{
  float: left;
  width: 200px;
  margin: 0 16px 12px 0;
}

.be-scorecard__img{
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* IUCN image under featured image, full width */
.be-scorecard__iucn-img{
  display: block;
  clear: both;
  float: none;
  margin-top: 8px;
  width: 200px;
  height: auto;
  border-radius: 8px;
}

/* ---------- Text ---------- */
.be-scorecard__info{
  line-height: 1.65;
}

.be-scorecard__info p{
  margin: 0 0 14px 0;
}

.be-scorecard__info p:last-child{
  margin-bottom: 0;
}

/* ---------- Read More (BIOEXPLORER BUTTON – NO JUMP EVER) ---------- */
.be-scorecard__footer{
  clear: both;
  margin-top: 14px;
}

body .be-scorecard a.be-scorecard__read-more,
body .be-scorecard a.be-scorecard__read-more:hover,
body .be-scorecard a.be-scorecard__read-more:focus,
body .be-scorecard a.be-scorecard__read-more:focus-visible,
body .be-scorecard a.be-scorecard__read-more:active{
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 1.05rem !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  font-size: 0.80rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  border-radius: 999px !important;
  border: 2px solid #000 !important;
  background: #f4cf58 !important;
  color: #000 !important;
  outline: none !important;
  text-decoration: none !important;
  box-shadow: 3px 3px 0 #000 !important;
  transform: translate(0,0) !important;
  cursor: pointer !important;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease !important;
}

/* Hover / focus — correct BioExplorer green + white (no layout change) */
body .be-scorecard a.be-scorecard__read-more:hover,
body .be-scorecard a.be-scorecard__read-more:focus,
body .be-scorecard a.be-scorecard__read-more:focus-visible{
  background: #0b5d0b !important;
  color: #ffffff !important;
  transform: translate(0,0) !important;
  box-shadow: 4px 4px 0 #000 !important;
}

/* Active press — subtle depth, no shrink */
body .be-scorecard a.be-scorecard__read-more:active{
  transform: translate(1px,1px) !important;
  box-shadow: 3px 3px 0 #000 !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px){

  .be-scorecard{
    padding: 16px;
  }

  /* Keep wrapping on mobile too, but smaller */
  .be-scorecard__img-wrap{
    float: left !important;
    width: 140px !important;
    margin: 0 12px 10px 0 !important;
  }

  .be-scorecard__img{
    width: 140px !important;
    height: 140px !important;
  }

  /* Keep IUCN from affecting wrap flow */
  .be-scorecard__iucn-img{
    float: none !important;
    clear: both !important;
    display: block !important;
    margin: 8px 0 0 0 !important;
    width: 140px !important;
    height: auto !important;
  }

  /* Let BE Responsive Table control the mobile layout */
  .be-scorecard__table tbody td{
    padding-left: 50% !important;
    position: relative !important;
    white-space: normal;
  }

  /* Ensure value text never disappears */
  .be-scorecard__table td .be-scorecard__val{
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}
