/* Certifications / promises - running banner (right to left) */
/* Medium tiles: icon on top, label in CAPITALS below */

.cert-marquee {
  position: relative;
  overflow: hidden;
  padding: 30px 0;
  background: linear-gradient(180deg, #fbf0de 0%, #f6e6cc 100%);
  border-top: 2px solid rgba(201, 150, 47, 0.55);
  border-bottom: 2px solid rgba(201, 150, 47, 0.55);
  /* soft fade at both ends */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.cert-track {
  display: flex;
  width: max-content;
  animation: certScroll 48s linear infinite;
  will-change: transform;
}

/* pause while someone is reading */
.cert-marquee:hover .cert-track {
  animation-play-state: paused;
}

.cert-group {
  display: flex;
  flex: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* one tile */
.cert-badge {
  width: 210px;
  margin-right: 22px;
  padding: 20px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  text-align: center;
  background: #fffbf4;
  border: 1px solid rgba(201, 150, 47, 0.6);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(139, 13, 13, 0.10);
}

.cert-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #fbe8c8;
  color: #8b0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.cert-icon svg {
  width: 38px;
  height: 38px;
}

.cert-label {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #8b0d0d;
  min-height: 2.7em;           /* keeps every tile the same height */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* moves right to left; the second group is an exact copy so the loop is seamless */
@keyframes certScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* comfortable gap before the next section */
.cert-marquee + .section {
  padding-top: 64px;
}

@media (max-width: 600px) {
  .cert-marquee { padding: 22px 0; }
  .cert-track { animation-duration: 38s; }
  .cert-badge { width: 170px; margin-right: 16px; padding: 16px 10px 14px; gap: 10px; }
  .cert-icon { width: 54px; height: 54px; }
  .cert-icon svg { width: 30px; height: 30px; }
  .cert-label { font-size: 0.76rem; letter-spacing: 0.5px; }
}

/* for visitors who ask for less motion: no scrolling, show the tiles in a wrapped row */
@media (prefers-reduced-motion: reduce) {
  .cert-marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .cert-track {
    animation: none;
    width: auto;
    justify-content: center;
  }
  .cert-group {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 16px;
  }
  .cert-group[aria-hidden="true"] {
    display: none;
  }
}
