/* =========================
   certs.css
   Link AFTER style.css in <head>
   Certificate gallery section
========================= */

/* ── Section wrapper ── */
.certs-section {
  width: min(860px, 88vw);
  margin: 0 auto var(--about-mb);
}

/* ── Section header ── */
.certs-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.certs-header-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}
.certs-header-label {
  font-family: var(--font-special);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

/* ── Certificate grid ── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

/* ── Individual card ── */
.cert-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  overflow: hidden;
  background: #161616;
  transition:
    border-color 0.2s ease,
    transform 0.22s ease;
  position: relative;
}
.cert-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}
.cert-card.cert-active {
  border-color: rgba(255, 255, 255, 0.35);
}

/* ── Thumbnail area ── */
.cert-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%) brightness(0.88);
  transition:
    filter 0.25s ease,
    transform 0.25s ease;
}
.cert-card:hover .cert-thumb img,
.cert-card.cert-active .cert-thumb img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.04);
}

/* expand hint */
.cert-expand {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.cert-card:hover .cert-expand {
  opacity: 1;
}

/* ── Card meta strip ── */
.cert-meta {
  padding: 11px 13px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.cert-meta-title {
  font-family: var(--font-base);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 3px;
  line-height: 1.3;
}
.cert-meta-issuer {
  font-family: var(--font-special);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

/* ── Lightbox panel ── */
.cert-lightbox {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #161616;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  pointer-events: none;
  max-height: 0;
}
.cert-lightbox.cert-lb-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 9999px;
}

/* Left — image */
.cert-lb-img-col {
  position: relative;
  background: #111;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert-lb-img-col img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 16px;
}
.cert-lb-no-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 260px;
}
.cert-lb-no-img-icon {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.15);
}
.cert-lb-no-img-text {
  font-family: var(--font-special);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.12);
}

/* Right — info */
.cert-lb-info-col {
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}
.cert-lb-eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-special);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
}

.cert-lb-eyebrow-meta {
  flex: 0 1 auto;
}

.cert-lb-eyebrow-lang {
  flex: 0 0 auto;
  text-align: right;
}
.cert-lb-title {
  font-family: var(--font-special);
  font-size: 20px;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.3;
}
.cert-lb-divider {
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.cert-lb-desc {
  font-family: var(--font-base);
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.4);
}
.cert-lb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cert-lb-tag {
  font-family: var(--font-special);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 3px 10px;
}

/* Close button in image col */
.cert-lb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.4);
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
  z-index: 2;
}
.cert-lb-close:hover {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ── Nav dots ── */
.cert-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  min-height: 13px;
}
.cert-nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.cert-nav-dot:hover {
  background: rgba(255, 255, 255, 0.3);
}
.cert-nav-dot.cert-nav-active {
  background: rgba(255, 255, 255, 0.55);
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .certs-section {
    width: calc(100% - 48px);
    margin-left: 24px;
    margin-right: 24px;
  }
  .cert-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .cert-lightbox {
    grid-template-columns: 1fr;
  }
  .cert-lb-img-col {
    min-height: 200px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  .cert-lb-info-col {
    border-left: none;
    padding: 20px 18px;
    gap: 10px;
  }
  .cert-lb-title {
    font-size: 16px;
  }
}

/* ── Hidden by default, revealed inline by #certsTriggerBtn ── */
.certs-section {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  margin-bottom: 0;
}
.certs-section.certs-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: none;
  overflow: visible;
  margin-bottom: var(--about-mb);
}

/* ── Two-button row in .about-card ── */
.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
