section.portfolio {
    display: flex;
    flex-wrap: wrap;
    padding: 25px;

    gap: 25px;


    max-width: 1250px;
    margin: 0 auto;
    align-items: center;
    align-content: flex-start;
    cursor: default;
    margin-bottom: 125px;
}

div:hover~.bg {
    opacity: 1;
}

.bg {
    width: 100%;
    height: 100%;
    display: block;
    position: fixed;
    background-color: rgba(0, 0, 0, 0.5);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease 0.25s;
}

.svgem-logo {
    position: relative;
    z-index: 200;
    max-width: 200px;
    margin: 20px auto;
    display: block;
}

/* .portfolio::before {
    visibility: hidden;
    content: '';
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.portfolio:hover::before {
    visibility: visible;
    content: '';
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;

} */

.portfolio div {
    background-color: rgba(200, 200, 200, 0.5);
    /* flex: 1 0 auto; */
    flex: 1;
    aspect-ratio: 1 / 1;
    min-width: 300px;
    background-size: contain;
    overflow: hidden;
    cursor: pointer;


    /* margin: 25px; */

    /* min-width: 200px; */
    /* max-height: 400px; */
    /* min-height: 200px; */

    /* aspect-ratio: 1 / 1; */
    border-radius: 6px;
    position: relative;
    /* transition: flex 0.5s ease 0.5s; */
    transition: all 0.5s ease, z-index 0s ease 0.5s;
}

.portfolio div:hover {
    position: relative;
    z-index: 50;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
    flex: 2;
    /* position: relative; */
}

/* .portfolio div::after {
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    background: inherit;
    transition: all 0.5s ease 0.5s, position 0s;

    -webkit-transition: width 0.5s ease 0.5s, height 0.5s ease 0.5s, margin 0.5s ease 0.5s;
    -moz-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
    position: relative;
    z-index: 75;
    pointer-events: none;
    position: relative;
}

.portfolio div:hover::after {
    height: 120%;
    width: 120%;
    margin: -10%;

    
}

.portfolio div::before {
    content: '';
    display: block;
    position: fixed;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    visibility: hidden;
    transition: all 0.5s ease 0.5s, position 0s, pointer-events 0s ease 0.5s;
    pointer-events: none;
    opacity: 0;
    z-index: 25;
}

.portfolio div:hover::before {

    opacity: 1;
    transition: opacity 0.5s ease 0.5s;
}

.portfolio div::before:hover {
    pointer-events: none;
} */

.btn-container {
    margin: 0 auto;
    max-width: 310px;
}

a.button-wide {
    box-sizing: border-box;

    text-align: center;
    text-decoration: none;
    color: black;
    display: inline-block;
    height: 50px;
    width: 150px;
    line-height: 50px;
    margin: 15px 0 0 0;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    border: none;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.25s ease;
    -webkit-transition: all 0.25s ease;
    -moz-transition: all 0.25s ease;
    -ms-transition: all 0.25s ease;
}

a.button-wide:hover {
    background-color: rgba(0, 0, 0, 0.65);
}