/* Estilos globales */
body {
    overflow-x: hidden !important;
    background-color: #081A29 !important;
}
.premium-hscroll-temp, section, .e-con-full {
/*     height: 100% !important;
    padding: 0 !important; */
}

/* Estilos para móvil */
@media screen and (max-width: 767px) {
    .elementor-loop-container.elementor-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: scroll !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x proximity !important;
        scroll-behavior: smooth !important;
        gap: 2rem !important;
        white-space: nowrap !important;
        -ms-overflow-style: none !important;
        /* scrollbar-width: none !important; */
        height: 100% !important;
        margin-top: 8.7vh !important;
    }

    .elementor-loop-container.elementor-grid .e-loop-item:first-of-type {
        margin-left: 3rem !important;
    }
    .elementor-loop-container.elementor-grid .e-loop-item:last-of-type {
        margin-right: 1.8rem !important;
    }

     .elementor-loop-container.elementor-grid::-webkit-scrollbar {
        display: none !important;
    }

     .elementor-loop-container.elementor-grid .e-loop-item {
        flex: 0 0 auto !important;
        width: 76% !important;
        min-width: 76% !important;
        scroll-snap-align: center !important;
        white-space: normal !important;
        padding: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
    }

     /* .elementor-loop-container.elementor-grid .e-loop-item:first-child::div {
        padding: 1rem !important;
    } */

    .elementor-loop-container.elementor-grid .e-loop-item .elementor-widget-container img {
        width: 100% !important;
        height: 51.1vh !important;
        border-radius: 8px;
    }
    .elementor-loop-container.elementor-grid .e-loop-item .elementor-page-title {
        margin-top: 0px;
    }
}

/* Estilos para tabletas */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .elementor-loop-container.elementor-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: scroll !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x proximity !important;
        scroll-behavior: smooth !important;
        gap: 0 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        -ms-overflow-style: none !important;
        /* scrollbar-width: none !important; */
        height: 100% !important;
        margin-top: 14vh !important;
        margin-left: -15px !important;
    }

    .elementor-loop-container.elementor-grid::-webkit-scrollbar {
        display: none !important;
    }

    .elementor-loop-container.elementor-grid .e-loop-item {
        flex: 0 0 auto !important;
        width: 48% !important;
        min-width: 48% !important;
        scroll-snap-align: center !important;
        margin: 0 !important;
        white-space: normal !important;
        padding: 1rem !important;
    }

     .elementor-loop-container.elementor-grid .e-loop-item {
        display: flex !important;
        flex-direction: column !important;
    }

    .elementor-loop-container.elementor-grid .e-loop-item:first-child::div {
        padding: 1rem !important;
    }

    .elementor-loop-container.elementor-grid .e-loop-item .elementor-widget-container img {
        width: 93% !important;
        height: 73vh !important;
        border-radius: 8px;
    }
}

/* Estilos para escritorio */
@media screen and (min-width: 1025px) {
/*     .elementor-widget-container {
        display: flex;
        justify-content: center;
        width: 100%;
    } */

    .elementor-loop-container.elementor-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x proximity !important;
        scroll-behavior: smooth !important;
        gap: 2.5rem !important;
        margin: 0 !important;
        white-space: nowrap !important;
        -ms-overflow-style: none !important;
        /* scrollbar-width: none !important; */
        height: 100% !important;
        padding: 0 2rem !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .elementor-loop-container.elementor-grid::-webkit-scrollbar {
        display: none !important;
    }

    .elementor-loop-container.elementor-grid .e-loop-item {
        flex: 0 0 auto !important;
        width: 27% !important;
        min-width: 27% !important;
        scroll-snap-align: center !important;
        margin: 0 !important;
        white-space: normal !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
        /* margin-top: 3.5vh !important; */
    }

    /* Ajuste para más de 3 cards */
    .elementor-loop-container.elementor-grid:has(.e-loop-item:nth-child(4)) {
        justify-content: flex-start !important;
    }

    .elementor-loop-container.elementor-grid .e-loop-item {
        display: flex !important;
        flex-direction: column !important;
        
    }

    .elementor-loop-container.elementor-grid .e-loop-item:first-child {
        margin-left: 0 !important;
    }

    .elementor-loop-container.elementor-grid .e-loop-item:last-child {
        margin-right: 2rem !important;
    }

    .elementor-loop-container.elementor-grid .e-loop-item .elementor-widget-container img {
        width: 100% !important;
        height: 65vh !important;
        border-radius: 8px;
    }

    .elementor-loop-container.elementor-grid .e-loop-item .elementor-widget-container .elementor-heading-title {
        font-size: 1.3rem !important;
    }
}
/* =============================================== */



/* =============================================== */
/* Estilos específicos para cards de portfolio */
/* =============================================== */
@media screen and (max-width: 1024px) {
    .elementor-366,
    .elementor-2467,.elementor-162 {
        width: 100% !important;
        /* overflow: hidden !important; */
        padding: 0 40px !important;
        box-sizing: border-box !important;
        position: relative !important;
        min-height: calc(100vh - 8vh) !important;
        margin-top: 8vh !important;
    }

    .elementor-366 .e-con,
    .elementor-2467 .e-con,.elementor-162 .e-con {
        width: 100% !important;
        /* overflow: hidden !important; */
        padding: 0 !important;
        margin: 0;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 2rem;
        padding: 15px 0;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        scroll-padding-left: calc(33% - 30%);
        scroll-padding-right: calc(33% - 30% + 60px);
        justify-content: flex-start;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .elementor-element.elementor-widget-image-box {
        width: 100% !important;
        padding: 0 5px;
        box-sizing: border-box;
        scroll-snap-align: center;
        flex-shrink: 0;
        transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
        will-change: transform;
    }

    .elementor-element.elementor-widget-image-box:first-child {
        margin-left: calc(33% - 30%);
        padding-left: 0;
    }

    .elementor-element.elementor-widget-image-box:last-child {
        padding-right: 0;
        margin-right: calc(33% - 30% + 60px);
    }

    .elementor-element.elementor-widget-image-box .elementor-widget-container {
        width: 100%;
        height: 100%;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        height: 100%;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-img {
        width: 100%;
        margin-bottom: 15px;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-img img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-content {
        width: 100%;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-title {
        margin: 0;
        font-size: 1.3rem !important;
        line-height: 1.2;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-title a {
        color: inherit;
        text-decoration: none;
    }

    /* Ajustes para el scroll horizontal */
    .elementor-366 .e-con::-webkit-scrollbar, .elementor-2467 .e-con::-webkit-scrollbar, .elementor-162 .e-con::-webkit-scrollbar {
        display: none;
    }

    .elementor-366 .e-con, .elementor-2467 .e-con, .elementor-162 .e-con {
        -ms-overflow-style: none;
        /* scrollbar-width: none; */
    }

    /* Forzar scroll al inicio */
    .elementor-366 .e-con, .elementor-2467 .e-con, .elementor-162 .e-con {
        scroll-behavior: auto;
        scroll-left: 0;
    }
}

/* Media queries para responsive */
@media (max-width: 1024px) {
    .elementor-element.elementor-widget-image-box {
        flex: 0 0 60%;
        max-width: 60%;
    }
}

@media (max-width: 767px) {
    .elementor-element.elementor-widget-image-box {
        flex: 0 0 75%;
        max-width: 75%;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-title {
        font-size: 18px;
    }
}

/* Estilos específicos para cards de portfolio en escritorio */
@media screen and (min-width: 1025px) {
    .elementor-366,
    .elementor-2467,
    .elementor-162 {
        width: 100% !important;
        overflow: visible !important;
        padding: 0 0 0 40px !important;
        box-sizing: border-box !important;
        position: relative !important;
    }

    .elementor-366 .e-con,
    .elementor-2467 .e-con,
    .elementor-162 .e-con {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 !important;
        margin: 0;
        display: flex;
        flex-direction: row;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x proximity !important;
        scroll-behavior: smooth !important;
        gap: 2rem !important;
        padding: 15px 0;
        margin: 0;
        box-sizing: border-box !important;
        justify-content: center !important;
        position: relative !important;
        white-space: nowrap !important;
    }

    .elementor-162 .e-con::-webkit-scrollbar {
        display: none !important;
    }

    .elementor-162 .e-con {
        -ms-overflow-style: none !important;
        /* scrollbar-width: none !important; */
    }

    .elementor-element.elementor-widget-image-box {
        width: 27% !important;
        min-width: 27% !important;
        padding: 0 5px;
        box-sizing: border-box;
        scroll-snap-align: center !important;
        flex-shrink: 0;
        transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
        will-change: transform;
        white-space: normal !important;
    }

    /* Ajuste para más de 3 cards */
    .elementor-366 .e-con:has(.elementor-widget-image-box:nth-child(4)),
    .elementor-2467 .e-con:has(.elementor-widget-image-box:nth-child(4)),
    .elementor-162 .e-con:has(.elementor-widget-image-box:nth-child(4)) {
        justify-content: flex-start !important;
    }

    .elementor-element.elementor-widget-image-box:first-child {
        margin-left: 0 !important;
    }

    .elementor-element.elementor-widget-image-box:last-child {
        margin-right: 2rem !important;
    }

    .elementor-element.elementor-widget-image-box .elementor-widget-container {
        width: 100%;
        height: 100%;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        height: 100%;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-img {
        width: 100%;
        margin-bottom: 15px;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-img img {
        width: 100%;
        height: 65vh;
        object-fit: cover;
        border-radius: 8px;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-content {
        width: 100%;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-title {
        margin: 0;
        font-size: 1.3rem !important;
        line-height: 1.2;
    }

    .elementor-element.elementor-widget-image-box .elementor-image-box-title a {
        color: inherit;
        text-decoration: none;
    }
}

