/* WRAPPER */
#am-hero-search-module {
  max-width: 800px;
  margin: 0 auto;
}

/* SEARCH INPUT */
.am-search-box input {
  width: 100%;
  padding: 16px 22px;
  font-size: 1.15rem;
  border-radius: 14px;
  border: 1px solid #ddd;
  transition: 0.3s;
}

.am-search-box input:focus {
  border-color: #FF8D50;
  box-shadow: 0 0 0 4px rgba(255,141,80,0.15);
  outline: none;
}

/* RESULTS GRID */
#am-search-results {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

/* CARD */
.am-search-card {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #eee;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);

  /* PREMIUM ANIMATION */
  opacity: 0;
  transform: translateX(40px) scale(0.94);
  filter: blur(4px);

  animation: amCascadeIn 0.6s cubic-bezier(.17,.67,.48,1.44) forwards;

  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* TITLE */
.am-search-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
  font-weight: 600;
}

/* HOVER EFFECT */
.am-search-card:hover {
  transform: translateX(0) translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

/* PREMIUM ANIMATION KEYFRAMES */
@keyframes amCascadeIn {
  0% {
    opacity: 0;
    transform: translateX(40px) scale(0.94);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

/* STAGGER SEQUENCE */
.am-search-card:nth-child(1) { animation-delay: 0.05s; }
.am-search-card:nth-child(2) { animation-delay: 0.10s; }
.am-search-card:nth-child(3) { animation-delay: 0.15s; }
.am-search-card:nth-child(4) { animation-delay: 0.20s; }
.am-search-card:nth-child(5) { animation-delay: 0.25s; }
.am-search-card:nth-child(6) { animation-delay: 0.30s; }
.am-search-card:nth-child(7) { animation-delay: 0.35s; }
.am-search-card:nth-child(8) { animation-delay: 0.40s; }
.am-search-card:nth-child(9) { animation-delay: 0.45s; }
.am-search-card:nth-child(10){ animation-delay: 0.50s; }


/* TOP ROW INSIDE CARD */
.am-card-top {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

/* GENERIC BADGE STYLE */
.am-accr-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  border-radius: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* CUSTOM COLORS PER ACCREDITATION */
.am-accr-nebosh {
  background: #1F4E79; /* NEBOSH dark blue */
}

.am-accr-iosh {
  background: #009CA6; /* IOSH teal */
}

.am-accr-bqa {
  background: #C89B3C; /* Gold */
}

.am-accr-highfield {
  background: #673ab7; /* Purple */
}

.am-accr-habc {
  background: #00AEEF; /* Light blue */
}

/* fallback for unstyled accreditations */
.am-accr-badge[class*="am-accr-"] {
  background: #444;
}


/* Clear Button (X) */
.am-search-box {
  position: relative;
}

.am-clear-input {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #999;
  cursor: pointer;
  display: none; /* hidden until input has text */
  transition: color 0.2s ease;
}

.am-clear-input:hover {
  color: #555;
}