IELTS Coaching India: Online & 1-on-1 (2025) | IELTS Training Camp
{
"@context": "https://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://atomic-temporary-240268778.wpcomstaging.com/in/ielts-coaching-near-me/"
},
"headline": "IELTS Coaching Near Me (India): Online Group & 1-on-1 Courses 2025",
"image": "https://ieltstrainingcamp.com/wp-content/uploads/2026/01/8c3fa-chatgpt-image-may-24-2025-10_36_13-pm.png",
"author": {
"@type": "Person",
"name": "Sahil Sayed"
},
"publisher": {
"@type": "Organization",
"name": "IELTS Training Camp",
"logo": {
"@type": "ImageObject",
"url": "https://placehold.co/600x60/000/FFF?text=IELTS+Training+Camp+Logo"
}
},
"datePublished": "2025-07-23",
"dateModified": "2025-07-23",
"description": "A comprehensive guide to finding the best online IELTS coaching in India, offering expert 1-on-1 and group classes for Academic & General IELTS. Includes an inquiry form for personalized guidance."
}
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "How can I find the best IELTS coaching near me in India?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The
best IELTS coaching near you in India is now accessible online, regardless of your city. Our platform offers expert 1-on-1 and group coaching from experienced tutors, bringing quality IELTS preparation directly to your home."
}
},
{
"@type": "Question",
"name": "What are the benefits of online IELTS coaching in India?",
"acceptedAnswer": {
"@type": "Answer",
"text": "
Online IELTS coaching in India offers unparalleled flexibility, allowing you to learn from top instructors without commuting. It provides access to a wider pool of expert tutors, personalized attention, and often more affordable options compared to traditional centers. You can study from Delhi, Mumbai, Bangalore, or any other city."
}
},
{
"@type": "Question",
"name": "Do you offer 1-on-1 IELTS coaching or group classes?",
"acceptedAnswer": {
"@type": "Answer",
"text": "We offer both! You can choose between personalized
1-on-1 IELTS coaching in India for focused attention on your specific weaknesses, or opt for interactive
group IELTS classes India for a collaborative learning environment. Both formats are designed for maximum effectiveness."
}
},
{
"@type": "Question",
"name": "Is your IELTS coaching suitable for both Academic and General Training?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes, our online IELTS coaching programs are fully customized for both the Academic and General Training modules. We cover all four sections (Listening, Reading, Writing, Speaking) with specific strategies tailored to your chosen IELTS type."
}
},
{
"@type": "Question",
"name": "How can I enroll for your online IELTS coaching in India?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Simply fill out our inquiry form on this page! Provide your details, city, preferred IELTS module (Academic or General), and coaching preference (1-on-1 or group). Our team will get in touch to discuss your needs and guide you through the enrollment process for the
best IELTS coaching in India."
}
},
{
"@type": "Question",
"name": "How do Preptical's mock tests complement your coaching?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Preptical's mock tests are an excellent complement to our coaching. While we provide the strategies and personalized feedback, Preptical offers the realistic, timed practice environment you need to apply those strategies and build stamina. It's the perfect combination for comprehensive
IELTS preparation India."
}
}
]
}
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');
/* Global Styling & Reset (IELTS Training Camp Branding) */
body {
font-family: 'Inter', sans-serif; /* Using brand font */
line-height: 1.6;
color: #333;
margin: 0;
padding: 0;
background-color: #f8f8f8; /* Light background */
overflow-x: hidden;
}
/* Main Container */
.container {
max-width: 1200px;
margin: 20px auto;
background-color: #fff;
padding: 25px;
border-radius: 12px; /* Rounded corners */
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow */
display: flex;
flex-wrap: wrap;
}
/* Table of Contents (TOC) Sidebar */
.toc-sidebar {
flex: 0 0 280px;
margin-right: 30px;
padding: 20px 0;
position: sticky;
top: 100px; /* Adjusted to typically clear header */
height: fit-content;
background-color: #f5f5f1; /* Brand light background */
border-radius: 12px; /* Rounded corners */
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
overflow-y: auto;
max-height: calc(100vh - 120px); /* Adjusted max height */
}
.toc-sidebar h3 {
color: #000; /* Brand black */
margin-top: 0;
padding: 0 20px;
font-size: 1.3em;
border-bottom: 1px solid #dcdcdc;
padding-bottom: 10px;
margin-bottom: 15px;
font-weight: 700;
}
.toc-sidebar ul {
list-style: none;
padding: 0 20px;
margin: 0;
}
.toc-sidebar ul li {
margin-bottom: 10px;
}
.toc-sidebar ul li a {
text-decoration: none;
color: #333;
font-weight: 500;
display: block;
padding: 8px 10px;
border-radius: 8px; /* Rounded corners */
transition: background-color 0.3s ease, color 0.3s ease;
}
.toc-sidebar ul li a:hover,
.toc-sidebar ul li a.active {
background-color: #FBC462; /* Brand yellow/gold */
color: #000; /* Brand black */
}
/* Main Content Area */
.main-content {
flex: 1;
min-width: 0;
}
.main-content h1 {
color: #000; /* Brand black */
font-size: 2.8em; /* Consistent with previous pages */
margin-bottom: 20px;
text-align: center;
border-bottom: 2px solid #FBC462; /* Brand yellow/gold underline */
padding-bottom: 10px;
font-weight: 700;
}
.main-content h2 {
color: #333; /* Dark grey for subheadings */
font-size: 2.2em; /* Consistent with previous pages */
margin-top: 60px;
margin-bottom: 25px;
border-left: 4px solid #FBC462; /* Brand yellow/gold left border */
padding-left: 15px;
font-weight: 700;
}
.main-content h3 {
color: #444; /* Slightly lighter grey */
font-size: 1.6em; /* Consistent with previous pages */
margin-top: 30px;
margin-bottom: 15px;
font-weight: 700;
}
.main-content p {
margin-bottom: 15px;
text-align: justify;
font-weight: 400;
}
.main-content ul, .main-content ol {
margin-left: 25px;
margin-bottom: 15px;
font-weight: 400;
}
.main-content ul li, .main-content ol li {
margin-bottom: 8px;
}
.main-content a {
color: #000; /* Brand black for links */
text-decoration: underline;
transition: color 0.3s ease;
}
.main-content a:hover {
color: #FBC462; /* Brand yellow/gold on hover */
text-decoration: none;
}
/* Info Box Styling */
.info-box {
background-color: #FFF8E1; /* Lighter shade of brand yellow */
border-left: 5px solid #FBC462; /* Brand yellow/gold border */
padding: 15px 20px;
margin: 20px 0;
border-radius: 10px; /* Rounded corners */
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.info-box p {
margin: 0;
color: #333; /* Dark text */
}
/* Call to Action Box for Affiliate Links */
.affiliate-cta-box {
background-color: #E6F7FF; /* Light blue, inviting */
border: 2px solid #2b7ffe; /* Blue border */
border-radius: 12px;
padding: 25px;
margin: 40px 0;
text-align: center;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.affiliate-cta-box h3 {
color: #000;
font-size: 1.8em;
margin-top: 0;
margin-bottom: 15px;
}
.affiliate-cta-box p {
font-size: 1.1em;
margin-bottom: 20px;
color: #333;
}
.affiliate-cta-box .cta-button {
display: inline-block;
background-color: #FBC462; /* Brand yellow/gold */
color: #000; /* Brand black */
padding: 15px 30px;
border-radius: 10px;
text-decoration: none;
font-weight: 700;
font-size: 1.1em;
transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
border: none;
cursor: pointer;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.affiliate-cta-box .cta-button:hover {
background-color: #FFD700; /* Slightly brighter yellow on hover */
transform: translateY(-3px);
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
/* Preptical Specific Styling */
.preptical-logo {
max-width: 250px;
height: auto;
margin-bottom: 20px;
}
.preptical-review-box {
background-color: #e0f2f7; /* Light blue for review */
border: 2px solid #2b7ffe;
border-radius: 12px;
padding: 25px;
margin: 40px 0;
text-align: center;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.preptical-review-box h3 {
color: #000;
font-size: 1.8em;
margin-top: 0;
margin-bottom: 15px;
}
.preptical-review-box p {
font-size: 1.1em;
margin-bottom: 20px;
color: #333;
}
.preptical-review-box .review-stars {
color: #FFD700; /* Gold stars */
font-size: 1.5em;
margin-bottom: 10px;
}
/* Image Styling */
.content-image {
max-width: 100%;
height: auto;
border-radius: 10px;
margin: 25px 0;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
display: block;
margin-left: auto;
margin-right: auto;
}
/* Inquiry Form Styling */
.inquiry-form-section {
background-color: #f5f5f1;
border-radius: 12px;
padding: 30px;
margin: 40px 0;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.inquiry-form-section h2 {
text-align: center;
margin-top: 0;
margin-bottom: 30px;
border-left: none; /* Override general h2 style */
padding-left: 0;
border-bottom: 2px solid #FBC462;
padding-bottom: 10px;
display: inline-block;
width: auto;
margin-left: auto;
margin-right: auto;
}
.inquiry-form-section form {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: #333;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
width: calc(100% - 20px); /* Adjust for padding */
padding: 12px 10px;
border: 1px solid #ccc;
border-radius: 8px;
font-family: 'Inter', sans-serif;
font-size: 1em;
box-sizing: border-box; /* Include padding in width */
}
.form-group select {
appearance: none; /* Remove default arrow */
background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-6.5%200-12.1%203.2-15.1%208.5-3%205.3-2.9%2011.6.3%2016.9l139.5%20158c5.8%206.6%2015.1%206.6%2020.9%200l139.5-158c3.2-5.3%203.3-11.6.3-16.9z%22%2F%3E%3C%2Fsvg%3E');
background-repeat: no-repeat;
background-position: right 10px center;
background-size: 12px;
padding-right: 30px; /* Make space for custom arrow */
}
.form-group input[type="submit"] {
background-color: #2b7ffe; /* Blue submit button */
color: #fff;
padding: 15px 25px;
border: none;
border-radius: 10px;
font-size: 1.1em;
font-weight: 700;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.2s ease;
grid-column: 1 / -1; /* Span full width */
margin-top: 20px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.form-group input[type="submit"]:hover {
background-color: #0056b3;
transform: translateY(-2px);
}
.form-message {
grid-column: 1 / -1;
text-align: center;
padding: 10px;
border-radius: 8px;
margin-top: 10px;
font-weight: 500;
}
.form-message.success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.form-message.error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
/* Responsive Carousel */
.carousel-container {
margin-top: 40px;
overflow: hidden;
padding: 40px 30px;
background-color: #f5f5f1;
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
position: relative;
}
.carousel-title {
text-align: center;
color: #000;
margin-bottom: 25px;
font-size: 1.8em;
font-weight: 700;
}
.carousel-wrapper {
display: flex;
justify-content: flex-start;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding: 0 10px;
scroll-snap-type: x mandatory;
gap: 30px;
}
.carousel-item {
flex: 0 0 auto;
width: 300px;
background-color: #ffffff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
scroll-snap-align: start;
transition: transform 0.3s ease;
display: flex;
flex-direction: column;
}
.carousel-item:hover {
transform: translateY(-5px);
}
.carousel-item h4 {
color: #000;
margin-top: 0;
font-size: 1.2em;
min-height: 50px;
font-weight: 700;
}
.carousel-item p {
font-size: 0.9em;
color: #555;
min-height: 80px;
flex-grow: 1;
}
.carousel-item a {
display: inline-block;
background-color: #000; /* Brand black button */
color: #fff;
padding: 8px 15px;
border-radius: 8px;
text-decoration: none;
margin-top: 10px;
transition: background-color 0.3s ease;
font-weight: 600;
}
.carousel-item a:hover {
background-color: #FBC462; /* Brand yellow/gold on hover */
color: #000; /* Brand black on hover */
}
/* Responsive Adjustments */
@media (max-width: 992px) {
.container {
flex-direction: column;
margin: 15px auto;
padding: 15px;
}
.toc-sidebar {
position: static;
width: 100%;
margin-right: 0;
margin-bottom: 25px;
max-height: none;
}
.toc-sidebar h3 {
text-align: center;
padding-bottom: 5px;
margin-bottom: 10px;
}
.toc-sidebar ul {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 0 10px;
}
.toc-sidebar ul li {
margin: 5px 8px;
}
.toc-sidebar ul li a {
padding: 6px 12px;
font-size: 0.9em;
text-align: center;
}
.main-content {
width: 100%;
}
.main-content h1 {
font-size: 2em;
}
.main-content h2 {
font-size: 1.6em;
}
.main-content h3 {
font-size: 1.3em;
}
.affiliate-cta-box {
padding: 20px;
}
.affiliate-cta-box h3 {
font-size: 1.5em;
}
.affiliate-cta-box p {
font-size: 1em;
}
.affiliate-cta-box .cta-button {
padding: 12px 25px;
font-size: 1em;
}
.preptical-logo {
max-width: 200px;
}
.inquiry-form-section form {
grid-template-columns: 1fr; /* Stack columns on smaller screens */
}
.carousel-item {
width: 280px;
margin: 0 10px;
}
}
@media (max-width: 768px) {
.container {
margin: 10px;
padding: 10px;
}
.main-content h1 {
font-size: 1.8em;
}
.main-content h2 {
font-size: 1.4em;
}
.carousel-wrapper {
flex-wrap: nowrap;
overflow-x: auto;
scroll-snap-type: x mandatory;
}
.carousel-item {
min-width: 85%;
scroll-snap-align: start;
}
}
@media (max-width: 480px) {
.toc-sidebar ul li a {
font-size: 0.85em;
padding: 5px 10px;
}
.carousel-item {
min-width: 95%;
}
}
IELTS Coaching Near Me (India): Online Group & 1-on-1 Courses 2025
Are you an aspiring student or professional in India looking to achieve your dream band score in the IELTS exam? The search for "IELTS coaching near me India" often leads to local centers, but in today's digital age, the best preparation is now truly accessible from anywhere. At IELTS Training Camp, we bring expert-led online IELTS coaching India directly to your home, offering flexible and effective programs tailored to your needs, whether you're in Delhi, Mumbai, Bangalore, or any other city across the country.
Forget the commute and rigid schedules. Our online courses provide the convenience and personalized attention you need to excel in Academic or General Training IELTS. Discover how our 1-on-1 IELTS coaching India and dynamic group IELTS classes India can help you unlock your global opportunities in 2025.
Why Choose Online IELTS Coaching in India?
For Indian students, online IELTS coaching offers significant advantages over traditional coaching centers:
- Unmatched Convenience & Flexibility: Study from the comfort of your home, saving precious time and money on commuting. Our flexible timings accommodate your busy schedule, making it the ideal "IELTS coaching near me" solution, no matter your location.
- Access to Expert Tutors: You're no longer limited to local instructors. Our online platform connects you with highly experienced IELTS trainers who are experts in all four modules (Listening, Reading, Writing, Speaking), ensuring you receive top-tier guidance.
- Personalized Learning Paths: Whether you opt for 1-on-1 IELTS coaching India or smaller group IELTS classes India, we tailor our approach to your specific strengths and weaknesses, ensuring efficient and targeted improvement.
- Rich Digital Resources: Gain access to a wealth of online materials, including practice tests, video lessons, and interactive exercises. We also recommend external resources like Preptical for comprehensive practice.
- Cost-Effectiveness: Online coaching often proves more affordable than traditional centers, as it eliminates overheads like rent and infrastructure, passing the savings on to you.
Our Online IELTS Courses: Group & 1-on-1 for Academic & General Training
We understand that every student has unique learning preferences and goals. That's why we offer diverse online IELTS coaching options:
Group IELTS Classes (India)
- Interactive Learning: Engage with fellow aspirants from across India, share insights, and learn from collective experiences.
- Structured Curriculum: Our group classes follow a comprehensive curriculum covering all sections of both Academic and General Training IELTS.
- Affordable: A cost-effective way to get high-quality coaching.
- Motivation: The group dynamic fosters a supportive and motivating environment.
1-on-1 IELTS Coaching (India)
- Tailored to Your Needs: Receive undivided attention from your tutor, with lessons designed specifically to target your weak areas and maximize your strengths.
- Flexible Scheduling: Arrange sessions at times that perfectly fit your personal timetable.
- Rapid Progress: Personalized feedback and intensive practice lead to faster improvement in your band score.
- Module-Specific Focus: Ideal if you need to improve a specific module, like Writing or Speaking, for your target score.
Did you know? Our coaching is designed to help you achieve your desired band score for universities abroad, immigration, or professional registration. We cover all aspects of IELTS preparation India, ensuring you're fully ready for test day.
Enhance Your Practice with Preptical's Mock Tests
While our coaching provides the core strategies and guidance, consistent practice is key. We highly recommend integrating Preptical's IELTS mock tests into your study plan. Preptical offers realistic, full-length simulated exams that mirror the actual IELTS experience, providing invaluable practice and helping you manage your time effectively.
Preptical: Your Essential Practice Partner for IELTS in India!
★★★★★
For Indian students, Preptical is an absolute game-changer. Their platform provides the most authentic and effective IELTS practice online India. The mock tests are incredibly accurate, helping you get accustomed to the real exam environment. We've seen firsthand how Preptical helps our students build confidence and pinpoint areas for improvement, making it an indispensable tool for anyone serious about achieving a high IELTS band score from any corner of India.
Explore Preptical's IELTS Practice Tests!
Consider these links to boost your practice:
Ready to take the next step towards your IELTS success? Fill out the form below, and our team will get in touch to discuss your specific coaching needs and how we can help you achieve your target band score. This is your direct link to the best IELTS coaching India has to offer, right at your fingertips!
FAQs about IELTS Coaching in India
Q: How can I find the best IELTS coaching near me in India?
A: The best IELTS coaching near you in India is now accessible online, regardless of your city. Our platform offers expert 1-on-1 and group coaching from experienced tutors, bringing quality IELTS preparation directly to your home. You can start your journey by filling out our inquiry form!
Q: What are the benefits of online IELTS coaching in India?
A: Online IELTS coaching in India offers unparalleled flexibility, allowing you to learn from top instructors without commuting. It provides access to a wider pool of expert tutors, personalized attention, and often more affordable options compared to traditional centers. You can study from Delhi, Mumbai, Bangalore, or any other city.
Q: Do you offer 1-on-1 IELTS coaching or group classes?
A: We offer both! You can choose between personalized 1-on-1 IELTS coaching in India for focused attention on your specific weaknesses, or opt for interactive group IELTS classes India for a collaborative learning environment. Both formats are designed for maximum effectiveness and are available for both Academic and General Training modules.
Q: Is your IELTS coaching suitable for both Academic and General Training?
A: Yes, our online IELTS coaching programs are fully customized for both the Academic and General Training modules. We cover all four sections (Listening, Reading, Writing, Speaking) with specific strategies tailored to your chosen IELTS type, ensuring you get the exact preparation you need for your goals (study visa, PR, etc.).
Q: How can I enroll for your online IELTS coaching in India?
A: Simply fill out our inquiry form on this page! Provide your details, city, preferred IELTS module (Academic or General), and coaching preference (1-on-1 or group). Our team will get in touch promptly to discuss your needs, answer any questions, and guide you through the enrollment process for the best IELTS coaching in India.
Q: How do Preptical's mock tests complement your coaching?
A: Preptical's mock tests are an excellent complement to our coaching. While we provide the strategies and personalized feedback, Preptical offers the realistic, timed practice environment you need to apply those strategies and build stamina. It's the perfect combination for comprehensive IELTS preparation India.
Conclusion
The search for "IELTS coaching near me India" has evolved. With our comprehensive online IELTS coaching programs, top-tier tutors, and flexible learning options, quality preparation is no longer limited by geography. Whether you prefer the focused attention of 1-on-1 IELTS coaching India or the collaborative energy of our group IELTS classes India, we are committed to helping you achieve your desired IELTS band score.
Combine our expert guidance with the realistic practice offered by Preptical's mock tests, and you'll have a winning strategy for IELTS success in 2025. Take the first step towards your global aspirations – fill out our inquiry form today and let us help you ace your IELTS exam!
More Essential IELTS Calculators & Tools
Explore All IELTS Tools
Discover our full suite of essential IELTS preparation tools and guides.
See All Tools →
IELTS Listening Score Calculator
Convert your raw Listening score to the official IELTS band score.
Calculate Now →
IELTS Reading Score Calculator
Find your Reading band score for both Academic and General Training.
Calculate Now →
IELTS Writing Band Score Calculator
Understand how your Writing tasks are graded and calculate your band.
Calculate Now →
IELTS Speaking Score Calculator
Estimate your Speaking band based on key assessment criteria.
Calculate Now →
PTE vs. IELTS Score Calculator
Compare your PTE and IELTS scores easily with this conversion tool.
Compare Now →
IELTS to CLB Calculator
Convert your IELTS scores to Canadian Language Benchmark (CLB) levels.
Convert Now →
How to Book IELTS Exam in UK
A step-by-step guide to finding and booking your IELTS test in the UK.
Book Now →
IELTS Preparation in India: Your Complete Guide
Explore comprehensive resources for mastering IELTS in India.
Read More →
IELTS Writing Practice: Strategies for Success
Improve your IELTS Writing skills with expert tips and practice exercises.
Start Practicing →
English Quiz Hub: Test Your Language Skills
Sharpen your English grammar and vocabulary with interactive quizzes.
Take a Quiz →
// Smooth scroll for TOC links
document.querySelectorAll('.toc-sidebar a').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
// Update active class for sidebar links
document.querySelectorAll('.toc-sidebar ul li a').forEach(link => {
link.classList.remove('active');
});
this.classList.add('active');
});
});
// Highlight active TOC link based on scroll position
window.addEventListener('scroll', () => {
const sections = document.querySelectorAll('.main-content h2, .main-content h1, .main-content h3'); // Include h3 for country sections
const navLinks = document.querySelectorAll('.toc-sidebar ul li a');
let current = '';
sections.forEach(section => {
const sectionTop = section.offsetTop;
const sectionHeight = section.clientHeight;
// Adjust offset for better timing, considering sticky header if any
if (pageYOffset >= sectionTop - window.innerHeight / 3) {
current = section.getAttribute('id');
}
});
navLinks.forEach(link => {
link.classList.remove('active');
if (link.getAttribute('href').includes(current)) {
link.classList.add('active');
}
});
});
// Initialize active class on page load if hash exists
window.addEventListener('load', () => {
if (window.location.hash) {
const targetId = window.location.hash;
const targetLink = document.querySelector(`.toc-sidebar a[href="${targetId}"]`);
if (targetLink) {
targetLink.classList.add('active');
// Scroll to target, accounting for sticky header
const targetElement = document.querySelector(targetId);
if (targetElement) {
const headerOffset = 100; // Adjust this if your actual header height is different
const elementPosition = targetElement.getBoundingClientRect().top + window.pageYOffset;
const offsetPosition = elementPosition - headerOffset;
window.scrollTo({
top: offsetPosition,
behavior: "smooth"
});
}
} else {
// If no hash, set the first link as active
const firstLink = document.querySelector('.toc-sidebar ul li a');
if (firstLink) {
firstLink.classList.add('active');
}
}
}
});
// Form Submission Logic for Google Apps Script
document.getElementById('ieltsCoachingForm').addEventListener('submit', function(event) {
event.preventDefault(); // Prevent default form submission
const formMessage = document.getElementById('formMessage');
formMessage.style.display = 'none'; // Hide previous messages
formMessage.textContent = ''; // Clear previous message
// Basic validation
const requiredFields = ['fullName', 'email', 'phone', 'city', 'ieltsType', 'coachingPreference', 'targetBand', 'currentLevel', 'preferredStart'];
let allFieldsFilled = true;
const formData = new FormData(this); // Use FormData for easier handling with Apps Script
requiredFields.forEach(fieldId => {
const inputElement = document.getElementById(fieldId);
if (!inputElement.value.trim()) {
allFieldsFilled = false;
inputElement.style.borderColor = 'red'; // Highlight empty required fields
} else {
inputElement.style.borderColor = '#ccc'; // Reset border color
}
});
if (allFieldsFilled) {
const form = event.target;
const url = form.action; // This will be your Google Apps Script Web App URL
fetch(url, {
method: 'POST',
body: formData // Send FormData directly
})
.then(response => {
if (response.ok) {
return response.json(); // Expect JSON response from Apps Script
}
throw new Error('Network response was not ok.');
})
.then(data => {
if (data.status === 'success') {
formMessage.textContent = 'Thank you for your inquiry! We will get back to you shortly.';
formMessage.className = 'form-message success';
formMessage.style.display = 'block';
form.reset(); // Clear the form
} else {
throw new Error(data.message || 'Unknown error from server.');
}
})
.catch((error) => {
console.error('Error:', error);
formMessage.textContent = 'There was an error submitting your inquiry: ' + error.message + '. Please try again or contact us directly.';
formMessage.className = 'form-message error';
formMessage.style.display = 'block';
});
} else {
formMessage.textContent = 'Please fill in all required fields.';
formMessage.className = 'form-message error';
formMessage.style.display = 'block';
}
});