/* -- Gallery - Tabs -- */

.gallery-nav-list {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    margin: 20px auto 80px;
    padding: 0;
    list-style: none;
    background-color: #f2f4f8;
}
.gallery-nav-disabled::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}
.gallery-nav-item {
    width: 50%;
    z-index: 0;
}
.gallery-nav-button {
    position: relative;
    width: 100%;
    background-color: transparent;
    border: none;
    text-align: center;
    padding: 15px 10px;
    font-size: .9rem;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 3px solid #e2e4e8;
    transition: color .33s, border-color .33s;
}
.gallery-nav-button:hover,
.gallery-nav-button:focus {
    color: var(--accent-color);
}
.gallery-nav-button-active,
.gallery-nav-button-active:hover,
.gallery-nav-button-active:focus {
    border-bottom: 3px solid var(--accent-color);
    color: var(--accent-color);
}

.gallery-nav-button[data-target='reviews_google'] .gallery-nav-button-inner,
.gallery-nav-button[data-target='reviews_facebook'] .gallery-nav-button-inner {
    position: relative;
    margin-left: 20px;
}
.gallery-nav-button-inner::before {
    content: "";
    position: absolute;
    background-size: cover;
    background-position: center;
    top: 50%;
    left: -30px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}
.gallery-nav-button[data-target='reviews_google'] .gallery-nav-button-inner::before {
    background-image: url(/imageserver/UserMedia/dukesroof2/google_logo.webp);
}
.gallery-nav-button[data-target='reviews_facebook'] .gallery-nav-button-inner::before {
    background-image: url(/imageserver/UserMedia/dukesroof2/facebook_logo.webp);
}

.gallery-wrapper {
    transition: all .33s;
}
.gallery-wrapper-fade-out {
    opacity: 0;
    transform: translateY(20px);
}
.gallery-content {
    display: none;
}
.gallery-content-visible {
    display: block;
}



/* -- 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: 25px;
}
.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%;
    }
}



/* -- Gallery - Other -- */

.gallery-output {
    position: relative;
    text-align: left;
}
.gallery-output-first {
    margin-top: 80px;
}
.gallery-loader {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    border: 5px solid #eee;
    border-top-color: var(--accent-color);
    transition: opacity .4s;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 80px;
    padding: 0;
    transition: transform .4s, opacity .4s;
}
.gallery-fade-in {
    transform: translateY(0);
    opacity: 1;
}
.gallery-fade-out {
    opacity: 0;
}
.gallery-item {
    position: relative;
    width: 24%;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px .5% 0;
}
.gallery-item img {
    width: auto;
    height: 115%;
    transition: opacity .4s, transform .4s;
}
.gallery-item img.vertical-img {
    width: 115%;
    height: auto;
}
.gallery-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    fill: #111;
    opacity: 0;
    transition: opacity .4s;
}
.gallery-item:hover .gallery-icon {
    opacity: 1;
}
.gallery-item:hover img {
    opacity: .6;
    transform: scale(1.05);
}
.gallery-caption {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    max-width: 40vmin;
    padding: 6px 12px;
    background-color: rgba(0, 0, 0, .55);
}

@media screen and (max-width: 1200px) {
    .gallery-item {
        width: 32.3333333333%;
    }
}

@media screen and (max-width: 900px) {
    .gallery-item {
        width: 49%;
    }
}

@media screen and (max-width: 600px) {
    .gallery-item,
    .gallery-item img {
        width: 100%;
        height: auto;
    }
}

.videos-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 60px auto 20px;
    padding: 0;
    gap: 5%;
}
.videos-item {
    width: calc(50% - (5% / 2));
    margin-block: 20px;
    text-align: left;
}
.videos-item iframe {
    max-width: 600px;
    width: 100%;
    height: 350px;
}

@media (max-width: 750px) {
    .videos-item {
        width: 100%;
    }
}