Path : /home/vishqocm/pcib.in/
File Upload :
Current File : /home/vishqocm////pcib.in/index.php

<?php
// Start session
session_start();

// Check if installation is complete
if (!file_exists('installed.php')) {
    // Redirect to installation page
    header('Location: install.php');
    exit;
}

// Include database configuration
require_once 'admin/database/db_config.php';

// Check database connection
if (!$conn || $conn->connect_error) {
    die("Database connection failed. Please contact the administrator.");
}

// Get courses for display
$featured_courses = [];
try {
    // Check if courses table exists
    $check_courses = mysqli_query($conn, "SHOW TABLES LIKE 'courses'");
    
    if (mysqli_num_rows($check_courses) > 0) {
        // Check for available columns
        $columns_result = mysqli_query($conn, "SHOW COLUMNS FROM courses");
        $columns = [];
        while ($column = mysqli_fetch_assoc($columns_result)) {
            $columns[] = $column['Field'];
        }
        
        // Build query based on available columns
        $where_clause = "";
        if (in_array('status', $columns)) {
            $where_clause = "WHERE status = 'active'";
        }
        
        // Add is_featured condition if the column exists
        if (in_array('is_featured', $columns)) {
            if (!empty($where_clause)) {
                $where_clause .= " AND is_featured = 1";
            } else {
                $where_clause = "WHERE is_featured = 1";
            }
        }
        
        $courses_query = "SELECT * FROM courses " . $where_clause . " ORDER BY id DESC LIMIT 6";
        $courses_result = mysqli_query($conn, $courses_query);
        
        if ($courses_result && mysqli_num_rows($courses_result) > 0) {
            while ($row = mysqli_fetch_assoc($courses_result)) {
        $featured_courses[] = $row;
    }
        }
    }
} catch (Exception $e) {
    // Just continue without courses
    error_log("Error fetching courses: " . $e->getMessage());
}

// Static testimonials - no database queries needed for testimonials

// Get institute stats
$stats = [];
try {
    // Check if table exists first
    $check_stats = mysqli_query($conn, "SHOW TABLES LIKE 'institute_stats'");
    
    if (mysqli_num_rows($check_stats) > 0) {
        $stats_query = "SELECT * FROM institute_stats WHERE is_visible = 1 ORDER BY display_order ASC";
        $stats_result = mysqli_query($conn, $stats_query);
        
        if ($stats_result && mysqli_num_rows($stats_result) > 0) {
            while ($row = mysqli_fetch_assoc($stats_result)) {
                $stats[] = $row;
            }
        }
    }
} catch (Exception $e) {
    // Just continue without stats
    error_log("Error fetching institute stats: " . $e->getMessage());
}

// Include header
include 'includes/header.php';

// Include Hero Section
include 'includes/hero_slider.php';
?>


<!-- Hero Section Styles -->
<style>
/* Hero Section Base */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background-color: #050814;
    overflow: hidden;
}

/* Background Elements */
.hero-background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.3) 0%, rgba(124, 58, 237, 0.1) 100%);
    filter: blur(50px);
}

.circle-1 {
    width: 500px;
    height: 500px;
    top: -150px;
    right: -100px;
    opacity: 0.6;
}

.circle-2 {
    width: 600px;
    height: 600px;
    bottom: -200px;
    left: -150px;
    opacity: 0.4;
}

.circle-3 {
    width: 300px;
    height: 300px;
    bottom: 20%;
    right: 15%;
    opacity: 0.3;
}

.bg-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.2), transparent);
    height: 1px;
}

.line-1 {
    width: 100%;
    top: 20%;
    transform: rotate(-5deg);
}

.line-2 {
    width: 100%;
    bottom: 30%;
    transform: rotate(5deg);
}

/* Carousel Container */
#heroSlider {
    height: 100%;
}

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
}

.hero-slide-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Slide Overlay & Image */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(5, 8, 20, 0.75) 0%, rgba(5, 8, 20, 0.5) 50%, rgba(5, 8, 20, 0.6) 100%);
    z-index: 2;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Slide Content */
.slide-content-wrapper {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 60px 0;
}

.slide-content {
    color: #fff;
    animation: fadeInUp 0.8s ease-out both;
}

.slide-badge {
    display: inline-block;
    background: rgba(79, 70, 229, 0.15);
    color: #a5b4fc;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(124, 58, 237, 0.3);
    animation: fadeInUp 0.4s ease-out both;
}

.slide-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

.slide-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    max-width: 600px;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

/* Feature Pills */
.slide-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

.feature-pill {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-pill:hover {
    background: rgba(79, 70, 229, 0.2);
    transform: translateY(-3px);
}

.feature-pill i {
    color: #a5b4fc;
    margin-right: 8px;
    font-size: 0.9rem;
}

.feature-pill span {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Slide Buttons */
.slide-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

.btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(5px);
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

.btn-block {
    width: 100%;
}

/* Slide Card */
.slide-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInRight 0.8s ease-out 0.5s both;
}

.card-counter {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.counter-item:nth-child(3) {
    grid-column: span 2;
}

.counter-number {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 5px;
}

.counter-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.card-action {
    padding: 0 30px 30px;
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.carousel-control:hover {
    background: rgba(79, 70, 229, 0.8);
    border-color: transparent;
    opacity: 1;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

/* Carousel Indicators */
.carousel-indicators {
    z-index: 10;
    margin-bottom: 20px;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: #4f46e5;
    width: 12px;
    height: 12px;
    transform: scale(1.2);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: fadeIn 1s ease-out 1s both;
}

.scroll-indicator a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.scroll-indicator a:hover {
    color: white;
}

.scroll-indicator span {
    margin-bottom: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-indicator i {
    animation: bounce 2s infinite;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive Styles */
@media (max-width: 1199.98px) {
    .slide-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 991.98px) {
    .slide-title {
        font-size: 2.4rem;
    }
    
    .slide-content {
        text-align: center;
        margin: 0 auto;
    }
    
    .slide-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .slide-features {
        justify-content: center;
    }
    
    .slide-buttons {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 600px;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-description {
        font-size: 1.1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        min-height: 500px;
    }
    
    .slide-title {
        font-size: 1.8rem;
    }
    
    .slide-description {
        font-size: 1rem;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
    }
    
    .feature-pill {
        padding: 6px 12px;
    }
    
    .scroll-indicator {
        display: none;
    }
}
</style>

<script>
document.addEventListener('DOMContentLoaded', function() {
    // Initialize carousel
    const heroSlider = new bootstrap.Carousel(document.getElementById('heroSlider'), {
        interval: 5000,
        ride: true
    });
    
    // Make carousel controls visible
    const controls = document.querySelectorAll('.carousel-control');
    controls.forEach(control => {
        control.style.display = 'flex';
        control.style.visibility = 'visible';
        control.style.opacity = '0.7';
    });
    
    // Add animation class to first slide content
    const firstSlide = document.querySelector('.carousel-item.active');
    if (firstSlide) {
        const content = firstSlide.querySelectorAll('.slide-badge, .slide-title, .slide-description, .slide-features, .slide-buttons');
        content.forEach((el, index) => {
            el.style.animationDelay = (0.1 * index) + 's';
        });
    }
    
    // Handle slide change
    document.getElementById('heroSlider').addEventListener('slide.bs.carousel', function (e) {
        const nextSlide = e.relatedTarget;
        const content = nextSlide.querySelectorAll('.slide-badge, .slide-title, .slide-description, .slide-features, .slide-buttons');
        
        // Reset animations
        content.forEach(el => {
            el.style.opacity = '0';
            el.style.transform = 'translateY(30px)';
        });
        
        // Apply animations after a small delay
        setTimeout(() => {
            content.forEach((el, index) => {
                el.style.animation = 'none';
                setTimeout(() => {
                    el.style.animation = 'fadeInUp 0.5s ease-out forwards';
                    el.style.animationDelay = (0.1 * index) + 's';
                }, 10);
            });
        }, 300);
    });
    
    // Counter animation
    const counters = document.querySelectorAll('.counter-number');
    counters.forEach(counter => {
        const target = parseInt(counter.getAttribute('data-count'));
        let count = 0;
        const increment = target / 40;
        
        function updateCount() {
            if (count < target) {
                count += increment;
                counter.textContent = Math.ceil(count) + '+';
                setTimeout(updateCount, 30);
            } else {
                counter.textContent = target + '+';
            }
        }
        
        // Start counter animation when in viewport
        const observer = new IntersectionObserver((entries) => {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    updateCount();
                    observer.unobserve(entry.target);
                }
            });
        }, { threshold: 0.5 });
        
        observer.observe(counter);
    });
});
</script>

<!-- Featured Courses -->
<section id="courses" class="featured-courses-section py-5">
    <div class="container">
        <div class="row mb-5">
            <div class="col-lg-8 mx-auto text-center">
                <span class="badge bg-primary px-3 py-2 mb-3">Our Top Picks</span>
                <h2 class="section-title">Featured Courses</h2>
                <p class="section-subtitle">Expand your skills with our most popular and highly-rated courses</p>
            </div>
        </div>
        
        <div class="featured-courses-grid">
            <?php if (count($featured_courses) > 0): ?>
                <?php foreach ($featured_courses as $course): 
                    // First check if there's a database image path stored
                    $db_image_path = $course['image'] ?? '';
                    
                    // Check if the database image exists and use it if so
                    if (!empty($db_image_path) && file_exists($db_image_path)) {
                        $image_url = $db_image_path;
                    } else {
                        // Check all possible image paths in order of preference
                        $image_path_1 = 'assets/img/courses/' . $course['id'] . '.jpg';
                        $image_path_2 = 'assets/images/courses/' . $course['id'] . '.jpg';
                        $image_path_3 = 'assets/img/courses/default.jpg';
                        $image_path_4 = 'assets/images/course-placeholder.jpg';
                        $image_path_5 = 'https://placehold.co/600x400/4f46e5/ffffff?text=' . urlencode(substr($course['title'], 0, 20));
                        
                        // Check which image exists
                        if (file_exists($image_path_1)) {
                            $image_url = $image_path_1;
                        } elseif (file_exists($image_path_2)) {
                            $image_url = $image_path_2;
                        } elseif (file_exists($image_path_3)) {
                            $image_url = $image_path_3;
                        } elseif (file_exists($image_path_4)) {
                            $image_url = $image_path_4;
                        } else {
                            $image_url = $image_path_5;
                        }
                    }
                    
                    // Format the price
                    $formatted_price = isset($course['price']) && $course['price'] > 0 ? '$' . number_format($course['price'], 2) : 'Free';
                    
                    // Get instructor name
                    $instructor_name = isset($course['instructor_name']) ? $course['instructor_name'] : 'Expert Instructor';
                    
                    // Determine the category badge color
                    $category_colors = [
                        'web development' => 'primary',
                        'design' => 'info',
                        'marketing' => 'success',
                        'programming' => 'danger',
                        'business' => 'warning',
                        'data science' => 'secondary',
                        'mobile development' => 'dark'
                    ];
                    $category = strtolower($course['category'] ?? 'general');
                    $badge_color = isset($category_colors[$category]) ? $category_colors[$category] : 'primary';
                ?>
                <div class="course-card-wrapper">
                    <div class="course-card">
                        <div class="course-card-header">
                        <div class="course-image">
                                <img src="<?php echo $image_url; ?>" alt="<?php echo htmlspecialchars($course['title']); ?>" class="course-img">
                                <div class="course-overlay">
                                    <a href="course-details.php?id=<?php echo $course['id']; ?>" class="btn btn-primary btn-sm">View Details</a>
                </div>
            </div>
                            <span class="course-badge bg-<?php echo $badge_color; ?>"><?php echo htmlspecialchars($course['category'] ?? 'General'); ?></span>
        </div>
                        <div class="course-card-body">
                            <h5 class="course-title">
                                <a href="course-details.php?id=<?php echo $course['id']; ?>"><?php echo htmlspecialchars($course['title']); ?></a>
                            </h5>
                            <p class="course-desc"><?php echo htmlspecialchars(substr($course['description'], 0, 100)); ?>...</p>
                            
                            <div class="course-meta">
                                <div class="course-instructor">
                                    <i class="fas fa-user-tie"></i> <?php echo htmlspecialchars($instructor_name); ?>
                                </div>
                                <?php if(isset($course['duration'])): ?>
                                <div class="course-duration">
                                    <i class="far fa-clock"></i> <?php echo htmlspecialchars($course['duration'] ?? '8 weeks'); ?>
                                </div>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="course-card-footer">
                            <div class="course-rating">
                                <?php 
                                $rating = isset($course['rating']) ? floatval($course['rating']) : rand(35, 50) / 10;
                                $full_stars = floor($rating);
                                $half_star = $rating - $full_stars >= 0.5;
                                $empty_stars = 5 - $full_stars - ($half_star ? 1 : 0);
                                
                                for ($i = 0; $i < $full_stars; $i++): ?>
                                    <i class="fas fa-star"></i>
                                <?php endfor; 
                                
                                if ($half_star): ?>
                                    <i class="fas fa-star-half-alt"></i>
                                <?php endif;
                                
                                for ($i = 0; $i < $empty_stars; $i++): ?>
                                    <i class="far fa-star"></i>
                                <?php endfor; ?>
                                
                                <span class="rating-text"><?php echo number_format($rating, 1); ?></span>
                            </div>
                            <div class="course-price">
                                <span class="price-tag"><?php echo $formatted_price; ?></span>
                            </div>
                        </div>
                    </div>
                </div>
                <?php endforeach; ?>
            <?php else: ?>
                <!-- Default courses if no featured courses are found -->
                <div class="course-card-wrapper">
                    <div class="course-card">
                        <div class="course-card-header">
                        <div class="course-image">
                                <img src="https://placehold.co/600x400/4f46e5/ffffff?text=Web+Development" alt="Web Development" class="course-img">
                                <div class="course-overlay">
                                    <a href="#" class="btn btn-primary btn-sm">View Details</a>
            </div>
        </div>
                            <span class="course-badge bg-primary">Web Development</span>
                    </div>
                        <div class="course-card-body">
                            <h5 class="course-title">
                                <a href="#">Web Development Bootcamp</a>
                            </h5>
                            <p class="course-desc">Learn HTML, CSS, JavaScript and build responsive websites. Perfect for beginners.</p>
                            
                            <div class="course-meta">
                                <div class="course-instructor">
                                    <i class="fas fa-user-tie"></i> John Doe
                </div>
                                <div class="course-duration">
                                    <i class="far fa-clock"></i> 12 weeks
            </div>
                            </div>
                        </div>
                        <div class="course-card-footer">
                            <div class="course-rating">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star-half-alt"></i>
                                <span class="rating-text">4.5</span>
                            </div>
                            <div class="course-price">
                                <span class="price-tag">$49.99</span>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="course-card-wrapper">
                    <div class="course-card">
                        <div class="course-card-header">
                            <div class="course-image">
                                <img src="https://placehold.co/600x400/4f46e5/ffffff?text=Data+Science" alt="Data Science" class="course-img">
                                <div class="course-overlay">
                                    <a href="#" class="btn btn-primary btn-sm">View Details</a>
                                </div>
                            </div>
                            <span class="course-badge bg-secondary">Data Science</span>
                                    </div>
                        <div class="course-card-body">
                            <h5 class="course-title">
                                <a href="#">Data Science with Python</a>
                            </h5>
                            <p class="course-desc">Master data analysis, visualization, and machine learning with Python.</p>
                            
                            <div class="course-meta">
                                <div class="course-instructor">
                                    <i class="fas fa-user-tie"></i> Sarah Johnson
                                        </div>
                                <div class="course-duration">
                                    <i class="far fa-clock"></i> 10 weeks
                                    </div>
                            </div>
                        </div>
                        <div class="course-card-footer">
                            <div class="course-rating">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <span class="rating-text">5.0</span>
                            </div>
                            <div class="course-price">
                                <span class="price-tag">$59.99</span>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="course-card-wrapper">
                    <div class="course-card">
                        <div class="course-card-header">
                        <div class="course-image">
                                <img src="https://placehold.co/600x400/4f46e5/ffffff?text=Digital+Marketing" alt="Digital Marketing" class="course-img">
                                <div class="course-overlay">
                                    <a href="#" class="btn btn-primary btn-sm">View Details</a>
                                </div>
                                </div>
                            <span class="course-badge bg-success">Marketing</span>
                                    </div>
                        <div class="course-card-body">
                            <h5 class="course-title">
                                <a href="#">Digital Marketing Masterclass</a>
                            </h5>
                            <p class="course-desc">Learn SEO, social media marketing, and content strategy for your business.</p>
                            
                            <div class="course-meta">
                                <div class="course-instructor">
                                    <i class="fas fa-user-tie"></i> Michael Brown
                                </div>
                                <div class="course-duration">
                                    <i class="far fa-clock"></i> 8 weeks
                            </div>
                            </div>
                        </div>
                        <div class="course-card-footer">
                            <div class="course-rating">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="far fa-star"></i>
                                <span class="rating-text">4.0</span>
                            </div>
                            <div class="course-price">
                                <span class="price-tag">$39.99</span>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="course-card-wrapper">
                    <div class="course-card">
                        <div class="course-card-header">
                        <div class="course-image">
                                <img src="https://placehold.co/600x400/4f46e5/ffffff?text=Graphic+Design" alt="Graphic Design" class="course-img">
                                <div class="course-overlay">
                                    <a href="#" class="btn btn-primary btn-sm">View Details</a>
                        </div>
                    </div>
                            <span class="course-badge bg-info">Design</span>
                        </div>
                        <div class="course-card-body">
                            <h5 class="course-title">
                                <a href="#">Graphic Design Essentials</a>
                            </h5>
                            <p class="course-desc">Master Adobe Creative Suite and fundamental design principles.</p>
                            
                            <div class="course-meta">
                                <div class="course-instructor">
                                    <i class="fas fa-user-tie"></i> Emily Wilson
                                </div>
                                <div class="course-duration">
                                    <i class="far fa-clock"></i> 6 weeks
                                </div>
                            </div>
                        </div>
                        <div class="course-card-footer">
                            <div class="course-rating">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star-half-alt"></i>
                                <i class="far fa-star"></i>
                                <span class="rating-text">3.5</span>
                            </div>
                            <div class="course-price">
                                <span class="price-tag">$44.99</span>
                            </div>
                        </div>
                    </div>
                </div>
            <?php endif; ?>
        </div>
        
        <div class="text-center mt-5">
            <a href="courses.php" class="btn btn-lg btn-primary">Browse All Courses <i class="fas fa-arrow-right ms-2"></i></a>
        </div>
    </div>
</section>

<!-- Add Course Card Styles -->
<style>
/* Featured Courses Section */
.featured-courses-section {
    padding: 80px 0;
    background-color: #f8f9fc;
    position: relative;
    overflow: hidden;
}

.featured-courses-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(79, 70, 229, 0.1);
    z-index: 1;
}

.featured-courses-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(124, 58, 237, 0.05);
    z-index: 1;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout */
.featured-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

/* Course Card */
.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Card Header with Image */
.course-card-header {
    position: relative;
}

.course-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-img {
    transform: scale(1.1);
}

.course-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-card:hover .course-overlay {
    opacity: 1;
}

.course-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

/* Card Body */
.course-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.course-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.course-title a:hover {
    color: var(--primary-color);
}

.course-desc {
    font-size: 0.9375rem;
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    color: #6b7280;
    font-size: 0.875rem;
}

.course-instructor, .course-duration {
    display: flex;
    align-items: center;
}

.course-instructor i, .course-duration i {
    margin-right: 5px;
    font-size: 0.875rem;
    color: var(--primary-color);
}

/* Card Footer */
.course-card-footer {
    padding: 15px 20px;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-rating {
    display: flex;
    align-items: center;
    color: #f59e0b;
    font-size: 0.875rem;
}

.course-rating i {
    margin-right: 2px;
}

.rating-text {
    margin-left: 5px;
    color: #6b7280;
    font-weight: 600;
}

.course-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
}

.price-tag {
    position: relative;
    display: inline-block;
}

.price-tag.free {
    color: #10b981;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .featured-courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .featured-courses-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.875rem;
    }
    
    .featured-courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .featured-courses-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .course-image {
        height: 180px;
    }
}
</style>

<!-- About Section -->
<section id="about" class="about-section py-6 position-relative overflow-hidden">
    <!-- 3D background elements -->
    <div class="floating-shapes">
        <div class="shape shape-1" data-tilt data-tilt-max="15" data-tilt-perspective="1000"></div>
        <div class="shape shape-2" data-tilt data-tilt-max="15" data-tilt-perspective="1000"></div>
        <div class="shape shape-3" data-tilt data-tilt-max="15" data-tilt-perspective="1000"></div>
        <div class="shape shape-4" data-tilt data-tilt-max="15" data-tilt-perspective="1000"></div>
    </div>
    
    <div class="container">
        <div class="row justify-content-center mb-5">
            <div class="col-lg-7 text-center">
                <h6 class="text-primary text-uppercase fw-bold mb-2 animate__animated animate__fadeInUp">discover our story</h6>
                <h2 class="display-4 fw-bold mb-4 animate__animated animate__fadeInUp animate__delay-1s">Transforming Education for <span class="text-gradient">The Digital Age</span></h2>
                <p class="lead animate__animated animate__fadeInUp animate__delay-2s">We combine innovative technology with expert instruction to create a learning experience that adapts to your needs.</p>
            </div>
        </div>
        
        <div class="row align-items-center">
            <div class="col-lg-6 mb-5 mb-lg-0">
                <div class="about-image-wrapper animate__animated animate__fadeInLeft">
                    <div class="about-image-3d" data-tilt data-tilt-max="10" data-tilt-perspective="1000">
                        <img src="assets/img/about/about.jpg" alt="About Us" class="img-fluid rounded-xl shadow-lg">
                        <!-- Floating badges -->
                        <div class="floating-badge badge-students">
                            <div class="badge-icon">
                                <i class="fas fa-user-graduate"></i>
                            </div>
                            <div class="badge-content">
                                <h4>10K+</h4>
                                <p>Students</p>
                            </div>
                        </div>
                        <div class="floating-badge badge-courses">
                            <div class="badge-icon">
                                <i class="fas fa-book-open"></i>
                            </div>
                            <div class="badge-content">
                                <h4>10+</h4>
                                <p>Courses</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="col-lg-6">
                <div class="about-content animate__animated animate__fadeInRight">
                    <h3 class="fw-bold mb-4">Why Choose Our Platform?</h3>
                    <p class="mb-4">Our learning platform combines cutting-edge technology with expert instruction to deliver an unparalleled educational experience. We focus on practical, industry-relevant skills that help you achieve your goals.</p>
                    
                    <div class="features-grid">
                        <div class="feature-card" data-tilt data-tilt-max="10" data-tilt-scale="1.05">
                            <div class="feature-icon">
                                <i class="fas fa-graduation-cap"></i>
                    </div>
                            <div class="feature-text">
                                <h5>Expert Instructors</h5>
                                <p>Learn from industry professionals with real-world experience</p>
                </div>
            </div>
                        
                        <div class="feature-card" data-tilt data-tilt-max="10" data-tilt-scale="1.05">
                            <div class="feature-icon">
                                <i class="fas fa-certificate"></i>
                    </div>
                            <div class="feature-text">
                                <h5>Certification</h5>
                                <p>Earn recognized certificates to boost your credentials</p>
                </div>
            </div>
                        
                        <div class="feature-card" data-tilt data-tilt-max="10" data-tilt-scale="1.05">
                            <div class="feature-icon">
                                <i class="fas fa-laptop"></i>
                    </div>
                            <div class="feature-text">
                                <h5>Online Learning</h5>
                                <p>Access your courses anytime, anywhere, on any device</p>
                </div>
            </div>
                        
                        <div class="feature-card" data-tilt data-tilt-max="10" data-tilt-scale="1.05">
                            <div class="feature-icon">
                                <i class="fas fa-users"></i>
                    </div>
                            <div class="feature-text">
                                <h5>Supportive Community</h5>
                                <p>Join a network of learners and mentors who help each other succeed</p>
                </div>
                    </div>
                </div>
                    
                    <div class="mt-5">
                        <a href="about.php" class="btn btn-primary btn-lg rounded-pill shadow-hover">
                            <span>Learn More About Us</span>
                            <i class="fas fa-arrow-right ms-2"></i>
                        </a>
            </div>
                </div>
            </div>
        </div>
    </div>
</section>

<style>
/* About Section Styles */
.about-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.rounded-xl {
    border-radius: 20px;
}

.shadow-hover {
    transition: all 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* 3D Background Elements */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--secondary-rgb), 0.05) 100%);
    backdrop-filter: blur(5px);
    transform-style: preserve-3d;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -100px;
    animation: float 15s infinite alternate ease-in-out;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -100px;
    animation: float 20s infinite alternate-reverse ease-in-out;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 10%;
    animation: float 25s infinite alternate ease-in-out;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    left: 40%;
    animation: float 18s infinite alternate-reverse ease-in-out;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(20px) rotate(-5deg);
    }
}

/* About Image Styles */
.about-image-wrapper {
    position: relative;
    padding: 30px;
    perspective: 1200px;
    margin-bottom: 30px;
}

.about-image-3d {
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    will-change: transform;
    z-index: 1;
    height: 500px; /* Increased height */
    width: 100%;
}

.about-image-3d:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
}

.about-image-3d img {
    transform-style: preserve-3d;
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateZ(0);
    width: 100%;
    object-fit: cover;
    object-position: center;
    height: 100%;
    z-index: 1;
}

.about-image-3d:before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.about-image-3d:hover:before {
    opacity: 1;
}

.about-image-3d:after {
    content: '';
    position: absolute;
    inset: -5px;
    z-index: -1;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.5;
    filter: blur(15px);
    transform: translateZ(-50px);
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: white;
    border-radius: 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    z-index: 3;
    transform-style: preserve-3d;
    transform: translateZ(20px);
    transition: all 0.3s ease;
}

.floating-badge:hover {
    transform: translateZ(40px) scale(1.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.badge-students {
    bottom: -25px;
    left: -25px;
    animation: floatBadge 6s infinite alternate ease-in-out;
}

.badge-courses {
    top: -10px;
    right: -15px;
    animation: floatBadge 8s infinite alternate-reverse ease-in-out;
}

@keyframes floatBadge {
    0% {
        transform: translateZ(20px) translateY(0);
    }
    100% {
        transform: translateZ(20px) translateY(-15px);
    }
}

.badge-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-size: 22px;
}

.badge-content {
    line-height: 1.2;
}

.badge-content h4 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.badge-content p {
    margin: 3px 0 0;
    font-size: 14px;
    color: #666;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--secondary-rgb), 0.1) 100%);
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.feature-text h5 {
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 16px;
}

.feature-text p {
    margin-bottom: 0;
    font-size: 14px;
    color: #666;
}

/* Responsive Styles */
@media (max-width: 1199.98px) {
    .about-image-3d {
        height: 450px;
    }
}

@media (max-width: 991.98px) {
    .about-image-wrapper {
        margin-bottom: 60px;
        padding: 20px;
    }
    
    .about-image-3d {
        height: 400px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .py-6 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .about-image-3d {
        height: 350px;
    }
    
    .floating-badge {
        padding: 10px 15px;
    }
    
    .badge-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .badge-content h4 {
        font-size: 18px;
    }
    
    .badge-content p {
        font-size: 12px;
    }
}

@media (max-width: 575.98px) {
    .about-image-3d {
        height: 300px;
    }
    
    .floating-badge {
        transform: scale(0.9);
    }
    
    .badge-students {
        bottom: -15px;
        left: -15px;
    }
    
    .badge-courses {
        top: -15px;
        right: -15px;
    }
}

/* Role Badge Styles */
.role-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge-director {
    background: linear-gradient(135deg, #ff9500, #ff5e3a);
    box-shadow: 0 2px 10px rgba(255, 94, 58, 0.2);
}

.role-badge-developer {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    box-shadow: 0 2px 10px rgba(58, 123, 213, 0.2);
}

.role-badge-instructor {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    box-shadow: 0 2px 10px rgba(106, 17, 203, 0.2);
}
</style>

<!-- Team Section -->
<section id="team" class="instructors-section py-6 position-relative overflow-hidden">
    <!-- Background elements -->
    <div class="instructors-bg-elements">
        <div class="bg-circle circle-1"></div>
        <div class="bg-circle circle-2"></div>
        <div class="bg-line line-1"></div>
        <div class="bg-line line-2"></div>
    </div>
    
    <div class="container position-relative">
        <div class="row justify-content-center mb-5">
            <div class="col-lg-7 text-center">
                <h6 class="text-primary text-uppercase fw-bold mb-2 animate__animated animate__fadeInUp">expert educators</h6>
                <h2 class="display-4 fw-bold mb-4 animate__animated animate__fadeInUp animate__delay-1s">Meet Our <span class="text-gradient">Instructors</span></h2>
                <p class="lead animate__animated animate__fadeInUp animate__delay-2s">Learn from industry professionals with years of experience and passion for teaching</p>
            </div>
        </div>
        
        <div class="instructors-slider-container animate__animated animate__fadeInUp animate__delay-3s">
            <div class="instructors-slider-controls">
                <button class="nav-prev" id="instructorPrev">
                    <i class="fas fa-chevron-left"></i>
                </button>
                <button class="nav-next" id="instructorNext">
                    <i class="fas fa-chevron-right"></i>
                </button>
            </div>
            
            <div class="instructors-slider" id="instructorsSlider">
                <?php
                // Fetch instructors from database
                // First check if the profile_image column exists
                $column_check = $conn->query("SHOW COLUMNS FROM users LIKE 'profile_image'");
                $profile_image_exists = $column_check->num_rows > 0;

                $designation_check = $conn->query("SHOW COLUMNS FROM users LIKE 'designation'");
                $designation_exists = $designation_check->num_rows > 0;

                $expertise_check = $conn->query("SHOW COLUMNS FROM users LIKE 'expertise'");
                $expertise_exists = $expertise_check->num_rows > 0;

                $bio_check = $conn->query("SHOW COLUMNS FROM users LIKE 'bio'");
                $bio_exists = $bio_check->num_rows > 0;

                // Check if phone column exists
                $phone_check = $conn->query("SHOW COLUMNS FROM users LIKE 'phone'");
                $phone_exists = $phone_check->num_rows > 0;

                // Build the query dynamically based on which columns exist
                $instructors_query = "SELECT u.id, u.first_name, u.last_name, u.email, u.role";

                if ($profile_image_exists) {
                    $instructors_query .= ", u.profile_image";
                }

                if ($designation_exists) {
                    $instructors_query .= ", u.designation";
                }

                if ($expertise_exists) {
                    $instructors_query .= ", u.expertise";
                }

                if ($bio_exists) {
                    $instructors_query .= ", u.bio";
                }

                if ($phone_exists) {
                    $instructors_query .= ", u.phone";
                }

                $instructors_query .= " FROM users u
                                 WHERE (u.role = 'instructor' OR u.role = 'director' OR u.role = 'developer') 
                                 AND u.status = 'active'";
                
                // Check if is_team_member column exists before using it
                $is_team_member_exists = $conn->query("SHOW COLUMNS FROM users LIKE 'is_team_member'")->num_rows > 0;
                if ($is_team_member_exists) {
                    $instructors_query .= " AND u.is_team_member = 1";
                }
                
                $instructors_query .= " ORDER BY 
                                    CASE 
                                       WHEN u.role = 'director' THEN 1
                                       WHEN u.role = 'developer' THEN 2
                                       ELSE 3
                                    END, 
                                    u.first_name
                                 LIMIT 10";
                                     
                $instructors_result = $conn->query($instructors_query);
                $instructors = [];
                
                if ($instructors_result && $instructors_result->num_rows > 0) {
                    while ($row = $instructors_result->fetch_assoc()) {
                        $instructors[] = $row;
                    }
                }
                
                // If no instructors found, use sample data
                if (empty($instructors)) {
                    $instructors = [
                        [
                            'id' => 1,
                            'first_name' => 'John',
                            'last_name' => 'Smith',
                            'designation' => 'Web Development Expert',
                            'profile_image' => 'assets/images/instructors/instructor-1.jpg',
                            'expertise' => 'HTML, CSS, JavaScript, React',
                            'bio' => 'Over 10 years of experience in web development and teaching programming concepts to students of all levels.',
                            'phone' => '+91 9876543210',
                            'role' => 'instructor'
                        ],
                        [
                            'id' => 2,
                            'first_name' => 'Sarah',
                            'last_name' => 'Johnson',
                            'designation' => 'UI/UX Design Specialist',
                            'profile_image' => 'assets/images/instructors/instructor-2.jpg',
                            'expertise' => 'UI Design, UX Research, Figma, Adobe XD',
                            'bio' => 'Award-winning designer with a passion for creating beautiful and functional user interfaces.',
                            'phone' => '+91 8765432109',
                            'role' => 'instructor'
                        ],
                        [
                            'id' => 3,
                            'first_name' => 'Michael',
                            'last_name' => 'Brown',
                            'designation' => 'Data Science Instructor',
                            'profile_image' => 'assets/images/instructors/instructor-3.jpg',
                            'expertise' => 'Python, Machine Learning, Data Analysis',
                            'bio' => 'Former data scientist at a Fortune 500 company with a PhD in Computer Science.',
                            'phone' => '+91 7654321098',
                            'role' => 'instructor'
                        ],
                        [
                            'id' => 4,
                            'first_name' => 'Emily',
                            'last_name' => 'Davis',
                            'designation' => 'Digital Marketing Expert',
                            'profile_image' => 'assets/images/instructors/instructor-4.jpg',
                            'expertise' => 'SEO, Social Media, Content Marketing',
                            'bio' => 'Experienced digital marketer who has helped dozens of businesses improve their online presence.',
                            'phone' => '+91 6543210987',
                            'role' => 'instructor'
                        ]
                    ];
                }
                
                // Render instructor cards
                foreach ($instructors as $index => $instructor) {
                    // Process social links
                    $social_links = [];
                    if (!empty($instructor['social_links'])) {
                        if (is_string($instructor['social_links'])) {
                            $social_links = json_decode($instructor['social_links'], true) ?? [];
                        } else if (is_array($instructor['social_links'])) {
                            $social_links = $instructor['social_links'];
                        }
                    }
                    
                    // Get instructor profile image
                    $profile_image = !empty($instructor['profile_image']) ? $instructor['profile_image'] : 'assets/images/avatar-placeholder.jpg';
                    
                    // Set expertise array
                    $expertise = explode(',', $instructor['expertise'] ?? '');
                    $expertise = array_slice(array_filter(array_map('trim', $expertise)), 0, 4);
                    
                    // Render card
                    ?>
                    <div class="instructor-card">
                        <div class="instructor-card-inner">
                            <div class="instructor-card-front">
                                <div class="instructor-image">
                                    <img src="<?php echo $profile_image; ?>" alt="<?php echo htmlspecialchars($instructor['first_name'] . ' ' . $instructor['last_name']); ?>">
                                </div>
                                
                                <div class="instructor-content">
                                    <h3 class="instructor-name"><?php echo htmlspecialchars($instructor['first_name'] . ' ' . $instructor['last_name']); ?></h3>
                                    <?php
                                    // Display role badge first
                                    $role_badge_class = '';
                                    $role_display = 'Instructor';
                                    
                                    if (isset($instructor['role'])) {
                                        if ($instructor['role'] == 'director') {
                                            $role_badge_class = 'role-badge-director';
                                            $role_display = 'Director';
                                        } elseif ($instructor['role'] == 'developer') {
                                            $role_badge_class = 'role-badge-developer';
                                            $role_display = 'Developer';
                                        } else {
                                            $role_badge_class = 'role-badge-instructor';
                                        }
                                    }
                                    ?>
                                    <div class="role-badge <?php echo $role_badge_class; ?>"><?php echo $role_display; ?></div>
                                    
                                 
                                    
                                    <?php if (!empty($expertise)): ?>
                                    <div class="instructor-expertise">
                                        <?php foreach ($expertise as $skill): ?>
                                            <span class="expertise-tag"><?php echo htmlspecialchars($skill); ?></span>
                                        <?php endforeach; ?>
                                    </div>
                                    <?php endif; ?>
                                    
                                    <div class="instructor-stats">
                                        <?php if (!empty($instructor['phone'])): ?>
                                        <div class="stat-item">
                                            <i class="fas fa-phone"></i>
                                            <span><?php echo htmlspecialchars($instructor['phone']); ?></span>
                                        </div>
                                        <?php endif; ?>
                                        <div class="flip-indicator">
                                            <span>Click to view bio</span>
                                            <i class="fas fa-sync-alt"></i>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="instructor-card-back">
                                <button class="flip-back-btn">
                                    <i class="fas fa-arrow-left"></i> Back
                                </button>
                                
                                <h3 class="back-name"><?php echo htmlspecialchars($instructor['first_name'] . ' ' . $instructor['last_name']); ?></h3>
                                <div class="role-badge <?php echo $role_badge_class; ?>"><?php echo $role_display; ?></div>
                                <p class="back-designation"><?php echo htmlspecialchars($instructor['designation'] ?? 'Instructor'); ?></p>
                                
                                <div class="back-bio">
                                    <p><?php echo nl2br(htmlspecialchars(substr($instructor['bio'] ?? '', 0, 300) . (strlen($instructor['bio'] ?? '') > 300 ? '...' : ''))); ?></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php
                }
                ?>
            </div>
            
            <div class="slider-pagination" id="instructorPagination"></div>
        </div>
        
        <div class="text-center mt-5 animate__animated animate__fadeInUp animate__delay-4s">
            <a href="instructors.php" class="btn btn-primary btn-lg rounded-pill shadow-hover">
                <span>View All Instructors</span>
                <i class="fas fa-arrow-right ms-2"></i>
            </a>
        </div>
    </div>
</section>

<style>
/* Instructors Section Styles */
.instructors-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #f8f9fc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

/* Background Elements */
.instructors-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--secondary-rgb), 0.05) 100%);
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -150px;
    right: -100px;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -50px;
}

.bg-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.1), transparent);
}

.line-1 {
    width: 100%;
    top: 30%;
    transform: rotate(-2deg);
}

.line-2 {
    width: 100%;
    bottom: 35%;
    transform: rotate(2deg);
}

/* Instructors Slider */
.instructors-slider-container {
    position: relative;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
}

.instructors-slider-controls {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
    padding: 0 10px;
}

.nav-prev, .nav-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    position: relative;
    z-index: 20;
}

.nav-prev:hover, .nav-next:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.2);
}

.instructors-slider {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    padding: 20px 40px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative;
    scroll-snap-type: x mandatory;
    flex-wrap: nowrap;
}

.instructors-slider::-webkit-scrollbar {
    display: none;
}

/* Pagination */
.slider-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-dot.active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 10px;
}

/* Instructor Card */
.instructor-card {
    flex: 0 0 300px;
    min-width: 300px;
    perspective: 1000px;
    scroll-snap-align: start;
}

.instructor-card-inner {
    position: relative;
    width: 100%;
    height: 420px;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.instructor-card:hover .instructor-image img {
    transform: scale(1.05);
}

.instructor-card-front, .instructor-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.instructor-card-back {
    transform: rotateY(180deg);
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.instructor-card.flipped .instructor-card-inner {
    transform: rotateY(180deg);
}

/* Instructor Image */
.instructor-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.instructor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Instructor Overlay */
.instructor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instructor-card:hover .instructor-overlay {
    opacity: 1;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 14px;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.instructor-card:hover .social-icon {
    transform: translateY(0);
    opacity: 1;
}

.social-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.instructor-card:hover .social-icon:nth-child(1) {
    transition-delay: 0.1s;
}

.instructor-card:hover .social-icon:nth-child(2) {
    transition-delay: 0.2s;
}

.instructor-card:hover .social-icon:nth-child(3) {
    transition-delay: 0.3s;
}

.instructor-card:hover .social-icon:nth-child(4) {
    transition-delay: 0.4s;
}

/* Instructor Content */
.instructor-content {
    padding: 20px;
    text-align: center;
}

.instructor-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.instructor-designation {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.instructor-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-bottom: 15px;
}

.expertise-tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.instructor-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 13px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--dark-color);
}

.flip-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    cursor: pointer;
}

/* Card Back */
.flip-back-btn {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    padding: 0;
    margin-bottom: 20px;
    cursor: pointer;
}

.back-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.back-designation {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.back-bio {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark-color);
}

.view-profile-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.view-profile-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.2);
}

@media (max-width: 991px) {
    .instructors-slider {
        justify-content: flex-start;
    }
    
    .nav-prev, .nav-next {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 767px) {
    .instructors-section {
        padding: 80px 0;
    }
    
    .instructors-slider-controls {
        padding: 0;
    }
    
    .instructor-card {
        flex: 0 0 260px;
        min-width: 260px;
    }
    
    .instructor-card-inner {
        height: 380px;
    }
    
    .instructor-image {
        height: 200px;
    }
}
</style>

<script>
document.addEventListener('DOMContentLoaded', function() {
    // Instructor slider functionality
    const slider = document.getElementById('instructorsSlider');
    const prevBtn = document.getElementById('instructorPrev');
    const nextBtn = document.getElementById('instructorNext');
    const pagination = document.getElementById('instructorPagination');
    const cards = slider.querySelectorAll('.instructor-card');
    
    // Initialize card flipping
    cards.forEach(card => {
        const flipIndicator = card.querySelector('.flip-indicator');
        const backBtn = card.querySelector('.flip-back-btn');
        
        if (flipIndicator) {
            flipIndicator.addEventListener('click', () => {
                card.classList.add('flipped');
            });
        }
        
        if (backBtn) {
            backBtn.addEventListener('click', () => {
                card.classList.remove('flipped');
            });
        }
    });
    
    // Calculate how many cards to show
    const cardWidth = cards[0].offsetWidth;
    const sliderWidth = slider.offsetWidth;
    const gap = 30; // gap between cards
    const cardsPerView = Math.max(1, Math.floor(sliderWidth / (cardWidth + gap)));
    const totalSlides = Math.ceil(cards.length / cardsPerView);
    
    // Create pagination dots
    for (let i = 0; i < totalSlides; i++) {
        const dot = document.createElement('div');
        dot.classList.add('pagination-dot');
        if (i === 0) dot.classList.add('active');
        dot.addEventListener('click', () => {
            const scrollAmount = i * (cardsPerView * (cardWidth + gap));
            slider.scrollTo({
                left: scrollAmount,
                behavior: 'smooth'
            });
            updateActiveDot(i);
        });
        pagination.appendChild(dot);
    }
    
    // Update active pagination dot
    function updateActiveDot(index) {
        const dots = pagination.querySelectorAll('.pagination-dot');
        dots.forEach((dot, i) => {
            if (i === index) {
                dot.classList.add('active');
            } else {
                dot.classList.remove('active');
            }
        });
    }
    
    // Navigation buttons
    let currentSlide = 0;
    
    prevBtn.addEventListener('click', () => {
        if (currentSlide > 0) {
            currentSlide--;
            const scrollAmount = currentSlide * (cardsPerView * (cardWidth + gap));
            slider.scrollTo({
                left: scrollAmount,
                behavior: 'smooth'
            });
            updateActiveDot(currentSlide);
        }
    });
    
    nextBtn.addEventListener('click', () => {
        if (currentSlide < totalSlides - 1) {
            currentSlide++;
            const scrollAmount = currentSlide * (cardsPerView * (cardWidth + gap));
            slider.scrollTo({
                left: scrollAmount,
                behavior: 'smooth'
            });
            updateActiveDot(currentSlide);
        }
    });
    
    // Monitor scroll to update active dot
    slider.addEventListener('scroll', () => {
        const scrollPosition = slider.scrollLeft;
        const slideWidth = cardsPerView * (cardWidth + gap);
        const newIndex = Math.round(scrollPosition / slideWidth);
        
        if (newIndex !== currentSlide && newIndex >= 0 && newIndex < totalSlides) {
            currentSlide = newIndex;
            updateActiveDot(currentSlide);
        }
    });
    
    // Handle window resize
    window.addEventListener('resize', () => {
        // Recalculate dimensions
        const newCardWidth = cards[0].offsetWidth;
        const newSliderWidth = slider.offsetWidth;
        const newCardsPerView = Math.max(1, Math.floor(newSliderWidth / (newCardWidth + gap)));
        
        // If the number of cards per view has changed, update and reset
        if (newCardsPerView !== cardsPerView) {
            // Reset to first slide
            currentSlide = 0;
            slider.scrollTo({
                left: 0,
                behavior: 'smooth'
            });
            updateActiveDot(0);
            
            // Remove and recreate pagination dots
            while (pagination.firstChild) {
                pagination.removeChild(pagination.firstChild);
            }
            
            const newTotalSlides = Math.ceil(cards.length / newCardsPerView);
            for (let i = 0; i < newTotalSlides; i++) {
                const dot = document.createElement('div');
                dot.classList.add('pagination-dot');
                if (i === 0) dot.classList.add('active');
                dot.addEventListener('click', () => {
                    const scrollAmount = i * (newCardsPerView * (newCardWidth + gap));
                    slider.scrollTo({
                        left: scrollAmount,
                        behavior: 'smooth'
                    });
                    updateActiveDot(i);
                });
                pagination.appendChild(dot);
            }
        }
    });
});
</script>

<!-- Testimonials -->
<section id="testimonials" class="testimonials-section py-6 position-relative overflow-hidden">
    <!-- 3D Background Elements -->
    <div class="testimonial-3d-elements">
        <div class="floating-cube cube-1"></div>
        <div class="floating-cube cube-2"></div>
        <div class="floating-cube cube-3"></div>
        <div class="floating-sphere sphere-1"></div>
        <div class="floating-sphere sphere-2"></div>
        <div class="quote-mark quote-1"><i class="fas fa-quote-left"></i></div>
        <div class="quote-mark quote-2"><i class="fas fa-quote-right"></i></div>
    </div>
    
    <div class="container position-relative">
        <div class="row justify-content-center mb-5">
            <div class="col-lg-7 text-center">
                <h6 class="text-primary text-uppercase fw-bold mb-2 animate__animated animate__fadeInUp">testimonials</h6>
                <h2 class="display-4 fw-bold mb-4 animate__animated animate__fadeInUp animate__delay-1s">What Our <span class="text-gradient">Students Say</span></h2>
                <p class="lead mb-0 animate__animated animate__fadeInUp animate__delay-2s">Hear from our students about their learning journey and success stories.</p>
            </div>
        </div>
        
        <div class="testimonial-slider-wrapper">
            <div class="testimonial-slider">
                <!-- Only 3 static testimonials -->
                        <div class="testimonial-card" data-tilt data-tilt-max="5" data-tilt-glare data-tilt-max-glare="0.1">
                            <div class="testimonial-card-inner">
                                <div class="testimonial-header">
                                    <div class="testimonial-avatar">
                                <img src="assets/img/testimonials/p1.jpg" alt="">
            </div>
                                <div class="testimonial-meta">
                                    <h4>David Chen</h4>
                                    <p class="student-course">Web Development</p>
                                    <div class="rating">
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                        </div>
                    </div>
                            </div>
                            <div class="testimonial-body">
                                <p>"The web development course was comprehensive and well-structured. I was able to build my portfolio website by the end of the course. The instructor's guidance was invaluable throughout my learning journey."</p>
                                    </div>
                        </div>
                    </div>
                    
                    <div class="testimonial-card" data-tilt data-tilt-max="5" data-tilt-glare data-tilt-max-glare="0.1">
                        <div class="testimonial-card-inner">
                            <div class="testimonial-header">
                                <div class="testimonial-avatar">
                                <img src="assets/img/testimonials/p2.jpg" alt="">
                                </div>
                                <div class="testimonial-meta">
                                    <h4>Sarah Williams</h4>
                                    <p class="student-course">Data Science</p>
                                    <div class="rating">
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star-half-alt"></i>
                        </div>
                    </div>
                </div>
                            <div class="testimonial-body">
                                <p>"The data science course provided me with practical skills that I immediately applied in my job. The instructor was knowledgeable and supportive throughout the entire learning process."</p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="testimonial-card" data-tilt data-tilt-max="5" data-tilt-glare data-tilt-max-glare="0.1">
                        <div class="testimonial-card-inner">
                            <div class="testimonial-header">
                                <div class="testimonial-avatar">
                                <img src="assets/img/testimonials/p3.jpg" alt="Emily Rodriguez">
                                </div>
                                <div class="testimonial-meta">
                                    <h4>Emily Rodriguez</h4>
                                    <p class="student-course">Digital Marketing</p>
                                    <div class="rating">
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="testimonial-body">
                                <p>"Thanks to this course, I was able to increase my company's social media engagement by 200%. The strategies taught are practical and effective. I highly recommend this program to anyone looking to boost their digital marketing skills."</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="testimonial-controls">
                <button class="testimonial-prev"><i class="fas fa-arrow-left"></i></button>
                <div class="testimonial-dots"></div>
                <button class="testimonial-next"><i class="fas fa-arrow-right"></i></button>
            </div>
                                </div>
                            </div>
</section>

<style>
/* Testimonials Section */
.testimonials-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 100px 0;
    perspective: 1000px;
}

.testimonial-3d-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-cube {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 15px;
    opacity: 0.1;
    transform-style: preserve-3d;
    animation: floatAnimation 15s infinite ease-in-out;
}

.cube-1 {
    top: 10%;
    left: 10%;
    background: var(--primary-color);
    animation-duration: 17s;
    transform: rotate(45deg);
}

.cube-2 {
    top: 70%;
    left: 15%;
    width: 120px;
    height: 120px;
    background: var(--secondary-color);
    animation-duration: 22s;
    animation-delay: 2s;
    transform: rotate(30deg);
}

.cube-3 {
    top: 20%;
    right: 10%;
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    animation-duration: 19s;
    animation-delay: 5s;
    transform: rotate(60deg);
}

.floating-sphere {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    transform-style: preserve-3d;
    animation: floatAnimation 20s infinite ease-in-out;
}

.sphere-1 {
    bottom: 20%;
    right: 15%;
    width: 150px;
    height: 150px;
    background: var(--primary-color);
    animation-duration: 25s;
}

.sphere-2 {
    top: 60%;
    right: 25%;
    width: 90px;
    height: 90px;
    background: var(--secondary-color);
    animation-duration: 18s;
    animation-delay: 3s;
}

.quote-mark {
    position: absolute;
    font-size: 150px;
    opacity: 0.08;
    color: var(--primary-color);
    z-index: 0;
}

.quote-1 {
    top: 10%;
    left: 5%;
}

.quote-2 {
    bottom: 10%;
    right: 5%;
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0) rotate(0);
    }
    25% {
        transform: translateY(-15px) rotate(5deg);
    }
    50% {
        transform: translateY(8px) rotate(-5deg);
    }
    75% {
        transform: translateY(-5px) rotate(2deg);
    }
}

.testimonial-slider-wrapper {
    width: 100%;
    position: relative;
    z-index: 5;
}

.testimonial-slider {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 30px;
    margin: 0 auto;
    max-width: 1200px;
    overflow: visible;
    padding: 20px 10px;
}

@media (max-width: 1199px) {
    .testimonial-slider {
        max-width: 960px;
    }
}

@media (max-width: 991px) {
    .testimonial-slider {
        flex-wrap: wrap;
    justify-content: center;
}

.testimonial-card {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .testimonial-card {
        flex: 0 0 100%;
        max-width: 380px;
        margin-bottom: 30px;
    }
    
    .testimonials-section {
        padding: 60px 0;
    }
}

    .testimonial-card {
    flex: 1;
    min-width: 0;
    max-width: calc(33.33% - 20px);
    animation: fadeInUp 0.8s forwards;
    opacity: 0;
}

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

@media (max-width: 991px) {
    .testimonial-slider {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .testimonial-card {
        flex: 0 0 100%;
        max-width: 380px;
        margin-bottom: 30px;
    }
}

/* Hide controls since we're showing all testimonials in one row */
.testimonial-controls {
    display: none;
}

.testimonial-card-inner {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    padding: 30px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

.testimonial-card-inner:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid var(--primary-color);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-meta h4 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.testimonial-meta .student-course {
    color: var(--primary-color);
    font-size: 14px;
    margin: 0 0 8px;
}

.testimonial-meta .rating {
    color: #FFD700;
    font-size: 14px;
}

.testimonial-body {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

.testimonial-body p {
    margin: 0;
    font-style: italic;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.testimonial-dots {
    display: flex;
    gap: 10px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    width: 30px;
    border-radius: 10px;
    background: var(--primary-color);
}

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

@media (max-width: 767.98px) {
    .testimonials-section {
        padding: 60px 0;
    }
    
    .quote-mark {
        font-size: 100px;
    }
    
    .testimonial-card {
        margin-bottom: 20px;
    }
}
</style>

<script>
document.addEventListener('DOMContentLoaded', function() {
    // Initialize tilt effect on testimonial cards
    const testimonialCards = document.querySelectorAll('.testimonial-card');
    testimonialCards.forEach(card => {
        // Apply tilt effect if VanillaTilt exists
    if (typeof VanillaTilt !== 'undefined') {
            VanillaTilt.init(card, {
            max: 5,
            speed: 400,
            glare: true,
                "max-glare": 0.1
        });
    }
    
        // Add animation delay for staggered appearance
    testimonialCards.forEach((card, index) => {
            card.style.animationDelay = `${index * 0.1}s`;
        });
    });
});
</script>


<!-- Contact Section -->
<section id="contact" class="contact-section position-relative overflow-hidden py-6">
    <!-- 3D background elements -->
    <div class="contact-3d-elements">
        <div class="floating-cube cube-1" data-tilt data-tilt-max="15"></div>
        <div class="floating-cube cube-2" data-tilt data-tilt-max="15"></div>
        <div class="floating-cube cube-3" data-tilt data-tilt-max="15"></div>
        <div class="floating-sphere sphere-1"></div>
        <div class="floating-sphere sphere-2"></div>
    </div>
    
    <div class="container position-relative">
        <div class="row justify-content-center mb-5">
            <div class="col-lg-7 text-center">
                <h6 class="text-primary text-uppercase fw-bold mb-2 animate__animated animate__fadeInUp">reach out to us</h6>
                <h2 class="display-4 fw-bold mb-4 animate__animated animate__fadeInUp animate__delay-1s">Let's Connect <span class="text-gradient">Together</span></h2>
                <p class="lead mb-0 animate__animated animate__fadeInUp animate__delay-2s">Have questions or feedback? We'd love to hear from you!</p>
            </div>
        </div>
        
        <div class="contact-container">
            <div class="row">
                <div class="col-lg-5 contact-info-column animate__animated animate__fadeInLeft">
                    <div class="contact-info-card" data-tilt data-tilt-max="10" data-tilt-glare data-tilt-max-glare="0.1">
                        <div class="contact-header">
                            <div class="contact-logo">
                                <div class="logo-circle">
                                    <i class="fas fa-graduation-cap"></i>
                                    </div>
                                </div>
                            <h3>Get in Touch</h3>
                            <p>We're here to help with any questions you might have</p>
                            </div>
                        
                        <div class="contact-body">
                            <div class="contact-detail-item">
                                <div class="contact-icon">
                                    <i class="fas fa-map-marker-alt"></i>
                                </div>
                                <div class="contact-text">
                                    <h5>Location</h5>
                                    <p>Bhimpura No.1, Ballia, UP 221716</p>
                            </div>
                            </div>
                            
                            <div class="contact-detail-item">
                                <div class="contact-icon">
                                    <i class="fas fa-phone-alt"></i>
                                </div>
                                <div class="contact-text">
                                    <h5>Call Us</h5>
                                    <p>+91 9984878446</p>
                                </div>
                            </div>
                            
                            <div class="contact-detail-item">
                                <div class="contact-icon">
                                    <i class="fas fa-envelope"></i>
                                </div>
                                <div class="contact-text">
                                    <h5>Email Us</h5>
                                    <p>[email protected]</p>
                                </div>
                            </div>
                            
                            <div class="contact-detail-item">
                                <div class="contact-icon">
                                    <i class="fas fa-clock"></i>
                                </div>
                                <div class="contact-text">
                                    <h5>Open Hours</h5>
                                    <p>Monday - Saturday: 6am to 5pm</p>
                                </div>
                            </div>
                        </div>
                        
                        <!-- <div class="contact-social">
                            <h5>Connect With Us</h5>
                        <div class="social-icons">
                                <a href="#" class="social-icon" data-tilt data-tilt-scale="1.1"><i class="fab fa-facebook-f"></i></a>
                                <a href="#" class="social-icon" data-tilt data-tilt-scale="1.1"><i class="fab fa-twitter"></i></a>
                                <a href="#" class="social-icon" data-tilt data-tilt-scale="1.1"><i class="fab fa-instagram"></i></a>
                                <a href="#" class="social-icon" data-tilt data-tilt-scale="1.1"><i class="fab fa-linkedin-in"></i></a>
                                <a href="#" class="social-icon" data-tilt data-tilt-scale="1.1"><i class="fab fa-youtube"></i></a>
                        </div> -->
                <!-- </div> -->
            </div>
            </div>
                
                <div class="col-lg-7 contact-form-column animate__animated animate__fadeInRight">
                    <div class="contact-form-card">
                        <div class="form-header">
                            <h3>Send Us a Message</h3>
                            <p>Fill out the form below and we'll get back to you as soon as possible</p>
                        </div>
                        
                        <form class="contact-form" method="post" action="send_contact_email.php">
                            <div class="row g-3">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label for="name" class="form-label">Your Name <span class="text-danger">*</span></label>
                                        <div class="input-group">
                                            <span class="input-group-text"><i class="fas fa-user"></i></span>
                                            <input type="text" class="form-control" id="name" name="name" placeholder="Enter your name" required>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label for="email" class="form-label">Your Email <span class="text-danger">*</span></label>
                                        <div class="input-group">
                                            <span class="input-group-text"><i class="fas fa-envelope"></i></span>
                                            <input type="email" class="form-control" id="email" name="email" placeholder="Enter your email" required>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-group">
                                        <label for="subject" class="form-label">Subject <span class="text-danger">*</span></label>
                                        <div class="input-group">
                                            <span class="input-group-text"><i class="fas fa-heading"></i></span>
                                            <input type="text" class="form-control" id="subject" name="subject" placeholder="Enter subject" required>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-group">
                                        <label for="message" class="form-label">Your Message <span class="text-danger">*</span></label>
                                        <div class="input-group">
                                            <span class="input-group-text"><i class="fas fa-comment-alt"></i></span>
                                            <textarea class="form-control" id="message" name="message" rows="5" placeholder="Enter your message" required></textarea>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-check">
                                        <input class="form-check-input" type="checkbox" id="agreement" name="agreement" required>
                                        <label class="form-check-label" for="agreement">
                                            I agree to the <a href="#">terms and conditions</a> and <a href="#">privacy policy</a>
                                        </label>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div id="contactFormMessages" class="mb-3"></div>
                                </div>
                                <div class="col-12">
                                    <button type="submit" class="btn btn-primary btn-lg rounded-pill shadow-hover w-100">
                                        <span class="btn-text">Send Message</span>
                                        <span class="spinner-border spinner-border-sm d-none" role="status" aria-hidden="true"></span>
                                        <i class="fas fa-paper-plane ms-2"></i>
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        
        <!-- Google Map Container -->
        <div class="map-container animate__animated animate__fadeInUp">
            <div class="map-frame">
                <iframe 
                    src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d448.1267299327211!2d83.7672111!3d26.0331032!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x39923b098927314b%3A0xcc4e3e1a25a58883!2sPopular%20Computer%20Education!5e0!3m2!1sen!2sin!4v1744209737655!5m2!1sen!2sin" 
                    width="100%" 
                    height="100%" 
                    style="border:0;" 
                    allowfullscreen="" 
                    loading="lazy" 
                    referrerpolicy="no-referrer-when-downgrade">
                </iframe>
            </div>
        </div>
    </div>
</section>

<style>
/* Contact Section Styles */
.contact-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f4f8 100%);
    overflow: hidden;
}

.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* 3D Elements */
.contact-3d-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.floating-cube {
    position: absolute;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, rgba(var(--secondary-rgb), 0.05) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    transform-style: preserve-3d;
    transform: rotateX(45deg) rotateZ(45deg);
    transition: all 0.5s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.cube-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 5%;
    animation: floatCube 20s infinite linear;
}

.cube-2 {
    width: 80px;
    height: 80px;
    bottom: 15%;
    right: 10%;
    animation: floatCube 25s infinite linear reverse;
}

.cube-3 {
    width: 60px;
    height: 60px;
    top: 50%;
    right: 5%;
    animation: floatCube 18s infinite linear;
}

@keyframes floatCube {
    0% {
        transform: rotateX(45deg) rotateZ(0deg) translateY(0);
    }
    50% {
        transform: rotateX(45deg) rotateZ(180deg) translateY(-20px);
    }
    100% {
        transform: rotateX(45deg) rotateZ(360deg) translateY(0);
    }
}

.floating-sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--secondary-rgb), 0.02) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.08);
    animation: floatSphere 20s infinite ease-in-out alternate;
}

.sphere-1 {
    width: 200px;
    height: 200px;
    top: 20%;
    right: 15%;
}

.sphere-2 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 10%;
    animation-delay: 5s;
}

@keyframes floatSphere {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(20px, -20px);
    }
}

/* Contact Container */
.contact-container {
    position: relative;
    z-index: 2;
    margin-bottom: 80px;
}

/* Contact Info Card */
.contact-info-column {
    margin-bottom: 30px;
}

.contact-info-card {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, rgba(var(--secondary-rgb), 0.05) 100%);
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    transform-style: preserve-3d;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
}

.contact-header {
    margin-bottom: 30px;
    text-align: center;
}

.contact-logo {
    margin-bottom: 20px;
}

.logo-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.2);
}

.logo-circle i {
    color: white;
    font-size: 2rem;
}

.contact-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.contact-header p {
    color: #6c757d;
    margin-bottom: 0;
}

.contact-body {
    margin-bottom: 30px;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.contact-detail-item:hover .contact-icon {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.1);
}

.contact-text h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-text p {
    color: #6c757d;
    margin-bottom: 0;
}

.contact-social {
    text-align: center;
}

.contact-social h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.social-icon:hover {
    transform: translateY(-5px);
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.2);
}

.social-icon i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Contact Form Card */
.contact-form-column {
    margin-bottom: 30px;
}

.contact-form-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-header p {
    color: #6c757d;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    border: 2px solid #e9ecef;
    border-radius: 10px 0 0 10px;
    background-color: #f8f9fa;
    color: #6c757d;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 2px solid #e9ecef;
    border-radius: 0 10px 10px 0;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.1);
}

textarea.form-control {
    min-height: 120px;
    border-radius: 10px;
}

.form-check {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
}

.form-check-input {
    position: absolute;
    margin-top: 0.3rem;
    margin-left: -1.5rem;
}

.form-check-label {
    margin-bottom: 0;
    color: #6c757d;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.form-check-label a:hover {
    text-decoration: underline;
}

.btn-primary {
    padding: 0.8rem 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.4);
}

.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

@media (max-width: 991.98px) {
    .contact-form-card {
        padding: 30px;
    }
}

@media (max-width: 767.98px) {
    .floating-cube,
    .floating-sphere {
        transform: scale(0.7);
    }
    
    .contact-detail-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .form-header,
    .contact-header {
        text-align: center;
    }
}
</style>

<!-- Include Vanilla Tilt.js for 3D effects -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-tilt/1.7.2/vanilla-tilt.min.js"></script>
<script>
    document.addEventListener('DOMContentLoaded', function() {
        // Initialize tilt effect for elements
        const tiltElements = document.querySelectorAll('[data-tilt]');
        if (tiltElements.length > 0) {
            VanillaTilt.init(tiltElements, {
                max: 15,
                speed: 400,
                glare: true,
                'max-glare': 0.3,
                scale: 1.05,
                perspective: 1000,
                gyroscope: true
            });
        }
        
        // Special initialization for about image with enhanced effect
        const aboutImage = document.querySelector('.about-image-3d');
        if (aboutImage) {
            VanillaTilt.init(aboutImage, {
                max: 20,
                speed: 400,
                glare: true,
                'max-glare': 0.4,
                scale: 1.05,
                perspective: 800,
                gyroscope: true,
                reset: false,
                transition: true,
                easing: "cubic-bezier(.03,.98,.52,.99)"
            });
        }
    });
</script>

<script>
document.addEventListener('DOMContentLoaded', function() {
    const contactForm = document.querySelector('.contact-form');
    const messagesContainer = document.getElementById('contactFormMessages');
    const submitButton = contactForm.querySelector('button[type="submit"]');
    const buttonText = submitButton.querySelector('.btn-text');
    const spinner = submitButton.querySelector('.spinner-border');
    
    contactForm.addEventListener('submit', function(e) {
        e.preventDefault();
        
        // Clear previous messages
        messagesContainer.innerHTML = '';
        
        // Show loading state
        submitButton.disabled = true;
        buttonText.textContent = 'Sending...';
        spinner.classList.remove('d-none');
        
        // Collect form data
        const formData = new FormData(contactForm);
        
        // Send AJAX request
        fetch('send_contact_email.php', {
            method: 'POST',
            body: formData
        })
        .then(response => {
            if (!response.ok) {
                throw new Error('Network response was not ok');
            }
            return response.json();
        })
        .then(data => {
            if (data.success) {
                messagesContainer.innerHTML = `
                    <div class="alert alert-success alert-dismissible fade show" role="alert">
                        ${data.message}
                        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                    </div>`;
                contactForm.reset();
            } else {
                let errorMessage = data.message;
                if (data.errors && data.errors.length > 0) {
                    errorMessage = '<ul class="mb-0">' + data.errors.map(error => `<li>${error}</li>`).join('') + '</ul>';
                }
                messagesContainer.innerHTML = `
                    <div class="alert alert-danger alert-dismissible fade show" role="alert">
                        ${errorMessage}
                        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                    </div>`;
            }
        })
        .catch(error => {
            messagesContainer.innerHTML = `
                <div class="alert alert-danger alert-dismissible fade show" role="alert">
                    An error occurred while sending your message. Please try again later.
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>`;
        })
        .finally(() => {
            // Reset button state
            submitButton.disabled = false;
            buttonText.textContent = 'Send Message';
            spinner.classList.add('d-none');
        });
    });
});
</script>

<style>
/* Map Container Styles */
.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    height: 500px;
    margin-top: 30px;
    position: relative;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.map-frame {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.map-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    z-index: 1;
    pointer-events: none;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    transition: all 0.3s ease;
}

.map-frame iframe:hover {
    transform: scale(1.02);
}

/* Map Overlay */
.map-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
    transform: translateX(0);
    transition: all 0.3s ease;
}

.map-overlay:hover {
    transform: translateX(-5px);
}

.map-overlay h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1rem;
}

.map-overlay p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Map Styles */
@media (max-width: 991.98px) {
    .map-container {
        height: 400px;
        margin-top: 20px;
    }
}

@media (max-width: 767.98px) {
    .map-container {
        height: 300px;
        margin-top: 15px;
    }
    
    .map-overlay {
        top: 10px;
        right: 10px;
        padding: 10px;
    }
}

/* Map Loading Animation */
.map-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 2;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
</style>

<script>
document.addEventListener('DOMContentLoaded', function() {
    const mapContainer = document.querySelector('.map-container');
    const mapFrame = mapContainer.querySelector('iframe');
    
    // Add loading animation
    mapContainer.classList.add('loading');
    
    // Remove loading animation when map is loaded
    mapFrame.addEventListener('load', function() {
        mapContainer.classList.remove('loading');
    });
    
    // Add intersection observer for animation
    const observer = new IntersectionObserver((entries) => {
        entries.forEach(entry => {
            if (entry.isIntersecting) {
                entry.target.style.opacity = '1';
                entry.target.style.transform = 'translateY(0)';
            }
        });
    }, {
        threshold: 0.1
    });
    
    observer.observe(mapContainer);
});
</script>

<script>
// Ensure testimonial cards are centered even without slick carousel
document.addEventListener('DOMContentLoaded', function() {
    // Check if slick is loaded and active
    if (typeof $.fn.slick === 'undefined' || !$('.testimonial-slider').hasClass('slick-initialized')) {
        const testimonialSlider = document.querySelector('.testimonial-slider');
        if (testimonialSlider) {
            testimonialSlider.style.display = 'flex';
            testimonialSlider.style.justifyContent = 'center';
            testimonialSlider.style.flexWrap = 'wrap';
            
            // Add animation delays to cards for a staggered appearance
            const cards = testimonialSlider.querySelectorAll('.testimonial-card');
            cards.forEach((card, index) => {
                card.style.setProperty('--index', index);
                // Add some margins for spacing when not using slick
                card.style.margin = '0 15px 30px';
            });
        }
    }
});
</script>

<?php
// Include footer
include 'includes/footer.php';
?>