body {
    position: relative;
    background-color: black;
    color: #EB0028;
}

.team-hero {
    display: grid;
    justify-content: center;
    justify-items: center;
    align-items: center;
    background-size: contain;
    background-position: top center;
    background-repeat: repeat-x;
    max-height: 100vh;
    width: 99vw;
    margin-bottom: 5vw;
    overflow: hidden;
}

.team {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.team-hero-img {
    width: 99vw;
    max-height: 100vh;
    min-height: 400px;
    grid-row: 1;
    grid-column: 1;
    object-fit: cover;
}


.team-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-items: center;
    align-items: center;
    text-align: center;
    padding-bottom: 5vw;
    gap: 30px;
}

.scroll-section {
    display: grid;
    grid-template-rows: calc(20px + 10vw) auto calc(20px + 10vw);
    justify-content: center;
    justify-items: center;
    align-items: center;
    text-align: center;
    gap: 40px;
}

.team-title {
    font-size: calc(20px + 3vw);
    line-height: 1;
    top: 30vh;
    text-transform: uppercase;
    text-align: center;
}

.team-title-mult {
    grid-row: 1/4;
    grid-column: 1;
    margin-top: 80px;
    font-size: calc(20px + 10vw);
    line-height: 1;
    position: sticky;
    top: 30vh;
    align-self: start;
    margin: 0;
    z-index: 10;
    mix-blend-mode: multiply;
    text-transform: uppercase;
}

.team-img {
    max-height: 60vh;
    object-fit: cover;
    position: relative;
}

.team-members th {
    text-align: start;
    font-size: calc(10px + 1vw);
}

.team-members td {
    text-align: start;
    padding-left: 30px;
    font-size: calc(10px + 1vw);
    color: white;
}

.team-desc {
    grid-row: 2 / 3;
    font-size: calc(10px + 1vw);
    margin: 0 10%;
    max-width: 1500px;
    color: white;
}

.team-grid {
    grid-row: 3 / 4;
    display: grid;
    align-items: stretch;
    gap: 10px;
    margin: 0 10%;
    max-width: 1500px;
}

.team-grid-item {
    position: relative;
}

.info {
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    position: absolute;
    top: 10px;
    left: 15px;
    text-align: left;
    font-size: 1vw;
}

.role {
    font-style: oblique;
    font-weight: 300;
}

.linkedin {
    color: white;
    font-size: calc(14px + 1.5vw);
    text-decoration: none;
    font-weight: 600;
}

.linkedin:hover {
    color: #EB0028;
}

.two-m {
    grid-template-columns: repeat(2, minmax(100px, auto));
}

.two-m img {
    max-height: 70vh;
}

.three-m {
    grid-template-rows: repeat(2, minmax(100px, auto));
    grid-template-columns: repeat(2, minmax(100px, auto));
}

.five-m {
    grid-template-rows: repeat(2, minmax(100px, auto));
    grid-template-columns: repeat(3, minmax(100px, auto));
}

.seven-m {
    grid-template-rows: repeat(2, minmax(100px, auto));
    grid-template-columns: repeat(3, minmax(100px, auto));
}

.director-two-rows {
    grid-row: 1 / 3;
}

.director-three-rows {
    grid-row: 1 / 4;
}

@media (max-width: 450px) {

    .director-two-rows {
        grid-row: 1 / 2;
        grid-column: 1 / 3;
    }

    .director-three-rows {
        grid-row: 1 / 2;
        grid-column: 1 / 3;
    }

    .five-m {
        grid-template-rows: repeat(3, minmax(100px, auto));
        grid-template-columns: repeat(2, minmax(100px, auto));
    }

    .seven-m {
    grid-template-rows: repeat(3, minmax(100px, auto));
    grid-template-columns: repeat(2, minmax(100px, auto));
}

    .info {
        font-size: 1.5vw;
    }
}

.image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
}

.image-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ad011e75;
    pointer-events: none;
}

.team-member-img {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
   transition: opacity 0.4s ease-in-out;
   object-fit:cover;
}

.fadebox {
    position: relative;
    width: 100%;
}

.fadebox-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.team-member-img.front {
    position: relative;       /* front image defines height */
    display: block;
    width: 100%;
    height: 100%;
    opacity: 1;
}

.team-member-img.back {
    position: absolute;       /* fades over it */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.fadebox:hover .back {
    opacity: 1;
}

.fadebox:hover .front {
    opacity: 0;
}
