.kmg.staff {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
    gap: 30px;
    align-items: self-start;
}

.kmg.staff .item {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

.kmg.staff .image-wrapper {
    position: relative;
    aspect-ratio: 600/800;
    overflow: hidden;
    margin-top: 20px;
    max-width: 190px;
}

@media (max-width: 766.9px) {
    .kmg.staff .image-wrapper {
        /* max-width: 190px; */
    }
}

.kmg.staff .image-wrapper.retangle {
    aspect-ratio: 800/530;
}

.kmg.staff .image-wrapper:is(.square, .circle) {
    aspect-ratio: 1/1;
}

.kmg.staff .image-wrapper.circle {
    border-radius: 50%;
} 

.kmg.staff .image-wrapper img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    object-position: center center;
   
}

.kmg.staff .details span {
    position: relative;
    float: left;
    width: 100%;
}

.kmg.staff a {
    text-decoration: none;
    color: black;
    word-break: break-all;
}

.kmg.staff .item  a:hover {
    text-decoration: underline;
}

.kmg.staff .title {
    color: black;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.kmg.staff .title a {
    color: black;
    text-decoration: none;
    &:hover {
        text-decoration: underline;
    }
}

.staff-info-free_text {
    margin: 10px 0;
}

.details .title + .staff-info-free_text {
    margin: 0 0 10px 0;
}

@media (min-width: 767px) {
	.kmg.staff {
        gap: 30px;
    }
}

@media (min-width: 1024px) {
	.kmg.staff {
        grid-template-columns: 1fr 1fr 1fr 1fr;
		gap: 50px;
	}

    .kmg.staff:has(.item:only-child) {
        grid-template-columns: 400px auto;
    }

    .kmg.staff.columns-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .kmg.staff.columns-2 {
        grid-template-columns: 1fr 1fr;
    }

}

.kmg.staff .social-media {
    position: relative;
    float: left;
    width: 100%;
    margin: 10px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(24px, auto));
    gap: 12px;
    align-items: baseline;
}

.kmg.staff .social-media a {
    position: relative;
    float: left;
    width: 24px;
    height: 24px;
    overflow: hidden;
    /* text-indent: -999px; */
    display: block;
    /* background: #d9d9d9; */
    /* margin: 10px 10px 0 0; */
    color: black;
}

.kmg.staff .social-media a:last-child {
    margin-right: 0;
}

.kmg.staff .social-media a svg {
    height: 24px;
    width: 24px;
    fill: black;
}

@media (max-width: 519px) {
    .kmg.staff .item {
        text-align: center;
    }

    /* .image-wrapper {
        margin-left: auto;
        margin-right: auto;
        width: 190px;
    } */

    .social-media {
        margin: 0 auto;
        display: inline-block;
    }
}

.acf-block-preview .kmg.staff {
    float: none;
}

.acf-block-preview .kmg.staff {
    font-size: 20px;
}

.acf-block-preview .kmg.staff a {
    pointer-events: none;
}
