/* General Section Styling */
.case-studies, .final-thoughts {
    background: linear-gradient(145deg, #f0f7ff, #e3efff);
    border-radius: 20px;
    padding: 50px 30px;
    margin-bottom: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    font-family: 'Arial', sans-serif;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}


/* Header Styles */
.case-studies h2, .final-thoughts h2 {
    font-size: 2.5rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    text-align: center;
    z-index: 1;
}

/* Case Study Titles */
.case-studies h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Paragraph Styling */
.case-studies p, .final-thoughts p {
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

/* Hover effect on paragraph */
.case-studies p:hover, .final-thoughts p:hover {
    color: #fff;
    transform: scale(1.02);
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Interactive Case Studies Background Effects */
.case-studies h2, .final-thoughts h2 {
    position: relative;
    overflow: hidden;
}

/* Gradient underline animation for the headings */
.case-studies h2::after, .final-thoughts h2::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #2575fc, #6a11cb);
    bottom: -10px;
    left: 0;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.case-studies h2:hover::after, .final-thoughts h2:hover::after {
    transform: scaleX(1);
}

/* Parallax Effect for Case Study Background */
.case-studies {
    background: url('bg.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    transition: all 0.3s ease-in-out;
    opacity: 0.8; /* 40% transparency */
}

/* Smooth fade-in effect for case studies and thoughts */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Case Study 1 & 2 Parallax Effect */
.case-studies h3 {
    position: relative;
    z-index: 2;
    color: #fff;
    transition: transform 0.4s ease-in-out;
}

/* Hover effect for case studies */
.case-studies:hover h3 {
    transform: translateY(-10px);
}

/* Floating effect on images or background */
.case-studies img, .final-thoughts img {
    transition: transform 0.3s ease;
}

.case-studies:hover img, .final-thoughts:hover img {
    transform: scale(1.05);
}

/* Border animation for case studies */
.case-studies::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #000, #000);
    z-index: -1;
    color: #000;
    opacity: 0.9;
    transition: all 0.5s ease;
}

.case-studies:hover::before {
    opacity: 0.4;
}

/* Responsive design */
@media (max-width: 768px) {
    .case-studies, .final-thoughts {
        padding: 30px 15px;
    }

    .case-studies h2 {
        font-size: 2rem;
    }

    .case-studies h3 {
        font-size: 1.5rem;
    }

    .case-studies p {
        font-size: 1rem;
    }
}
