/* 
 * BD Sticky Content Widget Styles
 * File: wp-content/plugins/bad-dog-elementor-addons/assets/sticky-content/style.css
 */

.bd-sticky-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow: visible!important;
    width: 100%;

}
.bd-sticky-content2{
    display: flex;
    flex-direction: column;
  

  
    z-index: 10;

}
/* ========== CONTENUTO FISSO ========== */
.bd-sticky-content {
    position: sticky!important;
    top: 25%;
    justify-content: center;
   
  
}

.bd-sticky-subtitle {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.bd-sticky-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 30px 0;
    color: #333;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.bd-sticky-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    max-width: 90%;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

/* ========== IMMAGINI SCROLLABILI ========== */
.bd-scrolling-images {
    display: flex;
    flex-direction: column;
    padding: 40px 30px;
    gap: 30px;
  
}

.bd-scroll-image {
    position: relative;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    flex-shrink: 0; /* Impedisce alle immagini di comprimersi */
}

.bd-scroll-image.in-view {
    transform: translateY(0);
    opacity: 1;
}

.bd-scroll-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.bd-scroll-image:hover img {
    transform: scale(1.05);
}

/* ========== OVERLAY IMMAGINI ========== */
.bd-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 40px 30px 30px;
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.bd-scroll-image:hover .bd-image-overlay {
    transform: translateY(0);
    opacity: 1;
}

.bd-image-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: white;
}

.bd-image-description {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* ========== ANIMAZIONI ========== */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== PARALLAX EFFECT ========== */
.bd-scroll-image.parallax {
    will-change: transform;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .bd-sticky-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .bd-sticky-content {
        position: relative;
        width: 100% !important;
        height: auto;
        min-height: 60vh;
        top: auto;
        transform: none;
    }
    
    .bd-scrolling-images {
        width: 100% !important;
        min-height: auto;
        padding: 20px;
    }
    
    .bd-sticky-title {
        font-size: 36px;
    }
    
    .bd-scroll-image {
        height: 300px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .bd-sticky-content {
        padding: 40px 20px;
    }
    
    .bd-sticky-title {
        font-size: 28px;
    }
    
    .bd-sticky-description {
        font-size: 14px;
        max-width: 100%;
    }
    
    .bd-scrolling-images {
        padding: 20px 15px;
        gap: 20px;
    }
    
    .bd-scroll-image {
        height: 250px;
    }
    
    .bd-image-overlay {
        padding: 20px;
    }
    
    .bd-image-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .bd-sticky-title {
        font-size: 24px;
    }
    
    .bd-scroll-image {
        height: 200px;
    }
    
    .bd-image-title {
        font-size: 18px;
    }
    
    .bd-image-description {
        font-size: 13px;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .bd-scroll-image,
    .bd-image-overlay,
    .bd-scroll-image img {
        transition: none;
    }
    
    .bd-sticky-subtitle,
    .bd-sticky-title,
    .bd-sticky-description {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ========== LOADING STATE ========== */
.bd-scroll-image.loading {
    background: #f0f0f0;
}

.bd-scroll-image.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #ddd;
    border-top-color: #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
.bd-sticky-container * {
    box-sizing: border-box;
}

.bd-scroll-image {
    contain: layout style paint;
}

.bd-scroll-image img {
    content-visibility: auto;
}