.portfolio-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 60px auto;
}
.icon-gallery {
    width: 1040px;
    height: 340px;
    padding: 20px 40px 40px 20px;
    overflow: hidden;
    position: relative;
}
.ig-wrapper {
    position: absolute;
    margin: 20px 0;
    transition: all .5s;
    top: 0;
    display: flex;
}
.icon-group {
    width: 960px;
    height: 280px;
    margin: 0 40px;
}
.icon-group-inner {
    padding-top: 20px;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.icon-group-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}
.icon-group-item-img {
    width: 72px;
    height: 72px;
}
.icon-group-item-text {
    margin-top: 18px;
    color: #fff;
    font-size: 12px;
}
.page-dot-wrapper {
    height: 20px;
    position: absolute;
    display: flex;
    justify-content: space-between;
    align-items: center;
    left: 50%;
    bottom: 5px;
    transform: translate(-50%, 0);
}
.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.4;
    margin: 0 6px;
    transition: opacity .2s;
}
#prev-button, #next-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    width: 20px;
    opacity: 0.5;
    transition: opacity .2s;
    cursor: pointer;
    margin: 0 10px;
}
#prev-button:hover, #next-button:hover {
    opacity: 1;
}
#prev-button > img {
    transform: rotate(-90deg);
}
#next-button > img {
    transform: rotate(90deg);
}

#ig2 > #ig-inner2-0 > a:nth-child(2) > .icon-group-item-text,
#ig3 > #ig-inner3-1 > a:nth-child(4) > .icon-group-item-text {
    font-size: 10px;
}
.portfolio-wrapper-m {
    margin: 60px auto;
    height: 444px;
    overflow-y: scroll;
}

.mobile-icon-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 5%;
}
.icon-group-item-m {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.icon-group-item-m-img {
    width: 72px;
    height: 72px;
}
.icon-group-item-m-text {
    margin-top: 18px;
    color: #fff;
    font-size: 14px;
}
.portfolio-sub-title {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 70px;
}
.portfolio-sub-title a {
    position: relative;
    font-size: 16px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    margin-right: 60px;
}
.portfolio-sub-title a.active::after {
    content: "";
    display: block;
    border-top: 3px solid var(--theme-color);
    box-shadow: 0 -3px 12px var(--theme-color-shadow);
    width: 60px;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translate(-50%, 0);
}
#portfolio .block-title {
    margin-bottom: 80px;
}
.portfolio-sub-title a:last-child {
    margin-right: 0;
}
.portfolio-content {
    max-width: 1000px;
    margin: auto;
    overflow: hidden;
    margin-bottom: 60px;
}
.portfolio-content-container {
    width: 500%;
    display: flex;
    transition: all ease 0.3s;
}
.portfolio-content .icons {
    width: 20%;
    padding: 30px 15px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 23px;
    column-gap: 50px;
    align-content: start;
}
.portfolio-content .icon {
    display: block;
}
.portfolio-content .icon img {
    display: block;
    width: 100%;
    height: 68px;
    object-fit: contain;
    margin: auto;
    margin-bottom: 23px;
}
.portfolio-content .icon span {
    display: block;
    text-align: center;
    color: #fff;
    font-size: 12px;
}

.portfolio-sub-title .nav-btn {
    display: none;
    position: absolute;
    cursor: pointer;
}
.portfolio-sub-title .nav-btn.prev {
    transform: translate(0, -50%) rotate(-90deg);
    left: 15px;
    top: 50%;
}
.portfolio-sub-title .nav-btn.next {
    transform: translate(0, -50%) rotate(90deg);
    right: 15px;
    top: 50%;
}

@media (max-width: 1000px) {
    .portfolio-sub-title a {
        font-size: 14px;
        display: none;
        margin-right: 0;
    }
    .portfolio-sub-title a.active {
        display: block;
    }
    .portfolio-content .icons {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        height: 565px;
        overflow: auto;
    }
    .portfolio-sub-title .nav-btn {
        display: block;
    }
}
@media (max-width: 600px) {
    .portfolio-content .icons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
