/* ====================================
            GALLERY HERO
==================================== */

.gallery-hero {

    min-height: 65vh;

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;

    position: relative;

    color: var(--white-color);


    background:
        linear-gradient(
            rgba(15, 15, 15, .45),
            rgba(15, 15, 15, .55)
        ),
        url("../images/gallery/gallery-hero.jpg");

    background-size: cover;

    background-position: center;
}


.gallery-hero::before {

    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,.15),
            rgba(0,0,0,.35)
        );

}


.gallery-hero .container {

    position: relative;

    z-index: 2;

}


.gallery-hero span {

    display: inline-block;

    color: var(--primary-color);

    text-transform: uppercase;

    letter-spacing: 4px;

    font-weight: 600;

    margin-bottom: 20px;

}


.gallery-hero h1 {

    color: var(--white-color);

    margin-bottom: 25px;

}


.gallery-hero p {

    max-width: 700px;

    margin: auto;

    font-size: 1.1rem;

    color: rgba(255,255,255,.9);

}



/* ====================================
        GALLERY INTRO
==================================== */


.gallery-intro {

    padding: 120px 0 60px;

    background: var(--secondary-color);

}


.gallery-intro .section-title {

    text-align: center;

}


.gallery-intro p {

    max-width: 750px;

    margin: 25px auto 0;

    text-align: center;

    line-height: 1.9;

}



/* ====================================
        FILTER BUTTONS
==================================== */


.gallery-filter {

    padding-bottom: 80px;

    background: var(--secondary-color);

}


.filter-buttons {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 15px;

    flex-wrap: wrap;

}


.filter-btn {

    padding: 14px 28px;

    border-radius: 50px;

    border: 1px solid rgba(0,0,0,.12);

    background: var(--white-color);

    color: var(--heading-color);

    font-weight: 500;

    transition: var(--transition);

    box-shadow: var(--shadow-soft);

}


.filter-btn:hover {

    transform: translateY(-4px);

    border-color: var(--accent-color);

    color: var(--accent-color);

}


/* Active Filter */


.filter-btn.active {

    background: var(--accent-color);

    color: var(--white-color);

    border-color: var(--accent-color);

}


.filter-btn.active:hover {

    color: var(--white-color);

}

/* ====================================
            GALLERY GRID
==================================== */

.gallery-section {

    padding-bottom: 120px;

    background: var(--secondary-color);

}


.gallery-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    grid-auto-rows: 280px;

    gap: 25px;

}


/* Different Sizes */

.gallery-item.large {

    grid-row: span 2;

}


.gallery-item.wide {

    grid-column: span 2;

}


/* ====================================
            GALLERY ITEM
==================================== */


.gallery-item {

    position: relative;

    overflow: hidden;

    border-radius: var(--radius-large);

    cursor: pointer;

    box-shadow: var(--shadow-soft);

}


.gallery-item img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: transform .8s ease;

}


.gallery-item:hover img {

    transform: scale(1.12);

}



/* ====================================
            OVERLAY
==================================== */


.gallery-overlay {

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.75),
            rgba(0,0,0,.15)
        );

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    padding: 30px;

    opacity: 0;

    transition: var(--transition);

}


.gallery-item:hover .gallery-overlay {

    opacity: 1;

}


.gallery-overlay h3 {

    color: var(--white-color);

    margin-bottom: 10px;

}


.gallery-overlay p {

    color: rgba(255,255,255,.85);

    margin-bottom: 15px;

}


/* ====================================
            GALLERY TAG
==================================== */


.gallery-tag {

    display: inline-block;

    align-self: flex-start;

    margin-bottom: 15px;

    padding: 8px 18px;

    border-radius: 30px;

    background: rgba(255,255,255,.18);

    color: var(--white-color);

    backdrop-filter: blur(10px);

    font-size: .85rem;

}



/* ====================================
            VIEW BUTTON
==================================== */


.gallery-view {

    width: fit-content;

    padding: 10px 22px;

    border: none;

    border-radius: 30px;

    background: var(--accent-color);

    color: var(--white-color);

    font-size: .9rem;

    transition: var(--transition);

}


.gallery-view:hover {

    transform: translateY(-3px);

}



/* ====================================
        BEFORE AFTER BADGE
==================================== */


.before-after-badge {

    position: absolute;

    top: 20px;

    left: 20px;

    z-index: 2;

    padding: 10px 18px;

    border-radius: 30px;

    background: var(--accent-color);

    color: var(--white-color);

    font-size: .8rem;

    font-weight: 600;

    letter-spacing: 1px;

}



/* ====================================
            VIDEO ITEMS
==================================== */


.video-item .play-button {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    width: 75px;

    height: 75px;

    border-radius: 50%;

    background: rgba(255,255,255,.85);

    color: var(--accent-color);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 1.8rem;

    z-index: 3;

    transition: var(--transition);

}


/* Pulse Animation */

.video-item .play-button::before {

    content: "";

    position: absolute;

    inset: -12px;

    border-radius: 50%;

    border: 2px solid rgba(255,255,255,.6);

    animation: pulse 2s infinite;

}


.video-item:hover .play-button {

    transform:
        translate(-50%, -50%)
        scale(1.1);

}


@keyframes pulse {

    0% {

        transform: scale(1);

        opacity: 1;

    }


    100% {

        transform: scale(1.5);

        opacity: 0;

    }

}

/* ====================================
    FEATURED TRANSFORMATION
==================================== */

.featured-result {

    padding: 120px 0;

    background: var(--white-color);

}


.featured-result .section-title {

    text-align: center;

    margin-bottom: 70px;

}


.featured-result .section-title p {

    max-width: 650px;

    margin: 20px auto 0;

}

/* ====================================
        BEFORE AFTER CONTAINER
==================================== */

.before-after-container {

    position: relative;

    width: 100%;

    max-width: 1200px;

    height: 650px;

    margin: auto;

    overflow: hidden;

    border-radius: var(--radius-large);

    box-shadow:
        0 30px 60px rgba(0,0,0,.12);

}

/* ====================================
            IMAGES
==================================== */

.before-image,
.after-image {

    position: absolute;

    inset: 0;

}


.before-image img,
.after-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}


.after-image {

    width: 50%;

    overflow: hidden;

}

/* ====================================
            LABELS
==================================== */

.image-label {

    position: absolute;

    top: 25px;

    left: 25px;

    z-index: 3;

    padding: 10px 22px;

    border-radius: 30px;

    background: rgba(255,255,255,.9);

    color: var(--heading-color);

    font-weight: 600;

    backdrop-filter: blur(10px);

}


.after-image .image-label {

    left: auto;

    right: 25px;

}

/* ====================================
            SLIDER LINE
==================================== */

.slider-line {

    position: absolute;

    top: 0;

    left: 50%;

    width: 4px;

    height: 100%;

    background: var(--accent-color);

    z-index: 5;

    transform: translateX(-50%);

}

/* ====================================
            HANDLE
==================================== */

.slider-handle {

    position: absolute;

    top: 50%;

    left: 50%;

    transform:
        translate(-50%, -50%);

    width: 75px;

    height: 75px;

    border-radius: 50%;

    background: var(--white-color);

    color: var(--accent-color);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 1.5rem;

    font-weight: bold;

    cursor: ew-resize;

    box-shadow:
        0 10px 25px rgba(0,0,0,.15);

}

/* ====================================
        RANGE INPUT
==================================== */

.comparison-slider {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    opacity: 0;

    cursor: ew-resize;

    z-index: 10;

}

/* ====================================
        RESULT DETAILS
==================================== */

.result-details {

    margin-top: 60px;

    display: grid;

    grid-template-columns: repeat(3,1fr);

    gap: 30px;

}


.detail-box {

    background: var(--secondary-color);

    padding: 40px;

    text-align: center;

    border-radius: var(--radius-large);

    transition: var(--transition);

}


.detail-box:hover {

    transform: translateY(-8px);

}


.detail-box h3 {

    margin-bottom: 15px;

    color: var(--accent-color);

}


.detail-box p {

    margin: 0;

    font-weight: 500;

}

/* ====================================
        PREMIUM EFFECT
==================================== */

.before-after-container::after {

    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:

        linear-gradient(
            180deg,
            rgba(255,255,255,.05),
            rgba(255,255,255,0)
        );

}


/* ====================================
        VIDEO SHOWCASE
==================================== */

.video-showcase {

    padding: 120px 0;

    background: var(--secondary-color);

}


.video-content span {

    color: var(--accent-color);

    text-transform: uppercase;

    letter-spacing: 3px;

    font-weight: 600;

}


.video-content h2 {

    margin: 20px 0 25px;

}


.video-content p {

    margin-bottom: 35px;

    max-width: 550px;

}

/* ====================================
        VIDEO PREVIEW
==================================== */

.video-preview {

    position: relative;

    overflow: hidden;

    border-radius: var(--radius-large);

    box-shadow:
        0 25px 50px rgba(0,0,0,.1);

}


.video-preview img {

    width: 100%;

    display: block;

}


.video-preview::after {

    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            rgba(0,0,0,.05),
            rgba(0,0,0,.25)
        );

}


/* ====================================
        BIG PLAY BUTTON
==================================== */

.big-play-button {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    width: 110px;

    height: 110px;

    border-radius: 50%;

    background: rgba(255,255,255,.95);

    color: var(--accent-color);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 2.2rem;

    z-index: 5;

    cursor: pointer;

    transition: var(--transition);

}


.big-play-button:hover {

    transform:
        translate(-50%, -50%)
        scale(1.08);

}


.big-play-button::before {

    content: "";

    position: absolute;

    inset: -15px;

    border-radius: 50%;

    border: 2px solid rgba(255,255,255,.5);

    animation: videoPulse 2.5s infinite;

}


@keyframes videoPulse {

    from {

        transform: scale(1);

        opacity: 1;

    }

    to {

        transform: scale(1.7);

        opacity: 0;

    }

}


/* ====================================
            GALLERY CTA
==================================== */

.gallery-cta {

    padding: 120px 0;

    text-align: center;

    background:
        linear-gradient(
            rgba(15,15,15,.7),
            rgba(15,15,15,.7)
        ),
        url("../images/gallery/cta-bg.jpg");

    background-size: cover;

    background-position: center;

    color: var(--white-color);

}


.gallery-cta span {

    color: var(--primary-color);

    text-transform: uppercase;

    letter-spacing: 4px;

    font-weight: 600;

}


.gallery-cta h2 {

    color: var(--white-color);

    margin: 25px 0;

}


.gallery-cta p {

    max-width: 700px;

    margin: auto;

    color: rgba(255,255,255,.9);

}


.cta-buttons {

    margin-top: 40px;

    display: flex;

    justify-content: center;

    gap: 20px;

    flex-wrap: wrap;

}


.cta-primary {

    background: var(--accent-color);

    color: var(--white-color);

    padding: 16px 34px;

    border-radius: 50px;

}


.cta-primary:hover {

    transform: translateY(-4px);

}


.cta-secondary {

    background: transparent;

    border: 1px solid rgba(255,255,255,.4);

    color: var(--white-color);

    padding: 16px 34px;

    border-radius: 50px;

}


.cta-secondary:hover {

    background: rgba(255,255,255,.08);

}

/* ====================================
        PREMIUM EFFECTS
==================================== */

.gallery-item,
.detail-box,
.video-preview {

    transition:
        all .4s ease;

}


.gallery-item:hover {

    box-shadow:
        0 25px 50px rgba(0,0,0,.15);

}


.video-preview:hover {

    transform: translateY(-8px);

}


.detail-box:hover {

    box-shadow:
        0 20px 40px rgba(0,0,0,.08);

}


/* ====================================
        GALLERY MODAL
==================================== */

.gallery-modal {

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.92);

    display: none;

    align-items: center;

    justify-content: center;

    z-index: 9999;

}


.gallery-modal.active {

    display: flex;

}


.gallery-modal img,
.gallery-modal video {

    max-width: 90%;

    max-height: 90vh;

    border-radius: 15px;

}


.modal-close {

    position: absolute;

    top: 30px;

    right: 30px;

    color: white;

    font-size: 2rem;

    cursor: pointer;

}

.gallery-item {

    transition:
        opacity .35s ease,
        transform .35s ease,
        box-shadow .35s ease;

}

.modal-content-wrapper {

    display: flex;

    align-items: center;

    justify-content: center;

}


.modal-content-wrapper video {

    width: 100%;

    max-width: 1200px;

    border-radius: 15px;

}