.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 2px;
}

@media (min-width: 576px) {
    .portfolio {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .portfolio {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .portfolio {
        grid-template-columns: repeat(6, 1fr);
    }
}

.portfolio-item {
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8px;
}

.portfolio-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    width: 100%;
    padding: 4px;
}


.portfolio-logo img.logo-img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    position: relative;
    z-index: 1;
}

.portfolio-logo img.logo-img.loaded {
    opacity: 1;
}

/* Skeleton loading styles */
.skeleton-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 5;
    /* Matches 450x250 image ratio */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.skeleton-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
    z-index: 0;
}

.skeleton-logo.hidden {
    display: none;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.portfolio-company {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
}

.portfolio-filters {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
}

.portfolio-filters .form-group {
    margin-bottom: 15px;
    width: 100%;
}

.portfolio-filters input[type="text"],
.portfolio-filters select,
.portfolio-filters input[type="checkbox"],
.portfolio-filters button {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-right: 10px;
}


.portfolio-filters button[type="submit"]:hover {
    background-color: #0056b3;
}

.portfolio-filters button[type="button"] {
    background-color: #143e57;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.portfolio-filters button[type="submit"] {
    background-color: #143e57;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 16px;
    min-width: 230px;
}

.portfolio-filters button[type="button"]:hover {
    background-color: #5a6268;
}

.portfolio-filters button[type="submit"]:hover {
    background-color: #5a6268;
}

.portfolio-filters input[type="checkbox"]+label {
    font-weight: 500;
}

h5.card-title.portfolio-company {
    margin-bottom: 5px;
    font-size: 1em;
    letter-spacing: -0.03em;
    line-height: 1.3;
    font-weight: 400;
}

fieldset.form-group.mb-2.mx-sm-3 .row {
    display: flex;
    align-items: center;
    flex-direction: row;
}

.portfolio-filters legend {
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #143e57;
    color: #143e57;
}

@media (min-width: 960px) {
    .form-inline .form-control {
        display: inline-block;
        width: auto;
        min-width: 230px;
        line-height: 1.4;
        height: 40px;
        vertical-align: middle;
        padding: 2px 10px;
    }

    label.mr-2 {
        width: 120px;
    }
}

@media (max-width: 768px) {
    fieldset.form-group.mb-2.mx-sm-3 .row {
        align-items: center;
        display: grid;
    }

    .portfolio-filters select {
        padding: 0px 14px;
    }

    h5.card-title.portfolio-company {
        font-size: 12px;
    }

    .portfolio-filters input[type="checkbox"] {
        margin-right: 0px;
    }

    .col-md-4 label {
        font-weight: 500;
    }
}


.lds-ellipsis,
.lds-ellipsis div {
    box-sizing: border-box;
}

.lds-ellipsis {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-ellipsis div {
    position: absolute;
    top: 33.33333px;
    width: 13.33333px;
    height: 13.33333px;
    border-radius: 50%;
    background: currentColor;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.lds-ellipsis div:nth-child(1) {
    left: 8px;
    animation: lds-ellipsis1 0.6s infinite;
}

.lds-ellipsis div:nth-child(2) {
    left: 8px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(3) {
    left: 32px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(4) {
    left: 56px;
    animation: lds-ellipsis3 0.6s infinite;
}

@keyframes lds-ellipsis1 {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes lds-ellipsis3 {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

@keyframes lds-ellipsis2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}

/* cutom radio boxes */
.custom-radio-form {
    color: #666666;
    background-color: #f5f5f5;
}

.custom-radio-form .custom-radio-group {
    display: flex;
    flex-direction: column;
}

.custom-radio-form .custom-radio {
    display: flex;
    cursor: pointer;
    font-weight: 500;
    font-size: calc(1em + 1px);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.375em;
}

.custom-radio-form .custom-radio input {
    position: absolute;
    left: -9999px;
}

.custom-radio-form .custom-radio input:checked+span {
    background-color: #e0e0e0;
    /* Adjust background color when checked */
}

.custom-radio-form .custom-radio input:checked+span:before {
    box-shadow: inset 0 0 0 0.35em #143e57;
    /* Adjust box-shadow color when checked */
}

.custom-radio-form .custom-radio span {
    display: flex;
    align-items: center;
    padding: 0.175em 0.5em 0.175em 0.175em;
    border-radius: 99em;
    /* Adjust border radius */
    transition: 0.25s ease;
}

.custom-radio-form .custom-radio span:hover {
    background-color: #e0e0e0;
    /* Adjust hover background color */
}

.custom-radio-form .custom-radio span:before {
    display: flex;
    flex-shrink: 0;
    content: "";
    background-color: #fff;
    width: 1.25em;
    height: 1.25em;
    border-radius: 50%;
    margin-right: 0.375em;
    transition: 0.25s ease;
    box-shadow: inset 0 0 0 0.125em #143e57;
    /* Adjust box-shadow color */
}