/* Base Parallax Section Styles */
.parallax-section {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    color: #333;
}

/* Parallax with Fade Effect */
.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    background-position: center;
    background-size: cover;
    background-attachment: fixed; /* Parallax effect */
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0.4;
    animation: fadeIn 6s forwards; /* Fade in animation */
}

/* Centered content */
.parallax-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    text-align: center; /* Center-align the text */
}

/* Specific Backgrounds */
.parallax-welcome::before {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
                      url('../images/welcome2.jpg'); /* Background image for Welcome Section */
}
.parallax-puzzle::before {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
                      url('../images/puzzlew.jpeg');
}
.parallax-neuro::before {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
                      url('../images/neuro.jpeg'); /* Background image for Neuro Section */
    background-position: center; /* Align the image from the top center */
}
.parallax-quiz::before {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
                      url('../images/quizp.jpeg'); /* Background image for Neuro Section */
    background-position: center; /* Align the image from the top center */
}
.parallax-training::before {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
                      url('../images/trainingp.jpeg'); /* Background image for Neuro Section */
    background-position: center; /* Align the image from the top center */
}
.parallax-mentoring::before {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
                      url('../images/mentorp.jpeg'); /* Background image for Neuro Section */
    background-position: center; /* Align the image from the top center */
}
.parallax-abook::before {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
                      url('../images/abook.jpeg'); /* Background image for Neuro Section */
    background-position: center; /* Align the image from the top center */
}
.parallax-books::before {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
                      url('../images/books.jpeg'); /* Background image for Neuro Section */
    background-position: center; /* Align the image from the top center */
}
.parallax-newsle::before {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
                      url('../images/newsle.jpeg'); /* Background image for Neuro Section */
    background-position: center; /* Align the image from the top center */
}
/* Mobile Adjustments */
@media (max-width: 767px) {
    .parallax-section::before {
        background-attachment: scroll; /* Use scroll on mobile */
        background-size: cover; /* Ensure the image still covers the container */
    }
}
