html,
body.welcome-page {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.welcome {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0 0;
    box-sizing: border-box;
}

.welcome .hero-tiles {
    flex: 1 1 auto;
    padding: 0;
    display: flex;
    align-items: stretch;
    min-height: 0;
}

.welcome .hero-tiles > .container-fluid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.welcome .hero-tiles .row {
    flex: 1 1 0;
    margin: 0;
    --bs-gutter-y: 0;
    --bs-gutter-x: 10px;
}

.welcome .hero-tiles .row > [class^="col-"] {
    display: flex;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.welcome .hero-tile,
.welcome .hero-tile--tall {
    min-height: 0;
    height: 100%;
    width: 100%;
    margin: 0;
}

.hero-tile {
    position: relative;
}

.hero-tile picture {
    position: absolute;
    inset: 0;
}

.hero-tile picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-tile__text {
    position: relative;
    z-index: 2;
}

.welcome-logo {
    display: none;
}

@media (max-width: 767px) {
    .welcome {
        padding-top: 1rem;
    }

    .welcome-logo {
        display: block;
        flex: 0 0 auto;
        text-align: center;
        padding: 0 10px 1rem;
    }

    .welcome-logo img {
        max-width: 60%;
        max-height: 15vh;
        height: auto;
    }

    /* 2 x 3 grid: the two Bootstrap rows collapse so all six tiles share one grid */
    .welcome .hero-tiles > .container-fluid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 1fr;
        gap: 10px;
    }

    .welcome .hero-tiles .row {
        display: contents;
    }

    .welcome .hero-tiles .row > [class^="col-"] {
        width: auto;
        max-width: none;
        flex: 1 1 auto;
        padding: 0;
        min-height: 0;
    }

    /* half-width tiles: keep the longer names inside the tile */
    .welcome .hero-tile__text {
        font-size: 18px;
        letter-spacing: 1px;
        padding: 0 10px;
        text-align: center;
    }
}
