/* PVControl project galleries – desktop, tablet and mobile. */
body.pvctl-project-galleries {
    --pvctl-gallery-gold: #d8a200;
    --pvctl-gallery-dark: #171920;
    --pvctl-gallery-border: rgba(23, 25, 32, 0.09);
    --pvctl-gallery-shadow: 0 14px 38px rgba(23, 25, 32, 0.09);
    --pvctl-gallery-radius: 14px;
    --pvctl-gallery-height: 410px;
}

/* Each project becomes a clean, visually separated card. */
body.pvctl-project-galleries .pvctl-project-row > .elementor-container,
body.pvctl-project-galleries .pvctl-project-row > .e-con-inner {
    position: relative;
    align-items: center;
    padding: 24px !important;
    border: 1px solid var(--pvctl-gallery-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(23, 25, 32, 0.055);
    overflow: hidden;
}

body.pvctl-project-galleries .pvctl-project-row > .elementor-container::before,
body.pvctl-project-galleries .pvctl-project-row > .e-con-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 3px;
    background: var(--pvctl-gallery-gold);
}

body.pvctl-project-galleries .pvctl-project-row {
    margin-top: 46px !important;
    margin-bottom: 0 !important;
}

body.pvctl-project-galleries .pvctl-project-row:first-of-type {
    margin-top: 54px !important;
}

/* Carousel shell. */
body.pvctl-project-galleries .elementor-widget-image-carousel,
body.pvctl-project-galleries .elementor-widget-gallery,
body.pvctl-project-galleries .elementor-widget-image-gallery {
    width: 100%;
    margin-bottom: 0 !important;
}

body.pvctl-project-galleries .elementor-widget-image-carousel .elementor-widget-container,
body.pvctl-project-galleries .elementor-widget-gallery .elementor-widget-container,
body.pvctl-project-galleries .elementor-widget-image-gallery .elementor-widget-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--pvctl-gallery-radius);
    background: #eef0f2;
    box-shadow: var(--pvctl-gallery-shadow);
}

body.pvctl-project-galleries .elementor-widget-image-carousel .swiper,
body.pvctl-project-galleries .elementor-widget-image-carousel .swiper-container,
body.pvctl-project-galleries .elementor-widget-image-carousel .elementor-image-carousel-wrapper,
body.pvctl-project-galleries .elementor-widget-image-carousel .elementor-image-carousel,
body.pvctl-project-galleries .elementor-widget-image-carousel .swiper-wrapper,
body.pvctl-project-galleries .elementor-widget-image-carousel .swiper-slide,
body.pvctl-project-galleries .elementor-widget-image-carousel .swiper-slide-inner,
body.pvctl-project-galleries .elementor-widget-image-carousel figure,
body.pvctl-project-galleries .elementor-widget-image-carousel a {
    height: var(--pvctl-gallery-height) !important;
    min-height: var(--pvctl-gallery-height) !important;
}

body.pvctl-project-galleries .elementor-widget-image-carousel .swiper-slide {
    overflow: hidden;
    background: #eef0f2;
}

body.pvctl-project-galleries .elementor-widget-image-carousel figure {
    width: 100%;
    margin: 0 !important;
}

body.pvctl-project-galleries .elementor-widget-image-carousel img,
body.pvctl-project-galleries .elementor-widget-gallery img,
body.pvctl-project-galleries .elementor-widget-image-gallery img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 0 !important;
    transform: scale(1.001);
    transition: transform 0.45s ease, filter 0.35s ease;
}

body.pvctl-project-galleries .elementor-widget-image-carousel:hover img,
body.pvctl-project-galleries .elementor-widget-gallery a:hover img,
body.pvctl-project-galleries .elementor-widget-image-gallery a:hover img {
    transform: scale(1.035);
    filter: contrast(1.02) saturate(1.03);
}

/* Elementor gallery grid – all thumbnails share the same ratio. */
body.pvctl-project-galleries .elementor-gallery__container,
body.pvctl-project-galleries .gallery,
body.pvctl-project-galleries .elementor-image-gallery .gallery {
    gap: 12px !important;
}

body.pvctl-project-galleries .elementor-gallery-item,
body.pvctl-project-galleries .gallery-item,
body.pvctl-project-galleries .elementor-image-gallery .gallery-item {
    position: relative;
    min-height: 220px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #eef0f2;
}

body.pvctl-project-galleries .elementor-gallery-item__image,
body.pvctl-project-galleries .gallery-item a,
body.pvctl-project-galleries .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Elegant carousel controls. */
body.pvctl-project-galleries .elementor-swiper-button,
body.pvctl-project-galleries .swiper-button-prev,
body.pvctl-project-galleries .swiper-button-next {
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(23, 25, 32, 0.82) !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(5px);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

body.pvctl-project-galleries .elementor-swiper-button:hover,
body.pvctl-project-galleries .swiper-button-prev:hover,
body.pvctl-project-galleries .swiper-button-next:hover {
    background: var(--pvctl-gallery-gold) !important;
    color: var(--pvctl-gallery-dark) !important;
    transform: translateY(-50%) scale(1.06);
}

body.pvctl-project-galleries .elementor-swiper-button svg,
body.pvctl-project-galleries .elementor-swiper-button i {
    width: 15px;
    height: 15px;
    font-size: 15px;
}

body.pvctl-project-galleries .swiper-pagination {
    bottom: 12px !important;
}

body.pvctl-project-galleries .swiper-pagination-bullet {
    width: 7px !important;
    height: 7px !important;
    background: #fff !important;
    opacity: 0.65 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

body.pvctl-project-galleries .swiper-pagination-bullet-active {
    width: 20px !important;
    border-radius: 99px !important;
    background: var(--pvctl-gallery-gold) !important;
    opacity: 1 !important;
}

/* Project headings and text spacing. */
body.pvctl-project-galleries .pvctl-project-row .elementor-widget-heading .elementor-heading-title {
    margin: 0;
    line-height: 1.05;
}

body.pvctl-project-galleries .pvctl-project-row .elementor-widget-text-editor:last-child p:last-child {
    margin-bottom: 0;
}

/* Tablet. */
@media (max-width: 1024px) {
    body.pvctl-project-galleries {
        --pvctl-gallery-height: 350px;
    }

    body.pvctl-project-galleries .pvctl-project-row > .elementor-container,
    body.pvctl-project-galleries .pvctl-project-row > .e-con-inner {
        padding: 20px !important;
    }

    body.pvctl-project-galleries .pvctl-project-row {
        margin-top: 34px !important;
    }
}

/* Mobile: title first, full-width gallery below it. */
@media (max-width: 767px) {
    body.pvctl-project-galleries {
        --pvctl-gallery-height: 250px;
        --pvctl-gallery-radius: 11px;
    }

    body.pvctl-project-galleries .pvctl-project-row {
        margin-top: 22px !important;
        padding-right: 14px !important;
        padding-left: 14px !important;
    }

    body.pvctl-project-galleries .pvctl-project-row:first-of-type {
        margin-top: 30px !important;
    }

    body.pvctl-project-galleries .pvctl-project-row > .elementor-container,
    body.pvctl-project-galleries .pvctl-project-row > .e-con-inner {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 16px;
        padding: 16px !important;
        border-radius: 14px;
    }

    body.pvctl-project-galleries .pvctl-project-row > .elementor-container > .elementor-column,
    body.pvctl-project-galleries .pvctl-project-row > .e-con-inner > .e-con,
    body.pvctl-project-galleries .pvctl-project-row .elementor-column {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    body.pvctl-project-galleries .pvctl-project-row .elementor-widget-heading .elementor-heading-title {
        font-size: 27px !important;
        line-height: 1.08 !important;
    }

    body.pvctl-project-galleries .elementor-widget-image-carousel .elementor-widget-container {
        box-shadow: 0 9px 24px rgba(23, 25, 32, 0.11);
    }

    body.pvctl-project-galleries .elementor-swiper-button,
    body.pvctl-project-galleries .swiper-button-prev,
    body.pvctl-project-galleries .swiper-button-next {
        width: 36px !important;
        height: 36px !important;
    }

    body.pvctl-project-galleries .elementor-swiper-button-prev,
    body.pvctl-project-galleries .swiper-button-prev {
        left: 8px !important;
    }

    body.pvctl-project-galleries .elementor-swiper-button-next,
    body.pvctl-project-galleries .swiper-button-next {
        right: 8px !important;
    }

    body.pvctl-project-galleries .elementor-gallery__container,
    body.pvctl-project-galleries .gallery,
    body.pvctl-project-galleries .elementor-image-gallery .gallery {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    body.pvctl-project-galleries .elementor-gallery-item,
    body.pvctl-project-galleries .gallery-item,
    body.pvctl-project-galleries .elementor-image-gallery .gallery-item {
        width: 100% !important;
        min-height: 145px;
        margin: 0 !important;
    }
}

@media (max-width: 420px) {
    body.pvctl-project-galleries {
        --pvctl-gallery-height: 225px;
    }

    body.pvctl-project-galleries .elementor-gallery__container,
    body.pvctl-project-galleries .gallery,
    body.pvctl-project-galleries .elementor-image-gallery .gallery {
        grid-template-columns: 1fr !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.pvctl-project-galleries * {
        transition: none !important;
        animation-duration: 0.01ms !important;
    }
}
