/* Founder Page Specific Styles - Clean & Aligned */
/* Founder Hero with Background Image */
.founder-hero {
    height: 70vh;
    min-height: 500px;
    background: 
        linear-gradient(rgba(37, 99, 235, 0.7), rgba(59, 130, 246, 0.6)),
        url('../images/Stock/9.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    overflow-x: hidden;
    position: relative;
}

.founder-hero .hero-content h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.founder-hero .hero-content p {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-size: clamp(1rem, 2vw, 1.3rem);
    max-width: 600px;
    margin: 0 auto 30px;
}

.founder-hero .hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.founder-hero .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.founder-hero .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.founder-hero .btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.founder-hero .btn-secondary:hover {
    background: white;
    color: var(--primary-blue);
}

/* Mobile optimization for hero - FIXED */
@media (max-width: 768px) {
    .founder-hero {
        height: auto; /* Changed from 60vh to auto */
        min-height: 400px; /* Keep this for minimum height */
        padding: 100px 20px 60px; /* Increased padding for more space */
    }
    
    .founder-hero .hero-content h1 {
        margin-bottom: 20px; /* Add space below heading */
        line-height: 1.3; /* Better line height for mobile */
    }
    
    .founder-hero .hero-content p {
        margin-bottom: 25px; /* More space below paragraph */
        line-height: 1.5; /* Better readability */
        font-size: 1rem; /* Slightly smaller but readable */
    }
    
    .founder-hero .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 15px; /* More space between buttons */
        margin-top: 20px; /* Space above buttons */
    }
    
    .founder-hero .hero-btns .btn-primary,
    .founder-hero .hero-btns .btn-secondary {
        width: 220px; /* Slightly wider for better touch */
        padding: 14px 25px; /* Better touch target */
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .founder-hero {
        min-height: 450px; /* More height for very small screens */
        padding: 90px 15px 50px; /* Adjusted padding */
    }
    
    .founder-hero .hero-content h1 {
        font-size: 1.8rem; /* Slightly smaller heading */
        margin-bottom: 15px;
    }
    
    .founder-hero .hero-content p {
        font-size: 0.95rem; /* Adjusted font size */
        margin-bottom: 20px;
    }
    
    .founder-hero .hero-btns .btn-primary,
    .founder-hero .hero-btns .btn-secondary {
        width: 100%; /* Full width on very small screens */
        max-width: 280px; /* But not too wide */
    }
}

/* Founders Intro Section */
.founders-intro {
    background: var(--bg-white);
    padding: 80px 0;
    overflow-x: hidden;
}

.founders-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.founders-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
    border-radius: 2px;
}

.founders-content p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 500;
}

/* Content with Image Layout */
.content-with-image {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 50px 0;
    align-items: center;
    overflow: hidden;
}

.text-content {
    order: 2;
}

.integrated-image {
    order: 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.integrated-image:hover {
    transform: translateY(-5px);
}

.integrated-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Founders List Section */
.founders-list {
    background: var(--bg-light);
    padding: 80px 0;
    overflow-x: hidden;
}

.founders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    overflow: hidden;
}

.founder-card {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 40px 25px;
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.founder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
}

.founder-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.founder-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.founder-card:hover .founder-icon {
    transform: scale(1.1);
}

.founder-icon i {
    font-size: 1.8rem;
    color: white;
}

.founder-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 600;
}

.founder-card > p {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.founder-bio p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

/* Legacy Section */
.legacy {
    background: var(--bg-white);
    padding: 80px 0;
    overflow-x: hidden;
}

.legacy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    overflow: hidden;
}

.legacy-card {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 40px 25px;
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.legacy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
}

.legacy-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.legacy-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    position: relative;
    z-index: 1;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.legacy-card:hover .legacy-icon {
    transform: scale(1.05);
}

.legacy-icon i {
    font-size: 1.5rem;
    color: white;
}

.legacy-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

.legacy-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* CTA Section */
.founder-cta {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    padding: 100px 0;
    text-align: center;
    color: white;
    overflow-x: hidden;
}

.founder-cta h2 {
    color: white;
    margin-bottom: 20px;
}

.founder-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-size: 1.2rem;
}

/* Horizontal Scroll Prevention */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

.container {
    overflow-x: hidden;
}

/* ===== FOUNDER PAGE PERFORMANCE OPTIMIZATION ===== */
/* Hardware acceleration for founder page elements */
.founder-hero, .founder-card, .legacy-card,
.integrated-image {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform; /* Prepare browser for animations */
}

/* Reduce repaints and improve scrolling */
.content-with-image, .founders-grid, .legacy-grid {
    contain: layout style paint;
}

/* Optimize images for mobile */
.integrated-image img {
    background: #f8fafc; /* Placeholder color while loading */
    transition: transform 0.5s ease;
}

/* Lazy loading support */
.integrated-image img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.integrated-image img.loaded {
    opacity: 1;
}

/* Touch optimization for mobile */
@media (max-width: 768px) {
    .founder-card,
    .legacy-card {
        transition: transform 0.2s ease; /* Faster transitions on mobile */
    }
    
    .founder-card:active,
    .legacy-card:active {
        transform: scale(0.98); /* Touch feedback */
    }
}

/* Performance: Reduce animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .founder-hero, .founder-card, .legacy-card,
    .integrated-image {
        transition: none;
        transform: none;
    }
    
    .integrated-image img {
        transition: none;
    }
    
    .founder-card:hover .founder-icon,
    .legacy-card:hover .legacy-icon {
        transform: none;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .content-with-image {
        grid-template-columns: 2fr 1fr;
        gap: 60px;
    }

    .text-content {
        order: 1;
    }

    .integrated-image {
        order: 2;
    }

    .founders-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .legacy-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .founders-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .legacy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Optimization */
@media (max-width: 767px) {
    .founder-hero {
        height: auto; /* Ensure auto height for all mobile */
        min-height: 400px;
        padding: 80px 20px 40px;
    }

    .founders-content h2 {
        font-size: 2rem;
    }

    .founders-content p {
        font-size: 1rem;
    }

    .integrated-image img {
        height: 250px;
    }

    .founder-card {
        padding: 30px 20px;
    }

    .founder-icon {
        width: 70px;
        height: 70px;
    }

    .founder-icon i {
        font-size: 1.5rem;
    }

    .legacy-card {
        padding: 30px 20px;
    }

    .legacy-icon {
        width: 60px;
        height: 60px;
    }

    .legacy-icon i {
        font-size: 1.3rem;
    }
}