/* Parallax Specific Styles */

.parallax-section {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* This is key for true parallax */
    color: #fff;
    text-align: center;
    padding: 100px 0;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay for readability */
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.parallax-content h2 {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.parallax-content p {
    font-size: 1.1em;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Article Card Parallax (hover effect) */
.article-card {
    overflow: hidden;
}

.article-card .article-image img {
    transition: transform 0.3s ease-out;
}

.article-card:hover .article-image img {
    transform: scale(1.05); /* Subtle zoom on hover */
}

/* Advanced Parallax Effects */
.floating-element {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.1s linear; /* Smooth movement */
}

.depth-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.1s linear;
}

/* Parallax Text Effects */
.parallax-text {
    will-change: transform, opacity;
    transition: transform 0.1s linear, opacity 0.1s linear;
}

/* Performance Optimization */
.parallax-active {
    /* Add any active states or animations here */
}

@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll; /* Disable fixed background on mobile */
        padding: 60px 0;
    }

    .parallax-content h2 {
        font-size: 2.2em;
    }
}


