/* About Page - Enhanced with Animations and Smooth Effects */

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes countUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Global Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Base Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Ensure elements stay visible after animation */
.animated {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Default visibility for all sections */
.about-section, .mission-section, .stats-section, .team-section, .cta-section {
    opacity: 1;
    visibility: visible;
}

/* Default visibility for content */
.about-content, .mission-content, .team-grid, .stats-grid, .values-grid {
    opacity: 1;
    visibility: visible;
}

/* Loading Animations */
.page-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* About Section */
.about-section {
    padding: 80px 0;
    position: relative;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    animation: slideInFromLeft 1s ease-out forwards;
    opacity: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1e293b;
    position: relative;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    animation: expandWidth 1.5s ease-out 0.5s both;
}

@keyframes expandWidth {
    to {
        width: 60px;
    }
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out both;
}

.about-text p:nth-child(3) {
    animation-delay: 0.6s;
}

.about-text p:nth-child(4) {
    animation-delay: 0.8s;
}

.about-text p:nth-child(5) {
    animation-delay: 1s;
}

.about-image {
    animation: slideInFromRight 1s ease-out forwards;
    opacity: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    transform: scale(1);
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
}

.about-image img:hover {
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Mission Section */
.mission-section {
    padding: 80px 0;
    background: #f8fafc;
    position: relative;
}

.mission-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #1e293b;
    opacity: 0;
    animation: fadeInDown 0.8s ease-out both;
}

.mission-content > p {
    font-size: 1.25rem;
    text-align: center;
    color: #4b5563;
    max-width: 800px;
    margin: 0 auto 4rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    animation: scaleIn 0.8s ease-out both;
}

.value-card:nth-child(1) { animation-delay: 0.1s; }
.value-card:nth-child(2) { animation-delay: 0.2s; }
.value-card:nth-child(3) { animation-delay: 0.3s; }
.value-card:nth-child(4) { animation-delay: 0.4s; }

.value-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.value-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.value-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.value-card:hover .value-icon::before {
    left: 100%;
}

.value-card:hover .value-icon {
    animation: pulse 0.6s ease-in-out;
}

.value-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
    transition: color 0.3s ease;
}

.value-card:hover h3 {
    color: #6366f1;
}

.value-card p {
    color: #64748b;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.value-card:hover p {
    color: #4b5563;
}

/* Statistics Section */
.stats-section {
    padding: 80px 0;
    background: #1e293b;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(99,102,241,0.1)"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
    pointer-events: none;
}

.stats-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInDown 0.8s ease-out both;
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.stat-card {
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: countUp 0.8s ease-out both;
    transition: transform 0.3s ease;
}

.stat-card:nth-child(1) { animation-delay: 0.2s; }
.stat-card:nth-child(2) { animation-delay: 0.4s; }
.stat-card:nth-child(3) { animation-delay: 0.6s; }
.stat-card:nth-child(4) { animation-delay: 0.8s; }

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.stat-number::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: numberShine 3s infinite;
}

@keyframes numberShine {
    0%, 50%, 100% {
        left: -100%;
    }
    25% {
        left: 100%;
    }
}

.stat-label {
    font-size: 1.125rem;
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.stat-card:hover .stat-label {
    color: #e2e8f0;
}

/* Team Section */
.team-section {
    padding: 80px 0;
    position: relative;
}

.team-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #1e293b;
    opacity: 0;
    animation: fadeInDown 0.8s ease-out both;
}

.team-intro {
    font-size: 1.125rem;
    text-align: center;
    color: #4b5563;
    max-width: 800px;
    margin: 0 auto 4rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.team-member {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(50px) rotateY(10deg);
    animation: scaleIn 0.8s ease-out both;
    position: relative;
    overflow: hidden;
}

.team-member:nth-child(1) { animation-delay: 0.1s; }
.team-member:nth-child(2) { animation-delay: 0.3s; }
.team-member:nth-child(3) { animation-delay: 0.5s; }

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.team-member:hover::before {
    transform: scaleX(1);
}

.team-member:hover {
    transform: translateY(-10px) rotateY(0deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.member-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}



.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
}

.team-member:hover .member-photo {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.member-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
    transition: color 0.3s ease;
}

.team-member:hover .member-info h3 {
    color: #6366f1;
}

.member-role {
    color: #6366f1;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.team-member:hover .member-role {
    color: #8b5cf6;
}

.member-bio {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.team-member:hover .member-bio {
    color: #4b5563;
}

.member-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.member-social a {
    width: 40px;
    height: 40px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.member-social a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #6366f1;
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.member-social a:hover::before {
    width: 100%;
    height: 100%;
}

.member-social a:hover {
    color: white;
    transform: translateY(-3px) scale(1.1);
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: floatingBubbles 10s infinite linear;
}

@keyframes floatingBubbles {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-20px) rotate(360deg);
    }
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInDown 0.8s ease-out both;
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.cta-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.cta-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cta-buttons .btn:hover::before {
    left: 100%;
}

.cta-buttons .btn:hover {
    transform: translateY(-3px);
}

.cta-buttons .btn-outline {
    border-color: white;
    color: white;
    background: transparent;
}

.cta-buttons .btn-outline:hover {
    background: white;
    color: #6366f1;
    transform: translateY(-3px) scale(1.05);
}



/* Scroll Progress Bar - Removed */

/* Enhanced Transitions */
* {
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

/* Prevent dropdown interference during scrolling and animations */
body.is-scrolling .dropdown:not(.active):not(.dropdown-open) .dropdown-menu {
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

body.animating .dropdown:not(.active):not(.dropdown-open) .dropdown-menu {
    transition-delay: 0.5s !important;
}

/* Reduce hover sensitivity during heavy animation periods */
body.is-scrolling .dropdown:hover .dropdown-menu {
    transition-delay: 0.3s !important;
}

/* Fallback visibility for critical content */
.about-text, .about-image, .mission-content, .team-section, .stats-section {
    opacity: 1;
    visibility: visible;
}

/* Ensure all images are visible */
img {
    opacity: 1 !important;
    visibility: visible !important;
    display: block;
}

/* Text content visibility */
h1, h2, h3, p {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design with Enhanced Animations */
@media (max-width: 1024px) {
    .about-content {
        gap: 3rem;
    }
    
    .page-header h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 80px 0 60px;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-text {
        animation: fadeInUp 1s ease-out;
    }
    
    .about-image {
        animation: fadeInUp 1s ease-out 0.3s both;
    }

    .about-text h2,
    .mission-content h2,
    .team-section h2,
    .cta-content h2 {
        font-size: 2rem;
    }

    .values-grid,
    .stats-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .value-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .team-member:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .about-section,
    .mission-section,
    .stats-section,
    .team-section,
    .cta-section {
        padding: 60px 0;
    }

    .value-card,
    .team-member {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .member-photo {
        width: 100px;
        height: 100px;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-progress {
        transition: none;
    }
}
