/*
 * Homepage "We have talent for your tech stack" (acf/blocks-technologies-homepage →
 * template_parts/blocks/homepage/technologies/technologies.php).
 * Plain CSS enqueued on the front page only, like home-hero.css; it overrides the
 * legacy .technologiesHomepage rules from dist_old/css/app.css.
 * Geometry follows Figma nodes 1849:10 (desktop, 1440) and 1849:138 (mobile, 390).
 */

.technologiesHomepage {
    background-color: #fff;
    padding: 96px 0;
}

.technologiesHomepage .technologiesHomepageTitle {
    color: #1f1f1f;
    font-family: AvenirNext-Bold, sans-serif;
    font-size: 48px;
    line-height: 59.8px;
    margin: 0 0 56px;
    text-align: center;
}

.technologiesHomepage .technologiesHomepageTitle p {
    font: inherit;
    margin: 0;
}

.technologiesHomepage .technologiesHomepageTitle strong {
    color: #e84f1c;
    font-weight: inherit;
}

.technologiesHomepageGrid {
    display: grid;
    gap: 24px;
    grid-auto-rows: 112px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.technologiesHomepageCard {
    align-items: center;
    background-color: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.technologiesHomepageCard::before {
    content: none;
}

.technologiesHomepageCard--accent {
    background-color: #fff3ee;
    border-color: #f9cdbb;
    filter: drop-shadow(0 6px 9px rgba(232, 79, 28, 0.12));
}

/* Lower rows: the uploaded SVGs are already exported at their Figma frame size. */
.technologiesHomepageCard img {
    display: block;
    flex-shrink: 0;
    height: auto;
    max-width: 100%;
}

/*
 * Top row: the uploads carry uneven built-in padding, so each known logo gets the
 * height that makes its drawing match the Figma size; unknown uploads fall back to 80px.
 * Width follows the aspect ratio and may exceed the card (the padding is transparent).
 */
.technologiesHomepageCard--accent {
    --logo-scale: 1;
}

.technologiesHomepageCard--accent img {
    height: calc(80px * var(--logo-scale));
    max-width: none;
    width: auto;
}

.technologiesHomepageCard--accent img[src$="/ML.svg"] { height: calc(66px * var(--logo-scale)); }
.technologiesHomepageCard--accent img[src$="/Java_logo.svg"] { height: calc(76px * var(--logo-scale)); }
.technologiesHomepageCard--accent img[src$="/logo-C.svg"] { height: calc(87px * var(--logo-scale)); }
.technologiesHomepageCard--accent img[src$="/logo-python.svg"] { height: calc(73px * var(--logo-scale)); }
.technologiesHomepageCard--accent img[src$="/logo-R.svg"] { height: calc(125px * var(--logo-scale)); }
.technologiesHomepageCard--accent img[src$="/rust-logo-orange.svg"] { height: calc(83px * var(--logo-scale)); }
.technologiesHomepageCard--accent img[src$="/logo-julia.svg"] { height: calc(83px * var(--logo-scale)); }

@media screen and (max-width: 1199px) {
    .technologiesHomepageGrid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media screen and (max-width: 767px) {
    .technologiesHomepage {
        padding: 62px 0;
    }

    /* Figma keeps this section narrower than the site's 10px mobile gutter. */
    .technologiesHomepage .container {
        padding-left: 32px;
        padding-right: 32px;
    }

    .technologiesHomepage .technologiesHomepageTitle {
        font-size: 30px;
        line-height: 1.25;
        margin-bottom: 40px;
    }

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

    /* Figma draws the top-row logos about 10% smaller on mobile. */
    .technologiesHomepageCard--accent {
        --logo-scale: 0.9;
    }
}
