<?php

require_once __DIR__ . "/data/clients.php";
require_once __DIR__ . "/includes/header.php";

?>




<style>
    .clients-hero {
        position: relative;
        min-height: 400px;
        display: flex;
        align-items: center;
        overflow: hidden;
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        border-radius: 0 !important;
    }

    .clients-hero-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg,
                rgba(0, 0, 0, .68),
                rgba(0, 0, 0, .30));
    }

    .clients-hero .container-fluid {
        position: relative;
        z-index: 2;
    }

    .clients-hero-content {
        max-width: 900px;
        padding: 90px 0;
    }

    .clients-hero-eyebrow {
        display: inline-block;
        margin-bottom: 15px;
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        letter-spacing: .8px;
        text-transform: uppercase;
    }

    .clients-hero-content h1 {
        margin: 0 0 18px;
        color: #fff;
        font-size: 42px;
        line-height: 1.1;
        font-weight: 700;
    }

    .clients-breadcrumb {
        display: flex;
        align-items: center;
        gap: 12px;
        color: #fff;
        font-size: 16px;
    }

    .clients-breadcrumb a {
        color: #fff;
        text-decoration: none;
    }

    .clients-breadcrumb a:hover {
        color: #ed1c24;
    }

    .clients-breadcrumb strong {
        color: #fff;
        font-weight: 500;
    }

    .clients-breadcrumb i {
        font-size: 13px;
    }

    .clients-section {
        padding: 0 0 20px;
        background: #eef4fa;
    }

    .clients-heading-banner {
        position: relative;
        width: 100%;
        min-height: 200px;
        margin: 0 0 35px;
        padding: 20px 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        background-image: url("../images/contact/contact-banner.webp");
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        overflow: hidden;
    }

    .clients-heading-overlay {
        position: absolute;
        inset: 0;
        z-index: 1;
        background: #eef4fa;
    }

    .clients-heading-content {
        position: relative;
        z-index: 2;
        width: 100%;
        max-width: 850px;
        margin: 0 auto;
    }

    .clients-heading-banner .eyebrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        color: var(--brand);
        font-size: 15px;
        font-weight: 700;
        letter-spacing: .7px;
        text-transform: uppercase;
    }

    .clients-heading-banner h2 {
        margin: 12px 0 14px;
        color: black;
        font-size: 44px;
        line-height: 1.15;
        font-weight: 700;
    }

    .clients-heading-banner h2 span {
        color: var(--brand);
    }

    .clients-heading-banner p {
        max-width: 760px;
        margin: 0 auto;
        color: black;
        font-size: 17px;
        line-height: 1.7;
    }

    .clients-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .client-card {
        height: 100%;
        padding: 24px;
        background: #fff;
        border: 1px solid #e2e8ef;
        border-radius: 10px;
        box-shadow: 0 7px 24px rgba(20, 40, 66, .06);
        transition:
            transform .25s ease,
            box-shadow .25s ease;
    }

    .client-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 30px rgba(20, 40, 66, .11);
    }

    .client-card-top {
        display: flex;
        align-items: flex-start;
        gap: 14px;
    }

    .client-icon {
        width: 42px;
        min-width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        background: #eef4fa;
        color: var(--brand);
        font-size: 21px;
    }

    .client-card h3 {
        margin: 2px 0 7px;
        color: black;
        font-size: 18px;
        line-height: 1.35;
        font-weight: 700;
    }

    .client-works {
        margin: 0;
        color: #263f5e;
        font-size: 15px;
        line-height: 1.5;
    }

    .client-address {
        display: flex;
        align-items: flex-start;
        gap: 11px;
        margin: 20px 0 0 56px;
        padding-top: 17px;
        border-top: 1px solid #edf0f4;
        color: #52647a;
        font-size: 15px;
        line-height: 1.55;
    }

    .client-address i {
        margin-top: 2px;
        color: #64788e;
        font-size: 17px;
    }

    .clients-cta {
        padding: 60px 0;
        background: #f3f7fa;
    }

    .clients-cta-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 40px;
    }

    .clients-cta .eyebrow {
        display: block;
        margin-bottom: 10px;
        color: var(--brand);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .6px;
        text-transform: uppercase;
    }

    .clients-cta h2 {
        margin: 0 0 10px;
        color: #142842;
        font-size: 38px;
        line-height: 1.2;
        font-weight: 700;
    }

    .clients-cta h2 span {
        color: var(--brand);
    }

    .clients-cta p {
        max-width: 720px;
        margin: 0;
        color: #52647a;
        font-size: 16px;
        line-height: 1.65;
    }

    .clients-cta .btn {
        min-width: 170px;
        flex-shrink: 0;
    }

    .clients-logos-section {
        width: 100%;
        overflow: hidden;
        padding: 5px 0 30px;
    }

    .clients-logo-row {
        width: 100%;
        /* overflow: hidden; */
        margin-bottom: 18px;
    }

    .clients-logo-row:last-child {
        margin-bottom: 0;
    }

    .clients-logo-track {
        display: flex;
        width: max-content;
        gap: 22px;
        will-change: transform;
    }

    .clients-row-left .clients-logo-track {
        animation: clientsScrollLeft 38s linear infinite;
    }

    .clients-row-right .clients-logo-track {
        animation: clientsScrollRight 42s linear infinite;
    }

    .clients-logo-card {
        width: 215px;
        height: 100px;
        flex-shrink: 0;
        padding: 14px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        background: #fff;
        border: 1px solid #26313d;
        border-radius: 12px;
    }

    .clients-logo-card:hover {
        border-color: var(--brand);
        /* transform: translateY(-4px); */
    }

    .clients-logo {
        width: 155px;
        height: 78px;
        display: flex;
        align-items: center;
        justify-content: center;
        /* overflow: hidden; */
    }

    .clients-logo img {
        display: block;
        max-width: 180px;
        max-height: 68px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .clients-logo-name {
        width: 100%;
        margin-top: 10px;
        color: black;
        font-size: 14px;
        line-height: 1.3;
        font-weight: 500;
        text-align: center;
        white-space: nowrap;
        /* overflow: hidden; */
        text-overflow: ellipsis;
    }

   @keyframes clientsScrollLeft {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 11px));
    }
}

@keyframes clientsScrollRight {
    from {
        transform: translateX(calc(-50% - 11px));
    }

    to {
        transform: translateX(0);
    }
}

    .clients-logo-row:hover .clients-logo-track {
        animation-play-state: paused;
    }

    @media (max-width: 991px) {
        .clients-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .clients-hero-content h1 {
            font-size: 48px;
        }

        .clients-heading-banner h2 {
            font-size: 38px;
        }

        .clients-cta-inner {
            align-items: flex-start;
        }

        .clients-cta h2 {
            font-size: 32px;
        }
    }

    @media (max-width: 767px) {
        .clients-hero {
            min-height: 350px;
        }

        .clients-hero-content {
            padding: 70px 0;
        }

        .clients-hero-content h1 {
            font-size: 40px;
        }

        .clients-hero-eyebrow {
            font-size: 14px;
        }

        .clients-heading-banner {
            min-height: 300px;
            padding: 55px 20px;
            margin-bottom: 35px;
        }

        .clients-heading-banner h2 {
            font-size: 32px;
        }

        .clients-heading-banner p {
            font-size: 15px;
        }

        .clients-grid {
            grid-template-columns: 1fr;
            gap: 15px;
        }

        .clients-cta {
            padding: 45px 0;
        }

        .clients-cta-inner {
            flex-direction: column;
            gap: 25px;
        }

        .clients-cta h2 {
            font-size: 30px;
        }

        .clients-cta p {
            font-size: 15px;
        }

        .clients-logo-row {
            margin-bottom: 14px;
        }

        .clients-logo-track {
            gap: 15px;
        }

        .clients-logo-card {
            width: 180px;
            height: 130px;
            padding: 15px;
        }

        .clients-logo {
            width: 135px;
            height: 62px;
        }

        .clients-logo img {
            max-width: 125px;
            max-height: 55px;
        }

        .clients-logo-name {
            font-size: 13px;
        }

        .clients-row-left .clients-logo-track {
            animation-duration: 30s;
        }

        .clients-row-right .clients-logo-track {
            animation-duration: 34s;
        }
    }

    @media (max-width: 420px) {
        .clients-hero {
            min-height: 320px;
        }

        .clients-hero-content {
            padding: 55px 0;
        }

        .clients-hero-content h1 {
            font-size: 34px;
        }

        .clients-breadcrumb {
            font-size: 14px;
        }

        .clients-heading-banner {
            min-height: 320px;
        }

        .clients-heading-banner h2 {
            font-size: 28px;
        }

        .clients-heading-banner .eyebrow {
            font-size: 13px;
        }

        .clients-heading-banner .eyebrow:before,
        .clients-heading-banner .eyebrow:after {
            width: 25px;
        }

        .client-card {
            padding: 20px;
        }

        .client-card h3 {
            font-size: 17px;
        }

        .client-address {
            margin-left: 0;
        }

        .clients-logo-card {
            width: 165px;
            height: 120px;
        }

        .clients-logo {
            width: 125px;
            height: 55px;
        }

        .clients-logo img {
            max-width: 115px;
            max-height: 50px;
        }
    }
</style>

<main>

    <section
        class="clients-hero"
        style="background-image:url('<?= htmlspecialchars($clients_page["banner_image"], ENT_QUOTES, "UTF-8") ?>');">

        <div class="clients-hero-overlay"></div>

        <div class="container-fluid px-lg-5">

            <div class="clients-hero-content">

                <span class="clients-hero-eyebrow">
                    <?= htmlspecialchars($clients_page["eyebrow"]) ?>
                </span>

                <h1>
                    <?= htmlspecialchars($clients_page["title"]) ?>
                </h1>

                <div class="clients-breadcrumb">

                    <a href="index.php">
                        Home
                    </a>

                    <i class="bi bi-chevron-right"></i>

                    <strong>
                        Our Clients
                    </strong>

                </div>

            </div>

        </div>

    </section>


    <section class="clients-section">

        <div class="clients-heading-banner">

            <div class="clients-heading-overlay"></div>

            <div class="clients-heading-content">

                <!-- <span class="eyebrow">
                    <?= htmlspecialchars($clients_page["intro_eyebrow"]) ?>
                </span> -->

                <h2>
                    <?= htmlspecialchars($clients_page["intro_title"]) ?>

                    <!-- <span>
                        <?= htmlspecialchars($clients_page["intro_highlight"]) ?>
                    </span> -->
                </h2>

                <p>
                    <?= htmlspecialchars($clients_page["intro_text"]) ?>
                </p>

            </div>

        </div>


        <!-- CLIENT LOGOS -->

        <div class="clients-logos-section">

            <div class="clients-logo-row clients-row-left">
                <div class="clients-logo-track">

                    <?php foreach ($clients as $client): ?>
                        <div class="clients-logo-card">

                            <div class="clients-logo">
                                <img src="<?= htmlspecialchars(
                                    rtrim($site['base_url'], '/') . '/' . ltrim($client["logo"] ?? 'assets/images/clients/default.webp', '/'),
                                    ENT_QUOTES,
                                    'UTF-8' ) ?>"
                                    alt="<?= htmlspecialchars($client["name"], ENT_QUOTES, "UTF-8") ?>" loading="lazy">
                            </div>

                            <div class="clients-logo-name">
                                <?= htmlspecialchars($client["name"], ENT_QUOTES, "UTF-8") ?>
                            </div>

                        </div>
                    <?php endforeach; ?>

                    <?php foreach ($clients as $client): ?>
                        <div class="clients-logo-card">

                            <div class="clients-logo">
                                <img src="<?= htmlspecialchars(rtrim($site['base_url'], '/') . '/' . ltrim($client['logo'] ?? 'assets/images/clients/default.webp', '/'), ENT_QUOTES, 'UTF-8') ?>"
                                alt="<?= htmlspecialchars($client['name'] ?? 'Client', ENT_QUOTES, 'UTF-8') ?>"
                                loading="lazy">
                            </div>

                            <div class="clients-logo-name">
                                <?= htmlspecialchars($client["name"], ENT_QUOTES, "UTF-8") ?>
                            </div>

                        </div>
                    <?php endforeach; ?>

                </div>
            </div>


            <div class="clients-logo-row clients-row-right">
                <div class="clients-logo-track">

                    <?php foreach (array_reverse($clients) as $client): ?>
                        <div class="clients-logo-card">

                            <div class="clients-logo">
                                <img src="<?= htmlspecialchars(rtrim($site['base_url'], '/') . '/' . ltrim($client['logo'] ?? 'assets/images/clients/default.webp', '/'),ENT_QUOTES, 'UTF-8') ?>"
                                alt="<?= htmlspecialchars($client['name'] ?? 'Client', ENT_QUOTES, 'UTF-8') ?>"
                                loading="lazy">
                            </div>

                            <div class="clients-logo-name">
                                <?= htmlspecialchars($client["name"], ENT_QUOTES, "UTF-8") ?>
                            </div>

                        </div>
                    <?php endforeach; ?>

                    <?php foreach (array_reverse($clients) as $client): ?>
                        <div class="clients-logo-card">

                            <div class="clients-logo">
                                <img src="<?= htmlspecialchars(rtrim($site['base_url'], '/') . '/' . ltrim($client['logo'] ?? 'assets/images/clients/default.webp', '/'), ENT_QUOTES, 'UTF-8') ?>"
                                alt="<?= htmlspecialchars($client['name'] ?? 'Client', ENT_QUOTES, 'UTF-8') ?>"
                                loading="lazy">
                            </div>

                            <div class="clients-logo-name">
                                <?= htmlspecialchars($client["name"], ENT_QUOTES, "UTF-8") ?>
                            </div>

                        </div>
                    <?php endforeach; ?>

                </div>
            </div>


            <div class="clients-logo-row clients-row-left">
                <div class="clients-logo-track">

                    <?php foreach ($clients as $client): ?>
                        <div class="clients-logo-card">

                            <div class="clients-logo">
                                <img src="<?= htmlspecialchars( rtrim($site['base_url'], '/') . '/' . ltrim($client['logo'] ?? 'assets/images/clients/default.webp', '/'), ENT_QUOTES, 'UTF-8') ?>"
                                alt="<?= htmlspecialchars($client['name'] ?? 'Client', ENT_QUOTES, 'UTF-8') ?>"
                                loading="lazy">
                            </div>

                            <div class="clients-logo-name">
                                <?= htmlspecialchars($client["name"], ENT_QUOTES, "UTF-8") ?>
                            </div>

                        </div>
                    <?php endforeach; ?>

                    <?php foreach ($clients as $client): ?>
                        <div class="clients-logo-card">

                            <div class="clients-logo">
                                <img src="<?= htmlspecialchars(rtrim($site['base_url'], '/') . '/' . ltrim($client['logo'] ?? 'assets/images/clients/default.webp', '/'), ENT_QUOTES, 'UTF-8') ?>"
                                alt="<?= htmlspecialchars($client['name'] ?? 'Client', ENT_QUOTES, 'UTF-8') ?>"
                                loading="lazy">
                            </div>

                            <div class="clients-logo-name">
                                <?= htmlspecialchars($client["name"], ENT_QUOTES, "UTF-8") ?>
                            </div>

                        </div>
                    <?php endforeach; ?>

                </div>
            </div>

        </div>

    </section>


    <section class="clients-cta">

        <div class="container-fluid px-lg-5">

            <div class="clients-cta-inner">

                <div>

                    <span class="eyebrow">
                        <?= htmlspecialchars($clients_page["cta_eyebrow"]) ?>
                    </span>

                    <h2>
                        <?= htmlspecialchars($clients_page["cta_title"]) ?>

                        <!-- <span>
                            <?= htmlspecialchars($clients_page["cta_highlight"]) ?>
                        </span> -->
                    </h2>

                    <p>
                        <?= htmlspecialchars($clients_page["cta_text"]) ?>
                    </p>

                </div>


                <a
                    href="<?= htmlspecialchars($clients_page["cta_link"]) ?>"
                    class="btn text-white"
                    style="background-color: var(--brand);">

                    <?= htmlspecialchars($clients_page["cta_button"]) ?>

                    <i class="bi bi-arrow-right"></i>

                </a>

            </div>

        </div>

    </section>

</main>

<?php require_once __DIR__ . "/includes/footer.php"; ?>