/* -- Gallery - Tabs -- */

.gallery-nav-list {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    margin: 20px auto 60px;
    padding: 0;
    list-style: none;
    gap: 3%;
}
.gallery-nav-disabled::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}
.gallery-nav-item {
    width: calc(33.3333333333% - (6% / 3));
    margin-block: 10px;
    z-index: 0;
}
.gallery-nav-button {
    position: relative;
    width: 100%;
    border: none;
    text-align: center;
    padding: 10px;
    font-size: .9rem;
    font-weight: 400;
    color: #606266;
    cursor: pointer;
    background-color: #f2f4f8;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #e2e4e8;
    transition: color .33s, background-color .33s;
}
.gallery-nav-button:hover,
.gallery-nav-button:focus {
    background-color: #e0e2e6;
}
.gallery-nav-button-active,
.gallery-nav-button-active:hover,
.gallery-nav-button-active:focus {
    font-weight: 600;
    background-color: #2a2c2f;
    color: #fff;
}

@media (max-width: 480px) {
    .gallery-nav-item {
        width: 100%;
    }
}



/* -- Gallery - Before & After Sliders -- */

.ba-slider-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 3%;
    border-bottom: 2px solid #d2d4d8;
    padding-bottom: 60px;
    margin-bottom: 80px;
}
.ba-slider-container {
    width: calc(50% - (3% / 2));
    margin-inline: auto;
    text-align: left;
    margin-block: 10px 30px;
}
.before-after__slider-wrapper {
    position: relative;
}
.before-after__label {
   font-size: 0;
   line-height: 0;
}
.before-after__label,
.before-after__range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: transparent;
    border: none;
    appearance: none;
    outline: none;
    cursor: ew-resize;
    z-index: 20;
}
.before-after__range:hover ~ .before-after__slider .before-after__thumb {
    transform: scale(1.1);
}
/* Specificity needed to override hover state above */
.before-after .before-after__slider-wrapper .before-after__range:active ~ .before-after__slider .before-after__thumb,
.before-after .before-after__slider-wrapper .before-after__range:focus ~ .before-after__slider .before-after__thumb,
.before-after .before-after__slider-wrapper .before-after__range--active ~ .before-after__slider .before-after__thumb {
    transform: scale(0.9);
    background-color: #111;
}
.before-after__image-wrapper--overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(50% + 1px);
    height: 100%;
    overflow: hidden;
}
.before-after__figure {
    margin: 0;
}
.before-after__figure::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f2f2f2;
}
.before-after__figure:not(.before-after__figure--overlay) {
    position: relative;
    padding-top: 66.666666667%;
}
.before-after__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 0 50%;
    overflow: hidden;
}
.before-after__figure--overlay .before-after__image {
    z-index: 1;
}
.before-after__caption {
    position: absolute;
    bottom: 12px;
    min-width: max-content;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
}
@media screen and (max-width: 40.063em) {
    .before-after__caption {
        font-size: 12px;
    }
}
.before-after__caption--before {
    left: 12px;
    z-index: 2;
}
.before-after__caption--after {
    right: 12px;
    text-align: right;
}
.before-after__caption-body {
    max-width: 40vmin;
    padding: 6px 12px;
    background-color: rgba(0, 0, 0, 0.55);
}
.before-after__slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: #fff;
    transition: background-color 0.3s ease-in-out;
    z-index: 10;
}
.before-after__thumb {
    position: absolute;
    top: calc(50% - 20px);
    left: calc(50% - 20px);
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--accent-color);
    border: 2px solid #fff;
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 22px 0 rgba(0, 0, 0, 0.5);
    transform-origin: center;
    transition: transform .33s ease-in-out, background-color .33s ease-in-out;
}
.before-after__range::-webkit-slider-runnable-track {
    width: 40px;
    height: 40px;
    opacity: 0;
}
.before-after__range::-moz-range-thumb {
    width: 40px;
    height: 40px;
    opacity: 0;
}
.before-after__range::-webkit-slider-thumb {
    width: 40px;
    height: 40px;
    opacity: 0;
}
.before-after__range::-ms-fill-lower {
    background-color: transparent;
}
.before-after__range::-ms-track {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
    padding: 0;
    background-color: transparent;
    color: transparent;
    outline: none;
    cursor: col-resize;
}
.before-after__range::-ms-thumb {
    width: 0.5%;
    height: 100%;
    opacity: 0;
}
.before-after__range::-ms-tooltip {
    display: none;
}

@media (max-width: 981px) {
    .ba-slider-container {
        width: 100%;
    }
}