/* ==========================================================
   Partners / Technology Partners Slider
   ========================================================== */

.partners-modern {
    position: relative;
    overflow: hidden;
}


/* ----- Left Content ----- */

.partners-small-title {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: #2563eb;
}

.partners-small-title::before {
    content: "";
    width: 28px;
    height: 2px;
    margin-right: 10px;
    background: #2563eb;
}

.partners-heading {
    max-width: 430px;
    margin: 0 0 18px;
    font-size: clamp(30px, 1vw, 44px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -1.2px;
    color: #111827;
}

.partners-heading span {
    display: block;
    color: #2563eb;
}

.partners-text {
    max-width: 440px;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}


/* ----- Logo Area ----- */

.partners-logo-area {
    padding: 16px;
}

.partners-slider {
    width: 100%;
    overflow: hidden;
}

.partners-track {
    display: flex;
    width: 100%;
    transition: transform .8s ease-in-out;
    will-change: transform;
}

.partner-page {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
}


/* ----- Logo Grid ----- */

.partner-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
}


/* ----- Logo Card ----- */

.partner-modern-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 95px;
    padding: 2px;
    background: #f8f9fa;

    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
}

/*
 * No vertical (right-hand) line after the
 * last image of ANY row — e.g. row 1's 4th
 * image, row 2's 4th image, etc. This applies
 * to every row, not just the final one.
 */

.partner-modern-card:nth-child(4n) {
    border-right: none;
}

.partner-modern-card:last-child {
    border-right: none;
}

/*
 * Bottom border removal for the true LAST
 * row (which may be incomplete, e.g. only
 * 2 logos left over) is injected dynamically
 * per page from partners-modern.php via
 * wp_add_inline_style(), since the correct
 * nth-last-child count depends on how many
 * logos are actually in that page's last row.
 * A fixed nth-last-child(-n+4) would be wrong
 * whenever that count isn't a multiple of 4.
 */


/* ----- Logo Image ----- */

.partner-modern-card img {
    display: block;
    width: 100%;
    max-width: 185px;
    height: 90px;
    object-fit: contain;
    opacity: .85;
    transition: .25s ease;
}

.partner-modern-card:hover img {
    opacity: 1;
    transform: scale(1.05);
}


/* ----- Slider Indicators ----- */

.partners-bottom-line {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    margin-top: 14px;
    padding-right: 4px;
}

.indicator-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: .3s ease;
}

.indicator-dot.active {
    width: 25px;
    border-radius: 20px;
    background: #2563eb;
}


/* ==========================================================
   Tablet
   ========================================================== */

@media (max-width: 991.98px) {

    .partners-content {
        text-align: center;
    }

    .partners-small-title {
        justify-content: center;
    }

    .partners-heading,
    .partners-text {
        margin-left: auto;
        margin-right: auto;
    }

    .partners-logo-area {
        padding: 10px 0;
    }

}


/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 575.98px) {

    .partners-modern {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    .partners-heading {
        font-size: 30px;
        letter-spacing: -.8px;
    }

    .partners-text {
        font-size: 14px;
    }

    .partner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .partner-modern-card {
        height: 85px;
    }

    /*
     * Mobile bottom-border reset for an
     * incomplete last row is handled by the
     * PHP-generated inline stylesheet (see
     * partners-modern.php).
     */

    /*
     * Mobile: last column is col 2, not col 4 —
     * no vertical line after col 2 of any row
     * (mirrors the desktop col-4 rule above).
     */

    .partner-modern-card:nth-child(4n) {
        border-right: 1px solid #cbd5e1;
    }

    .partner-modern-card:nth-child(2n) {
        border-right: none;
    }

}