.cert-section {
  padding: 55px 5%;
  background: #ffffff;
  text-align: center;
}

.cert-header {
  max-width: 900px;
  margin: 0 auto 70px;
}

.cert-badge {
  display: inline-block;
  padding: 6px 14px;
  background: #ffe5e5;
  color: #d71920;
  font-size: 16px;
  font-weight: 500;
  border-radius: 6px;
  margin-bottom: 30px;
}

.cert-header h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 14px 0;
  color: #111;
}

.cert-header p {
  font-size: 15px;
  font-weight: 500;
  color: #555;
  line-height: 1.7;
  margin-top: 2rem;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.cert-card {
  text-align: center;
}

.cert-image {
  position: relative;
  border-radius: 10px;
  overflow: visible;
}

.cert-image img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.cert-number {
  position: absolute;
  bottom: -21px;              /* 🔑 half outside */
  left: 50%;
  transform: translateX(-50%);

  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #FFB000;
  color: #fff;
  font-weight: 700;
  font-size: 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 3;
}

.cert-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 10px;
  color: #111;
}

.cert-card p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 12px;
}

.cert-link {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cert-link span {
  font-size: 13px;
}

.cert-link:hover {
  color: #d71920;
}

.cert-header h1 {
  font-size: 30px;
  font-weight: 700;
}

.cert-btn {
  padding: 8px 18px;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}

.cert-btn:hover {
  color: #FFB000;
}

/* Responsive */
/* ===============================
   MOBILE HORIZONTAL SCROLL
================================ */
@media (max-width: 1019px) {

  .cert-badge {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 10px;
  }

  .cert-header {
    padding: 0 20px;
    margin-bottom: 40px;
  }

  .cert-header h2 {
    font-size: 26px;
  }

  .cert-header p {
    font-size: 12px;
    font-weight: 400;
  }

  /* Horizontal scroll container */
  .cert-grid {
    display: flex;
    gap: 16px;
    padding: 0 20px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  /* Hide scrollbar */
  .cert-grid::-webkit-scrollbar {
    display: none;
  }

  .cert-grid {
    scrollbar-width: none; /* Firefox */
  }

  /* Card style */
  .cert-card {
    min-width: 260px;
    max-width: 260px;
    flex-shrink: 0;
    scroll-snap-align: start;
    text-align: center;
  }

  .cert-image img {
    height: 200px;
  }

  .cert-number {
    width: 40px;
    height: 40px;
    font-size: 16.59px;
  }

  .cert-card h3 {
    font-size: 15px;
  }

  .cert-card p {
    font-size: 12px;
  }

  .cert-header h1 {
    font-size: 25px;
    font-weight: 700;
  }

  .cert-btn {
    font-size: 12px;
    padding: 10px 20px;
  }

  .cert-section {
    padding: 30px 5%;
  }
}

