/* ================================================================
   Certs & Clients — Original structure + Blue Tinted Background
   ================================================================ */

/* ── Section: เพิ่มแค่โทนสีพื้นหลัง ── */
#certs-clients {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 80, 180, 0.20) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 140, 220, 0.15) 0%, transparent 55%),
        linear-gradient(170deg, #0c1e3d 0%, #0f2548 45%, #0c1e3d 100%);
    position: relative;
    overflow: hidden;
    border-top: none !important;  /* ปิด Bootstrap border-top เดิม */
}

/* Dot grid สไตล์ family เดียวกัน */
#certs-clients::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(56, 189, 248, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

#certs-clients > .container {
    position: relative;
    z-index: 1;
}

/* ── Title card ── */
#certs-clients .title-card {
    background: rgba(9, 30, 65, 0.70) !important;
    border: 1px solid rgba(56, 189, 248, 0.20) !important;
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

#certs-clients .title-text {
    color: #e2f0ff !important;
    font-weight: 700;
}

#certs-clients .title-accent {
    background: linear-gradient(180deg, #38bdf8, #0062ff) !important;
    width: 4px;
    height: 22px;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
    display: inline-block;
    flex-shrink: 0;
}

/* ── cc-card wrapper ── */
#certs-clients .cc-card {
    height: 100%;
}

/* ── Cert badges — white bg so logos are readable ── */
#certs-clients .cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 1rem;
}

#certs-clients .cert-badges .badge-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid rgba(56, 189, 248, 0.22);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#certs-clients .cert-badges .badge-item img {
    height: 72px;
    width: auto;
    object-fit: contain;
    filter: grayscale(8%);
    transition: transform .25s ease, filter .25s ease;
}
#certs-clients .cert-badges .badge-item:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 14px rgba(56, 189, 248, 0.22);
}
#certs-clients .cert-badges .badge-item:hover img {
    transform: scale(1.06);
    filter: grayscale(0%);
}

/* ── List items — readable text on dark ── */
#certs-clients .list-unstyled.small li {
    color: rgba(210, 235, 255, 0.85) !important;
    margin-bottom: 0.4rem;
}

/* ── View all button ── */
#certs-clients .btn-outline-primary {
    border-color: rgba(56, 189, 248, 0.55) !important;
    color: #7dd3fc !important;
    transition: all .25s ease;
}
#certs-clients .btn-outline-primary:hover {
    background: rgba(56, 189, 248, 0.15) !important;
    border-color: rgba(56, 189, 248, 0.85) !important;
    color: #e2f0ff !important;
    transform: translateY(-2px);
}

/* ── Client logos row ── */
#certs-clients .clients-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    background: rgba(5, 18, 45, 0.55);
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.12);
    backdrop-filter: blur(4px);
}

#certs-clients .clients-row img {
    height: 48px;
    width: auto;
    transition: all 0.3s ease;
    /* White background container for each logo */
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.15);
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    filter: grayscale(15%);
    opacity: 0.9;
}
#certs-clients .clients-row img:hover {
    transform: scale(1.1) translateY(-3px);
    filter: grayscale(0%);
    opacity: 1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 12px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.45);
}

#certs-clients .btn-link {
    color: #7dd3fc !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
#certs-clients .btn-link:hover {
    color: #bae6fd !important;
    gap: 10px;
}

/* ── Reveal animation ── */
#certs-clients .cc-reveal {
    opacity: 0;
    transition: opacity 1s cubic-bezier(.22,1,.36,1), transform 1s cubic-bezier(.22,1,.36,1);
}
#certs-clients .cc-reveal[data-reveal="from-left"] { transform: translateX(-28px); }
#certs-clients .cc-reveal[data-reveal="from-right"] { transform: translateX(28px); }
#certs-clients .cc-reveal.is-revealed { opacity: 1; transform: none; }

/* ── Equalise heights ── */
#certs-clients .cert-badges,
#certs-clients .clients-row {
    min-height: 120px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #certs-clients { padding: 3rem 0; }
    #certs-clients .cert-badges { gap: 12px; }
    #certs-clients .clients-row { gap: 12px; padding: 12px; }
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
    #certs-clients .cc-reveal {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
