﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066ff;
    --primary-light: #e6f2ff;
    --accent: #ff6b35;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --border-light: #e8e8e8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

.certs-clients-section {
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

    .certs-clients-section::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(0, 102, 255, 0.05) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

.card-wrapper {
    position: relative;
    z-index: 1;
}

/* Title Card Styling */
.title-card {
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(0, 102, 255, 0.02) 100%);
    border: 1px solid rgba(0, 102, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    animation: slideInTitle 0.6s ease-out;
}

    .title-card:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 102, 255, 0.12);
    }

.title-card__body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-accent {
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px;
    animation: expandHeight 0.6s ease-out 0.2s backwards;
}

.title-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* Certifications Section */
/* ====== CERTS ====== */
.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

    .cert-badges .badge-item {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
        border-radius: 12px;
        background: #fff;
        border: 1px solid var(--border-light);
        transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
    }

        .cert-badges .badge-item img {
            height: 80px;
            width: auto;
            object-fit: contain;
            filter: grayscale(10%);
            transition: transform .25s ease, filter .25s ease;
            transform-origin: center;
        }

        .cert-badges .badge-item:hover img {
            transform: scale(1.1) translateY(-4px);
            filter: grayscale(0%);
        }

        .cert-badges .badge-item:hover {
            border-color: var(--primary);
            box-shadow: 0 12px 24px rgba(0,102,255,.15);
        }

/* ====== CLIENT LOGOS ====== */
.clients-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(0,102,255,.02);
}

    .clients-row .client-logo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
        border-radius: 10px;
        background: #fff;
        border: 1px solid var(--border-light);
        transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
    }

        .clients-row .client-logo img {
            height: 48px;
            width: auto;
            object-fit: contain;
            filter: grayscale(30%);
            opacity: .7;
            transition: transform .25s ease, filter .25s ease, opacity .25s ease;
        }

        .clients-row .client-logo:hover img {
            transform: scale(1.15) translateY(-3px);
            filter: none;
            opacity: 1;
        }

        .clients-row .client-logo:hover {
            border-color: var(--primary);
            box-shadow: 0 10px 20px rgba(0,102,255,.12);
        }



/* List Styling */
.cert-list {
    list-style: none;
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

    .cert-list li {
        padding: 12px 0;
        padding-left: 24px;
        position: relative;
        color: var(--text-light);
        font-size: 14px;
        line-height: 1.6;
        border-bottom: 1px solid var(--border-light);
        transition: all 0.3s ease;
    }

        .cert-list li:last-child {
            border-bottom: none;
        }

        .cert-list li:hover {
            color: var(--text-dark);
            padding-left: 28px;
        }

        .cert-list li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: var(--primary);
            font-weight: bold;
            font-size: 16px;
        }

/* Button Styling */
.btn-outline-primary {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    margin-top: 16px;
    animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

    .btn-outline-primary:hover {
        background: var(--primary);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0, 102, 255, 0.25);
    }

/* Clients Section */
.clients-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
    padding: 20px;
    background: rgba(0, 102, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

    .clients-row:hover {
        border-color: var(--primary);
        background: rgba(0, 102, 255, 0.04);
    }

    .clients-row img {
        height: 48px;
        width: auto;
        transition: all 0.3s ease;
        filter: grayscale(30%);
        opacity: 0.7;
        border-radius: 10px;
        border: 1px solid var(--border-light);
        padding: 6px;
        background: white;
    }

        .clients-row img:hover {
            transform: scale(1.15) translateY(-3px);
            filter: grayscale(0%);
            opacity: 1;
        }

.btn-link {
    color: var(--primary) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-link:hover {
        color: var(--accent) !important;
        gap: 10px;
    }

/* Animations */
@keyframes slideInTitle {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes expandHeight {
    from {
        height: 0;
    }

    to {
        height: 24px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .certs-clients-section {
        padding: 40px 15px;
    }

    .cert-badges {
        gap: 12px;
    }

    .clients-row {
        gap: 16px;
        padding: 16px;
    }

    .title-text {
        font-size: 16px;
    }
}

/* ================================================================================================ 1) ทำคอลัมน์สูงเท่ากันแบบยืด === */


/* === 2) ทำ “บล็อกกลาง” ของสองฝั่งให้ใกล้เคียงกัน ===
   (ถ้าต้องการเท่ากันぴぴเลย ให้ตั้งเลข min-height เดียวกัน) */
#certs-clients .cert-badges,
#certs-clients .clients-row {
  min-height: 140px;      /* ปรับได้ 120–160 ตามดีไซน์ที่ต้องการ */
  display: flex;
  align-items: center;
}

/* === 3) ทำขนาดรูปให้เท่ากันทั้งสองฝั่ง === */



/* === 5) ลดเอฟเฟกต์เด้งเพื่อไม่ให้ล้นกรอบ (ถ้ายังเด้งได้อยู่) === */
#certs-clients .cert-badges .badge-item:hover img { transform: scale(1.06) translateY(-2px); }
#certs-clients .clients-row img:hover,
#certs-clients .clients-row .client-logo:hover img { transform: scale(1.06) translateY(-2px); }

/* (ออปชัน) ปิดไฟพื้นหลังวงกลม ถ้าไม่ต้องการให้มีผลภาพ */
.certs-clients-section::before,
#certs-clients::before { content: none; }



/* Border Top: ลากเส้นเต็มจอ โดยยังใช้ .border-top เดิม */
/* 1) ปิดเส้นบนเดิมของเซกชันนี้ให้หมด */
#certs-clients,
#certs-clients.border-top {
    border-top: 0 !important;
}

    /* ถ้าเคยใช้ ::before ตกแต่งพื้นหลัง (เช่นวงกลม) ให้ปิดมันก่อน กันชนกับเส้นใหม่ */
    #certs-clients::before {
        content: none !important;
    }

    /* 2) วาด "เส้นเดียว" แบบเต็มจอ ด้วย ::after (ไม่ชนกับของตกแต่งเดิมที่มักใช้ ::before) */
    #certs-clients.border-top {
        position: relative;
        overflow: visible; /* กันโดนตัดขอบ */
    }

        #certs-clients.border-top::after {
            content: "";
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100vw; /* กว้างทั้งหน้าจอ */
            border-top: 1px solid var(--border-light);
            pointer-events: none;
            z-index: 0;
        }

    /* ให้เนื้อหาภายในอยู่เหนือเส้น (กันบางธีมตั้ง z-index แปลก ๆ) */
    #certs-clients > * {
        position: relative;
        z-index: 1;
    }


/* =============================================================Fad In OUT================================================================= */
    /* ===== Slow, clear slide-in just for #certs-clients ===== */
    #certs-clients .cc-reveal {
        /* เริ่มยังไม่โชว์ */
        opacity: 0;
        will-change: transform, opacity;
        backface-visibility: hidden;
        /* ค่ามาตรฐาน (แก้ได้ด้วย data-*) */
        --cc-shift: 30px; /* ระยะเลื่อนเริ่มต้น */
        --cc-duration: 1.2s; /* ความช้าเริ่มต้น */
        --cc-ease: cubic-bezier(.22,1,.2,1);
        /* ทิศทางเริ่มต้น: ไม่เลื่อน (จะถูกตั้งค่าโดย data-reveal ด้านล่าง) */
        transform: translateX(0);
        /* ทรานซิชันหลัก */
        transition: opacity var(--cc-duration) var(--cc-ease), transform var(--cc-duration) var(--cc-ease);
    }

        /* ระยะ: sm / lg */
        #certs-clients .cc-reveal[data-distance="sm"] {
            --cc-shift: 20px;
        }

        #certs-clients .cc-reveal[data-distance="lg"] {
            --cc-shift: 60px;
        }

        /* ความเร็วเสริม (ออปชัน): fast / slow */
        #certs-clients .cc-reveal[data-speed="fast"] {
            --cc-duration: .75s;
        }

        #certs-clients .cc-reveal[data-speed="slow"] {
            --cc-duration: 1.6s;
        }

        /* ทิศทาง: ซ้าย/ขวา (แก้ให้ถูกทิศแล้ว) */
        #certs-clients .cc-reveal[data-reveal="from-left"] {
            transform: translateX(calc(var(--cc-shift) * -1));
        }

        #certs-clients .cc-reveal[data-reveal="from-right"] {
            transform: translateX(var(--cc-shift));
        }

        /* (ออปชัน) ถ้าจะใช้แนวตั้งในอนาคต */
        #certs-clients .cc-reveal[data-reveal="from-up"] {
            transform: translateY(calc(var(--cc-shift) * -1));
        }

        #certs-clients .cc-reveal[data-reveal="from-down"] {
            transform: translateY(var(--cc-shift));
        }

        /* เมื่อโผล่ให้เรียบสนิท */
        #certs-clients .cc-reveal.is-revealed {
            opacity: 1;
            transform: translate(0, 0);
        }

        /* (ออปชัน) ตั้งเวลาช้า/เร็วเป็น ms รายชิ้นผ่าน data-duration
   หมายเหตุ: การใช้ attr() นอก content ยังไม่รองรับทุกเบราว์เซอร์
   เราจึงตั้งผ่านตัวแปรไว้ก่อน เผื่อเบราว์เซอร์ที่รองรับในอนาคต */
        #certs-clients .cc-reveal[data-duration] {
            /* ถ้าบราวเซอร์รองรับ attr() จะอัปเดตตัวแปรนี้อัตโนมัติ */
            --cc-duration: attr(data-duration time, 1.2s);
        }

/* ลด motion = แสดงนิ่ง ๆ */
@media (prefers-reduced-motion: reduce) {
    #certs-clients .cc-reveal,
    #certs-clients .cc-reveal.is-revealed {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
