.locations {
    position: relative;
    width: 100%;
    padding-inline: 4rem;

    @media (max-width: 1023px) {
        padding-inline: 2rem;
    }
}

.location-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 0.5px solid var(--color-driftwood-taupe);
    overflow: hidden;

    @media (max-width: 1023px) {
        display: flex;
        flex-direction: column;
    }
}

.location-wrapper .additional-location {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem;
    border-right: 0.5px solid var(--color-driftwood-taupe);
    border-bottom: 0.5px solid var(--color-driftwood-taupe);
    transition: background-color 0.2s ease;

    &:nth-child(3n) {
        border-right: none;
    }

    &:nth-last-child(1):nth-child(3n),
    &:nth-last-child(2):nth-child(3n + 2),
    &:nth-last-child(3):nth-child(3n + 1) {
        border-bottom: none;
    }

    &:nth-last-child(2):nth-child(3n + 1),
    &:nth-last-child(1):nth-child(3n + 2) {
        border-bottom: none;
    }

    &:nth-last-child(1):nth-child(3n + 1) {
        border-bottom: none;
    }

    @media (max-width: 1023px) {
        border-right: none;
        border-bottom: 0.5px solid var(--color-driftwood-taupe);

        &:last-child {
            border-bottom: none;
        }

        &:nth-child(3n) {
            border-right: none;
        }
    }
}

.additional-location:hover {
    background-color: var(--color-sea-salt-white);
}

.additional-location .info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.additional-location .info .title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.additional-location .info .title-row .title {
    font-weight: var(--font-weight-semibold);
}

.additional-location .info p {
    color: var(--color-coconut-husk);
    font-size: var(--font-size-sm);
    opacity: 0.5;
}

.additional-location .info .title-row .icon {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    background-color: var(--color-coconut-husk);
    opacity: 0.5;
    mask-image: var(--location-icon);
    -webkit-mask-image: var(--location-icon);
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
}

.additional-location .distance {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.additional-location .distance .value {
    font-weight: var(--font-weight-bold);
}

.additional-location .distance .metric {
    color: var(--color-coconut-husk);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    opacity: 0.5;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .location-wrapper .additional-location {
        transition: none !important;
    }
}