/**
 * Clients page — layout styles
 *
 * Category headers, total counter, page-specific grid overrides.
 *
 * Per elementor.md §7: target both .e-con-full and > .e-con-inner
 * for grid overrides on Elementor containers.
 *
 * @package Technoproekt
 * @author  Kkalganov <https://kkalganov.com>
 */

/* ==========================================================================
   Category Header (icon + name + count)
   ========================================================================== */

.tp-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.tp-category-header__icon {
    width: 44px;
    height: 44px;
    background: var(--tp-green-main);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.tp-category-header__icon svg {
    width: 20px;
    height: 20px;
    color: var(--tp-white);
}

.tp-category-header__name {
    font-family: 'Unbounded', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tp-text);
}

.tp-category-header__count {
    font-size: 12px;
    color: var(--tp-text-light);
}

/* ==========================================================================
   Category Group Container
   ========================================================================== */

.tp-category-group {
    margin-bottom: 60px;
}

/* Separator between consecutive category groups */
.tp-category-group + .tp-category-group {
    padding-top: 40px;
    border-top: 1px solid var(--tp-cream-warm);
}

/* ==========================================================================
   Clients Page Grid — wider min-width for longer names
   ========================================================================== */

.tp-clients-page-grid.e-con-full,
.tp-clients-page-grid > .e-con-inner {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 0 !important;
}

/* Force client card widgets to fill grid cells with equal height */
.tp-clients-page-grid.e-con-full > .elementor-widget,
.tp-clients-page-grid > .e-con-inner > .elementor-widget {
    margin: -0.5px !important;
    width: auto !important;
    max-width: none !important;
}

/* Stretch widget content to fill grid cell height */
.tp-clients-page-grid.e-con-full > .elementor-widget > .elementor-widget-container,
.tp-clients-page-grid > .e-con-inner > .elementor-widget > .elementor-widget-container {
    height: 100%;
}

/* Equal-height cards inside the grid */
.tp-clients-page-grid .tp-info-block--client {
    height: 100%;
}

/* ==========================================================================
   Total Counter (bottom of page)
   ========================================================================== */

.tp-clients-total {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--tp-cream-warm);
}

.tp-clients-total__number {
    font-family: 'Unbounded', system-ui, sans-serif;
    font-size: 56px;
    font-weight: 800;
    color: var(--tp-green-main);
    line-height: 1;
    margin-bottom: 8px;
}

.tp-clients-total__label {
    font-size: 14px;
    color: var(--tp-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tp-clients-total__desc {
    font-size: 15px;
    color: var(--tp-text-light);
    max-width: 500px;
    margin: 16px auto 0;
    line-height: 1.6;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .tp-category-header__icon {
        width: 36px;
        height: 36px;
    }

    .tp-category-header__icon svg {
        width: 16px;
        height: 16px;
    }

    .tp-category-header__name {
        font-size: 12px;
    }

    .tp-category-group {
        margin-bottom: 40px;
    }

    .tp-category-group + .tp-category-group {
        padding-top: 28px;
    }

    .tp-clients-page-grid.e-con-full,
    .tp-clients-page-grid > .e-con-inner {
        grid-template-columns: 1fr 1fr !important;
    }

    .tp-clients-total__number {
        font-size: 40px;
    }

    .tp-info-block--client {
        padding: 14px 10px;
        min-height: 120px;
        gap: 8px;
    }

    .tp-info-block__client-logo {
        height: 40px;
        max-width: 90px;
    }

    .tp-info-block__client-name {
        font-size: 12px;
    }
}
