/* Slideshow Styles - Optimized */
.slideshow-section {
    position: relative;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.carousel-item {
    height: 500px; /* Reduced height for better performance */
    position: relative;
}

.carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.5));
    pointer-events: none; /* Improve performance */
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    will-change: transform; /* Optimize animations */
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    padding: 2rem;
    border-radius: 10px;
    max-width: 800px;
    margin: 0 auto;
    bottom: 15%;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.carousel-item.active .carousel-caption {
    transform: translateY(0);
    opacity: 1;
}

/* WhatsApp Float Button - Optimized */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    text-align: center;
    font-size: 28px;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease;
    will-change: transform;
}

.whatsapp-float:hover {
    transform: scale(1.05);
    background-color: #128C7E;
}

/* Section Styles - Optimized */
.section-title {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 25px;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #007bff;
    border-radius: 2px;
}

/* Feature Cards - Optimized */
.feature-card {
    padding: 1.5rem;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-3px);
}

.feature-card .icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

/* Program Cards - Optimized */
.program-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.program-card:hover {
    transform: translateY(-3px);
}

.program-card img {
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
}

.program-card:hover img {
    transform: scale(1.03);
}

/* Testimonial Cards - Optimized */
.testimonial-card {
    padding: 1.5rem;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 50px;
    color: rgba(0,123,255,0.1);
    font-family: serif;
}

/* Statistics Section - Optimized */
.stat-card {
    padding: 1.5rem;
    text-align: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

/* CTA Section - Optimized and Fixed */
.cta-section {
    background: #007bff;
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.1), rgba(255,255,255,0.1));
    pointer-events: none;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section .btn {
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 2;
}

.cta-section .btn-primary {
    background: white;
    color: #007bff;
    border: none;
}

.cta-section .btn-primary:hover {
    transform: translateY(-2px);
    background: #f8f9fa;
}

.cta-section .btn-success {
    background: #25d366;
    border: none;
}

.cta-section .btn-success:hover {
    transform: translateY(-2px);
    background: #128C7E;
}

/* Animation Classes - Optimized */
.fade-up {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: transform, opacity;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery Section - Optimized */
.gallery-section .img-fluid {
    border-radius: 8px;
    transition: transform 0.3s ease;
    will-change: transform;
}

.gallery-section a:hover .img-fluid {
    transform: scale(1.02);
}

/* News Cards - Optimized */
.news-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.news-card:hover {
    transform: translateY(-3px);
}

.news-card img {
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
}

.news-card:hover img {
    transform: scale(1.03);
}

.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 20px;
}

/* Responsive Styles - Optimized */
@media (max-width: 768px) {
    .carousel-item {
        height: 350px;
    }
    
    .carousel-caption {
        padding: 1.2rem;
        bottom: 10%;
    }
    
    .carousel-caption h1 {
        font-size: 1.4rem;
    }
    
    .carousel-caption .lead {
        font-size: 0.95rem;
    }
    
    .whatsapp-float {
        width: 45px;
        height: 45px;
        font-size: 22px;
        bottom: 15px;
        left: 15px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .feature-card,
    .program-card,
    .testimonial-card,
    .stat-card {
        margin-bottom: 1rem;
    }

    .cta-section {
        padding: 2rem 0;
    }

    .cta-section .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* WhatsApp Popup Styles */
.whatsapp-popup {
    position: fixed;
    bottom: 100px;
    left: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 15px;
    width: 300px;
    z-index: 1000;
    transform: translateX(-120%);
    transition: transform 0.3s ease;
    opacity: 0;
}

.whatsapp-popup.active {
    transform: translateX(0);
    opacity: 1;
}

.whatsapp-popup::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent transparent;
}

.whatsapp-popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.whatsapp-popup-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.whatsapp-popup-header h5 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.whatsapp-popup-header p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.whatsapp-popup-content {
    margin-bottom: 15px;
}

.whatsapp-popup-content p {
    margin: 0;
    font-size: 14px;
    color: #444;
    line-height: 1.4;
}

.whatsapp-popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whatsapp-popup-footer .btn {
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 20px;
}

.whatsapp-popup-footer .btn-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    transition: color 0.2s ease;
}

.whatsapp-popup-footer .btn-close:hover {
    color: #333;
}

/* Active Tab Animation */
.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-item:hover::after {
    width: 100%;
}

.navbar-nav .nav-item.active::after {
    width: 100%;
    background: linear-gradient(to right, #007bff, #00ff88);
}

.navbar-nav .nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link.active {
    color: #007bff !important;
    font-weight: 600;
}

/* Responsive WhatsApp Popup */
@media (max-width: 768px) {
    .whatsapp-popup {
        width: 280px;
        left: 20px;
        bottom: 80px;
    }
    
    .whatsapp-popup-header img {
        width: 35px;
        height: 35px;
    }
    
    .whatsapp-popup-header h5 {
        font-size: 15px;
    }
    
    .whatsapp-popup-content p {
        font-size: 13px;
    }
    
    .whatsapp-popup-footer .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
} 