.founder-section {
    width: 100%;
    height: 100%;
    text-align: right;
    margin-top: 100px;

    h1 {
        font-size: 40px;
        font-weight: 700;
        color: var(--secondary-color, #039990);
        margin-bottom: 50px;
        z-index: 5;

        @media screen and (max-width: 1200px) {
            margin-bottom: 50px;
        }
        @media (max-width: 768px) {
            font-size: 32px;
            padding-right: 10px;
        }
    }

         .cards-founder {
         width: 100%;
         display: grid;
         direction: rtl;
         grid-template-columns: repeat(3, 1fr);
         gap: 50px;
         margin-bottom: 100px;
         padding-top: 100px; /* Add space for protruding images */


         @media (min-width: 576px) and (max-width: 768px) {
             grid-template-columns: repeat(1, 1fr);
             padding-top: 80px;
         }

         @media (min-width: 768px) and (max-width: 1200px) {
             grid-template-columns: repeat(3, 1fr);
             padding-top: 90px;
         }

         @media (max-width: 576px) {
             grid-template-columns: repeat(1, 1fr);
             padding-top: 70px;
         }



        .founder-card {
            position: relative;
            background: var(--secondary-color, #039990) !important;
            box-shadow: 0 0 10px 0 var(--secondary-color, #039990);  
            border-radius: 24px;
            width: 100%;
            height: 500px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            z-index: 5;
            cursor: pointer;
            transition: transform 0.3s ease-in-out;
            overflow: visible; /* Allow images to extend outside */

            @media (min-width: 576px) and (max-width: 992px) {
                height: 300px;
                width: 100%;
            }

            @media (max-width: 768px) {
                height: 700px;
                width: 100%;
            }

            @media (max-width: 425px) {
                height: 500px;
                width: 100%;
            }

            &:hover {
                transform: scale(1.05);
                transition: transform 0.3s ease-in-out;
                box-shadow: 0 0 20px 0 var(--secondary-color, #039990);
                .founder-card-content h2 {
                    color: var(--primary-color, #001918) !important;
                    transition: color 0.3s ease-in-out;
                }
                .founder-card-content h6 {
                    color: var(--primary-color, #001918) !important;
                }
            }

            /* First child - content container */
            > div:first-child {
                height: 80px;
                position: absolute;
                width: 100%;
                bottom: 120px; /* Moved higher to avoid overlap with social icons */
                left: 50%;
                transform: translateX(-50%); 
                z-index: 20; /* Higher than subtract image to ensure visibility */

                @media (max-width: 1200px) {
                    bottom: 100px;
                }

                @media (max-width: 768px) {
                    bottom: 150px; /* More space on mobile */
                }

                @media (max-width: 425px) {
                    bottom: 130px;
                }

                .founder-card-content {
                    position: relative;
                    z-index: 21; /* Ensure text is above everything */
                   
                    h2 {
                        font-size: 24px;
                        font-weight: 700;
                        text-align: center;
                        color: var(--quaternary-color, #FFFFFF) !important;
                        margin-bottom: 8px;
                        text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Add shadow for better visibility */
                        
                        @media (max-width: 768px) {
                            font-size: 20px;
                        }
                    }
                    h6 {     
                        font-size: 16px;
                        font-weight: 400;
                        text-align: center;
                        color: var(--quaternary-color, #FFFFFF) !important;
                        margin: 0;
                        text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Add shadow for better visibility */
                        
                        @media (max-width: 768px) {
                            font-size: 14px;
                        }
                    }
                }
            }

            /* Second child - main founder image */
            > img:first-of-type {
                width: 80%;
                /* height: 65%; */
                left: 50%;
                transform: translateX(-50%);
                position: absolute;
                top: -40px; /* Positioned to overlap with subtract image */
                object-fit: cover;
                z-index: 5; /* LOWER than overlay so it appears inside subtract */
                border-radius: 15px;
                background: none;
                clip-path: none; /* Remove any clipping */

                @media (max-width: 1200px) {
                    top: -20px;
                }

                @media (max-width: 768px) {
                    top: -10px;
                    width: 80%;
                    height: 60%;
                }

                @media (max-width: 425px) {
                    top: -5px;
                    width: 75%;
                    height: 55%;
                }
            }

            /* Third child - decorative overlay (subtract image) */
            > img:last-of-type {
                width: 100%;
                height: 70%;
                position: absolute;
                bottom: 0;
                object-fit: cover;
                border-radius: 0 0 24px 24px;
                z-index: 10; /* Higher than founder image to create mask effect */
                pointer-events: none; /* Allow clicks to pass through */
            }
        }


       
    }
}

/* Swiper-specific styles for founder cards */
.founder-swiper {
    width: 100%;
    padding: 130px 20px 50px 20px; /* Added top padding for protruding images */
    margin-bottom: 100px;
    overflow: visible; /* Allow images to extend outside */
    
    @media (max-width: 768px) {
        padding: 100px 15px 30px 15px;
    }
}

.founder-swiper .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px 0;
}

/* Enhanced founder card styles for swiper - matching HTML structure */
.founder-swiper .founder-card {
    position: relative;
    background: var(--secondary-color, #039990);
    box-shadow: 0 0 10px 0 var(--secondary-color, #039990);  
    border-radius: 24px;
    width: 300px !important;
    max-width: 350px;
    height: 450px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 5;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    overflow: visible; /* Allow images to extend outside */

    @media (max-width: 768px) {
        max-width: 320px;
        height: 500px;
    }

    @media (max-width: 425px) {
        max-width: 300px;
        height: 450px;
    }

    &:hover {
        transform: scale(1.05);
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 0 20px 0 var(--secondary-color, #039990);
        
        .founder-card-content h2 {
            color: var(--primary-color, #001918) !important;
            transition: color 0.3s ease-in-out;
        }
        .founder-card-content h6 {
            color: var(--primary-color, #001918) !important;
        }
    }

    /* Content container - positioned at bottom */
    > div:first-child {
        height: 80px;
        position: absolute;
        width: 100%;
        bottom: 120px; /* Moved higher to avoid overlap with social icons */
        left: 50%;
        transform: translateX(-50%); 
        z-index: 20; /* Higher than subtract image to ensure visibility */

        @media (max-width: 1200px) {
            bottom: 100px;
        }

        @media (max-width: 768px) {
            bottom: 150px; /* More space on mobile */
        }

        @media (max-width: 425px) {
            bottom: 130px;
        }

        .founder-card-content {
            text-align: center;
            position: relative;
            z-index: 21; /* Ensure text is above everything */
            
            h2 {
                font-size: 24px;
                font-weight: 700;
                text-align: center;
                color: var(--quaternary-color, #FFFFFF) !important;
                margin-bottom: 8px;
                text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Add shadow for better visibility */
                
                @media (max-width: 768px) {
                    font-size: 20px;
                }
            }
            
            h6 {     
                font-size: 16px;
                font-weight: 400;
                text-align: center;
                color: var(--quaternary-color, #FFFFFF) !important;
                margin: 0;
                text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Add shadow for better visibility */
                
                @media (max-width: 768px) {
                    font-size: 14px;
                }
            }
        }
    }

    /* Main founder image - positioned at top with transform */
    > img:first-of-type {
        width: 80%;
        /* height: 60%; */
        left: 50%;
        transform: translateX(-50%);
        position: absolute;
        top: -40px; /* Positioned to overlap with subtract image */
        object-fit: cover;
        z-index: 5; /* LOWER than overlay so it appears inside subtract */
        border-radius: 15px;
        background: none;
        clip-path: none; /* Remove any clipping */

        @media (max-width: 1200px) {
            top: -20px;
        }

        @media (max-width: 768px) {
            top: -10px;
            width: 80%;
            height: 60%;
        }

        @media (max-width: 425px) {
            top: -5px;
            width: 75%;
            height: 55%;
        }
    }

    /* Decorative overlay image (subtract) - covers bottom and masks founder image */
    > img:last-of-type {
        width: 100%;
        height: 70%;
        position: absolute;
        bottom: 0;
        object-fit: cover;
        border-radius: 0 0 24px 24px;
        z-index: 10; /* Higher than founder image to create mask effect */
        pointer-events: none; /* Allow clicks to pass through */
    }
}

/* Swiper navigation and pagination */
.founder-swiper .swiper-button-prev,
.founder-swiper .swiper-button-next {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    
    &:after {
        font-size: 20px;
    }
    
    @media (max-width: 768px) {
        width: 40px;
        height: 40px;
        
        &:after {
            font-size: 16px;
        }
    }
}

.founder-swiper .swiper-pagination-bullet {
    background: var(--secondary-color);
    opacity: 0.5;
    width: 12px;
    height: 12px;
}

.founder-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}


.contact-card {
    display: flex;
    height: 70px;
    width: 270px;
    position: absolute;
    bottom: 20px; /* Changed from top to bottom for better positioning */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;

    @media (min-width: 1200px)  {
        bottom: 20px;
    }

    @media (min-width: 992px) and (max-width: 1200px) {
        bottom: 20px;
    }

    @media (min-width: 576px) and (max-width: 992px) {
        bottom: 15px;
        width: 80%;
        height: 50px;
    }

    @media (max-width: 768px) {
        bottom: 20px;
        width: 80%;
        height: 60px;
    }

    @media (max-width: 425px) {
        bottom: 15px;
        width: 85%;
        height: 55px;
    }
}

/* Contact card styles for swiper implementation */
.founder-swiper .contact-card {
    display: flex;
    height: 70px;
    width: 270px;
    position: absolute;
    bottom: 20px; /* Changed from top to bottom for consistent positioning */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    
    @media (max-width: 768px) {
        bottom: 20px;
        width: 80%;
        height: 60px;
    }

    @media (max-width: 425px) {
        bottom: 15px;
        width: 85%;
        height: 55px;
    }
}

.founder-swiper .contact-card svg {
    position: absolute;
    display: flex;
    width: 60%;
    height: 100%;
    font-size: 20px;
    font-weight: 700;
    opacity: 1;
    transition: opacity 0.25s;
    z-index: 2;
    cursor: pointer;
    
    @media (max-width: 768px) {
        font-size: 18px;
    }
}

.founder-swiper .contact-card .social-link1,
.founder-swiper .contact-card .social-link2,
.founder-swiper .contact-card .social-link3,
.founder-swiper .contact-card .social-link4 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25%;
    color: whitesmoke;
    font-size: 20px;
    text-decoration: none;
    transition: 0.25s;
    border-radius: 50px;
    
    @media (max-width: 768px) {
        font-size: 18px;
    }
}

/* Hover effects for swiper social links */
.founder-swiper .contact-card .social-link1:hover {
    background: #f09433;
    background: -moz-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    background: -webkit-linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    animation: bounce_613 0.4s linear;
}

.founder-swiper .contact-card .social-link2:hover {
    background-color: #00ccff;
    animation: bounce_613 0.4s linear;
}

.founder-swiper .contact-card .social-link3:hover {
    background-color: #5865f2;
    animation: bounce_613 0.4s linear;
}
  
  .contact-card svg {
    position: absolute;
    display: flex;
    width: 60%;
    height: 100%;
    font-size: 24px;
    font-weight: 700;
    opacity: 1;
    transition: opacity 0.25s;
    z-index: 2;
    cursor: pointer;
  }
  
  .contact-card .social-link1,.contact-card .social-link2,.contact-card .social-link3,.contact-card .social-link4 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25%;
    color: whitesmoke;
    font-size: 24px;
    text-decoration: none;
    transition: 0.25s;
    border-radius: 50px;
  }
  
  .contact-card svg {
    transform: scale(1);
  }
  
  .contact-card .social-link1:hover {
    background: #f09433;
    background: -moz-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    background: -webkit-linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f09433', endColorstr='#bc1888',GradientType=1 );
    animation: bounce_613 0.4s linear;
  }
  
  .contact-card .social-link2:hover {
    background-color: #00ccff;
    animation: bounce_613 0.4s linear;
  }
  
  .contact-card .social-link3:hover {
    background-color: #5865f2;
    animation: bounce_613 0.4s linear;
  }
  
  .contact-card .social-link4:hover {
    background-color: #12a50b;
    animation: bounce_613 0.4s linear;
  }
  
    @keyframes bounce_613 {
    40% {
      transform: scale(1.4);
    }

    60% {
      transform: scale(0.8);
    }

    80% {
      transform: scale(1.2);
    }

    100% {
      transform: scale(1);
    }
  }

/* Global overrides for founder cards */
.founder-section .founder-card .text-white,
.founder-swiper .founder-card .text-white {
    color: #FFFFFF !important;
    display: block !important;
    visibility: visible !important;
}

.founder-section .founder-card,
.founder-swiper .founder-card {
    background: #039990 !important;
    box-shadow: 0 0 10px 0 #039990 !important;
}

.founder-section .founder-card:hover,
.founder-swiper .founder-card:hover {
    box-shadow: 0 0 20px 0 #039990 !important;
}

