/* Certificates page - ported from the reference project's certificate section. Linked only by /certificates. */

/* --- Certificates page hero: left-aligned title on solid navy, with the
   p-21 engineers photo pinned right and masked so its left edge (which
   carries baked-in artwork) dissolves into the navy. The photo is only
   691x252, so its box is capped near that size rather than stretched
   full-bleed. On narrow screens it sits behind the text, dimmed. --- */
.certs-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(56px, 3vw + 40px, 92px) 0;
    background: linear-gradient(100deg, var(--navy-deep) 0%, var(--navy-deep) 45%, var(--navy) 100%);
}
.certs-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(52%, 640px);
    /* Sized taller than the box and pinned to the top, so the light strip
       along the photo's bottom edge is cropped off. */
    background: url("/Assets/images/pages/p-21/hero.jpg") right top / auto 112% no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 18%, #000 62%);
    mask-image: linear-gradient(90deg, transparent 0%, transparent 18%, #000 62%);
}
.certs-hero .wrap { position: relative; z-index: 1; }
.certs-hero h1 {
    margin: 0;
    font-family: var(--f-head);
    font-size: clamp(34px, 3.4vw + 16px, 54px);
    font-weight: 800;
    color: #fff;
}
.certs-hero-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: var(--s-3);
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, .76);
}
.certs-hero-crumb a {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    color: rgba(255, 255, 255, .76);
    text-decoration: none;
}
.certs-hero-crumb a svg,
.certs-hero-crumb a .bi,
.certs-hero-crumb a .icon,
.certs-hero-crumb a img { width: 15px; height: 15px; fill: currentColor;
    font-size: 15px;
}
.certs-hero-crumb a:hover { color: #fff; text-decoration: underline; }
.certs-hero-crumb span[aria-current] {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.certs-hero-crumb span[aria-hidden] { margin: 0 10px; }

@media (max-width: 768px) {
    .certs-hero::before {
        width: 100%;
        opacity: .32;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* --- Certificates page body: an
   award ornament over a sentence-case heading, then one card per ISO
   standard - laurel badge, title and a soft wave in the standard's own
   brand hue (--cert), with a PDF mark and "View Certificate" button in a
   footer strip. Every colour is an existing brand token. --- */
.cert-head .section-title {
    font-family: var(--f-head);
    font-size: clamp(28px, 1.6vw + 18px, 40px);
    letter-spacing: -.01em;
    text-transform: none;
    color: var(--navy-deep);
}

.cert-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-4);
    margin-bottom: var(--s-4);
    color: var(--navy);
}
.cert-ornament::before,
.cert-ornament::after {
    content: "";
    width: 72px;
    height: 1.5px;
    background: var(--line-strong);
}
.cert-ornament svg,
.cert-ornament .bi,
.cert-ornament .icon,
.cert-ornament img {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linejoin: round;
    font-size: 34px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-7);
}

.cert-card {
    --cert: var(--steel);
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--sh-card);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lift); }
.cert-card--blue   { --cert: var(--steel); }
.cert-card--green  { --cert: var(--green-badge); }
.cert-card--orange { --cert: var(--orange); }

.cert-card-top {
    position: relative;
    flex: 1;
    padding: var(--s-7) var(--s-6) var(--s-16);
    text-align: center;
}

.cert-badge {
    display: block;
    width: 132px;
    height: 110px;
    margin: 0 auto var(--s-3);
    color: var(--cert);
}
/* Leaves inherit this fill through <use>; the stem's own fill/stroke are
   presentation attributes on the symbol, since selectors can't reach it. */
.cert-badge use { fill: currentColor; }
.cert-badge text {
    fill: currentColor;
    font-family: var(--f-head);
    font-weight: 800;
}
.cert-badge-iso { font-size: 15px; }
.cert-badge-num { font-size: 16px; letter-spacing: -.02em; }

.cert-card-title {
    margin: 0;
    font-family: var(--f-head);
    font-size: clamp(24px, 1vw + 16px, 30px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--ink);
}
.cert-card-sub {
    margin: var(--s-2) auto 0;
    max-width: 26ch;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--ink-body);
}

.cert-card-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 56px;
    color: var(--cert);
}
.cert-wave-back  { fill: currentColor; opacity: .10; }
.cert-wave-front { fill: currentColor; opacity: .18; }

.cert-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    padding: var(--s-4) var(--s-6);
    border-top: 1px solid var(--line-soft);
}

.cert-pdf { width: 30px; height: 36px; flex: none; }
.cert-pdf path { fill: var(--white); stroke: var(--red); stroke-width: 1.5; }
.cert-pdf .cert-pdf-fold { fill: var(--pastel-red); }
.cert-pdf-tag { fill: var(--red); }
.cert-pdf text {
    fill: var(--white);
    font-family: var(--f-head);
    font-size: 8.5px;
    font-weight: 800;
}

.cert-card-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 9px 16px;
    border: 1.5px solid var(--navy);
    border-radius: var(--r-md);
    font-family: var(--f-head);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cert-card-btn svg,
.cert-card-btn .bi,
.cert-card-btn .icon,
.cert-card-btn img {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    font-size: 16px;
}
.cert-card-btn:hover,
.cert-card-btn:focus-visible { background: var(--navy); color: var(--white); }

@media (max-width: 1024px) {
    .cert-grid { gap: var(--s-4); }
    .cert-card-top { padding-inline: var(--s-4); }
    .cert-card-foot { padding-inline: var(--s-4); }
}
@media (max-width: 860px) {
    .cert-grid { grid-template-columns: 1fr; gap: var(--s-5); max-width: 480px; margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .cert-card:hover { transform: none; }
}

/* --- Values the reference's later design layer adds to the certificates page (written out
   literally: this project has no --ds-* tokens). --- */
#certificates.section { padding-block: clamp(48px, 3.6vw + 20px, 84px); }
.cert-head .section-title { font-weight: 800; line-height: 1.16; }
.cert-head .section-title::after { display: none; }
.cert-head .section-lede { color: #4F5B66; }
.certs-hero h1 { letter-spacing: -.02em; }
.cert-card {
    background: #fff;
    border: 1px solid #E3E9F1;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(13, 44, 107, .04), 0 12px 30px -16px rgba(13, 44, 107, .20);
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s cubic-bezier(.22, .61, .36, 1), border-color .35s cubic-bezier(.22, .61, .36, 1);
}
.cert-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(13, 44, 107, .06), 0 26px 48px -20px rgba(13, 44, 107, .34);
}
@media (prefers-reduced-motion: reduce) { .cert-card:hover { transform: none; } }
