/* ========================================================
   ARIVATION — CERTIFICATES / IMAGE FIRST EDITION
   Load after your existing assets/css/style.css
   ======================================================== */
.cert-v4,
.cert-v4 *,
.cert-v4 *::before,
.cert-v4 *::after,
.cert-v4-lightbox,
.cert-v4-lightbox * { box-sizing: border-box; }

.cert-v4 {
  --cert-ink: #103552;
  --cert-mid: #49677a;
  --cert-blue: #1475a0;
  --cert-teal: #0e9d92;
  --cert-line: #dfeaf0;
  color: var(--cert-mid);
  background: #f8fafb;
  overflow: clip;
}
.cert-v4-container { width: min(1240px, calc(100% - 64px)); margin: 0 auto; }
.cert-v4 :is(h1,h2,h3,p) { text-wrap: pretty; }
.cert-v4 a { text-decoration: none; }
.cert-v4 button { font: inherit; }
.cert-v4 .carousel-inner { overflow: hidden; }
.cert-v4 .carousel-item { display: none; }
.cert-v4 .carousel-item.active { display: block; }
.cert-v4 .carousel-item img { width: 100%; height: auto; display: block; }

/* Opening section is intentionally editorial, not another hero or cards grid. */
.cert-v4-intro { padding: 91px 0 42px; background: #fff; }
.cert-v4-intro-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(340px,.68fr); align-items: end; gap: clamp(35px,5vw,94px); }
.cert-v4-eyebrow { display: flex; gap: 9px; align-items: center; margin-bottom: 27px; color: #267a91; font-size: 13.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.cert-v4-eyebrow-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #18b6aa; box-shadow: 0 0 0 4px #e6f8f4; }
.cert-v4-eyebrow-rule { width: 22px; height: 1px; background: #a2c7d0; }
.cert-v4-intro h1 { max-width: 840px; margin: 0; color: var(--cert-ink); font: 800 clamp(46px, 6vw, 79.5px)/1.09 "Manrope", sans-serif; letter-spacing: -.055em; }
.cert-v4-intro h1 em { display: inline; color: var(--cert-blue); font-style: normal; }
.cert-v4-intro-aside { padding-bottom: 6px; }
.cert-v4-intro-aside p { margin: 0 0 14px; font: 400 17px/1.83 "DM Sans", sans-serif; color: #5e788b; }
.cert-v4-text-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; padding-bottom: 7px; border-bottom: 1px solid #8cbeca; font-size: 15.5px; font-weight: 800; color: var(--cert-blue); transition: gap .25s, color .25s; }
.cert-v4-text-link:hover { gap: 18px; color: #095476; }
.cert-v4-intro-divider { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 77px; padding: 19px 0 0; border-top: 1px solid #dce8ef; color: #86a2ae; font-size: 14px; font-weight: 800; letter-spacing: .14em; }

/* Document gallery: images are the ONLY trigger for the lightbox. */
.cert-v4-gallery-section { padding: 83px 0 108px; background: linear-gradient(180deg,#f3f8fb 0%,#f9fbfc 100%); }
.cert-v4-gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.cert-v4-overline { display: inline-block; color: #24869c; font-size: 13.5px; font-weight: 800; letter-spacing: .17em; line-height: 1.5; text-transform: uppercase; }
.cert-v4-gallery-heading h2 { margin: 12px 0 0; color: var(--cert-ink); font: 800 clamp(34.5px,4.5vw,60px)/1.15 "Manrope", sans-serif; letter-spacing: -.045em; }
.cert-v4-gallery-heading h2 span { color: var(--cert-blue); }
.cert-v4-gallery-heading > p { display: flex; align-items: center; gap: 9px; margin: 0 0 8px; color: #728998; font-size: 17px; }
.cert-v4-gallery-heading > p i { color: var(--cert-teal); font-size: 16px; }
.cert-v4-gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 38px 25px; }
.cert-v4-card { position: relative; min-width: 0; }
.cert-v4-frame { position: relative; display: grid; width: 100%; aspect-ratio: 1 / 1.08; padding: 25px; place-items: center; border: 1px solid #dce8ed; border-radius: 19px; background: #edf4f7; box-shadow: 0 10px 35px rgba(22,57,87,.035); transition: border-color .32s, transform .32s, box-shadow .32s; }
.cert-v4-card:nth-child(3n+2) .cert-v4-frame { background: #edf5f5; }
.cert-v4-card:nth-child(3n+3) .cert-v4-frame { background: #edf2f8; }
.cert-v4-card:hover .cert-v4-frame { transform: translateY(-5px); border-color: #b6d7e0; box-shadow: 0 24px 50px rgba(22,57,87,.09); }
.cert-v4-index { position: absolute; z-index: 3; left: 20px; top: 17px; color: #83a4b3; font: 700 15px "Manrope",sans-serif; letter-spacing: .06em; pointer-events: none; }
.cert-v4-image-button { position: relative; display: grid; justify-items: center; align-items: center; width: 82%; height: 93%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.cert-v4-image-button img { display: block; width: auto; max-width: 100%; max-height: 100%; aspect-ratio: 340 / 404; object-fit: contain; border: 1px solid rgba(14,63,96,.10); border-radius: 3px; background: #fff; box-shadow: 0 16px 38px rgba(13,41,66,.17); transition: transform .3s, box-shadow .3s; }
.cert-v4-image-button:hover img, .cert-v4-image-button:focus-visible img { transform: translateY(-6px) scale(1.022); box-shadow: 0 24px 48px rgba(13,41,66,.22); }
.cert-v4-image-button:focus-visible { outline: 3px solid #107bb2; outline-offset: 5px; border-radius: 5px; }
.cert-v4-zoom-hint { position: absolute; z-index: 2; right: -10px; bottom: 8%; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: #fff; background: #126d95; box-shadow: 0 10px 24px rgba(13,55,83,.2); font-size: 18px; pointer-events: none; transition: transform .28s, background .28s; }
.cert-v4-image-button:hover .cert-v4-zoom-hint { transform: scale(1.1); background: #0a9c91; }
.cert-v4-meta { display: flex; align-items: center; gap: 9px; margin: 23px 0 8px; color: #159193; font-size: 13.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cert-v4-meta span:last-child { color: #8ba3ad; }
.cert-v4-card h3 { margin: 0 0 7px; color: var(--cert-ink); font: 800 21.5px/1.35 "Manrope",sans-serif; letter-spacing: -.018em; }
.cert-v4-card p { max-width: 335px; margin: 0; color: #698295; font: 400 17px/1.75 "DM Sans",sans-serif; }
.cert-v4-disclaimer { display: flex; gap: 12px; align-items: start; margin: 53px 0 0; padding: 19px 22px; border: 1px solid #daeaef; border-radius: 12px; color: #648292; background: #fff; font-size: 15px; line-height: 1.75; }
.cert-v4-disclaimer i { color: #1689a2; flex: 0 0 auto; margin-top: 1px; font-size: 16px; }

/* Context section: lines instead of repeating the previous feature cards */
.cert-v4-context { padding: 112px 0; background: #fff; }
.cert-v4-context-grid { display: grid; grid-template-columns: minmax(0,.78fr) minmax(0,1.12fr); gap: clamp(40px, 7vw, 114px); }
.cert-v4-context-intro h2 { margin: 15px 0 22px; color: var(--cert-ink); font: 800 clamp(32px,4vw,53px)/1.17 "Manrope", sans-serif; letter-spacing: -.043em; }
.cert-v4-context-intro h2 span { color: var(--cert-blue); }
.cert-v4-context-intro p { max-width: 440px; margin: 0; font-size: 17px; line-height: 1.85; color: #688193; }
.cert-v4-context-list { border-top: 1px solid #d9e6ed; }
.cert-v4-context-list article { display: grid; grid-template-columns: 36px 1fr 28px; gap: 16px; padding: 29px 0 30px; border-bottom: 1px solid #d9e6ed; align-items: start; }
.cert-v4-context-number { padding-top: 5px; color: #1b98a6; font-size: 15px; font-weight: 800; }
.cert-v4-context-list h3 { margin: 0 0 8px; color: var(--cert-ink); font: 800 20px/1.4 "Manrope",sans-serif; }
.cert-v4-context-list p { margin: 0; max-width: 480px; color: #6c8594; font-size: 17px; line-height: 1.8; }
.cert-v4-context-list article > i { color: #7aaaba; font-size: 22px; }

/* Final call to action */
.cert-v4-contact { padding: 0 0 108px; background: #fff; }
.cert-v4-contact-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 35px; padding: 47px 57px; border-radius: 23px; overflow: hidden; background: radial-gradient(circle at 80% 0%,rgba(23,185,178,.20),transparent 42%),linear-gradient(116deg,#123e66 0%,#0a5a78 64%,#067d80 120%); }
.cert-v4-contact .cert-v4-overline { color: #8bddd9; }
.cert-v4-contact h2 { margin: 10px 0 9px; color: #fff; font: 800 clamp(31px,3vw,38.5px)/1.2 "Manrope",sans-serif; letter-spacing: -.03em; }
.cert-v4-contact p { margin: 0; max-width: 620px; color: rgba(255,255,255,.76); font-size: 17px; line-height: 1.75; }
.cert-v4-contact-link { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 53px; padding: 0 20px; border-radius: 10px; background: #fff; color: #155270; white-space: nowrap; font-size: 15px; font-weight: 800; transition: transform .25s, background .25s; }
.cert-v4-contact-link:hover { transform: translateY(-3px); background: #e5f7f7; color: #155270; }

/* Accessible zoom viewer. The image is the only clickable zoom control. */
.cert-v4-lightbox[hidden] { display: none !important; }
.cert-v4-lightbox { position: fixed; inset: 0; z-index: 99990; display: flex; flex-direction: column; padding: 24px clamp(18px,4vw,65px) 17px; color: #fff; background: rgba(4,17,31,.96); backdrop-filter: blur(14px); }
.cert-v4-lightbox-top { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 20px; padding: 0 0 12px; }
.cert-v4-lightbox-eyebrow { display: block; margin-bottom: 4px; color: #80bcc6; font-size: 13.5px; letter-spacing: .17em; font-weight: 800; }
.cert-v4-lightbox h2 { margin: 0; color: #fff; font: 800 clamp(31px,2.5vw,31px)/1.4 "Manrope",sans-serif; }
.cert-v4-lightbox-close { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: background .2s; }
.cert-v4-lightbox-close:hover, .cert-v4-lightbox-close:focus-visible { background: rgba(255,255,255,.17); }
.cert-v4-lightbox-stage { display: flex; flex: 1 1 auto; min-height: 0; justify-content: center; align-items: center; overflow: auto; overscroll-behavior: contain; padding: 8px 10px 15px; }
.cert-v4-lightbox-stage img { display: block; max-width: min(90vw,780px); max-height: calc(100dvh - 180px); width: auto; height: auto; object-fit: contain; box-shadow: 0 25px 65px rgba(0,0,0,.4); background: white; cursor: zoom-in; transition: max-width .22s ease, width .22s ease; }
.cert-v4-lightbox-stage img.is-zoomed { max-width: none; max-height: none; width: min(1120px, 180vw); cursor: zoom-out; }
.cert-v4-lightbox-help { flex: 0 0 auto; text-align: center; color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.5; margin: 12px 0 0; }
body.cert-v4-lock { overflow: hidden !important; }

@media (max-width:1050px) {
  .cert-v4-intro-grid { grid-template-columns: 1fr 360px; gap: 33px; }
  .cert-v4-frame { padding: 18px; }
  .cert-v4-gallery { gap: 33px 19px; }
  .cert-v4-image-button { width: 86%; }
  .cert-v4-contact-panel { padding: 40px; }
}
@media (max-width:800px) {
  .cert-v4-container { width: min(720px, calc(100% - 38px)); }
  .cert-v4-intro { padding-top: 70px; }
  .cert-v4-intro-grid, .cert-v4-context-grid { grid-template-columns: 1fr; }
  .cert-v4-intro-aside { max-width: 620px; }
  .cert-v4-intro-divider { margin-top: 48px; }
  .cert-v4-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cert-v4-frame { aspect-ratio: 1 / 1.18; }
  .cert-v4-context { padding: 76px 0; }
  .cert-v4-context-grid { gap: 32px; }
  .cert-v4-contact-panel { grid-template-columns: 1fr; gap: 20px; }
  .cert-v4-contact-link { width: max-content; max-width: 100%; }
}
@media (max-width:520px) {
  .cert-v4-container { width: calc(100% - 28px); }
  .cert-v4-intro { padding: 54px 0 27px; }
  .cert-v4-intro h1 { font-size: clamp(39.5px, 11vw, 51.5px); letter-spacing: -.045em; }
  .cert-v4-eyebrow { letter-spacing: .08em; font-size: 13px; }
  .cert-v4-intro-aside p { font-size: 16px; }
  .cert-v4-intro-divider { margin-top: 43px; font-size: 12.5px; }
  .cert-v4-gallery-section { padding: 55px 0 75px; }
  .cert-v4-gallery-heading { display: block; margin-bottom: 23px; }
  .cert-v4-gallery-heading h2 { font-size: 37.5px; }
  .cert-v4-gallery-heading > p { margin-top: 12px; }
  .cert-v4-gallery { grid-template-columns: 1fr; gap: 38px; }
  .cert-v4-frame { min-height: 370px; aspect-ratio: 1 / 1; }
  .cert-v4-image-button { width: 79%; }
  .cert-v4-meta { margin-top: 18px; }
  .cert-v4-disclaimer { margin-top: 36px; padding: 14px; font-size: 13.5px; }
  .cert-v4-context { padding: 69px 0; }
  .cert-v4-context-list article { grid-template-columns: 27px 1fr 21px; gap: 12px; }
  .cert-v4-context-list h3 { font-size: 19px; }
  .cert-v4-contact { padding-bottom: 77px; }
  .cert-v4-contact-panel { border-radius: 17px; padding: 29px 23px; }
  .cert-v4-contact-link { width: 100%; }
  .cert-v4-lightbox { padding: 15px 11px; }
  .cert-v4-lightbox-stage { padding: 10px 4px; }
  .cert-v4-lightbox-stage img { max-height: calc(100dvh - 165px); max-width: 95vw; }
  .cert-v4-lightbox-stage img.is-zoomed { width: 200vw; }
}
@media (prefers-reduced-motion:reduce) {
  .cert-v4 *, .cert-v4 *::before, .cert-v4 *::after, .cert-v4-lightbox * { animation: none !important; transition: none !important; }
}

/* Keep document previews contained on shorter mobile card frames. */
.cert-v4-frame { overflow: hidden; }
.cert-v4-image-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(82%, 300px);
  height: 92%;
  min-height: 0;
  min-width: 0;
}
.cert-v4-image-button img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}
@media (max-width: 520px) {
  .cert-v4-image-button { width: min(77%, 285px); height: 89%; }
}
