@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Roboto+Condensed:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Edwardian Script ITC';
  src: url('/fonts/Edwardian_Script_ITC.woff?v=2') format('woff'),
       url('/fonts/Edwardian_Script_ITC.ttf?v=2') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* v2 belge alt bilgi başlıkları (PT Sans Narrow Bold, OFL; Latin + Türkçe alt kümesi). Eski altlıktaki yazıyla aynı
   ölçüde; paylaşım görseli de aynı dosyayı kullanır. */
@font-face {
  font-family: 'PT Sans Narrow Certificate';
  src: url('/fonts/PTSansNarrow-Bold.woff2') format('woff2'),
       url('/fonts/PTSansNarrow-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

/* PDF (html2canvas): yazı taban çizgisini 1x1 gif ile ölçer. Tailwind'in img{display:block} kuralı bu gifi
   alt satıra iter, ölçüm şişer ve PDF'te tüm yazılar (en çok büyük puntolu isim) aşağı kayar. */
img[src^="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"] {
  display: inline;
}

/* Remove global styles to avoid header conflicts - box-sizing is already set globally */
.certificate-scroll-container,
.certificate-print-root,
.certificate-details-section {
  box-sizing: border-box;
}

.certificate-scroll-container *,
.certificate-print-root *,
.certificate-details-section * {
  box-sizing: border-box;
}

/* ==========================================================================
   PAGE & ROOT OVERFLOW PROTECTION (Mobile Fit Guarantee)
   ========================================================================== */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

#certificate-view-page {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

/* ==========================================================================
   RESPONSIVE CERTIFICATE VIEWER (Credsverse / Global Standard)
   ========================================================================== */
.credential-viewer-container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

/* Exact A4 Landscape Aspect Ratio (297 / 210 = 1.4142857) */
.credential-viewer-frame {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 297 / 210;
  position: relative;
  overflow: hidden !important;
  border-radius: 12px;
  /* Görsel gelene kadar görünen zemin: açık renk (koyu zemin mobilde yükleme sırasında "bozuk" görünüyordu). */
  background: #f8fafc;
  box-shadow: 0 12px 35px -5px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.06);
  display: block;
  user-select: none;
  cursor: default;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .credential-viewer-frame {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.12);
  }
}

/* Scaled Canvas: Completely taken out of document flow to prevent horizontal overflow */
.credential-scale-canvas,
.certificate-scale-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 1123px;
  height: 794px;
  transform-origin: 0 0;
  -webkit-transform-origin: 0 0;
  transform: scale(var(--cert-scale, 1));
  -webkit-transform: scale(var(--cert-scale, 1));
  will-change: transform;
  pointer-events: auto;
}

/* Yükleniyor durumu (certificate-preview.page.js): şablon görseli ve yazı tipleri gelene kadar belge gizlenir. */
.credential-viewer-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
}

/* Yazının sonunda dönen halka: sayfanın donmadığını, yüklemenin sürdüğünü gösterir. */
.credential-viewer-spinner {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2.5px solid #e2e8f0;
  border-top-color: #d97706;
  border-right-color: #d97706;
  border-radius: 50%;
  animation: credential-viewer-spin 0.8s linear infinite;
}

@keyframes credential-viewer-spin {
  to { transform: rotate(360deg); }
}

/* Belge ilk boyamadan itibaren gizlidir (yükleniyor göstergesi görünür); certificate-preview.page.js görsel, yazı tipi
   ve ölçek hazır olunca .is-ready ekleyip gösterir. Gizleme JS'e bırakılırsa script gelene kadar belge ölçeklenmemiş
   ve yanlış yazı tipiyle bir an görünüp sonra yerine oturuyordu.
   Yedek: script hiç çalışmazsa belge 12 sn sonra kendiliğinden görünür. Script çalışıyorsa .is-loading yedeği kapatır
   (yavaş bağlantıda belge yarım yüklenmiş görselle açılmasın, script görsel gelince açar). */
.credential-viewer-frame .credential-scale-canvas {
  opacity: 0;
  animation: credential-viewer-fallback-show 0s linear 12s forwards;
}

.credential-viewer-frame .credential-viewer-loader {
  animation: credential-viewer-fallback-hide 0s linear 12s forwards;
}

.credential-viewer-frame.is-loading .credential-scale-canvas,
.credential-viewer-frame.is-loading .credential-viewer-loader {
  animation: none;
}

.credential-viewer-frame.is-ready .credential-scale-canvas {
  opacity: 1;
  animation: none;
  transition: opacity 0.25s ease;
}

.credential-viewer-frame.is-ready .credential-viewer-loader {
  display: none;
}

@keyframes credential-viewer-fallback-show {
  to { opacity: 1; }
}

@keyframes credential-viewer-fallback-hide {
  to { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .credential-viewer-spinner { animation-duration: 2s; }
  .credential-viewer-frame.is-ready .credential-scale-canvas { transition: none; }
}

/* Yazdırma: belge her durumda görünür, gösterge görünmez. */
@media print {
  .credential-viewer-frame .credential-scale-canvas { opacity: 1 !important; animation: none !important; }
  .credential-viewer-frame .credential-viewer-loader { display: none !important; }
}

/* Print root inside the scaler */
.certificate-print-root {
  display: block;
  width: 1123px !important;
  height: 794px !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  box-shadow: none;
}

/* Certificate Actions */
.certificate-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px auto;
  padding: 0 20px;
  max-width: 297mm;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  min-width: 80px;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-verify:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: white !important;
}

.btn-print:hover {
  background: linear-gradient(135deg, #0d1b69, #0a1447) !important;
  color: white !important;
}

.btn-verify {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.btn-print {
  background: linear-gradient(135deg, #1a237e, #0d1b69);
  color: white;
}

.btn-pdf {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
}

.btn-pdf:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b) !important;
  color: white !important;
}

.btn-action i {
  font-size: 16px;
}

.btn-action span {
  font-size: 13px;
  font-weight: 600;
}

#certificate {
  position: absolute;
  left: 0 !important;
  top: 0 !important;
  width: 1123px !important;
  height: 794px !important;
  margin: 0 !important;
  padding: 0 !important;
  background-image: url('/images/belge/katilim-yeni.jpg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  box-sizing: border-box !important;
  overflow: hidden;
  box-shadow: none;
}

.katilim-bg-image {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  display: block;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* ==========================================================================
   KATILIM VE BAŞARI BELGELERİ (katilim-yeni.jpg & basari-yeni.jpg Şablonları)
   ========================================================================== */
#certificate.certificate-katilim {
  position: absolute;
  left: 0 !important;
  top: 0 !important;
  width: 1123px !important;
  height: 794px !important;
  margin: 0 !important;
  padding: 0 !important;
  background-image: url('/images/belge/katilimbelgesi.jpg') !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  box-sizing: border-box !important;
  overflow: hidden;
}

#certificate.certificate-katilim.cert-lang-en {
  background-image: url('/images/belge/katilimbelgesieng.jpg') !important;
}

#certificate.certificate-basari {
  position: absolute;
  left: 0 !important;
  top: 0 !important;
  width: 1123px !important;
  height: 794px !important;
  margin: 0 !important;
  padding: 0 !important;
  background-image: url('/images/belge/basaribelgesi.jpg') !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  box-sizing: border-box !important;
  overflow: hidden;
}

#certificate.certificate-basari.cert-lang-en {
  background-image: url('/images/belge/basaribelgesieng.jpg') !important;
}

/* Katılım ve başarı belgelerinde eski mavi-altın şablon elemanlarını gizle */
#certificate.certificate-katilim > .content,
#certificate.certificate-katilim > .meta-row,
#certificate.certificate-katilim > .signatures,
#certificate.certificate-basari > .content,
#certificate.certificate-basari > .meta-row,
#certificate.certificate-basari > .signatures {
  display: none !important;
}

/* Katılım Belgesi Konteyneri */
.katilim-body {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.certificate-signatures-dynamic {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.certificate-signature-dynamic {
  position: absolute;
  top: 76.0%;
  width: 22.18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: auto;
}

/* Sol İmza (Ali İpek): Çizgi X: 26.49% - 48.67% (Merkez: 37.58%) */
.certificate-signature-dynamic:nth-child(1),
.certificate-signature-dynamic.sig-order-1 {
  left: 26.49%;
}

/* Sağ İmza (Hakan Güngör) - Başarı ve Katılım Belgesi: Çizgi X: 51.29% - 73.47% (Merkez: 62.38%) */
.certificate-signature-dynamic:nth-child(2),
.certificate-signature-dynamic.sig-order-2 {
  left: 51.29%;
}

/* İmza Görsel Konteyneri - Çizginin tam üzerine basar, hafif taşma ile mürekkep çizgiyle kesişir */
.certificate-signature-image-wrap {
  height: 94px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: -5px;
}

.certificate-signature-dynamic img,
.certificate-signature-img {
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Ali İpek: Yatay geniş imza */
.certificate-signature-dynamic:nth-child(1) img,
.certificate-signature-dynamic.sig-order-1 img {
  max-height: 84px;
  max-width: 170px;
}

/* Hakan Güngör: Dikey yüksek imza */
.certificate-signature-dynamic:nth-child(2) img,
.certificate-signature-dynamic.sig-order-2 img {
  max-height: 94px;
  max-width: 145px;
}

/* İsim & Unvan (tasarımcı referansı: yarı kalın isim, koyu italik unvan) */
.certificate-signature-name {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.25;
  margin-top: 11px;
  white-space: nowrap;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.certificate-signature-title {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-style: italic;
  font-size: 13.5px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.25;
  margin-top: 2px;
  white-space: nowrap;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   ORTA METİN AKIŞI (trkatilim.png ve engkatılım.png formatı)
   ========================================================================== */
.katilim-statement-flow {
  position: absolute;
  top: 15.2%;
  left: 50%;
  transform: translateX(-50%);
  width: 62%;
  max-width: 62%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  z-index: 10;
  pointer-events: auto;
  transition: top 0.2s ease;
}

.katilim-statement-flow.has-long-title {
  top: 15.2%;
  left: 50%;
  transform: translateX(-50%);
  width: 62%;
  max-width: 62%;
}

.katilim-statement-tr,
.katilim-statement-en {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.katilim-statement-flow .d-none-lang {
  display: none !important;
}

#certificate:not(.cert-lang-en) .katilim-statement-en {
  display: none !important;
}

#certificate:not(.cert-lang-en) .katilim-statement-tr {
  display: flex !important;
}

#certificate.cert-lang-en .katilim-statement-tr {
  display: none !important;
}

#certificate.cert-lang-en .katilim-statement-en {
  display: flex !important;
}

/* Sayın / This is to certify that */
.cert-text-salutation {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.52;
  margin: 0;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

.katilim-statement-flow.has-long-title .cert-text-salutation {
  font-size: 26px;
  margin: 0;
}

/* Katılımcı Adı (Kaligrafi) */
.katilim-name {
  font-family: 'Edwardian Script ITC', 'Alex Brush', cursive;
  font-size: 61px;
  font-weight: 400 !important;
  color: #741f3c;
  letter-spacing: 0px;
  line-height: 1.05;
  margin-top: 5px;
  margin-bottom: -5px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(116, 31, 60, 0.15);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.katilim-statement-flow.has-long-title .katilim-name {
  font-size: 61px;
  margin-top: 5px;
  margin-bottom: -5px;
}

/* Standart Serif Gövde Metinleri (tasarımcı referansı: 23px, ~40px satır aralığı) */
.cert-text-org-main,
.cert-text-org-sub,
.cert-text-org-lead,
.cert-text-lead,
.cert-text-body,
.cert-text-conclusion {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.72;
  margin: 0;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cert-text-lead {
  font-size: 23px;
  margin: 0;
}

.cert-text-conclusion {
  font-size: 23px;
  margin: 0;
}

.katilim-statement-flow.has-long-title .cert-text-org-main,
.katilim-statement-flow.has-long-title .cert-text-org-sub {
  font-size: 23px;
  line-height: 1.72;
  margin: 0;
}

.katilim-statement-flow.has-long-title .cert-text-lead {
  font-size: 23px;
  line-height: 1.72;
  margin: 0;
}

.katilim-statement-flow.has-long-title .cert-text-conclusion {
  font-size: 23px;
  line-height: 1.72;
  margin: 0;
}

/* Eğitim Adı (Vurgulu Kırmızı Serif) */
.katilim-training-title {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: #8a2230;
  letter-spacing: 0;
  line-height: 1.55;
  margin: 0;
  margin-bottom: 0 !important;
  text-shadow: 0 1px 1px rgba(138, 34, 48, 0.12);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  width: 100%;
  text-align: center;
  text-wrap: pretty;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Tasarımcı referansı: uzun başlık da aynı boyut ve satır aralığıyla alt satırlara akar */
.katilim-training-title.title-long {
  font-size: 26px;
  line-height: 1.55;
  margin: 0;
  margin-bottom: 0 !important;
  width: 100%;
  max-width: 100%;
}

.katilim-training-title.title-very-long {
  font-size: 26px;
  line-height: 1.55;
  margin: 0;
  margin-bottom: 0 !important;
  width: 100%;
  max-width: 100%;
}

/* ==========================================================================
   İNGİLİZCE METİN AKIŞI (engkatılım.png Birebir Uyumu)
   ========================================================================== */
.katilim-statement-en {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.katilim-statement-en .cert-text-salutation {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

.katilim-statement-en .katilim-name {
  font-family: 'Edwardian Script ITC', 'Alex Brush', cursive;
  font-size: 61px;
  font-weight: 400 !important;
  color: #741f3c;
  letter-spacing: 0;
  line-height: 1.05;
  margin-top: 5px;
  margin-bottom: 4px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(116, 31, 60, 0.15);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.katilim-statement-en .cert-text-lead {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.katilim-statement-en .katilim-training-title {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: #8a2230;
  letter-spacing: 0;
  line-height: 1.4;
  margin: 0;
  margin-bottom: 0 !important;
  text-shadow: 0 1px 1px rgba(138, 34, 48, 0.12);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  width: 100%;
  text-align: center;
  text-wrap: pretty;
  word-break: normal;
  overflow-wrap: break-word;
}

.katilim-statement-en .katilim-training-title.title-long {
  font-size: 26px;
  line-height: 1.4;
  margin: 0;
  margin-bottom: 0 !important;
  width: 100%;
  max-width: 100%;
}

.katilim-statement-en .katilim-training-title.title-very-long {
  font-size: 26px;
  line-height: 1.4;
  margin: 0;
  margin-bottom: 0 !important;
  width: 100%;
  max-width: 100%;
}

.katilim-statement-en .cert-text-org-lead {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.katilim-statement-en .cert-text-org-main {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.katilim-statement-en .cert-text-org-sub {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.katilim-statement-en .cert-text-conclusion {
  font-family: 'Noto Serif', 'Times New Roman', Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* İngilizce uzun başlık ince ayarları */
.katilim-statement-flow.has-long-title .katilim-statement-en .katilim-name {
  font-size: 61px;
  margin-top: 5px;
  margin-bottom: 4px;
}

.katilim-statement-flow.has-long-title .katilim-statement-en .cert-text-lead {
  font-size: 23px;
  line-height: 1.5;
  margin: 0;
}

.katilim-statement-flow.has-long-title .katilim-statement-en .katilim-training-title {
  margin: 0;
  margin-bottom: 0 !important;
}

.katilim-statement-flow.has-long-title .katilim-statement-en .cert-text-org-lead {
  font-size: 23px;
  line-height: 1.5;
  margin: 0;
}

.katilim-statement-flow.has-long-title .katilim-statement-en .cert-text-org-main,
.katilim-statement-flow.has-long-title .katilim-statement-en .cert-text-org-sub {
  font-size: 23px;
  line-height: 1.5;
  margin: 0;
}

.katilim-statement-flow.has-long-title .katilim-statement-en .cert-text-conclusion {
  font-size: 23px;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   EĞİTİM ADI 3 SATIRDAN DAHA UZUNSA (> 3 Satır) -> font-size: 21px
   (Eğitim adı ve katılımcı adı hariç tüm orta metinler)
   ========================================================================== */
.katilim-statement-flow.has-title-over-3-lines .cert-text-salutation,
.katilim-statement-flow.has-title-over-3-lines .cert-text-org-main,
.katilim-statement-flow.has-title-over-3-lines .cert-text-org-sub,
.katilim-statement-flow.has-title-over-3-lines .cert-text-org-lead,
.katilim-statement-flow.has-title-over-3-lines .cert-text-lead,
.katilim-statement-flow.has-title-over-3-lines .cert-text-body,
.katilim-statement-flow.has-title-over-3-lines .cert-text-conclusion,
.katilim-statement-flow.has-title-over-3-lines .katilim-statement-en .cert-text-salutation,
.katilim-statement-flow.has-title-over-3-lines .katilim-statement-en .cert-text-lead,
.katilim-statement-flow.has-title-over-3-lines .katilim-statement-en .cert-text-org-lead,
.katilim-statement-flow.has-title-over-3-lines .katilim-statement-en .cert-text-org-main,
.katilim-statement-flow.has-title-over-3-lines .katilim-statement-en .cert-text-org-sub,
.katilim-statement-flow.has-title-over-3-lines .katilim-statement-en .cert-text-conclusion {
  font-size: 21px !important;
  line-height: 1.45 !important;
}

/* 3. QR KOD ALANI (Logonun altındaki yuvarlatılmış kare kutu) */
.katilim-qr-container,
#certificate.certificate-katilim .katilim-qr-container,
#certificate.certificate-basari .katilim-qr-container {
  position: absolute;
  left: 7.05%;
  top: 48.9%;
  width: 6.85%;
  height: 9.6%;
  /* Kutu ve çerçeve şablon görselinde çizili; burada yalnızca QR, kutunun çizgisine değmeyecek boşlukla yerleşir. */
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  z-index: 15;
}

.katilim-qr-container a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.katilim-qr-container img,
.katilim-qr-container .qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 2px;
  display: block;
  /* QR vektördür (SVG); PNG yedeğinde de küçültürken kareler bulanıklaşmasın, okuyucu kenarı seçebilsin. */
  image-rendering: pixelated;
}

.katilim-qr-container #qr {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.katilim-qr-container #qr canvas,
.katilim-qr-container #qr img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

/* QR Kodun Altındaki Eğitim No (Dikey Yazı: EBM-2026-0001) */
.katilim-qr-code-text {
  position: absolute;
  right: calc(100% - 10.2%);
  left: auto;
  top: 58%;
  width: auto;
  height: auto;
  writing-mode: horizontal-tb;
  transform-origin: right center;
  transform: rotate(-90deg);
  font-family: 'Oswald', 'Impact', 'Arial Narrow', sans-serif !important;
  font-size: 24px;
  font-weight: 600 !important;
  color: #7e7e83;
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: all;
  z-index: 15;
}

/* Sağ Taraftaki HKMO EBM Filigranı Üzerine Veriliş Tarihi (Dikey Yazı: 27 ARALIK 2025) */
.katilim-watermark-date,
#certificate.certificate-katilim .katilim-watermark-date,
#certificate.certificate-basari .katilim-watermark-date {
  position: absolute;
  left: 94.4%;
  top: 42.7%; /* Türkçe; İngilizce aşağıda 40% */
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
  font-family: 'Oswald', 'Impact', 'Arial Narrow', sans-serif !important;
  font-size: 36px;
  font-weight: 500 !important;
  color: #7e7e83;
  letter-spacing: -1.5px;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: all;
  z-index: 15;
}

#certificate.cert-lang-en .katilim-watermark-date {
  left: 94.4% !important;
  top: 40% !important;
  font-size: 36px !important;
}

/* 4. ALT BİLGİ ALANLARI (Tarih, Süre, Şekil Çizgilerinin Altı) */
.katilim-meta-item {
  position: absolute;
  top: 70%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  font-family: 'Arial Narrow', 'Roboto Condensed', 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 300;
  color: #2b2b2b;
  letter-spacing: -0.5px;
  line-height: 1.2;
  white-space: nowrap;
  z-index: 10;
}

/* Eğitim Tarihi (Çizginin altına tam ortalı) */
.katilim-meta-item.item-date {
  left: 27.5%;
  transform: translateX(-50%);
}

/* Eğitim Süresi (Çizginin altına tam ortalı) */
.katilim-meta-item.item-duration {
  left: 50.8%;
  transform: translateX(-50%);
}

/* Eğitim Şekli (Çizginin altına tam ortalı) */
.katilim-meta-item.item-model {
  left: 74%;
  transform: translateX(-50%);
}

/* 4b. YENİ TASARIM (v2): "Eğitim Tarihi / Süresi / Şekli" başlıkları ve çizgileri altlıkta yok, burada çizilir.
   Konumlar eski altlıktan ölçüldü (2480×1754 → 1123×794); paylaşım görseli aynı değerleri kullanır
   (CertificatePresentation.MetaLabels). Eski tasarımdaki belgelerde bu öğeler hiç render edilmez. */
.katilim-meta-label {
  position: absolute;
  top: 66.414%;
  height: 20.06px;
  line-height: 20.06px;
  transform: translateX(-50%);
  font-family: 'PT Sans Narrow Certificate', 'PT Sans Narrow', 'Arial Narrow', sans-serif;
  font-size: 20.06px;
  font-weight: 700;
  letter-spacing: 0.25px;
  color: #231f20;
  white-space: nowrap;
  z-index: 10;
}

.katilim-meta-label.item-date { left: 27.298%; }
.katilim-meta-label.item-duration { left: 50.887%; }
.katilim-meta-label.item-model { left: 74.516%; }

.katilim-meta-rule {
  position: absolute;
  top: calc(69.812% - 0.5px);
  height: 1.4px;
  background: linear-gradient(90deg, rgba(35, 31, 32, 0) 0%, #231f20 15%, #231f20 85%, rgba(35, 31, 32, 0) 100%);
  pointer-events: none;
  z-index: 10;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.katilim-meta-rule.item-date { left: 20.04%; width: 14.678%; }
.katilim-meta-rule.item-duration { left: 43.508%; width: 14.637%; }
.katilim-meta-rule.item-model { left: 66.976%; width: 14.556%; }

/* İNDİR ile üretilen PDF (pdf-turkish.js kopyaya .certificate-pdf-export ekler): 1,4px çizgi altlığın gri sayfa dokusu
   üstünde kayboluyordu; PDF'te yazdırmadaki gibi biraz kalın ve uçlara kadar tam koyu çizilir. */
.certificate-pdf-export .katilim-meta-rule {
  height: 3px;
  margin-top: -0.8px;
  background: linear-gradient(90deg, rgba(35, 31, 32, 0) 0%, #231f20 10%, #231f20 90%, rgba(35, 31, 32, 0) 100%);
}

/* 4c. EĞİTİCİLER (yalnızca v2): metin akışı ile alt bilgi bandı arasında, ortalı tek satır: "Eğitici(ler):" etiketi ve
   yanında adlar. Etiket alt bilgi başlıklarıyla aynı biçimdedir. Eğitici varken alt bilgi bandı imzalara binmeyecek
   kadar (%1,5) aşağı iner. Paylaşım görseli aynı değerleri kullanır (CertificatePresentation.Educators*). */
.katilim-educators {
  position: absolute;
  /* Alttan sabit: adlar iki satıra bölününce blok yukarı uzar, alt bilgi bandına olan mesafe değişmez. */
  bottom: 34.2%;
  left: 50%;
  width: 84%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  z-index: 10;
}

.katilim-educators-heading {
  flex: none;
  margin-right: 7px;
  line-height: 1.2;
  font-family: 'PT Sans Narrow Certificate', 'PT Sans Narrow', 'Arial Narrow', sans-serif;
  font-size: 20.06px;
  font-weight: 700;
  letter-spacing: 0.25px;
  color: #231f20;
  white-space: nowrap;
}

/* Adlar tek satırda; sığmazsa certificate-preview.page.js önce küçültür, yine sığmazsa iki satıra böler (ikinci satır
   etiketin hizasından değil adların başından başlar). Paylaşım görseli aynı kuralı CertificateEducatorsBlock ile uygular. */
.katilim-educators-names {
  text-align: left;
  font-family: 'Arial Narrow', 'Roboto Condensed', 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: #2b2b2b;
  white-space: nowrap;
}

.katilim-educators-names.is-two-lines {
  line-height: 1.15;
}

#certificate.has-educators .katilim-meta-label { top: 67.914%; }
#certificate.has-educators .katilim-meta-rule { top: calc(71.312% - 0.5px); }
#certificate.has-educators .katilim-meta-item { top: 71.5%; }

/* v2'de altlığı yalnızca <img> verir: eski tasarımın sabit arka planı (yukarıdaki !important kurallar) kapatılır. */
#certificate.cert-layout-v2.certificate-katilim,
#certificate.cert-layout-v2.certificate-basari,
#certificate.cert-layout-v2.certificate-katilim.cert-lang-en,
#certificate.cert-layout-v2.certificate-basari.cert-lang-en {
  background-image: none !important;
}

/* Belge kimliği her iki dilde de aynı yerde. Köşeden biraz içeride: mobilde çerçevenin yuvarlatılmış köşesi
   (küçültülmüş belgede ~27px'lik kavis) baştaki "I" harfini kesmesin. */
.katilim-certificate-id {
  position: absolute;
  left: 4mm;
  bottom: 2mm;
  max-width: 118mm;
  font-family: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  color: rgb(71 71 71);
  letter-spacing: 0;
  white-space: nowrap;
  z-index: 20;
  user-select: all;
}

.title {
  text-align: center;
  color: #0d1b69;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 44px;
  margin: 12px 0 12px 0;
  position: relative;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 4px;
  background: #C49A3B;
}

.subtitle {
  text-align: center;
  color: #b8860b;
  font-weight: 600;
  letter-spacing: 1.5px;
  font-size: 24px;
  margin: 15px 0 14px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lead {
  display: none;
}

.name {
  text-align: center;
  color: #0d1b69;
  font-weight: 900;
  font-size: 52px;
  letter-spacing: 1.5px;
  margin: 25px 0 30px 0;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  line-height: 1.1;
}

.description {
  text-align: center;
  color: #2c2c2c;
  font-size: 18px;
  line-height: 1.8em;
  margin: 4px auto 0 auto;
  max-width: 75ch;
  font-weight: 500;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #B07F2C 15%, #B07F2C 85%, transparent 100%);
  border-radius: 1px;
  margin: 20px 6%;
}

.signatures {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: absolute;
  left: 50px;
  right: 50px;
  bottom: 60px;
  gap: 50px;
  color: #14213d;
}

.signature {
  text-align: center;
  width: 30%;
}

.center-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40%;
  margin-top: 15px;
}

.main-logo {
  height: 100px;
  width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  margin-bottom: 6px;
}

.logo-tagline {
  color: #000000;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-align: center;
}

.signature .sig-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: 35px;
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 8px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  opacity: 0.9;
}

.signature .name-line {
  border-bottom: 3px solid #caa03a;
  margin: 0 auto 8px auto;
  width: 85%;
}

.signature .full-name {
  font-weight: 600;
  font-size: 14px;
  color: #1a237e;
  margin-bottom: 4px;
}

.signature .role {
  color: #000000;
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
}

#seal {
  position: static;
  color: #caa03a;
  font-size: 50px;
  line-height: 1;
  margin: 0 12px;
  pointer-events: none;
}

#qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #ffffff;
  border: 2px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#qr:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.qr-link {
  text-decoration: none;
  color: inherit;
}

.qr-code-text {
  display: none;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 120mm;
  margin: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.bottom-left,
.bottom-right {
  display: none;
}

.top-left-qr {
  display: none;
}

.qr-wrapper {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  overflow: hidden;
}

.qr-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.meta-row {
  position: absolute;
  left: 50px;
  right: 50px;
  bottom: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 2;
  flex-wrap: nowrap;
}

.meta-row .qr-link {
  flex-shrink: 0;
}

.meta-row .meta-inline {
  margin: 0;
  color: #1a237e;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 1;
  white-space: nowrap;
}

.meta-row .meta-inline .label {
  color: #7a8099;
  font-weight: 700;
  margin-right: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.meta-row .meta-inline .sep {
  color: #C49A3B;
  margin: 0 10px;
  font-weight: 700;
}

.meta-row .meta-inline .value {
  color: #1a237e;
  font-weight: 600;
  font-size: 13px;
}

.meta-inline {
  margin: 0;
  color: #1a237e;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
}

.meta-inline .label {
  color: #7a8099;
  font-weight: 700;
  margin-right: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.meta-inline .sep {
  color: #C49A3B;
  margin: 0 10px;
  font-weight: 700;
}

.meta-inline .value {
  color: #1a237e;
  font-weight: 600;
  font-size: 13px;
}

.lider-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 30%;
}

.lider-logo {
  height: 100px;
  width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  margin-bottom: 5px;
}

.lider-logo-text {
  color: #000000;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

/* ===========================================
   PRINT STYLES - A4 Landscape
   =========================================== */
@media print {

  /* Disable all animations and transitions that create stacking contexts or containing blocks */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  /* Page setup for A4 landscape */
  @page {
    size: A4 landscape;
    margin: 0;
  }

  /* Body and HTML print setup */
  html,
  body {
    width: 297mm;
    height: 210mm;
    margin: 0;
    padding: 0;
    background: #fff;
    overflow: hidden;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide all elements except certificate */
  body * {
    visibility: hidden;
  }

  /* Hide stage toolbar in print */
  .certificate-stage-toolbar {
    display: none !important;
  }

  /* Hide viewer containers styling & transforms in print */
  .credential-viewer-container,
  .credential-viewer-frame,
  .certificate-scroll-container {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    height: auto !important;
    max-width: none !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    position: static !important;
    aspect-ratio: auto !important;
  }

  /* Show only certificate print root with no transforms or will-change traps */
  .certificate-scale-wrapper {
    position: static !important;
    transform: none !important;
    -webkit-transform: none !important;
    will-change: auto !important;
    box-shadow: none !important;
    width: 297mm !important;
    height: 210mm !important;
    min-width: 297mm !important;
    min-height: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }

  .certificate-scroll-container,
  .certificate-print-root {
    visibility: visible !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 297mm !important;
    height: 210mm !important;
    min-width: 297mm !important;
    min-height: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    page-break-after: avoid !important;
    page-break-before: avoid !important;
    overflow: hidden !important;
    z-index: 9999999 !important;
  }

  .certificate-print-root * {
    visibility: visible !important;
  }

  /* Hide top meta and actions in print */
  .certificate-top-meta {
    display: none !important;
  }

  .certificate-top-meta .meta-actions {
    display: none !important;
  }

  /* Hide certificate actions in print */
  .certificate-actions {
    display: none !important;
  }

  /* Certificate positioning and sizing for print */
  #certificate {
    position: absolute;
    left: 0 !important;
    top: 0 !important;
    box-shadow: none;
    margin: 0 !important;
    padding: 0 !important;
    width: 297mm !important;
    height: 210mm !important;
    background-image: url('/images/belge/katilim-yeni.jpg');
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #certificate.certificate-katilim,
  #certificate.certificate-basari {
    left: 0 !important;
    top: 0 !important;
    width: 297mm !important;
    height: 210mm !important;
    padding: 0 !important;
    margin: 0 !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
  }

  #certificate.certificate-katilim {
    background-image: url('/images/belge/katilimbelgesi.jpg') !important;
  }

  #certificate.certificate-katilim.cert-lang-en {
    background-image: url('/images/belge/katilimbelgesieng.jpg') !important;
  }

  #certificate.certificate-basari {
    background-image: url('/images/belge/basaribelgesi.jpg') !important;
  }

  #certificate.certificate-basari.cert-lang-en {
    background-image: url('/images/belge/basaribelgesieng.jpg') !important;
  }

  #certificate.cert-layout-v2.certificate-katilim,
  #certificate.cert-layout-v2.certificate-basari,
  #certificate.cert-layout-v2.certificate-katilim.cert-lang-en,
  #certificate.cert-layout-v2.certificate-basari.cert-lang-en {
    background-image: none !important;
  }

  /* Content adjustments for print */
  #certificate .content {
    padding-top: 8mm;
    margin-top: 0;
    height: auto;
  }

  #certificate .meta-row {
    position: absolute;
    bottom: 180px;
    left: 50px;
    right: 50px;
  }

  /* Signature area adjustments */
  #certificate .signatures {
    position: absolute;
    bottom: 80px;
    left: 50px;
    right: 50px;
  }

  #certificate .signature .full-name {
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
  }

  #certificate .signature .role {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
  }

  /* Logo sizing for print */
  #certificate .main-logo {
    height: 100px;
    width: 140px;
  }

  #certificate .lider-logo {
    height: 100px;
    width: 140px;
  }

  #certificate .logo-tagline {
    font-size: 12px;
    font-weight: 500;
  }

  #certificate .lider-logo-text {
    font-size: 12px;
    font-weight: 500;
  }

  /* Title sizing for print - font-size is managed dynamically via JS for long titles */
  #certificate .title {
    /* Default 44px is set in normal styles; JS overrides to 38px for long titles via inline style */
  }

  #certificate .subtitle {
    font-size: 24px;
  }

  #certificate .name {
    font-size: 52px;
  }

  /* Hide details section in print */
  .certificate-details-section {
    display: none !important;
  }

  /* QR Kod altındaki dikey Eğitim No yazısı (Yazdır çıktısı için) */
  .katilim-qr-code-text {
    position: absolute !important;
    right: calc(100% - 10.2%) !important;
    left: auto !important;
    top: 58% !important;
    width: auto !important;
    height: auto !important;
    writing-mode: horizontal-tb !important;
    transform-origin: right center !important;
    transform: rotate(-90deg) !important;
    font-family: 'Oswald', 'Impact', 'Arial Narrow', sans-serif !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #7e7e83 !important;
    letter-spacing: 1px !important;
    text-align: center !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    z-index: 15 !important;
  }

  /* QR Kod Konumu (Yazdır çıktısı için) */
  .katilim-qr-container,
  #certificate.certificate-katilim .katilim-qr-container,
  #certificate.certificate-basari .katilim-qr-container {
    left: 7.05% !important;
  }

  /* Sağ Dikey Tarih Konumu (Yazdır çıktısı için) */
  .katilim-watermark-date,
  #certificate.certificate-katilim .katilim-watermark-date,
  #certificate.certificate-basari .katilim-watermark-date {
    left: 94.4% !important;
    top: 42.7% !important;
    font-size: 36px !important;
    letter-spacing: -1.5px !important;
  }

  #certificate.cert-lang-en .katilim-watermark-date {
    top: 40% !important;
  }

  /* v2 alt bilgi çizgileri (Eğitim Tarihi / Süresi / Şekli). Ekrandaki saydam uçlu degrade, yazdırma PDF'ine
     saydamlık maskeli desen olarak geçiyor; bazı PDF görüntüleyicileri ve yazıcı sürücüleri onu çizmiyordu. Baskıda düz
     kenar çizgisi kullanılır: her görüntüleyicide çıkar, "arka plan grafikleri" kapalıyken de basılır. */
  .katilim-meta-rule {
    height: 0 !important;
    margin-top: -0.3px !important;
    background: none !important;
    border-top: 2px solid #231f20 !important;
  }
}

/* ===========================================
   CERTIFICATE DETAILS SECTION
   =========================================== */
.certificate-details-section {
  max-width: 1200px;
  margin: 60px auto 40px;
  padding: 0 20px;
}

.details-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* --------- Responsive layout enhancements for details --------- */
@media (max-width: 1200px) {
  .certificate-details-section {
    padding: 0 16px;
  }

  .details-container {
    gap: 20px;
  }

  .detail-card {
    padding: 22px;
  }
}

@media (max-width: 1024px) {
  .details-container {
    grid-template-columns: 1fr;
  }
}

/* Detail Cards */
.detail-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.detail-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 16px;
  display: block;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 20px;
  line-height: 1.3;
}

/* ISSUED TO Card */
.issued-to-card .card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.issued-to-card .card-actions .action-btn {
  flex: 0 1 auto;
}

/* Icon buttons stay together in default view */
.issued-to-card .card-actions .action-icon-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.btn-share-primary {
  background: linear-gradient(135deg, #0a66c2, #004182);
  color: white;
  box-shadow: 0 2px 8px rgba(10, 102, 194, 0.3);
}

.btn-share-primary:hover {
  background: linear-gradient(135deg, #004182, #003d75);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 102, 194, 0.4);
}

.btn-linkedin-white {
  background: #ffffff;
  color: #0a66c2;
  border: 2px solid #0a66c2;
}

.btn-linkedin-white:hover {
  background: #f0f7ff;
  transform: translateY(-1px);
}

.action-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.action-icon-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
  transform: translateY(-1px);
}

.contact-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
  font-size: 13px;
  color: #6b7280;
}

.contact-link {
  color: #0a66c2;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: #004182;
  text-decoration: underline;
}

/* VERIFICATION Card */
.verification-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid #d1fae5;
}

.verification-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #059669;
  margin-bottom: 20px;
}

.verification-label i {
  font-size: 16px;
}

.verification-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.verification-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.info-value {
  font-size: 15px;
  color: #111827;
  font-weight: 600;
}

.verify-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  width: fit-content;
  cursor: pointer;
  font-family: inherit;
}

.verify-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.credential-id {
  display: flex;
  gap: 8px;
  font-size: 13px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.id-label {
  color: #6b7280;
  font-weight: 500;
}

.id-value {
  color: #111827;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

/* ISSUED BY Card */
.card-description {
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
  margin-top: 12px;
}

/* Credential Attributes */
.credential-attributes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* two per row */
  gap: 10px;
  margin-bottom: 24px;
}

.attribute-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.attribute-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.attribute-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .6);
  border: 1px solid rgba(0, 0, 0, .05);
  color: #0a66c2;
  font-size: 18px;
}

.attribute-content {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
}

.attribute-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 88px;
}

.attribute-value {
  font-size: 14px;
  color: #111827;
  font-weight: 700;
  line-height: 1.4;
}

/* Attribute icon color variants */
.credential-attributes .attribute-card:nth-child(1) .attribute-icon {
  color: #4f46e5;
  background: linear-gradient(180deg, #eef2ff, #ffffff);
}

.credential-attributes .attribute-card:nth-child(2) .attribute-icon {
  color: #d97706;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.credential-attributes .attribute-card:nth-child(3) .attribute-icon {
  color: #0284c7;
  background: linear-gradient(180deg, #e0f2fe, #ffffff);
}

.credential-attributes .attribute-card:nth-child(4) .attribute-icon {
  color: #14b8a6;
  background: linear-gradient(180deg, #ccfbf1, #ffffff);
}

/* Description Card */
.description-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
  line-height: 1.3;
}

.description-content {
  font-size: 14px;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 20px;
}

.description-content p {
  margin-bottom: 12px;
}

.description-content p:last-child {
  margin-bottom: 0;
}

.learn-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0a66c2;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.learn-more-link:hover {
  color: #004182;
  gap: 10px;
}

.learn-more-link i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.learn-more-link:hover i {
  transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 968px) {
  .certificate-scroll-container {
    padding: 15px 5px;
  }

  .details-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .credential-attributes {
    grid-template-columns: repeat(2, 1fr);
  }

  .issued-to-card .card-actions {
    gap: 8px;
  }

  .card-title {
    font-size: 22px;
  }

  .attribute-label {
    min-width: 84px;
  }
}

@media (max-width: 640px) {
  .certificate-scroll-container {
    padding: 10px 5px;
  }

  .certificate-details-section {
    margin: 40px auto 30px;
    padding: 0 16px;
  }

  .detail-card {
    padding: 20px;
  }

  .card-title {
    font-size: 20px;
  }

  .description-title {
    font-size: 18px;
  }

  .credential-attributes {
    grid-template-columns: 1fr;
    /* single column on small screens */
  }

  .issued-to-card .card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  /* Text buttons - each on separate row, full width */
  .issued-to-card .card-actions .action-btn {
    width: 100%;
    flex: 0 0 auto;
    justify-content: center;
    white-space: nowrap;
    font-size: 13px;
    padding: 10px 14px;
  }

  /* Icon buttons group - wrapper for icon buttons */
  .issued-to-card .card-actions .icon-buttons-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }

  /* Icon buttons inside the group */
  .issued-to-card .card-actions .icon-buttons-group .action-icon-btn {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    font-size: 18px;
    flex-shrink: 0;
  }

  .attribute-icon {
    width: 40px;
    height: 40px;
  }

  .attribute-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .attribute-label {
    min-width: 0;
    font-size: 11px;
  }

  .attribute-value {
    font-size: 13px;
  }
}

/* ===========================================
   VERIFICATION MODAL
   =========================================== */
.verification-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1060;
  backdrop-filter: blur(4px);
}

.verification-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 680px;
  max-width: calc(100% - 32px);
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.verification-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid #e5e7eb;
}

.verification-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.verification-modal-close {
  background: none;
  border: 0;
  font-size: 20px;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.verification-modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.verification-modal-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}

/* Verification Steps */
.verification-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  overflow: visible;
}

.verification-step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  /* reduced vertical spacing */
  position: relative;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  overflow: visible;
}

.verification-step.step-active {
  opacity: 1;
}

.verification-step.step-completed {
  opacity: 1;
}

.step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 30;
  transition: all 0.4s ease;
}

.step-icon.step-pending {
  background: #e5e7eb;
  color: #9ca3af;
}

.step-icon.step-active {
  background: #0a66c2;
  color: #ffffff;
  animation: pulse 1.5s ease-in-out infinite;
}

.step-icon.step-completed {
  background: #10b981;
  color: #ffffff;
}

.step-number {
  font-size: 16px;
  font-weight: 700;
}

.step-icon.step-completed .step-number {
  display: none;
}

.step-icon.step-completed::after {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 18px;
}

.step-content {
  flex: 1;
  padding-top: 2px;
  position: relative;
  z-index: 30;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.verification-step.step-pending .step-title {
  color: #9ca3af;
}

.step-info-icon {
  color: #0a66c2;
  font-size: 14px;
}

.step-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

.verification-step.step-pending .step-description {
  color: #9ca3af;
}

.verification-step.step-active .step-description,
.verification-step.step-completed .step-description {
  color: #374151;
}

/* Connecting Line */
.verification-steps {
  position: relative;
  padding-left: 0;
}

.verification-steps::before {
  display: none;
}

.verification-step {
  position: relative;
  z-index: 1;
}

.verification-step::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 52px;
  /* slightly tighter below icon */
  bottom: -16px;
  /* slightly tighter above next icon */
  width: 2px;
  background: #e5e7eb;
  z-index: 0;
  transition: background 0.4s ease;
  pointer-events: none;
}

.verification-step.step-active::after {
  background: #0a66c2;
}

.verification-step.step-completed::after {
  background: #10b981;
}

.verification-step:last-child::after {
  display: none;
}

.verification-step:last-child~.verification-steps::before {
  display: none;
}

/* Final Result */
.verification-result {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  animation: slideIn 0.5s ease-out;
}

.result-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}

.result-content {
  flex: 1;
}

.result-title {
  font-size: 18px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 8px;
}

.result-description {
  font-size: 14px;
  color: #047857;
  line-height: 1.6;
}

/* Animations */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(10, 102, 194, 0.4);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(10, 102, 194, 0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* Responsive */
@media (max-width: 640px) {
  .verification-modal {
    width: calc(100% - 16px);
    max-height: 95vh;
  }

  .verification-modal-header {
    padding: 20px;
  }

  .verification-modal-body {
    padding: 20px;
  }

  .verification-step {
    padding: 16px 0;
  }

  .step-icon {
    width: 36px;
    height: 36px;
  }

  .step-number {
    font-size: 14px;
  }

  .step-title {
    font-size: 15px;
  }

  .step-description {
    font-size: 13px;
  }
}

