/* CERTIFICATIONS.CSS — page-specific styles for certifications.html
   Loaded after base.css and about.css (the banner, section, CTA, footer and modal
   rules are shared with the About page). */

/* ── Compliance diagram: two columns of nodes around a central hub ── */
.cmp-wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 1180px; margin: 0 auto; }

.cmp-col { position: relative; display: grid; grid-template-rows: repeat(3, 1fr); gap: 20px; }
.cmp-left { padding-right: 48px; }
.cmp-right { padding-left: 48px; }

/* spine joining the three nodes on each side, then a line across to the hub */
.cmp-col::before { content: ''; position: absolute; top: calc((100% - 40px) / 6); bottom: calc((100% - 40px) / 6); width: 1px; background: #C9BDA8; }
.cmp-left::before { right: 0; }
.cmp-right::before { left: 0; }
.cmp-col::after { content: ''; position: absolute; top: 50%; width: 48px; height: 1px; background: #C9BDA8; }
.cmp-left::after { right: -48px; }
.cmp-right::after { left: -48px; }

.cmp-node { position: relative; background: #F7F3EE; border: 1px solid #D2CABD; padding: 24px 24px 26px; transition: background 0.3s ease, border-color 0.3s ease; }
.cmp-node:hover { background: #FBF8F4; border-color: #BFA67A; }
/* tick from node to spine, with a gold dot sitting on the spine */
.cmp-node::after { content: ''; position: absolute; top: 50%; width: 48px; height: 1px; background: #C9BDA8; }
.cmp-node::before { content: ''; position: absolute; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: #9E6B1E; transform: translateY(-50%); z-index: 1; }
.cmp-left .cmp-node::after { left: 100%; }
.cmp-left .cmp-node::before { left: calc(100% + 48px - 3.5px); }
.cmp-right .cmp-node::after { right: 100%; }
.cmp-right .cmp-node::before { right: calc(100% + 48px - 3.5px); }

.cmp-node-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cmp-icon { width: 30px; height: 30px; color: #9E6B1E; flex-shrink: 0; }
.cmp-num { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.18em; color: #9E6B1E; }
.cmp-title { font-family: var(--cinzel); font-size: 0.98rem; font-weight: 600; line-height: 1.3; color: #18192A !important; margin-bottom: 10px; }
.cmp-desc { font-family: var(--jakarta); font-size: 0.8rem; font-weight: 300; line-height: 1.65; color: #40455E; }

/* central hub */
.cmp-hub { position: relative; width: 250px; height: 250px; margin: 0 48px; flex-shrink: 0; }
.cmp-hub-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed #9E6B1E; opacity: 0.6; animation: cmpSpin 70s linear infinite; }
.cmp-hub-core { position: absolute; inset: 22px; border-radius: 50%; background: #18192A; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px; box-shadow: 0 18px 44px rgba(24, 25, 42, 0.22); }
.cmp-hub-icon { width: 34px; height: 34px; color: #C8A46D; margin-bottom: 12px; }
.cmp-hub-label { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.2em; text-transform: uppercase; color: #C8A46D; margin-bottom: 8px; }
.cmp-hub-title { font-family: var(--cinzel); font-size: 1.28rem; font-weight: 600; line-height: 1.15; letter-spacing: 0.04em; color: #ECE8DF; }
@keyframes cmpSpin { to { transform: rotate(360deg); } }

/* ── Certificates gallery ── */
#certificates[hidden] { display: none; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.cert-card { display: flex; flex-direction: column; background: #F7F3EE; border: 1px solid #D2CABD; text-decoration: none; color: inherit; transition: transform 0.35s ease, border-color 0.3s ease, box-shadow 0.35s ease; animation: certIn 0.7s ease both; }
.cert-card:hover { transform: translateY(-4px); border-color: #9E6B1E; box-shadow: 0 14px 34px rgba(24, 25, 42, 0.12); }
.cert-thumb { aspect-ratio: 3 / 4; background: #FFFFFF; border-bottom: 1px solid #D2CABD; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cert-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cert-pdf { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #9E6B1E; }
.cert-pdf svg { width: 54px; height: 54px; }
.cert-pdf span { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.22em; }
.cert-cap { padding: 16px 18px 18px; }
.cert-name { font-family: var(--cinzel); font-size: 0.92rem; font-weight: 600; line-height: 1.35; color: #18192A !important; margin-bottom: 8px; overflow-wrap: anywhere; }
.cert-view { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.18em; text-transform: uppercase; color: #9E6B1E; }
@keyframes certIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Certificate viewer ── */
.cert-lb { position: fixed; inset: 0; z-index: 300; background: rgba(16, 19, 32, 0.98); display: flex; align-items: center; justify-content: center; padding: 64px 72px; }
.cert-lb[hidden] { display: none; }
.cert-lb-fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cert-lb-fig img { max-width: 100%; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); object-fit: contain; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5); }
.cert-lb-fig figcaption { font-family: var(--cinzel); font-size: 1rem; letter-spacing: 0.04em; text-align: center; color: #ECE8DF; }
.cert-lb-close, .cert-lb-nav { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(200, 164, 109, 0.5); background: rgba(16, 19, 32, 0.6); color: #ECE8DF; display: flex; align-items: center; justify-content: center; cursor: pointer; appearance: none; -webkit-appearance: none; padding: 0; transition: background 0.25s ease, border-color 0.25s ease; }
.cert-lb-close:hover, .cert-lb-nav:hover { background: rgba(200, 164, 109, 0.2); border-color: #C8A46D; }
.cert-lb-close { top: 18px; right: 18px; }
.cert-lb-nav { top: 50%; transform: translateY(-50%); }
.cert-lb-prev { left: 18px; }
.cert-lb-next { right: 18px; }
.cert-lb.single .cert-lb-nav { display: none; }

/* ── Tablet and phone ── */
@media (max-width: 1100px) {
  /* diagram stacks: hub on top, then the six nodes as a single column */
  .cmp-wrap { display: flex; flex-direction: column; align-items: stretch; max-width: 600px; }
  .cmp-hub { order: -1; margin: 0 auto 40px; }
  .cmp-col { display: contents; }
  .cmp-col::before, .cmp-col::after, .cmp-node::before, .cmp-node::after { display: none; }
  .cmp-node { border-left: 3px solid #9E6B1E; margin-bottom: 14px; }
}
@media (max-width: 900px) {
  .cmp-hub { width: 220px; height: 220px; margin-bottom: 32px; }
  .cmp-hub-core { inset: 18px; padding: 14px; }
  .cmp-hub-title { font-size: 1.12rem; }
  .cmp-node { padding: 20px 20px 22px; }
}
@media (max-width: 600px) {
  .cert-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cert-cap { padding: 12px 12px 14px; }
  .cert-name { font-size: 0.8rem; }
  .cert-lb { padding: 72px 16px 56px; }
  .cert-lb-fig img { max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); }
  .cert-lb-nav { top: auto; bottom: 14px; transform: none; }
  .cert-lb-prev { left: calc(50% - 56px); }
  .cert-lb-next { right: calc(50% - 56px); }
  .cert-lb-close { top: 14px; right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmp-hub-ring, .cert-card { animation: none; }
}
