/* Companies - flex layout `companies`
   Live .block-partners .partners-section: 24px/48px padding, clamp(36px,6vw,84px)
   800 title, groups with 35px heading + 1px rule, 3-up (2 ≥640, 1 <640) grid of
   white 320px cards, 10px radius, soft shadow, 48px inner padding, logos ≤140px.
   `is_navy` puts the section on the brand navy (rule becomes white 25%). */
.companies {
    width: 100%;
    max-width: 100%;
    background: var(--background);

    &.is_navy {
        background: var(--primary);

        & .companies_title,
        & .companies_group_heading { color: var(--white); }
        & .companies_group_rule { background: rgba(255, 255, 255, .25); }
    }

    & .companies_title {
        margin: 0 0 32px;
        font-size: clamp(36px, 6vw, 84px);
        font-weight: 800;
        line-height: 1;
        text-transform: uppercase;
        color: var(--headings);
    }

    & .companies_group {
        margin-bottom: 40px;

        &:last-child { margin-bottom: 0; }
    }

    & .companies_group_heading {
        margin: 0 0 6px;
        font-size: 35px;
        font-weight: 700;
        text-transform: none; /* live "Head Partners" is mixed case, #363636, no rule */
        color: var(--text);
    }

    & .companies_group_rule {
        height: 1px;
        margin: 0 0 18px;
        border: 0;
        background: rgba(8, 35, 60, .15);
    }

    & .companies_grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;

        @media (min-width: 640px)  { grid-template-columns: repeat(2, 1fr); }
        @media (min-width: 1024px) { grid-template-columns: repeat(3, 1fr); }
    }

    & .companies_card {
        display: block;
        min-height: 320px;
        border-radius: 10px;
        background: var(--white);
        box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
        color: inherit;
        text-decoration: none;
        transition: transform .2s var(--ease), box-shadow .2s var(--ease);

        &:hover,
        &:focus-visible {
            transform: translateY(-2px);
            box-shadow: 0 12px 24px rgba(0, 0, 0, .16);
        }

        &.is_static { pointer-events: none; }
    }

    & .companies_card_inner {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        min-height: 320px;
        padding: 48px;
        text-align: center;
    }

    & .companies_logo {
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 140px;
        object-fit: contain;
    }

    & .companies_name {
        font-family: var(--font-display);
        font-size: 24px;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--headings);
    }
}
