
/* Fix Elementor PRO initialized*/

.wpcode-block-image-widget .swiper-container:not(.swiper-container-initialized)>.swiper-wrapper{
    overflow: visible;
}


/* WPCode Block Image Widget Base Styles */
.wpcode-block-image-widget {
    width: 100%;
    position: relative;
}

/* Layout types */
.wpcode-block-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.wpcode-block-image-widget .swiper-container{
    overflow: hidden;
}

.wpcode-layout-horizontal .wpcode-block-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}



.wpcode-layout-horizontal .wpcode-block-image img {
    width: 100%;
    height: auto;
    display: block;
}

.wpcode-layout-horizontal .wpcode-block-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 48%;
}

.wpcode-layout-horizontal.wpcode-reverse-yes .wpcode-block-content {
    flex-direction: row-reverse;
}

/* Zig Zag Layout - Individual block reverse */
.wpcode-layout-horizontal .wpcode-block-content.wpcode-block-reversed {
    flex-direction: row-reverse;
}

/* Handle case when global reverse is enabled but individual block is also reversed */
.wpcode-layout-horizontal.wpcode-reverse-yes .wpcode-block-content.wpcode-block-reversed {
    flex-direction: row; /* Reset to normal when both global and individual are reversed */
}

.wpcode-layout-vertical .wpcode-block-content {
    flex-direction: column;
    gap: 30px;
}

.wpcode-layout-vertical .wpcode-block-content > * {
    width: 100%;
}

/* Content containers */
.wpcode-block-image-widget .wpcode-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Image styles */
.wpcode-block-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.wpcode-layout-horizontal .wpcode-block-image {
    max-width: 50%;
}



.wpcode-block-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Horizontal layout styles */
.wpcode-block-horizontal {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
    flex-wrap: nowrap;
}

.wpcode-block-horizontal .wpcode-block-media-side {
    position: relative;
    width: 50%;
    min-width: 0;
}

.wpcode-block-horizontal .wpcode-block-text-side {
    width: 50%;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
}

.wpcode-block-horizontal .wpcode-block-media {
    width: 100%;
    position: relative;
}

.wpcode-block-horizontal .wpcode-block-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Fix for image container size */
.wpcode-block-horizontal .wpcode-block-media-side .wpcode-media-wrapper {
    width: 100%;
    display: block;
    line-height: 0;
    font-size: 0;
}

.wpcode-block-horizontal .wpcode-block-media-side .wpcode-media-link {
    display: block;
    width: 100%;
    line-height: 0;
    text-decoration: none;
}

/* Video overlay for horizontal layout */
.wpcode-block-horizontal .wpcode-block-media-side .wpcode-video-overlay,
.wpcode-block-horizontal .wpcode-block-media-side .wpcode-wp-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
    cursor: pointer;
}

.wpcode-block-horizontal .wpcode-block-media-side .wpcode-video-overlay:hover,
.wpcode-block-horizontal .wpcode-block-media-side .wpcode-wp-video-overlay:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Vertical layout styles */
.wpcode-block-vertical .wpcode-block-image {
    width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Стили для модального окна видео */
.wpcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpcode-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.wpcode-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.wpcode-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.wpcode-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.wpcode-video-container iframe,
.wpcode-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsive styles for horizontal layout */
@media screen and (max-width: 767px) {
    .wpcode-block-horizontal {
        flex-direction: column;
        gap: 20px;
    }

    .wpcode-block-horizontal .wpcode-block-media-side,
    .wpcode-block-horizontal .wpcode-block-text-side {
        width: 100% !important;
    }

    .wpcode-block-horizontal .wpcode-block-text-side {
        padding: 20px 0 0 0 !important;
    }
}

/* Image width types */
.wpcode-image-width-auto .wpcode-block-image {
    width: auto;
}

.wpcode-image-width-auto .wpcode-block-image img {
    width: auto;
}

.wpcode-image-width-full .wpcode-block-image {
    width: 100%;
}

.wpcode-image-width-full .wpcode-block-image img {
    width: 100%;
}

/* Text Alignment */
.wpcode-block-text {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.wpcode-block-title,
.wpcode-block-description {
    width: 100%;
    margin: 0;
}

.wpcode-block-title {
    font-size: 24px;
    line-height: 1.3;
}

.wpcode-block-description {
    line-height: 1.6;
}

.wpcode-block-button-wrapper {
    width: 100%;
    display: flex;
}

.wpcode-block-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: #007cba;
    color: #ffffff;
}

.wpcode-button-width-auto .wpcode-block-button {
    width: auto;
}

.wpcode-button-width-full .wpcode-block-button {
    width: 100%;
}

.wpcode-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.wpcode-button-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.wpcode-block-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #ffffff;
}

/* Slider styles */
.wpcode-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wpcode-slider .swiper-container {
    width: 100%;
    overflow: visible;
}

.wpcode-slider .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.wpcode-slider .swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
}

/* Ensure all slides have equal width based on slidesPerView */
.wpcode-slider[data-slides="1"] .swiper-slide {
    width: 100%;
}

.wpcode-slider[data-slides="2"] .swiper-slide {
    width: 50%;
}

.wpcode-slider[data-slides="3"] .swiper-slide {
    width: 33.333%;
}

.wpcode-slider[data-slides="4"] .swiper-slide {
    width: 25%;
}

.wpcode-slider[data-slides="5"] .swiper-slide {
    width: 20%;
}

/* Navigation buttons */
.wpcode-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 10;
    pointer-events: none;
}

.wpcode-slider-nav.outside {
    width: calc(100% + 60px);
    left: -30px;
}

.wpcode-slider-prev,
.wpcode-slider-next {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.wpcode-slider-prev {
    left: 10px;
}

.wpcode-slider-next {
    right: 10px;
}

.wpcode-slider-nav.outside .wpcode-slider-prev {
    left: 30px;
}

.wpcode-slider-nav.outside .wpcode-slider-next {
    right: 30px;
}


/* Pagination */
.wpcode-slider-pagination {
    position: relative;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.wpcode-slider-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpcode-slider-pagination .swiper-pagination-bullet-active {
    background: #000;
    transform: scale(1.2);
}

/* Fade effect */
.wpcode-slider .swiper-fade .swiper-slide {
    opacity: 0 !important;
    transition: opacity 0.3s ease;
}

.wpcode-slider .swiper-fade .swiper-slide-active {
    opacity: 1 !important;
}

/* Cube effect */
.wpcode-slider .swiper-cube .swiper-cube-shadow {
    background: rgba(0, 0, 0, 0.15);
}

/* Coverflow effect */
.wpcode-slider .swiper-coverflow {
    padding: 30px 0;
}

.wpcode-slider .swiper-coverflow .swiper-slide {
    transition: transform 0.3s ease;
}

/* Navigation container */
.wpcode-slider-nav {
    position: absolute;
    width: 100%;
    height: 0;
    z-index: 10;
}

/* Default position */
.wpcode-slider-nav.default {
    top: 50%;
    transform: translateY(-50%);
}

.wpcode-slider-nav.default .wpcode-slider-prev {
    left: 10px;
}

.wpcode-slider-nav.default .wpcode-slider-next {
    right: 10px;
}

/* Inside position */
.wpcode-slider-nav.inside {
    top: 50%;
    transform: translateY(-50%);
}

.wpcode-slider-nav.inside .wpcode-slider-prev {
    left: 20px;
}

.wpcode-slider-nav.inside .wpcode-slider-next {
    right: 20px;
}

/* Outside position */
.wpcode-slider-nav.outside {
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% + 80px);
    left: -40px;
    transition: all 0.3s ease;
}

.wpcode-slider-nav.outside .wpcode-slider-prev {
    left: 0;
    transition: all 0.3s ease;
}

.wpcode-slider-nav.outside .wpcode-slider-next {
    right: 0;
    transition: all 0.3s ease;
}

/* Top position */
.wpcode-slider-nav.top {
    top: 0;
    transform: translateY(-100%);
    margin-top: -20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    height: auto;
    padding-right: 0;
    transition: padding 0.3s ease;
}

/* Bottom position */
.wpcode-slider-nav.bottom {
    bottom: 0;
    transform: translateY(100%);
    margin-bottom: -20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    height: auto;
    padding-right: 0;
    transition: padding 0.3s ease;
}

/* Navigation buttons */
.wpcode-slider-prev,
.wpcode-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-width: 1px;
    border-style: solid;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #000;
    padding: 0;
}

/* Reset position for top/bottom navigation */
.wpcode-slider-nav.top .wpcode-slider-prev,
.wpcode-slider-nav.top .wpcode-slider-next,
.wpcode-slider-nav.bottom .wpcode-slider-prev,
.wpcode-slider-nav.bottom .wpcode-slider-next {
    position: relative;
    top: auto;
    transform: none;
    margin: 0;
}

/* Default arrow positions */
.wpcode-slider-prev {
    left: 10px;
}

.wpcode-slider-next {
    right: 10px;
}

/* Outside arrow positions */
.wpcode-slider-nav.outside .wpcode-slider-prev {
    left: 0;
}

.wpcode-slider-nav.outside .wpcode-slider-next {
    right: 0;
}

/* Pagination styles */
.wpcode-slider-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    bottom: 4px !important;
}

/* Bullets pagination */
.wpcode-slider-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 4px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Fraction pagination */
.wpcode-slider-pagination.swiper-pagination-fraction {
    font-size: 14px;
    font-weight: 500;
}

.wpcode-slider-pagination.swiper-pagination-fraction .swiper-pagination-current {
    font-weight: 700;
}

/* Progress bar pagination */
.wpcode-slider-pagination.swiper-pagination-progressbar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wpcode-slider-pagination.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    transform-origin: left top;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* Custom pagination */
.wpcode-slider-pagination.swiper-pagination-custom {
    display: flex;
    gap: 10px;
}

.wpcode-slider-pagination.swiper-pagination-custom .swiper-pagination-bullet {
    width: 30px;
    height: 5px;
    border-radius: 2.5px;
}

/* Video styles */
.wpcode-block-media {
    position: relative;
}

.wpcode-block-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.wpcode-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.wpcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.9);
    z-index: 999999;
    display: none;
}

.wpcode-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 90%;
    max-width: 1200px;
}

.wpcode-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.wpcode-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .wpcode-modal-content {
        width: 95%;
    }
    
    .wpcode-modal-close {
        top: -40px;
        right: 0;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
    
    .wpcode-play-icon {
        width: 48px;
        height: 34px;
    }
}

@media screen and (max-width: 767px) {
    .wpcode-block-horizontal {
        flex-direction: column;
        gap: 20px;
    }

    .wpcode-block-horizontal .wpcode-block-media-side,
    .wpcode-block-horizontal .wpcode-block-text-side {
        width: 100% !important;
    }

    .wpcode-block-horizontal .wpcode-block-text-side {
        padding: 20px 0 0 0 !important;
    }
}

@media screen and (max-width: 1024px) {
    .wpcode-slider[data-slides="4"] .swiper-slide,
    .wpcode-slider[data-slides="5"] .swiper-slide {
        width: 33.333%;
    }
}

@media screen and (max-width: 768px) {
    .wpcode-slider[data-slides="3"] .swiper-slide,
    .wpcode-slider[data-slides="4"] .swiper-slide,
    .wpcode-slider[data-slides="5"] .swiper-slide {
        width: 50%;
    }
    
    .wpcode-slider-nav.outside {
        width: 100%;
        left: 0;
    }
    
    .wpcode-slider-nav.outside .wpcode-slider-prev {
        left: 10px;
    }
    
    .wpcode-slider-nav.outside .wpcode-slider-next {
        right: 10px;
    }
}

@media screen and (max-width: 480px) {
    .wpcode-slider[data-slides] .swiper-slide {
        width: 100%;
    }
}

@media screen and (max-width: 767px) {
    .wpcode-block-button {
        width: 100%;
        justify-content: center;
    }

    .wpcode-slider-pagination .swiper-pagination-bullet {
        width: 6px;
        height: 6px;
        margin: 0 3px;
    }

    .wpcode-slider-pagination.swiper-pagination-custom .swiper-pagination-bullet {
        width: 20px;
        height: 4px;
    }

    .wpcode-slider-pagination.swiper-pagination-fraction {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .wpcode-layout-horizontal .wpcode-block-content,
    .wpcode-layout-horizontal .wpcode-block-content.wpcode-block-reversed,
    .wpcode-layout-horizontal.wpcode-reverse-yes .wpcode-block-content,
    .wpcode-layout-horizontal.wpcode-reverse-yes .wpcode-block-content.wpcode-block-reversed {
        flex-direction: column;
    }

    .wpcode-layout-horizontal .wpcode-block-image {
        max-width: 100%;
        width: 100%;
    }

    .wpcode-slider-prev {
        left: -15px;
    }

    .wpcode-slider-next {
        right: -15px;
    }

    .wpcode-slider-prev,
    .wpcode-slider-next {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

@media screen and (max-width: 767px) {
    .wpcode-slider-nav.outside {
        width: 100%;
        left: 0;
    }

    .wpcode-slider-nav.outside .wpcode-slider-prev {
        left: 10px;
    }

    .wpcode-slider-nav.outside .wpcode-slider-next {
        right: 10px;
    }

    .wpcode-slider-nav.top,
    .wpcode-slider-nav.bottom {
        padding-right: 10px;
    }
}

@media screen and (max-width: 767px) {
    .wpcode-layout-horizontal .wpcode-block-content {
        flex-direction: column;
    }

    .wpcode-layout-horizontal .wpcode-block-image,
    .wpcode-layout-horizontal .wpcode-block-text {
        width: 100%;
    }

    .wpcode-layout-horizontal.wpcode-reverse-yes .wpcode-block-content {
        flex-direction: column;
    }
}

@media screen and (max-width: 767px) {
    .wpcode-play-button {
        width: 48px;
        height: 34px;
    }

    .wpcode-modal-content {
        width: 95%;
    }

    .wpcode-modal-close {
        top: -40px;
        font-size: 32px;
    }
}

/* Video Overlay Styles */
.wpcode-block-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}



.wpcode-block-video-overlay:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

.wpcode-block-media {
    position: relative;
    overflow: hidden;
}

/* Video Play Icon Styles */
.wpcode-play-icon {
    width: 68px;
    height: 48px;
    z-index: 1;
    transition: transform 0.3s ease;
}

.wpcode-play-button {
    width: 100%;
    height: 100%;
}

.wpcode-play-icon-svg {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.wpcode-play-button-bg {
    fill: red;
    transition: transform 0.3s ease;
}

.wpcode-play-button-icon {
    fill: #ffffff;
}

.wpcode-block-video-overlay{
    transition: transform 0.3s ease;
}

.wpcode-block-video-overlay:hover{
    transform: scale(1.2);
}

/* Modal Styles */
.wpcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: none;
}

.wpcode-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
}

.wpcode-modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

.wpcode-modal-close:hover,
.wpcode-modal-close:focus {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.8);
    outline: none;
}

.wpcode-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.wpcode-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .wpcode-modal-content {
        width: 95%;
    }
    
    .wpcode-modal-close {
        top: -40px;
        right: 0;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
    
    .wpcode-play-icon {
        width: 48px;
        height: 34px;
    }
}
