/* PAGE BACKGROUND — SAME THEME */
body {
  background: #05060f;
  font-family: "Poppins", sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  opacity: 0;
  animation: fadeInPage 1.2s ease forwards;
}

@keyframes fadeInPage {
  to {
    opacity: 1;
  }
}

/* TITLE — SAME COLOR AS EXPERIENCE PAGE */
.title {
  font-size: 2.4rem;
  margin: 0; /* Remove margin because wrapper handles spacing */
  color: #b39a84; /* warm bisque tone */
  padding: 10px 0;
}

/* Title wrapper: keeps title centered while allowing a button positioned on the right */
.title-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  text-align: center;
  margin-bottom: 10px;
}

/* position the button on the right side of the title line without moving the centered title */
.title-wrapper button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* NEW GRID LAYOUT FOR CARDS */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* Left – Center – Right */
  gap: 25px;
  width: 100%;
  max-width: 1100px;
  justify-items: center;
  margin-top: 20px;
}

/* CARD STYLE — MATCHING YOUR PALETTE */
.card {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 330px;
  padding: 18px 22px;

  background: linear-gradient(
    120deg,
    #c9b7a0 60%,     /* bisque darker */
    #d9bba7 80%,     /* warm gradient */
    #d8a78b 40%,     /* coral light */
    rgba(204, 88, 56, 0.4) 30% /* coral */
  );

  border-radius: 18px;
  box-shadow: 0 20px 25px -5px rgba(204, 88, 56, 0.15);
  transition: 0.4s ease;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.1);
  box-shadow: 0 35px 35px -5px rgba(204, 88, 56, 0.25);
}

.cards:hover > .card:not(:hover) {
  filter: blur(8px);
  transform: scale(0.9);
}

/* BADGE IMAGE */
.badge {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.25);
  padding: 5px;
}

/* CERTIFICATION NAME */
.cert-name {
  font-size: 1rem;
  font-weight: 700;
  color: #a85a45; /* coral — same as UI buttons */
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr 1fr; /* 2 columns on tablet */
  }
}

@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr; /* 1 column on mobile */
  }
  .card {
    width: 90%;
  }
}

/* STAR BACKGROUND LAYERS (NO CHANGES TO YOUR DESIGN) */
.stars, .stars2, .stars3 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: repeat;
  z-index: -1;
  pointer-events: none;
}

.stars {
  background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
  opacity: 0.7;
  animation: moveStars 140s linear infinite;
}

.stars2 {
  background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
  opacity: 0.4;
  animation: moveStars 200s linear infinite;
}

.stars3 {
  background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
  opacity: 0.2;
  animation: moveStars 260s linear infinite;
}

@keyframes moveStars {
  from { background-position: 0 0; }
  to { background-position: 2000px 2000px; }
}

/* ---------------------------
   YOUR BUTTON CSS - verbatim
   --------------------------- */

button {
  display: flex;
  align-items: center;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
  font-size: 17px;
  padding: 0.8em 1.3em 0.8em 0.9em;
  color: white;
  background: #ad5389;
  background: linear-gradient(to right, #706052, #8e6e5b, #958173);
  border: none;
  letter-spacing: 0.05em;
  border-radius: 16px;
}

button svg {
  margin-right: 3px;
  transform: rotate(30deg);
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

button span {
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

button:hover svg {
  transform: translateX(5px) rotate(90deg);
}

button:hover span {
  transform: translateX(7px);
}
/* ================================= */
/*      CLEAN & CORRECT MOBILE FIX   */
/* ================================= */

/* Tablet */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr 1fr; /* 2 per row on tablets */
    gap: 20px;
  }

  .card {
    width: 95%;
    padding: 16px 18px;
  }
}

/* Phone */
@media (max-width: 600px) {
  body {
    padding: 10px 0;
  }

  .title {
    font-size: 1.9rem;
  }

  .cards {
    grid-template-columns: 1fr; /* 1 per row */
    gap: 18px;
    width: 100%;
    padding: 0 10px;
  }

  .card {
    width: 100%;
    max-width: 360px;
    padding: 16px 18px;
    transform: none !important;
  }

  .cards:hover > .card:not(:hover) {
    filter: none !important;
    transform: none !important;
  }

  .badge {
    width: 50px;
    height: 50px;
  }

  .cert-name {
    font-size: 0.95rem;
  }
}

/* Very small phones */
@media (max-width: 400px) {
  .title {
    font-size: 1.6rem;
  }

  .card {
    max-width: 330px;
  }

  .badge {
    width: 45px;
    height: 45px;
  }
}
