/* Image Text Section Widget Styles */

/* Keyframes para animaciones */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-text-section-wrapper {
    width: 100%;
}

.image-text-section-single {
    width: 100%;
    position: relative;
}

.image-text-section-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.image-text-section-row {
    display: grid;
    grid-template-columns: 45% 50%;
    gap: 5%;
    align-items: center;
    padding: 50px 0;
}

/* Image Column */
.image-text-section-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    z-index: 2;
    opacity: 0;
}

/* Animación para imágenes en la izquierda - solo cuando es visible */
.image-text-section-single.left.is-visible .image-text-section-image {
    animation: slideInFromLeft 0.8s ease-out forwards;
}

/* Animación para imágenes en la derecha - solo cuando es visible */
.image-text-section-single.right.is-visible .image-text-section-image {
    animation: slideInFromRight 0.8s ease-out forwards;
}

/* Animación del contenido - solo cuando es visible */
.image-text-section-single.is-visible .image-text-section-content {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

/* Ajuste de posición para la primera imagen - solo en desktop */
@media (min-width: 769px) {
    .image-text-section-single:first-child .image-text-section-image {
        margin-top: 20px;
        margin-left: -50px;
        bottom: -80px;
        left: -40px;
        z-index: 99;
    }
}

/* Solapamiento de imágenes - solo las imágenes en las esquinas */
.image-text-section-single:not(:first-child) .image-text-section-image {
    margin-top: -100px;
}

.image-text-section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Content Column */
.image-text-section-content {
    padding: 20px;
    opacity: 0;
}

.section-title {
    font-size: 60px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 30px !important;
    font-family: 'Montserrat', sans-serif !important;
}

.section-title .title-part-1,
.section-title .title-part-2 {
    display: inline;
}

.section-description {
    font-size: 25px !important;
    line-height: 1.4 !important;
    color: #000 !important;
    margin-bottom: 30px !important;
    font-family: 'Montserrat', sans-serif !important;
}

.section-description p {
    margin-bottom: 15px;
}

/* Button */
.section-button {
    margin-bottom: 30px;
}

.section-button .elementor-button {
    background-color: #fff !important;
    color: #000 !important;
    padding: 15px 30px !important;
    border-radius: 10px !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    text-decoration: none !important;
    border: 2px solid #000 !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    position: relative !important;
    overflow: hidden !important;
    display: inline-block !important;
    font-family: 'Montserrat', sans-serif !important;
}

.section-button .elementor-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

.section-button .elementor-button span {
    position: relative;
    z-index: 1;
    transition: color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-button .elementor-button:hover {
    color: #fff !important;
    border-color: #000 !important;
    transform: scale(1.05);
}

.section-button .elementor-button:hover::before {
    transform: scaleX(1);
}

.section-button .elementor-button:hover span {
    color: #fff !important;
}

.section-button .elementor-button:active {
    transform: scale(0.98);
}

/* Logos Section */
.section-logos {
    margin-top: 30px;
    width: 100%;
}

.logo-item {
    width: 100%;
    height: auto;
}

.logo-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .image-text-section-row {
        padding: 40px 0;
        grid-template-columns: 45% 50%;
        gap: 5%;
    }
    
    .image-text-section-image {
        height: 400px;
    }
    
    .image-text-section-single:not(:first-child) .image-text-section-image {
        margin-top: -80px;
    }
    
    .section-title {
        font-size: 45px !important;
    }
    
    .section-description {
        font-size: 20px !important;
    }
    
    .section-button .elementor-button {
        font-size: 18px !important;
        padding: 12px 25px !important;
    }
}

@media (max-width: 768px) {
    .image-text-section-row {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 0;
    }
    
    .image-text-section-image {
        height: 300px;
    }
    
    /* En móvil no hay solapamiento de imágenes */
    .image-text-section-single:not(:first-child) .image-text-section-image {
        margin-top: 0;
    }
    
    .image-text-section-content {
        padding: 10px;
    }
    
    /* Mostrar elementos inmediatamente en móvil sin animación */
    .image-text-section-single.is-visible .image-text-section-image,
    .image-text-section-single.is-visible .image-text-section-content {
        opacity: 1;
        animation: none;
        transform: none;
    }
    
    .section-title {
        font-size: 35px !important;
        margin-bottom: 20px !important;
    }
    
    .section-description {
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }
    
    .section-button .elementor-button {
        font-size: 16px !important;
        padding: 10px 20px !important;
    }
    
    .section-logos {
        margin-top: 20px;
    }
    
    .logo-item {
        width: 100%;
    }
    
    /* En móvil, la imagen siempre va primero */
    .image-text-section-row {
        display: flex;
        flex-direction: column;
    }
    
    .image-text-section-image {
        order: 1;
    }
    
    .image-text-section-content {
        order: 2;
    }
}

@media (max-width: 480px) {
    .image-text-section-row {
        padding: 20px 0;
    }
    
    .image-text-section-image {
        height: 250px;
    }
    
    .section-title {
        font-size: 28px !important;
    }
    
    .section-description {
        font-size: 16px !important;
    }
    
    .section-button .elementor-button {
        font-size: 14px !important;
        padding: 8px 16px !important;
    }
}

