/* ==========================================================================
   Clients Page — css/clients.css
   All classes prefixed with clients-
   ========================================================================== */

/* ---------- Background Glows ---------- */
.clients-bg-glows {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.clients-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    will-change: transform;
}

.clients-bg-glow--1 {
    width: 868px;
    height: 626px;
    top: -50px;
    left: -150px;
    background: radial-gradient(circle, rgba(var(--color-secondary-rgb), 0.25) 0%, transparent 70%);
    transform: rotate(90deg);
}

.clients-bg-glow--2 {
    width: 514px;
    height: 371px;
    top: 310px;
    right: -50px;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.2) 0%, transparent 70%);
    transform: rotate(100deg);
}

.clients-bg-glow--3 {
    width: 1367px;
    height: 706px;
    top: 1200px;
    left: 37px;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.08) 0%, transparent 70%);
}

/* ---------- Page container ---------- */
.clients-page {
    position: relative;
    z-index: 1;
}

/* ---------- Entrance Animation ---------- */
@keyframes clientsSlideUp {
    from {
        opacity: 0;
        transform: translateY(80px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clients-page--animate .clients-hero {
    animation: clientsSlideUp 0.8s ease-out both;
}

.clients-page--animate .clients-filter {
    opacity: 0;
    animation: clientsSlideUp 0.8s 0.15s ease-out both;
}

.clients-page--animate .clients-logos {
    opacity: 0;
    animation: clientsSlideUp 0.8s 0.3s ease-out both;
}

.clients-page--animate ~ .site-footer {
    opacity: 0;
    animation: clientsSlideUp 0.8s 0.45s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .clients-page--animate .clients-hero,
    .clients-page--animate .clients-filter,
    .clients-page--animate .clients-logos,
    .clients-page--animate ~ .site-footer {
        animation: none;
        opacity: 1;
    }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.clients-hero {
    position: relative;
    z-index: 1;
    padding-top: 200px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.clients-hero-title {
    font-weight: 900;
    font-size: 66px;
    line-height: 86px;
    text-transform: uppercase;
    margin: 0;
    background: linear-gradient(21deg, var(--color-white) 42.48%, var(--color-secondary) 71.39%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clients-hero-desc {
    font-weight: 400;
    font-size: 16px;
    line-height: 26px;
    text-transform: capitalize;
    color: var(--color-white);
    max-width: 800px;
    margin: 20px auto 0;
}

/* Stats */
.clients-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    margin-top: 40px;
}

.clients-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.clients-hero-stat-number {
    font-weight: 700;
    font-size: 36px;
    line-height: normal;
    background: linear-gradient(226deg, var(--color-primary) 1%, var(--color-primary-light) 82%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clients-hero-stat-label {
    font-weight: 400;
    font-size: 16px;
    line-height: 30px;
    text-transform: capitalize;
    color: var(--color-white);
}

/* ==========================================================================
   CATEGORY FILTER
   ========================================================================== */
.clients-filter {
    padding-top: 50px;
    padding-bottom: 40px;
}

.clients-filter-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Arrow buttons */
.clients-filter-arrow {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
    flex-shrink: 0;
    color: #fff;
    font-size: 16px;
    position: relative;
}

    .clients-filter-arrow::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1px;
        background: linear-gradient(184deg, var(--color-primary) 0.91%, var(--color-primary-light) 82.1%);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        mask-composite: exclude;
        pointer-events: none;
    }

    .clients-filter-arrow:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .clients-filter-arrow img {
        width: 20px;
        height: 20px;
    }

.clients-filter-arrow--prev img {
    transform: rotate(90deg);
    width: 15px;
    height: 15px;
}

.clients-filter-arrow--next img {
    transform: rotate(-90deg);
    width: 15px;
    height: 15px;
}

/* Scrollable track */
.clients-filter-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
}

    .clients-filter-track::-webkit-scrollbar {
        display: none;
    }

/* Filter pills */
.clients-filter-pill {
    flex-shrink: 0;
    height: 42px;
    padding: 0 36px;
    border-radius: 24px;
    border: none;
    background: transparent;
    color: var(--color-white);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

    .clients-filter-pill::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1px;
        background: linear-gradient(184deg, var(--color-primary) 0.91%, var(--color-primary-light) 82.1%);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        mask-composite: exclude;
        pointer-events: none;
    }

    .clients-filter-pill:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .clients-filter-pill.active {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        font-weight: 700;
        background-image: linear-gradient(226deg, var(--color-primary) 1%, var(--color-primary-light) 82%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* Active pill needs visible bg behind gradient text */
    .clients-filter-pill.active {
        position: relative;
    }

        .clients-filter-pill.active::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 24px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            z-index: -1;
        }

/* ==========================================================================
   LOGO GRID
   ========================================================================== */
.clients-logos {
    padding-top: 20px;
    padding-bottom: 80px;
}

.clients-logos-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 45px 20px;
    align-items: center;
    justify-items: center;
}

.clients-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    padding: 4px 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .clients-logo.hidden {
        opacity: 0;
        transform: scale(0.8);
        position: absolute;
        pointer-events: none;
        width: 0;
        height: 0;
        overflow: hidden;
    }

    .clients-logo img {
        display: block;
        width: 120px;
        height: 100px;
        object-fit: contain;
        filter: brightness(0) invert(1);
        opacity: 0.7;
        transition: opacity 0.3s ease;
    }

        .clients-logo img:hover {
            opacity: 1;
        }

/* ==========================================================================
   Responsive — Large (max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
    .clients-hero-title {
        font-size: 52px;
        line-height: 66px;
    }

    .clients-logos-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .clients-hero-stats {
        gap: 50px;
    }
}

/* ==========================================================================
   Responsive — Tablet (max-width: 991px)
   ========================================================================== */
@media (max-width: 991px) {
    .clients-hero {
        padding-top: 140px;
    }

    .clients-hero-title {
        font-size: 40px;
        line-height: 52px;
    }

    .clients-hero-desc {
        font-size: 14px;
        line-height: 22px;
    }

    .clients-hero-stats {
        gap: 30px;
    }

    .clients-hero-stat-number {
        font-size: 26px;
    }

    .clients-hero-stat-label {
        font-size: 12px;
    }

    .clients-logos-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px 16px;
    }

    .clients-logo {
        height: 46px;
        padding: 4px 6px;
    }
}

/* ==========================================================================
   Responsive — Mobile (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .clients-hero-title {
        font-size: 34px;
        line-height: 44px;
    }

    .clients-hero-stats {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .clients-filter-arrow {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

        .clients-filter-arrow img {
            width: 16px;
            height: 16px;
        }

    .clients-filter-pill {
        padding: 0 20px;
        font-size: 12px;
        height: 36px;
    }

    .clients-logos-grid:not(.marquee-active) {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px 12px;
    }
}

/* ==========================================================================
   Responsive — Small (max-width: 576px)
   ========================================================================== */
@media (max-width: 576px) {
    .clients-hero-title {
        font-size: 28px;
        line-height: 38px;
    }

    .clients-logos-grid:not(.marquee-active) {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px 10px;
    }

    .clients-logo {
        height: 40px;
    }
}

/* ==========================================================================
   MOBILE MARQUEE — auto-scrolling logo rows (≤768px)
   ========================================================================== */
.clients-logos-grid.marquee-active {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.clients-logos-grid.marquee-active > .clients-logo {
    display: none !important;
}

.clients-marquee-row {
    display: flex;
    width: max-content;
    gap: 30px;
    direction: ltr;
}

.clients-marquee-row .clients-logo {
    display: flex !important;
    flex-shrink: 0;
    width: 120px;
    height: 50px;
    padding: 4px 10px;
}

.clients-marquee-row--static {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 16px;
    width: 100% !important;
    justify-items: center;
    align-items: center;
    animation: none !important;
}

@keyframes clientsMarqueeLtr {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes clientsMarqueeRtl {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

[dir="rtl"] .clients-filter-arrow i {
    transform: rotate(180deg);
}