/* =====================================================
   CERT PAGE – PREMIUM DARK GLASS DESIGN
===================================================== */

.cert-page {
  max-width: 1300px;
  width: 92%;
  margin: auto;
  padding-top: 150px;
  padding-bottom: 100px;
  text-align: center;
}

/* ── PAGE TITLE ── */
.page-title {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -1px;
}

.page-title span {
  background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 16px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* ── STAT COUNTERS ── */
.cert-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stat-pill .stat-icon {
  font-size: 16px;
}

.stat-pill .stat-num {
  font-weight: 800;
  color: var(--primary-cyan);
  font-size: 17px;
}

/* ── FILTER BUTTONS ── */
.cert-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 600;
}

.filter-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.filter-btn.active {
  background: var(--primary-cyan);
  color: #000;
  border-color: var(--primary-cyan);
  font-weight: 700;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

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

/* ── CERT CARD ── */
.cert-card {
  padding: 28px 24px;
  border-radius: 20px;
  text-align: left;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-cyan), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cert-card:hover::before {
  opacity: 1;
}

.cert-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7),
              0 0 25px rgba(56, 189, 248, 0.25);
  background: rgba(30, 41, 59, 0.8);
}

/* ── CARD HEADER (icon + text) ── */
.cert-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.cert-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--primary-cyan);
}

.cert-card-header .cert-info h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}

.cert-card-header .cert-info .cert-org {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── CATEGORY BADGE ── */
.cert-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  width: fit-content;
}

.cert-badge.internship {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.cert-badge.hackathon {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.cert-badge.course {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cert-badge.others {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

/* ── CARD FOOTER ── */
.cert-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}

.cert-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.cert-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 12px;
  background: var(--primary-cyan);
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cert-btn:hover {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

/* ── ANIMATION ── */
.cert-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardFadeIn 0.5s ease forwards;
}

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── CERTIFICATE MODAL ── */
.cert-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cert-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cert-modal {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.cert-modal-overlay.active .cert-modal {
  transform: scale(1);
}

.cert-modal img {
  max-width: 100%;
  max-height: 85vh;
  display: block;
}

.cert-modal-close {
  position: fixed;
  top: 24px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10000;
}

.cert-modal-close:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}

.cert-modal-pdf {
  background: var(--bg-card);
  padding: 50px;
  text-align: center;
  min-width: 400px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

.cert-modal-pdf .pdf-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.cert-modal-pdf h3 {
  color: var(--text-main);
  font-size: 20px;
  margin-bottom: 8px;
}

.cert-modal-pdf p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.cert-modal-pdf a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 12px;
  background: var(--primary-cyan);
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s ease;
}

.cert-modal-pdf a:hover {
  box-shadow: 0 0 20px rgba(56,189,248,0.4);
}

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

@media (max-width: 700px) {
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-title {
    font-size: 36px;
  }

  .cert-stats {
    gap: 10px;
  }

  .stat-pill {
    padding: 10px 18px;
    font-size: 13px;
  }

  .cert-card {
    padding: 22px 20px;
  }
}