/* Sertifikat — yalnız .ec-cert-root daxilində */
.ec-cert-root,
.ec-cert-root *,
.ec-cert-root *::before,
.ec-cert-root *::after {
  box-sizing: border-box;
}

.ec-cert-root {
  --blue-primary: #1a5fb4;
  isolation: isolate;
  font-size: 16px;
  line-height: 1.5;
  --blue-bright: #2d7dd2;
  --blue-light: #5eb0e8;
  --blue-pale: #d4e8f7;
  --blue-deep: #0f3d6e;
  --brand: var(--blue-primary);
  --brand-deep: var(--blue-deep);
  --brand-mid: var(--blue-bright);
  --brand-light: var(--blue-light);
  --brand-pale: var(--blue-pale);
  --brand-shine: #eef6fc;
  --accent-silver: #c4c8cc;
  --accent-silver-dark: #8a9098;
  --navy: var(--blue-primary);
  --navy-deep: var(--blue-deep);
  --gold: #b8860b;
  --gold-light: #d4af37;
  --gold-pale: #f5e6c8;
  --gold-shine: #fff8e7;
  --cream: #fdfbf7;
  --cream-shadow: #e8eef4;
  --text: #1a2e42;
  --text-muted: #4a5f75;
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;
  clear: both;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--text);
}

.ec-cert-root .ec-cert-stage {
  position: relative;
  width: 100%;
  max-width: 842px;
  margin-left: auto;
  margin-right: auto;
}

.ec-cert-root .ec-cert-toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  margin: 0;
  pointer-events: none;
}

.ec-cert-root .btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #1a5fb4 0%, #0f3d6e 100%);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(15, 61, 110, 0.35);
  pointer-events: auto;
}

.ec-cert-root .btn-download:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ec-cert-root .cert-scale-viewport {
  container-type: inline-size;
  container-name: cert-viewport;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  aspect-ratio: 297 / 210;
  position: relative;
  overflow: hidden;
}

.ec-cert-root .cert-scale-viewport > .certificate {
  position: absolute;
  left: 50%;
  top: 0;
  width: 842px;
  height: calc(842px * 210 / 297);
  max-width: none;
  margin: 0;
  aspect-ratio: auto;
  transform: translateX(-50%) scale(var(--cert-scale, 1));
  transform-origin: top center;
}

/* ——— Sertifikat ——— */
.certificate {
  position: relative;
  width: 842px;
  height: calc(842px * 210 / 297);
  margin: 0 auto;
  padding: 1.2rem 3.2rem 1.9rem;
  display: flex;
  flex-direction: column;
  background-color: var(--cream);
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(45, 125, 210, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 50%, rgba(26, 95, 180, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 100% 50%, rgba(94, 176, 232, 0.06) 0%, transparent 50%),
    linear-gradient(175deg, #ffffff 0%, var(--cream) 38%, var(--cream-shadow) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 25px 60px rgba(8, 26, 38, 0.35),
    0 0 0 1px rgba(26, 95, 180, 0.15);
  overflow: hidden;
}

.cert-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 95% 85% at 50% 50%, transparent 40%, rgba(26, 95, 180, 0.06) 100%);
  pointer-events: none;
  z-index: 0;
}

.cert-shine {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 60%;
  height: 80%;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.35) 0%,
    transparent 55%
  );
  pointer-events: none;
  z-index: 0;
}

.cert-edge {
  position: absolute;
  top: 32px;
  bottom: 32px;
  width: 18px;
  z-index: 0;
  pointer-events: none;
}

.cert-edge--left {
  left: 22px;
  z-index: 1;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--gold-pale) 15%,
    var(--gold-light) 50%,
    var(--gold-pale) 85%,
    transparent 100%
  );
  opacity: 0.75;
  border-radius: 2px;
}

.cert-edge--right {
  right: 28px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--gold-pale) 15%,
    var(--gold-light) 50%,
    var(--gold-pale) 85%,
    transparent 100%
  );
  opacity: 0.75;
  border-radius: 2px;
}

.cert-edge--left::after,
.cert-edge--right::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 -40px 0 var(--gold-light), 0 40px 0 var(--gold-light);
  opacity: 0.7;
}

/* ——— Fon qatları ——— */
.cert-bg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.cert-bg-layer--mesh {
  background:
    radial-gradient(ellipse 90% 70% at 15% 20%, rgba(94, 176, 232, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 70% 60% at 88% 75%, rgba(26, 95, 180, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(45, 125, 210, 0.08) 0%, transparent 40%);
}

.cert-bg-layer--waves {
  background: none;
  opacity: 1;
  z-index: 0;
}

.cert-wave-svg,
.cert-layer-img--waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 54%;
  pointer-events: none;
  display: block;
}

.cert-wave-svg {
  z-index: 1;
}

.cert-layer-img--waves {
  object-fit: fill;
  object-position: center bottom;
  z-index: 2;
  display: none;
}

.cert-layer-img--waves.is-ready {
  display: block;
}

.certificate.wave-img-ready .cert-wave-svg {
  display: none;
}

.cert-layer-img--guilloche {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0.2;
}

/* Dalğa üzərində mətn oxunurluğu */
.cert-bg-layer--wave-scrim {
  bottom: 0;
  top: auto;
  height: 58%;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(248, 250, 252, 0.45) 28%,
    rgba(248, 250, 252, 0.28) 55%,
    transparent 100%
  );
  z-index: 3;
  pointer-events: none;
}

.cert-bg-layer--guilloche {
  background: none;
  opacity: 1;
}

.cert-bg-layer--rosette {
  background: var(--asset-rosette) center 42% / min(75%, 420px) no-repeat;
  opacity: 0.2;
}

.cert-watermark {
  position: absolute;
  left: 50%;
  top: 48%;
  width: max-content;
  max-width: 88%;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6.8rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  padding-left: 0.35em;
  color: rgba(26, 95, 180, 0.05);
  transform: translate(-50%, -50%) rotate(-8deg);
  transform-origin: center center;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  white-space: nowrap;
}

.cert-vignette,
.cert-shine {
  z-index: 0;
}

/* Künc ornamentləri */
.corner-ornament {
  position: absolute;
  width: 96px;
  height: 96px;
  background: var(--asset-corner) center / contain no-repeat;
  color: var(--gold);
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(184, 134, 11, 0.35));
}

.corner-ornament--tl { top: 14px; left: 14px; }
.corner-ornament--tr {
  top: 14px;
  right: 14px;
  transform: scaleX(-1);
}
.corner-ornament--bl {
  bottom: 14px;
  left: 14px;
  transform: scaleY(-1);
}
.corner-ornament--br {
  bottom: 14px;
  right: 14px;
  transform: scale(-1);
}

.corner-accent,
.corner-accent-img {
  position: absolute;
  width: 110px;
  height: 110px;
  color: var(--blue-bright);
  opacity: 0.75;
  z-index: 1;
  pointer-events: none;
  object-fit: contain;
}

.corner-accent--tr {
  top: 0;
  right: 0;
  color: var(--blue-primary);
}

.corner-accent--bl {
  bottom: 0;
  left: 0;
  color: var(--blue-light);
}

.cert-border {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.cert-border--outer {
  inset: 6px;
  border: 4px double var(--gold);
  box-shadow:
    inset 0 0 40px rgba(212, 175, 55, 0.18),
    inset 0 0 12px rgba(255, 248, 231, 0.4),
    0 0 0 1px rgba(26, 95, 180, 0.08);
}

.cert-border--inner {
  inset: 16px;
  border: 1px solid rgba(26, 95, 180, 0.28);
}

.cert-border--gold-line {
  inset: 22px;
  border: 1.5px solid rgba(26, 95, 180, 0.45);
}

.cert-border--frame-dots {
  inset: 28px;
  border: none;
  box-shadow: inset 0 0 0 1px rgba(201, 160, 64, 0.08);
  background: none;
  overflow: hidden;
}

.cert-layer-img--dots {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0.55;
}

.cert-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 4;
  min-height: 0;
  padding-left: 2.75rem;
  isolation: isolate;
}

.cert-content::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 8%;
  bottom: 12%;
  width: 3px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--blue-pale) 8%,
    var(--blue-bright) 50%,
    var(--blue-pale) 92%,
    transparent
  );
  border-radius: 2px;
  opacity: 0.7;
}

.cert-header-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0 0 0.2rem;
  color: var(--gold);
}

.cert-header-emblem-svg {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(184, 134, 11, 0.3));
}

.cert-header-emblem-wing {
  flex: 1;
  max-width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-pale), var(--gold-light), var(--gold));
  position: relative;
}

.cert-header-emblem-wing--right {
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold-pale), transparent);
}

.cert-header-emblem-wing::before,
.cert-header-emblem-wing::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 0 2px var(--gold-pale);
}

.cert-header-emblem-wing--left::after {
  right: 0;
}

.cert-header-emblem-wing--right::after {
  left: 0;
}

.cert-header-emblem-wing--left::before {
  left: 28%;
  width: 3px;
  height: 3px;
  opacity: 0.65;
}

.cert-header-emblem-wing--right::before {
  right: 28%;
  width: 3px;
  height: 3px;
  opacity: 0.65;
}

.cert-title-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 0 0.2rem;
}

.cert-title-ornament {
  flex: 1;
  max-width: 130px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), transparent);
  position: relative;
}

.cert-title-ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 0 2px var(--gold-pale);
}

.cert-title-ornament--left::after { right: 0; }
.cert-title-ornament--right::after { left: 0; }

.cert-title {
  font-family: "Cinzel", "Cormorant Garamond", Georgia, serif;
  font-size: 2.85rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 45%, #9a7209 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.32em;
  margin: 0;
  padding-left: 0.32em;
  text-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(184, 134, 11, 0.25));
  flex-shrink: 0;
}

.cert-ribbon {
  display: flex;
  justify-content: center;
  margin: 0.1rem 0 0.3rem;
}

.cert-ribbon-text {
  display: inline-block;
  padding: 0.28rem 1.4rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #7a5c0a;
  background: linear-gradient(180deg, var(--gold-shine) 0%, var(--gold-pale) 40%, rgba(212, 175, 55, 0.35) 100%);
  border: 1px solid var(--gold-light);
  border-radius: 2px;
  box-shadow:
    0 3px 8px rgba(184, 134, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(184, 134, 11, 0.15);
}

.cert-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 0 0.3rem;
}

.cert-divider::before,
.cert-divider::after {
  content: "";
  flex: 1;
  max-width: 110px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cert-divider-diamond {
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: rotate(45deg);
  box-shadow: 0 0 0 2px var(--gold-pale);
}

.cert-intro {
  text-align: center;
  font-size: 1.02rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.2rem;
}

.recipient-block {
  position: relative;
  text-align: center;
  margin-bottom: 0.25rem;
}

.recipient-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.7rem;
  font-weight: 700;
  text-align: center;
  color: #0a2d52;
  margin-bottom: 0.2rem;
  line-height: 1.12;
  word-break: break-word;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
}

.cert-trainer {
  text-align: center;
  font-size: 0.98rem;
  color: var(--blue-deep);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0.25rem auto 0.25rem;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 1),
    0 0 8px rgba(255, 255, 255, 0.75);
}

.cert-trainer-label {
  font-weight: 600;
  color: var(--blue-primary);
  margin-right: 0.25em;
}

.cert-trainer-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.08em;
  font-weight: 600;
  color: var(--blue-deep);
}

.recipient-name::before,
.recipient-name::after {
  content: "◆";
  font-size: 0.35em;
  color: var(--gold);
  opacity: 0.85;
  vertical-align: middle;
  margin: 0 0.5em;
}

.recipient-underline {
  width: min(300px, 72%);
  height: 3px;
  margin: 0 auto 0.3rem;
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
  box-shadow: 0 1px 6px rgba(212, 175, 55, 0.3);
}

.cert-body {
  text-align: center;
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 36em;
  margin: 0 auto 0.25rem;
  color: var(--blue-deep);
  font-weight: 500;
  white-space: pre-line;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 1),
    0 0 12px rgba(255, 255, 255, 0.85);
}

.cert-body strong {
  color: var(--blue-primary);
  font-weight: 700;
}

.cert-issuer {
  text-align: center;
  font-size: 0.88rem;
  color: var(--blue-deep);
  font-weight: 500;
  margin-top: 0.25rem;
  padding: 0 1rem;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 1),
    0 0 10px rgba(255, 255, 255, 0.8);
}

.cert-issuer strong {
  color: var(--blue-primary);
  font-weight: 700;
}

.cert-footer-rule {
  position: relative;
  z-index: 4;
  height: 2px;
  margin: 0.5rem 2.5rem 0;
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
  box-shadow: 0 1px 4px rgba(212, 175, 55, 0.25);
  flex-shrink: 0;
}

.cert-footer {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
  position: relative;
  z-index: 4;
  margin-top: auto;
  padding-top: 0.5rem;
  padding-right: 118px;
  flex-shrink: 0;
  width: 100%;
}

.cert-footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-end;
  flex: 1;
  min-width: 0;
}

.cert-meta {
  font-size: 0.82rem;
  color: #061220;
  font-weight: 600;
  line-height: 1.5;
  padding: 0.5rem 0.85rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 248, 231, 0.94) 100%);
  border-radius: 5px;
  border-left: 3px solid var(--gold);
  box-shadow:
    0 2px 10px rgba(6, 18, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-shadow: none;
}

.partner-logos {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 10px;
  padding-left: 0;
  padding-bottom: 0.35rem;
}

.partner-logo-item {
  width: fit-content;
  height: fit-content;
  border: 1px solid rgba(184, 134, 11, 0.45);
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  overflow: hidden;
}

.partner-logo-img {
  width: 100px;
  height: 66px;
  object-fit: contain;
  display: block;
}

.cert-date {
  margin-bottom: 0.2rem;
  color: #0a2d52;
  font-weight: 600;
}

.cert-number {
  font-weight: 700;
  color: #1a5fb4;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.cert-number span {
  color: #061220;
  font-weight: 700;
}

.signature-area {
  text-align: center;
  width: 240px;
  flex-shrink: 0;
  padding: 0.55rem 1rem 0.7rem;
}

.signature-panel {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  padding-bottom: 0.25rem;
}

.signature-main {
  position: relative;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  padding-top: 8px;
}

.signature-ink {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-bottom: 0.1rem;
  position: relative;
  z-index: 1;
}

.signature-svg {
  display: block;
  width: 180px;
  height: 44px;
  color: var(--blue-primary);
  flex-shrink: 0;
}

.signature-img--photo {
  width: 180px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: center bottom;
}

.signature-img--photo[hidden] {
  display: none;
}

.signature-baseline {
  width: 100%;
  border-bottom: 1.5px solid rgba(26, 95, 180, 0.45);
  margin: 0;
  position: relative;
  z-index: 0;
}

.signature-seal,
.signature-seal-img {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 62px;
  height: 62px;
  transform: translateX(-50%) rotate(-8deg);
  z-index: 3;
  opacity: 0.58;
  filter: drop-shadow(0 3px 8px rgba(26, 95, 180, 0.25));
  pointer-events: none;
}

.signature-seal-img {
  display: none;
  object-fit: contain;
}

.signature-main.has-seal-img .signature-seal,
.signature-main.is-pdf-seal .signature-seal {
  display: none;
}

.signature-main.has-seal-img .signature-seal-img,
.signature-main.is-pdf-seal .signature-seal-img {
  display: block;
  opacity: 0.82;
  filter: none;
}

.signature-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #061220;
  margin-top: 0.65rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-shadow: none;
}

.signature-role {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7a5c0a;
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
  text-shadow: none;
}

/* PDF endir — yalnız toolbar gizlənir; sertifikat ekrandakı kimi qalır */
body.is-pdf-export .ec-cert-toolbar,
body.is-pdf-export .btn-download {
  display: none !important;
}

body.is-pdf-export {
  background: #1a2535;
}

/* html2canvas gradient clip mətni düzgün çəkmir — PDF üçün solid qızıl */
.ec-cert-root .certificate.is-pdf-export h1.cert-title,
body.is-pdf-export .ec-cert-root h1.cert-title {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #9a7209 !important;
  color: #9a7209 !important;
  filter: none !important;
}

/* PDF: möhür SVG→img və transform düzəlişi — imza sahəsi sürüşməsin */
.certificate.is-pdf-export #signature-seal-svg {
  display: none !important;
}

.certificate.is-pdf-export #signature-seal-img {
  display: block !important;
  width: 62px;
  height: 62px;
  left: calc(50% - 31px);
  top: 2px;
  transform: rotate(-8deg);
  filter: none;
}

.certificate.is-pdf-export .signature-img--photo {
  width: 180px;
  max-height: 52px;
  height: auto;
}

.certificate.is-pdf-export .signature-area {
  width: 240px;
  flex-shrink: 0;
}

.certificate.is-pdf-export .signature-main {
  width: 200px;
  max-width: 200px;
}

/* QR kod — çərçivənin içində, sağ aşağı */
.cert-qr {
  position: absolute;
  right: 56px;
  bottom: 34px;
  z-index: 3;
  width: auto;
  min-width: 108px;
  padding: 7px 7px 5px;
  background: #fff;
  border: 1px solid rgba(26, 95, 180, 0.35);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(26, 95, 180, 0.12);
  text-align: center;
}

.cert-qr-label {
  display: block;
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-primary);
  margin-bottom: 3px;
  opacity: 0.75;
}

.cert-qr-canvas {
  line-height: 0;
}

.cert-qr-canvas img,
.cert-qr-canvas canvas {
  display: block;
  width: 96px !important;
  height: 96px !important;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

@page {
  size: A4 landscape;
  margin: 0;
}

@media print {
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Yalnız sertifikat çap olunsun, alət paneli yox */
  .ec-cert-root .ec-cert-toolbar,
  .ec-cert-root .btn-download {
    display: none !important;
  }

  .ec-cert-root {
    margin: 0 !important;
  }

  /* Fon rəngləri/şəkilləri çapda saxlanılsın */
  .ec-cert-root,
  .ec-cert-root * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 842px dizaynı A4 landşaftı (297mm) tam dolduracaq şəkildə miqyaslanır —
     ekran/PDF ilə eyni proporsiya */
  .cert-scale-viewport {
    max-width: none !important;
    width: 297mm !important;
    height: 210mm !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    margin: 0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .cert-scale-viewport > .certificate {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 842px !important;
    height: 595.28px !important;
    transform: scale(1.3331) !important;
    transform-origin: top left !important;
    box-shadow: none !important;
  }

  /* Çapda da başlıq qradiyent əvəzinə bütöv qızıl (background-clip:text bəzi
     brauzerlərdə çap olunmur) */
  .ec-cert-root h1.cert-title {
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #9a7209 !important;
    color: #9a7209 !important;
    filter: none !important;
  }
}

/* ═══ DLE tema müdafiəsi (kayma / font pozulması) ═══ */
.ec-cert-root footer.cert-footer {
  display: flex !important;
  margin: 0;
  padding: 0;
  padding-top: 0.5rem;
  padding-right: 118px;
  border: 0;
  background: none;
  float: none;
  position: relative;
  min-height: 0;
  max-width: none;
  width: 100%;
  text-transform: none;
  letter-spacing: normal;
  font-variant: normal;
  box-shadow: none;
}

.ec-cert-root .certificate {
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  float: none !important;
  margin: 0 auto !important;
}

.ec-cert-root .cert-footer {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
}

.ec-cert-root h1.cert-title {
  display: block !important;
  font-family: "Cinzel", "Cormorant Garamond", Georgia, serif !important;
  font-size: 2.85rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-transform: none !important;
  letter-spacing: 0.32em !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  padding: 0 0 0 0.32em !important;
  border: none !important;
  float: none !important;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 45%, #9a7209 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  filter: drop-shadow(0 2px 4px rgba(184, 134, 11, 0.25));
}

.ec-cert-root h2.recipient-name {
  display: block !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 2.7rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-transform: none !important;
  line-height: 1.12 !important;
  margin: 0 0 0.2rem !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  float: none !important;
  color: #0a2d52 !important;
}

.ec-cert-root p.cert-intro,
.ec-cert-root p.cert-body,
.ec-cert-root p.cert-trainer,
.ec-cert-root p.cert-issuer,
.ec-cert-root p.cert-date,
.ec-cert-root p.cert-number,
.ec-cert-root p.signature-name,
.ec-cert-root p.signature-role {
  display: block !important;
  text-transform: none !important;
  float: none !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

.ec-cert-root p.cert-intro {
  text-align: center !important;
  font-size: 1.02rem !important;
  font-style: italic !important;
  margin: 0 0 0.2rem !important;
  color: var(--text-muted) !important;
}

.ec-cert-root p.cert-body {
  text-align: center !important;
  font-size: 1.02rem !important;
  line-height: 1.5 !important;
  max-width: 36em !important;
  margin: 0 auto 0.25rem !important;
  color: var(--blue-deep) !important;
  font-weight: 500 !important;
  white-space: pre-line !important;
}

.ec-cert-root p.cert-body strong {
  font-weight: 700 !important;
  color: var(--blue-primary) !important;
}

.ec-cert-root p.cert-trainer {
  text-align: center !important;
  font-size: 0.98rem !important;
  font-weight: 500 !important;
  margin: 0.25rem auto 0.25rem !important;
  padding: 0 !important;
  color: var(--blue-deep) !important;
}

.ec-cert-root .cert-trainer-label {
  font-weight: 600 !important;
  color: var(--blue-primary) !important;
  margin-right: 0.25em !important;
}

.ec-cert-root .cert-trainer-name {
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 1.08em !important;
  font-weight: 600 !important;
  color: var(--blue-deep) !important;
}

.ec-cert-root p.cert-issuer {
  text-align: center !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  margin: 0 auto 0.3rem !important;
  padding: 0 1rem !important;
  max-width: 28em !important;
  color: var(--blue-deep) !important;
}

.ec-cert-root p.cert-issuer strong {
  font-weight: 700 !important;
  color: var(--blue-primary) !important;
}

.ec-cert-root .cert-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.ec-cert-root .cert-meta p {
  margin: 0 0 0.2rem !important;
  text-align: left !important;
  font-size: inherit !important;
}

.ec-cert-root img {
  max-width: none;
  border: none;
  vertical-align: middle;
}

.ec-cert-root button.btn-download {
  font-family: inherit !important;
  text-transform: none !important;
}
