/* Our Certifications — Modern Section */
.certifications-section {
    position: relative;
    padding: clamp(3.5rem, 8vw, 6rem) 0;
    overflow: hidden;
    background: linear-gradient(160deg, #0b1e3a 0%, #123a6b 42%, #1d4ed8 100%);
    isolation: isolate;
}

.certifications-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.certifications-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: certOrbFloat 14s ease-in-out infinite;
}

.certifications-orb--1 {
    width: min(420px, 70vw);
    height: min(420px, 70vw);
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
}

.certifications-orb--2 {
    width: min(360px, 60vw);
    height: min(360px, 60vw);
    bottom: -100px;
    left: -60px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    animation-delay: -7s;
}

.certifications-grid-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.6) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

@keyframes certOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-12px, 16px) scale(1.05); }
}

.certifications-section .container {
    position: relative;
    z-index: 1;
}

/* Header */
.certifications-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto clamp(2rem, 5vw, 3.25rem);
}

.certifications-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.certifications-eyebrow i {
    color: #7dd3fc;
    font-size: 0.85rem;
}

.certifications-title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.85rem, 4.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.certifications-title-accent {
    background: linear-gradient(90deg, #7dd3fc, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.certifications-subtitle {
    margin: 0;
    font-size: clamp(0.95rem, 2.2vw, 1.08rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
}

/* Grid */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
    max-width: 1140px;
    margin: 0 auto;
}

/* Cards */
.cert-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: clamp(1.35rem, 3vw, 1.85rem);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.04),
        0 18px 40px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s ease;
    overflow: hidden;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cert-accent, linear-gradient(90deg, #2563eb, #38bdf8));
}

.cert-card__glow {
    position: absolute;
    top: -40%;
    right: -30%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--cert-glow, rgba(37, 99, 235, 0.12));
    filter: blur(40px);
    pointer-events: none;
    transition: opacity 0.35s ease;
    opacity: 0.7;
}

.cert-card:hover,
.cert-card:focus-within {
    transform: translateY(-8px);
    box-shadow:
        0 8px 16px rgba(15, 23, 42, 0.06),
        0 28px 56px rgba(15, 23, 42, 0.16);
    border-color: rgba(56, 189, 248, 0.35);
}

.cert-card:hover .cert-card__glow,
.cert-card:focus-within .cert-card__glow {
    opacity: 1;
}

.cert-card--gmp {
    --cert-accent: linear-gradient(90deg, #2563eb, #0ea5e9);
    --cert-glow: rgba(14, 165, 233, 0.18);
}

.cert-card--dcgi {
    --cert-accent: linear-gradient(90deg, #059669, #10b981);
    --cert-glow: rgba(16, 185, 129, 0.18);
}

.cert-card--culture {
    --cert-accent: linear-gradient(90deg, #7c3aed, #a855f7);
    --cert-glow: rgba(168, 85, 247, 0.18);
}

.cert-card__icon-wrap {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    margin: 0 auto 1.15rem;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.35s ease;
}

.cert-card:hover .cert-card__icon-wrap,
.cert-card:focus-within .cert-card__icon-wrap {
    transform: scale(1.06);
}

.cert-card__icon {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.cert-card__badge {
    position: relative;
    z-index: 1;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--cert-accent, linear-gradient(90deg, #2563eb, #38bdf8));
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.cert-card__badge i {
    font-size: 0.72rem;
}

.cert-card__title {
    position: relative;
    z-index: 1;
    margin: 0 0 0.65rem;
    text-align: center;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.cert-card__desc {
    position: relative;
    z-index: 1;
    flex: 1;
    margin: 0 0 1.1rem;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #64748b;
}

.cert-card__footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

.cert-card__tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.cert-card__tag i {
    color: #10b981;
    font-size: 0.9rem;
}

/* Trust strip */
.certifications-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: clamp(2rem, 5vw, 2.75rem) auto 0;
}

.cert-trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.84rem;
    font-weight: 500;
    text-align: center;
}

.cert-trust-item i {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #7dd3fc;
    font-size: 0.9rem;
}

/* Scroll hint — mobile only */
.certifications-scroll-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
}

.certifications-scroll-hint i {
    animation: certSwipeHint 1.8s ease-in-out infinite;
}

@keyframes certSwipeHint {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(6px); opacity: 1; }
}

/* Fade-in animation */
.cert-card.is-visible {
    animation: certFadeUp 0.55s ease forwards;
}

@keyframes certFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet & below — horizontal scroll carousel */
@media (max-width: 991.98px) {
    .certifications-grid {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 1rem;
        padding: 0.25rem 1rem 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: none;
    }

    .certifications-grid::-webkit-scrollbar {
        display: none;
    }

    .cert-card {
        scroll-snap-align: start;
        min-width: 260px;
    }

    .certifications-scroll-hint {
        display: flex;
    }

    .certifications-trust {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .cert-trust-item {
        justify-content: flex-start;
        text-align: left;
    }
}

/* Mobile */
@media (max-width: 575.98px) {
    .certifications-section {
        padding: 2.75rem 0 2.5rem;
    }

    .certifications-header {
        padding: 0 0.5rem;
        margin-bottom: 1.75rem;
    }

    .certifications-grid {
        gap: 0.85rem;
        padding-inline: 0.85rem;
    }

    .cert-card {
        min-width: calc(100vw - 2.5rem);
        max-width: calc(100vw - 2.5rem);
        padding: 1.25rem;
        border-radius: 18px;
    }

    .cert-card__icon-wrap {
        width: 76px;
        height: 76px;
        margin-bottom: 1rem;
        border-radius: 18px;
    }

    .cert-card__icon {
        width: 50px;
        height: 50px;
    }

    .cert-card__desc {
        font-size: 0.88rem;
    }

    .certifications-trust {
        padding: 0 0.85rem;
        gap: 0.65rem;
    }

    .cert-trust-item {
        padding: 0.75rem 0.85rem;
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .certifications-orb,
    .certifications-scroll-hint i,
    .cert-card.is-visible {
        animation: none;
    }

    .cert-card {
        opacity: 1;
    }

    .cert-card,
    .cert-card__icon-wrap {
        transition: none;
    }
}
