/* ==========================================================================
   TechAbbot – credibility indicators
   Markup: generated by tools/build-credibility.js and placed in the homepage
   hero, directly under the highlights (see tools/build-hero.js).

   The row is its own white panel, set apart from the hero text above it.
   Each indicator is a logo with the platform name and its
   star row or status beside it. Two by two below 1000px, four in a row above.
   ========================================================================== */

.credibility {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
  margin: 36px 0 0;
  padding: 16px 14px;
  border-radius: var(--radius);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.6);
  list-style: none;
}

.credibility__body {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

a.credibility__body:hover .credibility__name { color: var(--c-blue); }

/* Fixed-size slot so logos of different shapes keep the rows aligned. */
.credibility__mark {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 40px;
}

.credibility__mark img { display: block; }

/* Stand-in for a platform whose logo file has not been supplied. */
.credibility__wordmark {
  color: var(--c-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.credibility__detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.credibility__name {
  color: var(--c-text);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.credibility__meta {
  color: var(--c-text-muted);
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
}

.credibility__meta strong { color: var(--c-text); }

/* Five stars, filled in gold up to --rating (out of 5). */
.stars {
  --rating: 5;
  --star-size: 15px;
  --star-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.6l2.6 5.3 5.8.8-4.2 4.1 1 5.8L10 14.9l-5.2 2.7 1-5.8L1.6 7.7l5.8-.8z'/%3E%3C/svg%3E");

  display: block;
  width: calc(var(--star-size) * 5);
  height: var(--star-size);
  background: linear-gradient(90deg, #F5B301 calc(var(--rating) / 5 * 100%), #D5DCE2 0);
  -webkit-mask: var(--star-shape) 0 0 / var(--star-size) var(--star-size) repeat-x;
  mask: var(--star-shape) 0 0 / var(--star-size) var(--star-size) repeat-x;
}

/* Platform status, for example an Upwork talent badge. */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1.5px solid var(--c-blue);
  border-radius: 999px;
  color: var(--c-blue);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

/* Deliberately neutral: not a copy of any platform's official badge. */
.status-badge--placeholder {
  border-style: dashed;
  border-color: #98A2B3;
  color: var(--c-text-muted);
}

@media (min-width: 1000px) {
  .credibility {
    grid-template-columns: repeat(4, max-content);
    column-gap: 16px;
    width: fit-content;
    padding: 14px 16px;
  }
}

@media (min-width: 1100px) {
  .credibility {
    column-gap: 30px;
    padding-inline: 22px;
  }
}

/* Narrow phones: trim the panel so two indicators still fit side by side. */
@media (max-width: 359.98px) {
  .credibility {
    column-gap: 6px;
    padding-inline: 8px;
  }

  .credibility__body { gap: 6px; }
  .credibility__mark { min-width: 30px; }
}

/* Short laptop screens: keep the row inside the first view. */
@media (min-width: 1100px) and (max-height: 760px) {
  .credibility { margin-top: 26px; padding-block: 10px; }
}
