/* All changes scoped to the Certificates page section and own overlay. */
.aims-cert-intro-quote::after {
  content: "\201C" !important;
  position: absolute !important;
  right: 20px !important;
  top: 8px !important;
  font-family: Georgia, serif !important;
  font-size: 42px !important;
  font-weight: bold !important;
  line-height: 1 !important;
  color: white !important;
}
.aims-cert-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
  max-width: 1120px !important;
  margin: 36px auto 62px !important;
  align-items: stretch !important;
}
.aims-cert-grid > article.tile {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0;
  padding: 24px !important;
  border: 1px solid #e0e7ed !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: 0 8px 25px rgba(15, 46, 68, .05);
  transition: box-shadow .18s ease, transform .18s ease;
}
.aims-cert-grid > article.tile:hover { box-shadow: 0 12px 30px rgba(15, 46, 68, .12); transform: translateY(-2px); }
.aims-cert-grid .tile-icon { margin-bottom: 10px; }
.aims-cert-grid h3 { min-height: 2.7em; margin: 0 0 18px !important; line-height: 1.35; }
.aims-cert-preview {
  display: flex;
  width: 100%;
  position: relative;
  background: #f1f5f8;
  border: 1px solid #dae3ec;
  border-radius: 10px;
  overflow: hidden;
  min-height: 260px;
  aspect-ratio: 1.42;
  justify-content: center;
  align-items: center;
  padding: 0;
  cursor: zoom-in;
  color: #1b658b;
  font: inherit;
  text-align: center;
}
.aims-cert-preview:disabled { opacity: 1; cursor: default; }
.aims-cert-preview iframe {
  position: absolute;
  border: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: white;
}
.aims-cert-preview .aims-cert-placeholder {
  display: flex;
  padding: 24px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.aims-cert-preview .aims-cert-placeholder svg { width: 58px; height: 70px; }
.aims-cert-preview-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 7px 10px;
  background: rgba(8, 43, 64, .9);
  color: white;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
}
.aims-cert-status { margin: 14px 0 0 !important; font-size: 13px !important; color: #657789; }
.aims-cert-dialog[hidden] { display: none !important; }
.aims-cert-dialog {
  position: fixed !important;
  z-index: 2147483000 !important;
  inset: 0 !important;
  padding: 18px !important;
  background: rgba(6, 20, 35, .89) !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.aims-cert-dialog-panel {
  display: flex;
  flex-direction: column;
  background: #fff;
  width: min(1100px, 100%);
  height: min(90vh, 900px);
  border-radius: 12px;
  overflow: hidden;
}
.aims-cert-dialog-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #f4f7fa;
}
.aims-cert-dialog-title { color: #193950; font-size: 16px; font-weight: 700; flex: 1; }
.aims-cert-dialog-close {
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  background: #164968;
  color: white;
  font: inherit;
  cursor: pointer;
}
.aims-cert-dialog-frame { display: block; width: 100%; flex: 1; border: 0; }
body.aims-cert-dialog-open { overflow: hidden !important; }
@media(max-width: 720px) {
  .aims-cert-grid { grid-template-columns: 1fr !important; gap: 18px !important; }
  .aims-cert-grid > article.tile { padding: 18px !important; }
  .aims-cert-grid h3 { min-height: 0; }
  .aims-cert-preview { min-height: 250px; }
  .aims-cert-dialog { padding: 8px !important; }
  .aims-cert-dialog-panel { height: 95vh; }
}
/* AIMS PDF Viewer Polish v2 */
/* Wider, more legible certificate preview without navigation away from this page. */
.aims-cert-dialog {
  padding: clamp(8px, 1.5vw, 22px) !important;
  background: rgba(7, 21, 34, .84) !important;
}
.aims-cert-dialog-panel {
  box-sizing: border-box !important;
  width: min(1320px, 97vw) !important;
  max-width: 97vw !important;
  height: min(94vh, 1000px) !important;
  max-height: 94vh !important;
  border-radius: 14px !important;
  box-shadow: 0 22px 65px rgba(0,0,0,.27) !important;
}
.aims-cert-dialog-toolbar {
  flex: 0 0 auto !important;
  min-height: 54px !important;
  box-sizing: border-box !important;
  padding: 10px 18px !important;
  background: #fff !important;
  border-bottom: 1px solid #e0e8ee !important;
}
.aims-cert-dialog-title {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font: 700 clamp(14px, 1.2vw, 17px)/1.4 Arial, sans-serif !important;
  color: #153d56 !important;
}
.aims-cert-dialog-close {
  flex: 0 0 auto !important;
  font: 700 14px/1 Arial, sans-serif !important;
  border-radius: 8px !important;
  padding: 12px 20px !important;
  color: #fff !important;
  background: #0d7daf !important;
  transition: background .15s ease !important;
}
.aims-cert-dialog-close:hover, .aims-cert-dialog-close:focus-visible {
  background: #095b80 !important;
  outline-offset: 3px !important;
}
.aims-cert-dialog-frame {
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  background: #e8edf1 !important;
}
@media (max-width: 650px) {
  .aims-cert-dialog { padding: 6px !important; }
  .aims-cert-dialog-panel { width: 100% !important; max-width: 100% !important; height: 96vh !important; max-height: 96vh !important; }
  .aims-cert-dialog-toolbar { padding: 8px 10px !important; }
  .aims-cert-dialog-close { padding: 11px 14px !important; }
}