/* Certificates — same cream glass language as the student panel */

.certs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  color: #061321;
  font-family: 'Manrope', 'Vazirmatn', Tahoma, sans-serif;
}

.certs-hero,
.certs-valid,
.certs-levels,
.certs-paper {
  background: rgba(245, 242, 234, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(6, 19, 33, 0.08);
}

.certs-hero {
  border-radius: 18px;
  padding: 16px 22px 18px;
}

.certs-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #d7a52a;
}

.certs-hero h1 {
  margin: 0.25rem 0 0.35rem;
  max-width: 18ch;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.certs-lead {
  margin: 0;
  max-width: 46rem;
  color: rgba(6, 19, 33, 0.72);
  font-size: 15px;
  line-height: 1.55;
}

.certs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.certs-paper {
  position: relative;
  min-width: 0;
  border-radius: 18px;
  padding: 12px;
  background: #f7f3ea;
  color: #061321;
  text-align: center;
}

.certs-paper__frame {
  border: 1px solid rgba(215, 165, 42, 0.7);
  border-radius: 12px;
  padding: clamp(18px, 3vw, 28px) clamp(16px, 3vw, 32px) 18px;
  background:
    linear-gradient(#d7a52a, #d7a52a) 14px 14px / 28px 1px no-repeat,
    linear-gradient(#d7a52a, #d7a52a) 14px 14px / 1px 28px no-repeat,
    linear-gradient(#d7a52a, #d7a52a) calc(100% - 14px) 14px / 28px 1px no-repeat,
    linear-gradient(#d7a52a, #d7a52a) calc(100% - 14px) 14px / 1px 28px no-repeat,
    linear-gradient(#d7a52a, #d7a52a) 14px calc(100% - 14px) / 28px 1px no-repeat,
    linear-gradient(#d7a52a, #d7a52a) 14px calc(100% - 14px) / 1px 28px no-repeat,
    linear-gradient(#d7a52a, #d7a52a) calc(100% - 14px) calc(100% - 14px) / 28px 1px no-repeat,
    linear-gradient(#d7a52a, #d7a52a) calc(100% - 14px) calc(100% - 14px) / 1px 28px no-repeat,
    #fbf8f2;
}

.certs-paper__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  text-align: start;
}

.certs-paper__brand img {
  width: 34px;
  height: 48px;
  object-fit: contain;
}

.certs-paper__brand > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.certs-paper__brand small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #d7a52a;
}

.certs-word {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.14em;
  line-height: 1;
}

.certs-word span { color: #d7a52a; }

.certs-paper__brand em {
  margin-inline-start: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #061321;
  color: #f0c24b;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.certs-paper__awarded {
  margin: 22px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #d7a52a;
}

.certs-paper h2 {
  margin: 4px 0 0;
  font-family: 'Playfair Display', 'Vazirmatn', serif;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.certs-paper__body,
.certs-paper__level {
  margin: 10px auto 0;
  max-width: 38rem;
  line-height: 1.7;
}

.certs-paper__body { color: rgba(6, 19, 33, 0.78); }

.certs-paper__level {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.certs-paper__skill {
  margin: 18px auto 0;
  max-width: 40rem;
  padding: 12px 16px 14px;
  border-block: 1px solid rgba(215, 165, 42, 0.45);
}

.certs-paper__skill span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #d7a52a;
}

.certs-paper__skill p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.75;
}

.certs-paper__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  margin-top: 22px;
  text-align: start;
}

.certs-paper__meta { justify-self: start; min-width: 0; }
.certs-paper__seal { justify-self: center; }

.certs-paper__meta span,
.certs-sign em {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(6, 19, 33, 0.55);
  font-style: normal;
}

.certs-paper__meta strong,
.certs-sign strong {
  display: block;
  margin: 2px 0 8px;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.certs-sign {
  justify-self: end;
  width: max-content;
  max-width: 100%;
  text-align: end;
  color: #13224d;
}

.certs-sign__script {
  display: block;
  font-family: 'Great Vibes', cursive;
  font-size: 42px;
  line-height: 0.9;
  font-weight: 400;
}

.certs-sign__stroke {
  display: block;
  width: min(160px, 100%);
  height: 22px;
  margin-inline-start: auto;
  margin-top: -6px;
}

.certs-no {
  font-family: 'Manrope', ui-monospace, monospace;
  letter-spacing: 0.04em;
}

.certs-paper__seal {
  width: 46px;
  height: 64px;
  object-fit: contain;
}

.certs-paper__scope {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(215, 165, 42, 0.45);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #d7a52a;
}

.certs-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.certs-valid {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 18px;
  padding: 14px 16px;
}

.certs-valid .lx-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #d7a52a;
}

.certs-valid strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.certs-valid p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(6, 19, 33, 0.72);
}

.certs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.certs-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(6, 19, 33, 0.16);
  background: rgba(245, 242, 234, 0.9);
  color: #061321;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.certs-btn--ink {
  background: #061321;
  border-color: #061321;
  color: #f5f2ea;
}

.certs-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.certs-levels {
  border-radius: 18px;
  padding: 14px;
}

.certs-levels h3 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.certs-level {
  width: 100%;
  min-height: 56px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: start;
  cursor: pointer;
}

.certs-level:last-child { margin-bottom: 0; }

.certs-level.is-on {
  border-color: rgba(215, 165, 42, 0.7);
  background: rgba(240, 194, 75, 0.18);
}

.certs-level.is-locked,
.certs-level:disabled {
  cursor: default;
  opacity: 0.72;
  color: inherit;
}

.certs-level__no {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #061321;
  color: #f5f2ea;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.certs-level__copy {
  min-width: 0;
  flex: 1;
}

.certs-level__copy strong,
.certs-level__copy em {
  display: block;
  overflow-wrap: anywhere;
}

.certs-level__copy em {
  font-style: normal;
  font-size: 12px;
  color: rgba(6, 19, 33, 0.62);
}

.certs-level b {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #d7a52a;
  flex: 0 0 auto;
}

@media (max-width: 860px) {
  .certs-layout { grid-template-columns: 1fr; }
  .certs-hero h1 { max-width: none; }
  .certs-paper__foot { grid-template-columns: 1fr; }
  .certs-sign,
  .certs-sign__stroke { text-align: start; margin-inline-start: 0; }
  .certs-paper__seal { justify-self: center; }
}

@media print {
  body * { visibility: hidden; }
  .certs-paper,
  .certs-paper * { visibility: visible; }
  .certs-paper {
    position: absolute;
    inset: 8mm;
    width: auto;
    box-shadow: none;
    border: 0;
    background: #fff;
  }
}
