/* ==========================================================================
   Certificate page - "Our Certifications & Affiliations"
   Heading + spacing come from the shared .hp-section / .section-spacing
   classes. This file adds the logo cards (5 per row,
   last row centred), the dotted backdrop and the navy wave into the footer.
   Logos live in public/img/certificate/ (300 x 212 PNGs).
   ========================================================================== */

.cert-area {
    position: relative;
    overflow: hidden;
    /* room for the wave at the bottom */
    /* padding-bottom: 190px !important; */
    background: linear-gradient(180deg, #fff 0%, #f7f8fb 100%);
}

@media only screen and (max-width: 991px) {
    .cert-area {
        padding-bottom: 150px !important;
    }
}

@media only screen and (max-width: 767px) {
    .cert-area {
        padding-bottom: 110px !important;
    }
}

.cert-area .container {
    position: relative;
    z-index: 1;
}

/* faint dot field behind the heading (fades out towards the cards) */
.cert-dots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 420px;
    background-image: radial-gradient(rgba(34, 46, 71, 0.09) 2px, transparent 2px);
    background-size: 14px 14px;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 20%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 50% 20%, #000 20%, transparent 75%);
    pointer-events: none;
}

/* ---------- heading ---------- */
.cert-area .section-title-wrapper {
    max-width: 760px;
}

.cert-intro {
    margin-top: 18px;
    font-size: 18px;
    line-height: 1.7;
    color: #5b6478;
}

@media only screen and (max-width: 767px) {
    .cert-intro {
        font-size: 16px;
    }
}

/* ---------- grid: 5 per row, last row centred ---------- */
.cert-grid {
    --cert-cols: 5;
    --cert-gap: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--cert-gap);
}

@media only screen and (max-width: 1199px) {
    .cert-grid {
        --cert-cols: 4;
    }
}

@media only screen and (max-width: 991px) {
    .cert-grid {
        --cert-cols: 3;
        --cert-gap: 20px;
    }
}

@media only screen and (max-width: 575px) {
    .cert-grid {
        --cert-cols: 2;
        --cert-gap: 14px;
    }
}

/* ---------- card ---------- */
.cert-card {
    flex: 0 0 calc((100% - (var(--cert-cols) - 1) * var(--cert-gap)) / var(--cert-cols));
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 14px 24px;
    border-radius: 18px;
    background-color: #fff;
    border: 1px solid #eef0f5;
    box-shadow: 0 10px 30px rgba(34, 46, 71, 0.07);
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.cert-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(34, 46, 71, 0.13);
}

/* every logo PNG is 300 x 212 with its own white margin, so the box uses that ratio
   and the image fills it edge to edge - all cards stay the same height */
.cert-logo {
    width: 100%;
    aspect-ratio: 300 / 212;
}

.cert-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.cert-card:hover .cert-logo img {
    transform: scale(1.05);
}

.cert-name {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--fg-navy);
}

/* amber underline - widens on hover */
.cert-name::after {
    content: "";
    display: block;
    width: 32px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: 2px;
    background-color: var(--fg-amber);
    transition: width 0.4s ease;
}

.cert-card:hover .cert-name::after {
    width: 56px;
}

@media only screen and (max-width: 767px) {
    .cert-card {
        padding: 10px 10px 18px;
        border-radius: 14px;
    }

    .cert-name {
        margin-top: 12px;
        font-size: 14px;
    }

    .cert-name::after {
        margin-top: 10px;
    }
}

/* ---------- navy wave with amber edge, same colour as the footer ---------- */
.cert-wave {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 120px;
    display: block;
}

@media only screen and (max-width: 767px) {
    .cert-wave {
        height: 60px;
    }
}

.cert-wave-edge {
    fill: var(--fg-amber);
}

.cert-wave-fill {
    fill: #091120;
}
