/* -------------------------------------------------------------------------- */
/*                                   Drivers                                  */
/* -------------------------------------------------------------------------- */
.drivers__section {
    --gap: 2px;
    --line-thickness: 1px;
    --line-color: #494949;
    --line-offset: calc(var(--gap) / 2);

    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc(1920px / 4 - var(--gap) * 3), 1fr));
    grid-auto-rows: minmax(min-content, 1fr);
    align-items: stretch;
    gap: var(--gap);
    overflow: hidden;
}

.drivers__section > .card {
    position: relative;
    margin-right: calc(var(--gap) * -1);
}

.drivers__section > .card::before,
.drivers__section > .card::after {
    content: "";
    background-color: var(--line-color);
    position: absolute;
}

/* Row Lines */
.drivers__section > .card::after {
   inline-size: 100vw;
   block-size: var(--line-thickness);
   inset-block-start: calc(var(--line-offset) * -1);
   inset-inline-start: 0;
}

/* Column Lines */
.drivers__section > .card::before {
   inline-size: var(--line-thickness);
   block-size: calc(100% + var(--gap));
   inset-block-start: 0;
   inset-inline-start: calc(var(--line-offset) * -1);
}

.drivers__section__card {
    display: flex;
    padding-bottom: calc(100px - var(--gap));
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.drivers__section__card__preview {
    width: 100%;
    cursor: pointer;
    position: relative;
    aspect-ratio: 1/1;
}

.preview__driver-photo,
.preview__car-photo {
    width: 100%;
    height: 100%;
    position: absolute;
    transition: opacity 0.75s;
}

.preview__car-photo {
    opacity: 0;
    background: lightgray 75.98px 183px / 76.256% 42.813% no-repeat, rgba(255, 255, 255, 0.10);
}

.preview__car-photo--mobile {
    display: none;
    overflow: hidden;
    width: 80px;
    height: 80px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: absolute;
    bottom: 16px;
    right: 16px;
    cursor: pointer;
}

.drivers__section__card__driver-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    align-self: stretch;
}

.driver-info__primary {
    display: flex;
    padding: 0 24px;
    align-items: center;
    gap: 24px;
    align-self: stretch;
}

.driver-info__primary__name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1 0 0;
}

.driver-info__primary__name h4 {
    overflow: hidden;
}

.driver-info__secondary {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
}

.driver-info__secondary__section {
    display: flex;
    padding: 0 24px;
    align-items: center;
    gap: 16px;
    align-self: stretch;
}

.driver-info__secondary__section>h4 {
    width: 15%;
}

.drivers__section__join-us {
    display: flex;
    padding: 31px 24px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 48px;
    background: var(--white);
}

.drivers__section__join-us__description {
    max-width: 405px;
    text-align: center;
}

@media (max-width: 480px) {
    .drivers__section {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    }

    .driver-info__secondary__section>h4 {
        width: 20%;
    }
}

@media (max-width: 1024px) {
    .preview__car-photo--mobile {
        display: block;
    }

    .preview__car-photo {
        display: none;
    }
}

@media (min-width: 1025px) {
    .drivers__section__card__preview:hover .preview__car-photo {
        opacity: 1;
    }

    .drivers__section__card__preview:hover .preview__driver-photo {
        opacity: 0;
    }
}
/* -------------------------------------------------------------------------- */