/* Parallax Effects */

.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.parallax-section .container {
    position: relative;
    z-index: 2;
}

/* Parallax speed variations */
.parallax-section.slow .parallax-bg {
    transform: translate3d(0, 0, 0);
}

.parallax-section.medium .parallax-bg {
    transform: translate3d(0, 0, 0);
}

.parallax-section.fast .parallax-bg {
    transform: translate3d(0, 0, 0);
}

/* Parallax content styles */
.parallax-content {
    position: relative;
    z-index: 3;
}

/* Overlay for better readability */
.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.parallax-section.light-overlay::before {
    background: rgba(0, 0, 0, 0.3);
}

.parallax-section.dark-overlay::before {
    background: rgba(0, 0, 0, 0.7);
}

.parallax-section.color-overlay::before {
    background: linear-gradient(45deg, rgba(44, 62, 80, 0.8), rgba(52, 152, 219, 0.8));
}

/* Parallax layers */
.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.layer-1 {
    z-index: 1;
    transform: translateZ(-2px) scale(3);
}

.layer-2 {
    z-index: 2;
    transform: translateZ(-1px) scale(2);
}

.layer-3 {
    z-index: 3;
    transform: translateZ(0) scale(1);
}

/* Performance optimizations */
.parallax-section {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000px;
}

.parallax-bg {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Mobile fallback */
@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll !important;
    }
    
    .parallax-bg {
        transform: none !important;
        will-change: auto;
    }
    
    .parallax-section::before {
        background: rgba(0, 0, 0, 0.6);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .parallax-section {
        background-attachment: scroll !important;
    }
    
    .parallax-bg {
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}