/* =========================================
   CLIENT SHOWCASE & LOGO GRID
========================================= */

.client-showcase {
    position: relative;
    width: 100%;
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
}

.client-item {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.25s ease;
}

.client-item:hover {
    background: #f7f7f7;
}

.client-item img {
    display: block;
    max-width: 60%;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}


/* =========================================
   PANEL BASE & VISIBILITY
========================================= */

.client-panel {
    position: fixed;
    inset: 0;
    z-index: 999999;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
}

/* Visible during opening, open and closing */
.client-panel.is-visible,
.client-panel.is-open,
.client-panel.is-closing {
    visibility: visible;
}

/* Allow interaction only while open */
.client-panel.is-open {
    pointer-events: auto;
}


/* =========================================
   DARK OVERLAY
========================================= */

.client-overlay {
    position: absolute;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.45s ease;
    text-decoration: none !important;
}

.client-panel.is-open .client-overlay {
    opacity: 1;
}

.client-panel.is-closing .client-overlay {
    opacity: 0;
}


/* =========================================
   RIGHT-SIDE SLIDE PANEL
========================================= */

.client-panel-inner {
    position: absolute;
    top: 0;
    right: 0;
    width: 50vw;
    max-width: 900px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(.77, 0, .18, 1);
    will-change: transform;
}

.client-panel.is-open .client-panel-inner {
    transform: translateX(0);
}

.client-panel.is-closing .client-panel-inner {
    transform: translateX(100%);
}


/* =========================================
   CLOSE BUTTON
========================================= */

.client-panel .client-close {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 20 !important;

    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;

    padding: 0 !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #fff !important;
    color: #111 !important;
    border: none !important;
    border-radius: 50% !important;

    font-family: Arial, sans-serif !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-indent: 0 !important;
    text-decoration: none !important;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15) !important;
    cursor: pointer !important;

    appearance: none !important;
    -webkit-appearance: none !important;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease !important;
}

.client-panel .client-close:hover {
    background: #0757d5 !important;
    color: #fff !important;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 5px 16px rgba(7, 87, 213, 0.3) !important;
}

.client-panel .client-close:focus-visible {
    outline: 2px solid #0757d5 !important;
    outline-offset: 3px !important;
}

.client-panel .client-close:active {
    transform: scale(0.94);
}


/* =========================================
   PROJECT HERO IMAGE
========================================= */

.client-image {
    width: 100%;
    height: 380px;
    overflow: hidden;
}

.client-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* =========================================
   PANEL CONTENT
========================================= */

.client-content {
    padding: 50px 40px 70px;
}

.client-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 230px;
    max-height: 75px;
    object-fit: contain;
    margin: 0 0 35px;
}

.client-content p {
    margin: 0;
    color: #111;
    font-size: 18px;
    line-height: 1.65;
}


/* =========================================
   VIEW CASE STUDY BUTTON
========================================= */

.client-panel .client-content a.button-text {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-height: 50px !important;
    padding: 10px 25px !important;
    margin-top: 24px !important;

    background: #fff !important;
    color: #0757d5 !important;
    border: 1px solid #0757d5 !important;
    border-radius: 50px !important;

    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;

    box-shadow: none !important;
    cursor: pointer !important;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease !important;
}

.client-panel .client-content a.button-text:hover {
    background: #0757d5 !important;
    color: #fff !important;
    border-color: #0757d5 !important;
}

.client-panel .client-content a.button-text:focus-visible {
    outline: 2px solid #0757d5 !important;
    outline-offset: 3px !important;
}


/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media (max-width: 767px) {

    .client-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-item {
        height: 180px;
    }

    .client-item img {
        max-width: 65%;
        max-height: 70px;
    }

    .client-panel-inner {
        width: 100%;
        max-width: none;
    }

    .client-image {
        height: 280px;
    }

    .client-content {
        padding: 35px 25px 50px;
    }

    .client-logo {
        max-width: 180px;
        max-height: 60px;
        margin-bottom: 30px;
    }

    .client-content p {
        font-size: 16px;
    }

    .client-panel .client-close {
        top: 14px !important;
        right: 14px !important;
    }
}


/* =========================================
   REDUCED MOTION ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {
    .client-overlay,
    .client-panel-inner,
    .client-panel .client-close,
    .client-panel .client-content a.button-text {
        transition-duration: 0.01ms !important;
    }
}


/* Bigger client logos */
.client-item img {
    max-width: 60% !important;
    max-height: 140px !important;
}