HOME PAGE 2

eLearning Solutions | SAP & IT Training Institute in Pune
🚀 New SAP & IT Training Batches Starting Soon
SAP • Oracle • Salesforce • Software Testing

Build Job-Ready SAP & IT Skills With Industry Experts

Practical training in Pune designed for freshers, working professionals and career switchers. Learn through hands-on practice, real-world scenarios, SAP system access and career preparation.

✓ Expert Trainers✓ Practical Training✓ SAP Server Access✓ Placement Assistance
Live Training Environment
eLearning Solutions
Students5K+
Courses25+
TrainingLive
CareerSupport
5,000+Students Trained*
25+Career Programs*
50+Expert Trainers*
10+Years of Experience*
4.8★Student Reviews*

Why Choose eLearning Solutions?

More than lectures — build practical skills that help you prepare for real technology careers.

🎓

Industry Expert Trainers

Learn from experienced professionals who bring practical industry knowledge into the classroom.

💻

Hands-on Practical Training

Understand concepts through exercises, assignments and real-world business scenarios.

🖥️

SAP Server Access

Practice SAP concepts in a dedicated training environment instead of learning only from slides.

🚀

Placement Assistance

Prepare for resumes, interviews and job opportunities with structured career guidance.

📚

Online + Classroom

Choose a learning format and schedule that fits your education, work and career goals.

🤝

Career Counselling

Get guidance on selecting the right technology based on your background and ambitions.

Which Career Path Is Right For You?

Choose a learning path based on where you are today and where you want your career to go.

🎓

Fresh Graduates

Build practical IT skills and prepare for your first technology role.

SAP • Salesforce • Testing • Oracle

Find My Course
💼

Working Professionals

Upgrade your skills and move toward enterprise technology opportunities.

SAP • Salesforce • Oracle

Explore Courses
🔄

Career Switchers

Not sure what to choose? Get personalised guidance based on your experience.

Talk to a Counsellor

Explore Our IT Training Programs

Career-focused training across SAP, Oracle, Salesforce and Software Testing.

SAP Training

FICOMMSDPPABAPBASISEWMHANA
Explore SAP Courses →

Oracle Training

Apps R12SCMHRMSTechnicalPL/SQL
Explore Oracle Courses →

Salesforce

AdministratorDeveloper
Explore Salesforce →

Software Testing

Manual TestingAutomation
Explore Testing →

Most Popular Career Programs

Start with the courses learners commonly choose for enterprise technology careers.

FI

SAP FICO

Finance & Controlling

  • Expert-led training
  • Practical scenarios
  • SAP system access
  • Interview preparation
₹25,000*
View Course
MM

SAP MM

Materials Management

  • Practical training
  • Business scenarios
  • SAP server access
  • Career guidance
₹25,000*
View Course
SD

SAP SD

Sales & Distribution

  • Instructor-led classes
  • Real-world scenarios
  • Hands-on practice
  • Interview preparation
₹25,000*
View Course
AB

SAP ABAP

SAP Technical Development

  • Programming concepts
  • Practical assignments
  • SAP system access
  • Career preparation
₹25,000*
View Course

Don’t Just Learn SAP — Practice SAP.

Turn classroom concepts into practical skills through hands-on exercises in a dedicated SAP training environment.

  • SAP transaction practice
  • Configuration exercises
  • Business process scenarios
  • Assignments and practical tasks
  • Real-time learning environment
PRACTICAL LEARNING

Learn by doing, not only watching.

Our practical approach is designed to help learners understand how enterprise systems work in real business situations.

Ask About SAP Access

Learn From Industry-Experienced Trainers

Meet the people who help turn technical concepts into practical career skills.

👨‍💼

Trainer Name

SAP FICO Consultant

Industry experience and practical project knowledge.

👩‍💼

Trainer Name

SAP MM / SD Consultant

Business-process focused SAP training and mentoring.

👨‍💻

Trainer Name

Salesforce / Technical Trainer

Practical development and technology-focused learning.

Your Journey With eLearning Solutions

A structured path from career counselling to interview preparation.

01

Free Counselling

Understand your goals.

02

Choose Course

Select the right path.

03

Expert Training

Learn from professionals.

04

Hands-on Practice

Practice real scenarios.

05

Interview Prep

Build interview confidence.

06

Career Support

Prepare for opportunities.

Our Students. Their Success.

Showcase your genuine placement and career success stories here.

AS

Student Name

SAP FICO Consultant

“The practical training and interview preparation helped me understand SAP with more confidence.”

RK

Student Name

SAP MM Consultant

“The hands-on exercises made it easier to connect SAP concepts with real business processes.”

SP

Student Name

Salesforce Professional

“The trainers were supportive and helped me prepare for interviews and career opportunities.”

What Our Students Say

Replace these examples with your verified Google reviews and genuine student testimonials.

★★★★★

“The trainer explained concepts clearly and the practical sessions helped me understand how SAP works in real scenarios.”

Student Name
SAP FICO Student
★★★★★

“Good learning experience with practical guidance and support throughout the course.”

Student Name
SAP MM Student
★★★★★

“The career guidance and interview preparation were useful and gave me more confidence.”

Student Name
Salesforce Student

Learning Beyond the Classroom

Use your real institute photographs here — classroom training, practical sessions, workshops and student events.

Upcoming Training Batches

Replace the sample dates below with your live batch calendar.

CourseModeStart DateTiming
SAP FICOOnline + ClassroomComing SoonEveningEnquire
SAP MMOnline + ClassroomComing SoonWeekendEnquire
Salesforce AdministratorOnlineComing SoonEveningEnquire

Latest SAP & IT Insights

Use your blog to educate learners and strengthen organic search visibility.

SAP CAREER
August 14, 2026

SAP Training for Beginners in Pune: Step-by-Step Guide

A practical guide for beginners exploring an SAP career.

SAP INSTITUTE
August 13, 2026

Best SAP Training Institute in Pune

What to check before choosing an SAP training institute.

SAP FICO vs MM
August 12, 2026

Which Is Better: SAP FICO or SAP MM?

Compare career paths and choose based on your background.

Frequently Asked Questions

Answer the questions students search before enrolling.

Is SAP suitable for freshers?

Yes. The right SAP module depends on your education, domain knowledge and career goals. We recommend career counselling before selecting a module.

Which SAP module is best for my background?

Finance graduates may consider FICO, supply-chain backgrounds may consider MM, sales backgrounds may consider SD, and coding-oriented learners may consider ABAP.

Do you provide SAP server access?

Yes, SAP system access can be provided for eligible training programs. Confirm the exact access and duration for your selected course.

Do you provide placement assistance?

We provide career and placement assistance such as resume guidance, interview preparation and job opportunity support. Placement outcomes vary by learner.

Are online and classroom classes available?

Training formats depend on the course and current batch schedule. Contact our counsellor for the latest options.

Can non-IT students learn SAP?

Yes. Several SAP functional modules can be suitable for learners from finance, supply chain, HR, sales and other business backgrounds.

Ready to Start Your IT Career?

Not sure which course is right for you? Talk to our career counsellors and find the right SAP or IT learning path based on your education, experience and goals.

Book Free Career Counselling WhatsApp Us
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes">
    <title>Placements · responsive auto-slider</title>
    <!-- Google Font & Font Awesome -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: #f4f7fc;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 1rem;
        }

        .placement-card {
            max-width: 1300px;
            width: 100%;
            background: #ffffff;
            border-radius: 32px;
            box-shadow: 0 30px 60px -20px rgba(0, 20, 40, 0.25), 0 10px 30px -10px rgba(0,0,0,0.05);
            padding: 1.8rem 1.2rem 2.2rem;
            transition: all 0.2s ease;
        }

        .header-section {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.8rem;
            gap: 0.8rem;
        }

        .header-section h1 {
            font-size: 1.8rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            background: linear-gradient(145deg, #0b2b4a, #1b4a7a);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }

        .header-section h1 i {
            background: #0b2b4a;
            color: white;
            font-size: 1.4rem;
            padding: 0.4rem 0.7rem;
            border-radius: 40px;
            -webkit-text-fill-color: white;
            background: linear-gradient(135deg, #1b4a7a, #0f3457);
            box-shadow: 0 6px 12px rgba(0,40,80,0.15);
        }

        .badge-group {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            flex-wrap: wrap;
        }

        .autoplay-badge {
            background: #d9e6f2;
            padding: 0.25rem 0.9rem;
            border-radius: 40px;
            font-size: 0.7rem;
            font-weight: 600;
            color: #1a4972;
            display: flex;
            align-items: center;
            gap: 0.3rem;
            letter-spacing: 0.3px;
            white-space: nowrap;
        }
        .autoplay-badge i {
            font-size: 0.6rem;
            color: #1f6eae;
        }

        .badge-count {
            background: #eef3fa;
            padding: 0.3rem 1rem;
            border-radius: 60px;
            font-weight: 600;
            font-size: 0.8rem;
            color: #1f4a7a;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
            display: flex;
            align-items: center;
            gap: 0.4rem;
            white-space: nowrap;
        }

        .badge-count i {
            color: #2a6b9e;
            font-size: 0.8rem;
        }

        /* slider container */
        .slider-wrapper {
            position: relative;
            border-radius: 24px;
            overflow: hidden;
            box-shadow: 0 12px 30px rgba(0, 20, 40, 0.08);
            background: #fafcff;
            padding: 0.3rem 0;
            touch-action: pan-y; /* better for touch */
        }

        .slider-track {
            display: flex;
            gap: 1.2rem;
            transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            will-change: transform;
            padding: 0.5rem 0.8rem;
        }

        .slide-item {
            flex: 0 0 auto;
            width: 260px;
            height: 300px;
            background: white;
            border-radius: 24px;
            box-shadow: 0 8px 22px rgba(0, 0, 0, 0.02), 0 2px 6px rgba(0,20,40,0.02);
            overflow: hidden;
            transition: all 0.25s ease;
            border: 1px solid rgba(255,255,255,0.5);
            backdrop-filter: blur(2px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 6px;
            background: #ffffff;
        }

        .slide-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 20px;
            display: block;
            transition: transform 0.4s ease, box-shadow 0.3s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.02);
        }

        .slide-item:hover img {
            transform: scale(1.02);
            box-shadow: 0 12px 28px rgba(0, 20, 40, 0.12);
        }

        /* navigation */
        .nav-controls {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.8rem;
            margin-top: 1.8rem;
            padding: 0 0.2rem;
            flex-wrap: wrap;
        }

        .nav-btn {
            background: white;
            border: none;
            width: 48px;
            height: 48px;
            border-radius: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: #1f4a7a;
            box-shadow: 0 8px 18px rgba(0, 20, 40, 0.06), 0 2px 4px rgba(0,0,0,0.02);
            transition: all 0.2s ease;
            cursor: pointer;
            background: #ffffff;
            border: 1px solid #e9eff5;
            flex-shrink: 0;
        }

        .nav-btn i {
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.02));
        }

        .nav-btn:hover {
            background: #0b2b4a;
            color: white;
            border-color: #0b2b4a;
            transform: scale(1.02);
            box-shadow: 0 12px 24px rgba(11, 43, 74, 0.2);
        }

        .nav-btn:active {
            transform: scale(0.94);
        }

        .dots-container {
            display: flex;
            gap: 0.4rem;
            align-items: center;
            margin-right: auto;
            flex-wrap: wrap;
        }

        .dot {
            width: 8px;
            height: 8px;
            border-radius: 20px;
            background: #d0dceb;
            transition: all 0.3s ease;
            cursor: pointer;
            border: none;
            padding: 0;
            flex-shrink: 0;
        }

        .dot.active {
            background: #1f4a7a;
            width: 24px;
            background: linear-gradient(90deg, #1f4a7a, #2f6a9e);
            box-shadow: 0 2px 8px rgba(25, 80, 140, 0.25);
        }

        .dot:hover {
            background: #7b9fc7;
        }

        .progress-indicator {
            font-size: 0.8rem;
            font-weight: 500;
            color: #2b4d6e;
            letter-spacing: 0.3px;
            background: #eef3fa;
            padding: 0.2rem 1rem;
            border-radius: 40px;
            display: flex;
            align-items: center;
            gap: 0.3rem;
            white-space: nowrap;
        }

        .progress-indicator i {
            font-size: 0.7rem;
            opacity: 0.7;
        }

        .scroll-hint {
            text-align: center;
            font-size: 0.7rem;
            color: #8899b0;
            margin-top: 0.6rem;
            letter-spacing: 0.3px;
        }

        /* ===== RESPONSIVE ===== */
        /* Tablet & small laptops */
        @media (max-width: 1024px) {
            .slide-item {
                width: 220px;
                height: 260px;
            }
            .slider-track {
                gap: 1rem;
                padding: 0.4rem 0.6rem;
            }
            .placement-card {
                padding: 1.5rem 1rem 2rem;
            }
        }

        /* Mobile portrait & small tablets */
        @media (max-width: 768px) {
            .placement-card {
                padding: 1.2rem 0.8rem 1.8rem;
                border-radius: 24px;
            }
            .header-section h1 {
                font-size: 1.5rem;
            }
            .header-section h1 i {
                font-size: 1.2rem;
                padding: 0.3rem 0.6rem;
            }
            .badge-count {
                font-size: 0.7rem;
                padding: 0.2rem 0.8rem;
            }
            .autoplay-badge {
                font-size: 0.6rem;
                padding: 0.2rem 0.7rem;
            }
            .slide-item {
                width: 180px;
                height: 220px;
                border-radius: 18px;
                padding: 4px;
            }
            .slide-item img {
                border-radius: 16px;
            }
            .slider-track {
                gap: 0.9rem;
                padding: 0.3rem 0.4rem;
            }
            .nav-btn {
                width: 42px;
                height: 42px;
                font-size: 1rem;
            }
            .dots-container {
                gap: 0.3rem;
            }
            .dot {
                width: 7px;
                height: 7px;
            }
            .dot.active {
                width: 20px;
            }
            .progress-indicator {
                font-size: 0.7rem;
                padding: 0.15rem 0.8rem;
            }
            .nav-controls {
                gap: 0.5rem;
                margin-top: 1.2rem;
            }
        }

        /* Small mobile devices */
        @media (max-width: 480px) {
            .placement-card {
                padding: 1rem 0.5rem 1.5rem;
                border-radius: 20px;
            }
            .header-section h1 {
                font-size: 1.3rem;
            }
            .header-section h1 i {
                font-size: 1rem;
                padding: 0.2rem 0.5rem;
            }
            .slide-item {
                width: 150px;
                height: 190px;
                border-radius: 16px;
                padding: 3px;
            }
            .slide-item img {
                border-radius: 14px;
            }
            .slider-track {
                gap: 0.7rem;
                padding: 0.2rem 0.2rem;
            }
            .nav-btn {
                width: 38px;
                height: 38px;
                font-size: 0.9rem;
            }
            .dot {
                width: 6px;
                height: 6px;
            }
            .dot.active {
                width: 16px;
            }
            .progress-indicator {
                font-size: 0.65rem;
                padding: 0.1rem 0.6rem;
            }
            .badge-count {
                font-size: 0.6rem;
                padding: 0.15rem 0.6rem;
            }
            .autoplay-badge {
                font-size: 0.55rem;
                padding: 0.15rem 0.6rem;
            }
            .scroll-hint {
                font-size: 0.6rem;
            }
        }

        /* Extra small (e.g. iPhone SE) */
        @media (max-width: 380px) {
            .slide-item {
                width: 130px;
                height: 170px;
            }
            .slider-track {
                gap: 0.6rem;
            }
            .header-section h1 {
                font-size: 1.1rem;
            }
            .nav-btn {
                width: 34px;
                height: 34px;
                font-size: 0.8rem;
            }
        }

        /* landscape phone support */
        @media (max-height: 500px) and (orientation: landscape) {
            .slide-item {
                height: 160px;
                width: 140px;
            }
            .placement-card {
                padding: 0.8rem 0.5rem 1.2rem;
            }
            .header-section {
                margin-bottom: 0.8rem;
            }
            .nav-controls {
                margin-top: 0.8rem;
            }
        }
    </style>
</head>
<body>

<div class="placement-card">
    <div class="header-section">
        <h1>
            <i class="fas fa-user-graduate"></i> 
            Placements
        </h1>
        <div class="badge-group">
            <div class="autoplay-badge">
                <i class="fas fa-play"></i> auto
            </div>
            <div class="badge-count">
                <i class="fas fa-images"></i> 
                <span id="totalCount">22</span>
            </div>
        </div>
    </div>

    <!-- slider -->
    <div class="slider-wrapper">
        <div class="slider-track" id="sliderTrack">
            <!-- images injected via JS -->
        </div>
    </div>

    <!-- navigation -->
    <div class="nav-controls">
        <div class="dots-container" id="dotsContainer"></div>

        <div class="progress-indicator">
            <i class="fas fa-arrow-left"></i>
            <span id="slideCounter">1 / 22</span>
            <i class="fas fa-arrow-right"></i>
        </div>

        <button class="nav-btn" id="prevBtn" aria-label="Previous slide">
            <i class="fas fa-chevron-left"></i>
        </button>
        <button class="nav-btn" id="nextBtn" aria-label="Next slide">
            <i class="fas fa-chevron-right"></i>
        </button>
    </div>
    <div class="scroll-hint"><i class="fas fa-arrows-alt-h"></i> auto-slideshow · hover to pause</div>
</div>

<script>
    (function() {
        // ---------- IMAGE LIST ----------
        const imageUrls = [
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/08/JOTII-683x1024.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/08/image-683x1024.png",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/91-9657711155-2026-02-19T134608.406-1-1-819x1024.png",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/Samadhan-Gaikwad-1-1-1024x1024.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/www.elearningsolutions.co_.in-37-1-1024x1024.png",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/sap-mm-select-4-1.png",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/www.elearningsolutions.co_.in-35-1024x1024-1.png",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/www.elearningsolutions.co_.in-36-1024x1024-1.png",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/Akshay-Nake-1024x1024-1.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/www.elearningsolutions.co_.in-2-1024x1024-1.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/Brigitte-Schwartz-1-1024x1024-1.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/39-1-1.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/36.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/33-1.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/34.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/37.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/38.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/40.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/41.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/42.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/43.jpg",
            "https://www.elearningsolutions.co.in/wp-content/uploads/2026/07/44.jpg"
        ];

        // DOM refs
        const track = document.getElementById('sliderTrack');
        const dotsContainer = document.getElementById('dotsContainer');
        const prevBtn = document.getElementById('prevBtn');
        const nextBtn = document.getElementById('nextBtn');
        const slideCounter = document.getElementById('slideCounter');
        const totalCountSpan = document.getElementById('totalCount');

        let currentIndex = 0;
        const totalSlides = imageUrls.length;
        if (totalCountSpan) totalCountSpan.textContent = totalSlides;

        // Auto-play
        let autoPlayInterval = null;
        const AUTO_INTERVAL = 3800;

        // ---------- RENDER SLIDES ----------
        function renderSlides() {
            track.innerHTML = '';
            imageUrls.forEach((url, idx) => {
                const slideDiv = document.createElement('div');
                slideDiv.className = 'slide-item';
                const img = document.createElement('img');
                img.src = url;
                img.alt = `Placement ${idx+1}`;
                img.loading = 'lazy';
                img.onerror = function() {
                    this.src = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"%3E%3Crect width="200" height="200" fill="%23eef3fa"/%3E%3Ctext x="50%25" y="50%25" font-family="Inter" font-size="14" fill="%236f8aa8" text-anchor="middle" dy=".3em"%3E📷%3C/text%3E%3C/svg%3E';
                    this.style.objectFit = 'contain';
                    this.style.padding = '20%';
                };
                slideDiv.appendChild(img);
                track.appendChild(slideDiv);
            });
        }

        // ---------- DOTS ----------
        function renderDots() {
            dotsContainer.innerHTML = '';
            for (let i = 0; i < totalSlides; i++) {
                const dot = document.createElement('button');
                dot.className = `dot ${i === currentIndex ? 'active' : ''}`;
                dot.setAttribute('data-index', i);
                dot.addEventListener('click', () => {
                    goToSlide(i);
                    resetAutoPlay();
                });
                dotsContainer.appendChild(dot);
            }
        }

        // ---------- GO TO SLIDE ----------
        function goToSlide(index) {
            if (!track.children.length) return;
            const slides = track.children;
            if (index < 0) index = 0;
            if (index >= totalSlides) index = totalSlides - 1;
            currentIndex = index;

            // get dynamic slide width + gap
            const firstSlide = slides[0];
            const slideWidth = firstSlide ? firstSlide.offsetWidth : 200;
            const gap = parseFloat(getComputedStyle(track).gap) || 16;
            const offset = currentIndex * (slideWidth + gap);
            track.style.transform = `translateX(-${offset}px)`;

            // update dots
            document.querySelectorAll('.dot').forEach((dot, i) => {
                dot.classList.toggle('active', i === currentIndex);
            });

            if (slideCounter) {
                slideCounter.textContent = `${currentIndex+1} / ${totalSlides}`;
            }
        }

        // ---------- NAVIGATION ----------
        function nextSlide() {
            const next = (currentIndex + 1) % totalSlides;
            goToSlide(next);
        }

        function prevSlide() {
            const prev = (currentIndex - 1 + totalSlides) % totalSlides;
            goToSlide(prev);
        }

        // ---------- AUTO-PLAY ----------
        function startAutoPlay() {
            if (autoPlayInterval) clearInterval(autoPlayInterval);
            autoPlayInterval = setInterval(() => {
                nextSlide();
            }, AUTO_INTERVAL);
        }

        function resetAutoPlay() {
            if (autoPlayInterval) {
                clearInterval(autoPlayInterval);
                startAutoPlay();
            }
        }

        function stopAutoPlay() {
            if (autoPlayInterval) {
                clearInterval(autoPlayInterval);
                autoPlayInterval = null;
            }
        }

        // ---------- HANDLE RESIZE ----------
        let resizeTimeout;
        function handleResize() {
            clearTimeout(resizeTimeout);
            resizeTimeout = setTimeout(() => {
                const slides = track.children;
                if (!slides.length) return;
                const firstSlide = slides[0];
                const slideWidth = firstSlide ? firstSlide.offsetWidth : 200;
                const gap = parseFloat(getComputedStyle(track).gap) || 16;
                const offset = currentIndex * (slideWidth + gap);
                track.style.transform = `translateX(-${offset}px)`;
            }, 80);
        }

        // ---------- INIT ----------
        function init() {
            renderSlides();
            renderDots();

            // wait for layout
            setTimeout(() => {
                goToSlide(0);
                handleResize();
                startAutoPlay();
            }, 40);

            // event listeners
            prevBtn.addEventListener('click', () => {
                prevSlide();
                resetAutoPlay();
            });
            nextBtn.addEventListener('click', () => {
                nextSlide();
                resetAutoPlay();
            });

            // keyboard
            document.addEventListener('keydown', (e) => {
                if (e.key === 'ArrowLeft') { prevSlide(); resetAutoPlay(); }
                if (e.key === 'ArrowRight') { nextSlide(); resetAutoPlay(); }
            });

            // hover to pause
            const wrapper = document.querySelector('.slider-wrapper');
            wrapper.addEventListener('mouseenter', stopAutoPlay);
            wrapper.addEventListener('mouseleave', startAutoPlay);

            // resize & orientation
            window.addEventListener('resize', handleResize);
            window.addEventListener('orientationchange', () => {
                setTimeout(handleResize, 200);
            });

            // also update on font load / layout shift
            if (window.ResizeObserver) {
                const ro = new ResizeObserver(() => handleResize());
                ro.observe(track);
            }
        }

        if (document.readyState === 'complete') {
            init();
        } else {
            window.addEventListener('load', init);
        }
    })();
</script>
</body>
</html>
X
WhatsApp WhatsApp us
Call Now Button