/*
 * Bedrijvenoverzicht A-Z.
 *
 * Opzet overgenomen van de merkenmodule op rap-webshop.nl. Kleuren en vormen
 * volgen de bestaande bedrijvengids op deze site: oranje rand (#c25233) en
 * de zachte achtergrond (#fcf5f0), zodat het twee onderdelen van dezelfde
 * pagina blijven en niet twee verschillende ontwerpen.
 *
 * Nested CSS waar het kan — dat is de richtlijn voor de aw-modules.
 */

.awcf-bedrijven-az {
    margin: 0 auto 50px;

    /* Letterbalk bovenaan */
    .awcf-bedrijven-az__header {
        margin-bottom: 2rem;
    }

    .awcf-bedrijven-az__titel {
        margin: 0;
        font-size: 2rem;
        line-height: 1.2;
    }

    .awcf-bedrijven-az__nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: .25rem 18px;
        margin-top: 1rem;
        font-size: 35px;
        line-height: 1.2;
    }

    .awcf-bedrijven-az__letter {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 1.1em;
        text-decoration: none;
        color: #c25233;
        transition: transform .2s ease, color .2s ease;

        &:hover,
        &:focus-visible {
            color: #c25233;
            transform: scale(1.25);
        }

        &.awcf-bedrijven-az__letter--leeg {
            color: #fcf5f0;
            pointer-events: none;

            &:hover {
                transform: none;
            }
        }
    }

    /* Groep per letter */
    .awcf-bedrijven-az__groep {
        margin-bottom: 30px;
        padding: 15px;
        background-color: #fcf5f0;
        border-radius: 8px;

        /* zodat een aangeklikte letter niet onder de sticky header verdwijnt */
        scroll-margin-top: 120px;
    }

    .awcf-bedrijven-az__letterkop {
        margin: 0 0 15px;
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .awcf-bedrijven-az__grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }

    /* Kaartje per bedrijf */
    .awcf-bedrijven-az__item {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        padding: 10px;
        background-color: #fff;
        border: 3px solid #c25233;
        border-radius: 8px;
        text-decoration: none;
        color: inherit;
        transition: transform .2s ease, box-shadow .2s ease;

        &:hover,
        &:focus-visible {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, .15);
        }
    }

    .awcf-bedrijven-az__logo {
        flex: 0 0 90px;
        width: 90px;
        height: 90px;
        display: flex;
        align-items: center;
        justify-content: center;

        img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
    }

    .awcf-bedrijven-az__naam {
        min-width: 0;
        font-weight: 700;
        font-size: 1rem;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 768px) {
    .awcf-bedrijven-az {
        .awcf-bedrijven-az__header {
            justify-content: center;
        }

        .awcf-bedrijven-az__titel {
            width: 100%;
            font-size: 1.75rem;
        }

        .awcf-bedrijven-az__nav {
            gap: 0 .6rem;
            font-size: 25px;
        }

        .awcf-bedrijven-az__grid {
            grid-template-columns: 1fr;
        }
    }
}
