/* ================================
   CERTIFICATES PAGE
   certificates/certificates.css
================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #1a1a1f;
  --surface:   #212126;
  --surface-2: #28282e;
  --border:    #2e2e35;
  --gold:      #ffbc5e;
  --gold-dim:  hsla(45,100%,72%,0.12);
  --text:      #e4e4e7;
  --text-sub:  #a1a1aa;
  --text-dim:  #71717a;
  --radius:    12px;
  --ff:        'Poppins', sans-serif;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── PAGE WRAPPER ── */
.cert-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── HEADER ── */
.cert-header {
  margin-bottom: 40px;
}

.cert-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: var(--transition);
  margin-bottom: 28px;
}

.cert-back:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.cert-header-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cert-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px;
}

.cert-heading {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.cert-subheading {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* ── CONTROLS ── */
.cert-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 10px;
}

/* search */
.cert-search-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.cert-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.cert-search {
  width: 100%;
  padding: 10px 40px 10px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--ff);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.cert-search::placeholder { color: var(--text-dim); }

.cert-search:focus {
  border-color: var(--gold);
}

.cert-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  transition: color var(--transition);
}

.cert-search-clear:hover { color: var(--gold); }

/* filters */
.cert-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cert-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-sub);
  font-family: var(--ff);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cert-filter:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.cert-filter.active {
  background: var(--gold);
  border-color: var(--gold);
  color: hsl(0,0%,7%);
}

.cert-count {
  font-size: 11px;
  font-weight: 600;
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
  padding: 1px 6px;
}

.cert-filter.active .cert-count {
  background: rgba(0,0,0,0.2);
}

/* results count */
.cert-results {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 20px;
  margin-top: 8px;
}

/* ── GRID ── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── CARD ── */
.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: cert-fade-in 0.3s ease both;
}

.cert-card:hover {
  transform: translateY(-3px);
  border-color: hsla(45,100%,72%,0.3);
  box-shadow: 0 8px 24px hsla(45,100%,50%,0.08);
}

@keyframes cert-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cert-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cert-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid transparent;
}

.cert-year {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  flex-shrink: 0;
}

.cert-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
}

.cert-issuer {
  font-size: 12px;
  color: var(--text-sub);
}

.cert-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding: 8px 16px;
  background: var(--gold);
  color: hsl(0,0%,7%);
  border-radius: 8px;
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--gold);
  transition: var(--transition);
  align-self: flex-start;
}

.cert-btn:hover {
  background: transparent;
  color: var(--gold);
}

/* ── EMPTY STATE ── */
.cert-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 14px;
}

/* ── FOOTER ── */
.cert-footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

.cert-footer a {
  color: var(--gold);
  text-decoration: none;
}

.cert-footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .cert-page { padding: 20px 16px 48px; }
  .cert-grid { grid-template-columns: 1fr; }
  .cert-heading { font-size: 22px; }
  .cert-filters { gap: 6px; }
  .cert-filter { font-size: 12px; padding: 5px 12px; }
}
