/*=============== HERO SINGLE STORY ===============*/
.single-story-hero {
    background-color: #fff;
    padding-block: 220px 184px;
    height: auto !important;
    min-height: auto !important;
    overflow: hidden;

    .single-story-hero__content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 90px;
    }

    .single-story-hero__info {
        display: flex;
        justify-content: center;
        align-items: start;
        flex-direction: column;
        gap: 33px;
        max-width: 577px;
        width: 100%;
    }

    .story-rating {
        display: flex;
        justify-content: start;
        align-items: center;
        gap: 7px;

        span {
            color: #21282E;
            font-size: 18px;
            font-weight: var(--font-semi-bold);
        }

        .stars {
            display: flex;
            justify-content: center;
            align-items: center;
            color: #FFB833;
            font-size: 18px;
        }
    }

    .text {
        display: flex;
        justify-content: center;
        align-items: start;
        flex-direction: column;

        h1 {
            color: #21282E;
            font-size: 36px;
            font-weight: var(--font-bold);
        }

        p {
            color: #21282E;
            font-size: 16px;
            font-weight: var(--font-regular);
        }
    }

    .story-meta {
        display: flex;
        justify-content: start;
        align-items: center;
        flex-wrap: wrap;
        column-gap: 58px;
        row-gap: 13px;
        font-family: var(--paragraph-font);

        .meta-item {
            display: flex;
            justify-content: start;
            align-items: center;
            gap: 13px;
            font-size: 18px;

            span {
                color: #5DB127;
                font-weight: var(--font-semi-bold);
            }

            strong {
                color: #222b32;
                font-weight: var(--font-bold);
            }
        }
    }

    .story-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 18px;
        flex-wrap: wrap;
        width: 100%;

        .btn-buy {
            padding: 16px 44px;
            background-color: var(--turquoise-light);
            color: #fff;
            font-size: 18px;
            font-weight: var(--font-bold);
            text-transform: uppercase;
            text-decoration: none;
            border-radius: 4px;
            transition: 0.3s ease;
            font-family: var(--body-font);

            &:hover {
                background-color: var(--turquoise-dark);
            }
        }

        .price {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 33px;
            font-family: var(--paragraph-font);

            .story-price {
                color: #EB2F27;
                font-size: 18px;
                font-weight: var(--font-bold);
            }

            .story-old-price {
                color: #505B62;
                font-size: 18px;
                font-weight: var(--font-bold);
                text-decoration: line-through;
            }
        }
    }

    .single-story-hero__video {
        position: relative;
        width: 100%;
        height: 360px;
        border: 0;
        padding: 0;
        overflow: hidden;
        cursor: pointer;
        background-color: transparent;
        box-shadow: 0px 0px 65px 0px #4A4A4A36;
        filter: grayscale(100%);
        transition: 0.45s ease;


        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            display: block;
            border-radius: 5px;
        }

        .video-play {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%) scale(0.8);
            width: 62px;
            height: 62px;
            border-radius: 3.44px;
            background-color: #6AC942;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: 0.35s ease;
            z-index: 3;
            box-shadow: 0px 0px 20px 0px #6AC942;

            i {
                color: white;
                font-size: 28px;
            }
        }

        &:hover {
            filter: grayscale(0%);
            transform: scale(1.04);

            .video-play {
                transform: translate(-50%, -50%) scale(1);
            }
        }
    }
}

/* Video Popup */

.story-video-popup {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.35s ease;
    z-index: 99999;

    &.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .story-video-popup__content {
        width: min(100%, 1000px);
        aspect-ratio: 16 / 9;
        background-color: #000;
        transform: scale(0.9);
        transition: 0.35s ease;
    }

    &.active .story-video-popup__content {
        transform: scale(1);
    }

    .story-video-popup__iframe {
        width: 100%;
        height: 100%;
        display: block;
    }

    .story-video-popup__close {
        position: absolute;
        top: 24px;
        right: 30px;
        width: 46px;
        height: 46px;
        border: 0;
        border-radius: 50%;
        background-color: #fff;
        color: #161616;
        font-size: 34px;
        line-height: 1;
        cursor: pointer;
        transition: 0.3s ease;
        z-index: 2;

        &:hover {
            background-color: var(--dark-red);
            color: white;
            transform: rotate(90deg);
        }
    }
}

body.video-popup-open {
    overflow: hidden;
}


/*=============== MAROOF GALLERY ===============*/
.maroof-gallery {
    background-color: var(--black-dark);
    padding-block: 58px 124px;
    height: auto !important;
    min-height: auto !important;
    overflow: hidden;

    .maroof-gallery__content {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: start;
        flex-direction: column;
        gap: 44px;

        h2 {
            color: white;
            font-size: 28px;
            font-weight: var(--font-bold);
        }
    }

    .maroof-gallery__grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(3, 283px);
        gap: 7px;
        width: 100%;
        height: auto;
        overflow: hidden;
    }

    .maroof-gallery__card {
        position: relative;
        overflow: hidden;
        border: 0;
        padding: 0;
        outline: none;
        cursor: pointer;
        background-color: transparent;

        &::before {
            content: "";
            position: absolute;
            inset: 0;
            background-color: rgba(0, 0, 0, 0.45);
            opacity: 0;
            visibility: hidden;
            transition: 0.35s ease;
            z-index: 2;
        }

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            display: block;
            transition: transform 0.4s ease;
        }

        .zoom-icon {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%) scale(0.7);
            width: 54px;
            height: 54px;
            border-radius: 50%;
            background-color: #fff;
            color: var(--turquoise-light);
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 24px;
            opacity: 0;
            visibility: hidden;
            transition: 0.35s ease;
            z-index: 3;
        }

        &:hover {
            &::before {
                opacity: 1;
                visibility: visible;
            }

            img {
                transform: scale(1.05);
            }

            .zoom-icon {
                opacity: 1;
                visibility: visible;
                transform: translate(-50%, -50%) scale(1);
            }
        }
    }

    .gallery-1 {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .gallery-2 {
        grid-column: 3 / 5;
        grid-row: 1 / 2;
    }

    .gallery-3 {
        grid-column: 5 / 7;
        grid-row: 1 / 2;
    }

    .gallery-4 {
        grid-column: 1 / 7;
        grid-row: 2 / 3;
    }

    .gallery-5 {
        grid-column: 1 / 4;
        grid-row: 3 / 4;
    }

    .gallery-6 {
        grid-column: 4 / 7;
        grid-row: 3 / 4;
    }
}

/* Popup img */

.image-lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.35s ease;
    z-index: 9999;

    &.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .image-lightbox__content {
        max-width: 1100px;
        width: 100%;
        max-height: 85vh;
        transform: scale(0.9);
        transition: 0.35s ease;
    }

    &.active .image-lightbox__content {
        transform: scale(1);
    }

    .image-lightbox__img {
        width: 100%;
        max-height: 85vh;
        object-fit: contain;
        display: block;
        border-radius: 12px;
    }

    .image-lightbox__close {
        position: absolute;
        top: 24px;
        right: 30px;
        width: 46px;
        height: 46px;
        border: 0;
        border-radius: 50%;
        background-color: #fff;
        color: #161616;
        font-size: 34px;
        line-height: 1;
        cursor: pointer;
        z-index: 2;
        transition: 0.3s ease;

        &:hover {
            transform: rotate(90deg);
            background-color: var(--dark-red);
            color: white;
        }
    }
}

body.lightbox-open {
    overflow: hidden;
}


/*=============== RESPONSIVE ===============*/
@media (max-width: 1200px) {

    /*===============HERO SINGLE STORY===============*/
    .single-story-hero {
        padding-block: 170px 130px;

        .single-story-hero__content {
            gap: 60px;
        }

        .single-story-hero__info {
            max-width: 520px;
            gap: 28px;
        }

        .text {
            h1 {
                font-size: 32px;
            }

            p {
                font-size: 15px;
            }
        }

        .story-meta {
            column-gap: 35px;

            .meta-item {
                font-size: 16px;
            }
        }

        .story-actions {
            .btn-buy {
                padding: 14px 34px;
                font-size: 16px;
            }

            .price {
                gap: 22px;

                .story-price,
                .story-old-price {
                    font-size: 16px;
                }
            }
        }

        .single-story-hero__video {
            height: 330px;
        }
    }

    /*===============MAROOF GALLERY===============*/
    .maroof-gallery {
        padding-block: 55px 100px;

        .maroof-gallery__grid {
            grid-template-rows: repeat(3, 250px);
        }
    }

    .image-lightbox {
        padding: 22px;

        .image-lightbox__content {
            max-width: 950px;
            max-height: 84vh;
        }

        .image-lightbox__img {
            max-height: 84vh;
        }
    }
}

@media (max-width: 991px) {

    /*===============HERO SINGLE STORY===============*/
    .single-story-hero {
        padding-block: 130px 90px;

        .single-story-hero__content {
            grid-template-columns: 1fr;
            gap: 22px;
        }

        .single-story-hero__info {
            max-width: 100%;
            width: 100%;
            order: 2;
        }

        .text {
            h1 {
                font-size: 32px;
            }

            p {
                max-width: 830px;
            }
        }

        .story-actions {
            gap: 28px;
        }

        .single-story-hero__video {
            height: 400px;
            order: 1;
        }
    }

    .story-video-popup {
        .story-video-popup__content {
            width: min(100%, 850px);
        }
    }

    /*===============MAROOF GALLERY===============*/
    .maroof-gallery {
        padding-block: 50px 80px;

        .maroof-gallery__content {
            gap: 32px;

            h2 {
                font-size: 26px;
            }
        }

        .maroof-gallery__grid {
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: none;
            gap: 7px;
        }

        .maroof-gallery__card {
            grid-column: auto !important;
            grid-row: auto !important;
            height: 240px;
        }

        .gallery-4 {
            grid-column: 1 / 3 !important;
            height: 280px;
        }
    }

    .image-lightbox {
        padding: 20px;

        .image-lightbox__content {
            max-width: 850px;
            max-height: 82vh;
        }

        .image-lightbox__img {
            max-height: 82vh;
            border-radius: 10px;
        }

        .image-lightbox__close {
            top: 20px;
            right: 20px;
            width: 42px;
            height: 42px;
            font-size: 30px;
        }
    }
}

@media (max-width: 768px) {

    /*===============HERO SINGLE STORY===============*/
    .single-story-hero {
        padding-block: 100px 70px;

        .single-story-hero__content {
            gap: 42px;
        }

        .single-story-hero__info {
            gap: 24px;
        }


        .text {
            h1 {
                font-size: 28px;
                line-height: 1.25;
            }

            p {
                line-height: 1.7;
            }
        }

        .story-meta {
            column-gap: 33px;
            row-gap: 12px;
        }

        .story-actions {
            .btn-buy {
                padding: 12px 60px;
                font-size: 20px;
            }

            .price {
                gap: 33px;

                .story-price,
                .story-old-price {
                    font-size: 18px;
                }
            }
        }

        .single-story-hero__video {
            height: 360px;

            .video-play {
                width: 62px;
                height: 62px;

                i {
                    font-size: 26px;
                }
            }
        }
    }

    .story-video-popup {
        padding: 18px;

        .story-video-popup__close {
            top: 18px;
            right: 18px;
            width: 42px;
            height: 42px;
            font-size: 30px;
        }

        .story-video-popup__content {
            width: 100%;
        }
    }

    /*===============MAROOF GALLERY===============*/
    .maroof-gallery {
        padding-block: 58px 76px;

        .maroof-gallery__content {
            h2 {
                font-size: 28px;
            }
        }

        .maroof-gallery__card {
            height: 283px;
        }

        .gallery-4 {
            height: 283px;
        }
    }

    .image-lightbox {
        padding: 18px;

        .image-lightbox__close {
            top: 18px;
            right: 18px;
            width: 42px;
            height: 42px;
            font-size: 30px;
        }

        .image-lightbox__img {
            border-radius: 10px;
        }
    }
}

@media (max-width: 576px) {

    /*===============HERO SINGLE STORY===============*/
    .single-story-hero {
        padding-block: 95px 57px;

        .single-story-hero__content {
            gap: 22px;
        }

        .single-story-hero__info {
            gap: 13px;
        }

        .story-rating {
            gap: 5px;

            span {
                font-size: 14px;
            }

            .stars {
                font-size: 15px;
            }
        }

        .text {
            h1 {
                font-size: 22px;
            }

            p {
                font-size: 14px;
                line-height: 1.7;
            }
        }

        .story-meta {

            .meta-item {
                font-size: 12px;
            }
        }

        .story-actions {
            flex-direction: column-reverse;
            align-items: flex-start;
            gap: 21px;

            .btn-buy {
                width: 100%;
                padding: 14px 24px;
                font-size: 20px;
            }

            .price {
                width: 100%;
                justify-content: start;
                gap: 34px;

                .story-price,
                .story-old-price {
                    font-size: 16px;
                }
            }
        }

        .single-story-hero__video {
            height: 215px;

            &:hover {
                transform: scale(1.02);
            }

            .video-play {
                width: 45px;
                height: 45px;

                i {
                    font-size: 22px;
                }
            }
        }
    }

    .story-video-popup {
        padding: 14px;

        .story-video-popup__close {
            top: 14px;
            right: 14px;
            width: 38px;
            height: 38px;
            font-size: 28px;
        }

        .story-video-popup__content {
            width: 100%;
            aspect-ratio: 16 / 9;
        }
    }

    /*===============MAROOF GALLERY===============*/
    .maroof-gallery {
        padding-block: 58px 35px;

        .maroof-gallery__content {
            gap: 24px;

            h2 {
                font-size: 24px;
                text-align: center;
                line-height: 1.3;
            }
        }

        /* .maroof-gallery__grid {
            grid-template-columns: 1fr;
        } */

        .maroof-gallery__card,
        .gallery-4 {
            /* grid-column: auto !important; */
            height: 187px;
        }

        .maroof-gallery__card {
            .zoom-icon {
                width: 46px;
                height: 46px;
                font-size: 32px;
            }
        }
    }

    .image-lightbox {
        padding: 14px;

        .image-lightbox__content {
            max-width: 100%;
            max-height: 78vh;
        }

        .image-lightbox__img {
            max-height: 78vh;
            border-radius: 6px;
        }

        .image-lightbox__close {
            top: 14px;
            right: 14px;
            width: 36px;
            height: 36px;
            font-size: 26px;
        }
    }

    .section {
        padding-inline: 1rem;
    }
}