forked from omroy07/AgriTech
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfaq.html
More file actions
687 lines (616 loc) · 26.9 KB
/
faq.html
File metadata and controls
687 lines (616 loc) · 26.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes" />
<meta name="description" content="AgriTech FAQ - Frequently Asked Questions about our agricultural technology platform. Get answers about registration, usage, payments, and more." />
<title>FAQ - AgriTech | Frequently Asked Questions</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" />
<link rel="icon" type="image/png" href="images/logo.png">
<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=Open+Sans:wght@300;400;500;600;700&family=Libertinus+Serif:wght@400;600&display=swap" rel="stylesheet" />
<link href="style.css" rel="stylesheet" />
<style>
/* FAQ Specific Styles */
.faq-hero {
background: linear-gradient(135deg, var(--light-green) 0%, var(--bg-secondary) 100%);
padding: 3rem 2rem;
text-align: center;
}
.faq-hero-content {
max-width: 800px;
margin: 0 auto;
}
.faq-hero h1 {
font-family: 'Libertinus Serif', serif;
font-size: clamp(2.5rem, 5vw, 3.5rem);
font-weight: 600;
color: var(--text-primary);
margin-bottom: 1rem;
line-height: 1.2;
}
.faq-hero p {
font-size: 1.125rem;
color: var(--text-secondary);
line-height: 1.7;
margin-bottom: 2rem;
}
.faq-container {
max-width: 900px;
margin: 0 auto;
padding: 4rem 2rem;
background: var(--bg-primary);
}
.faq-section {
margin-bottom: 3rem;
}
.faq-section-title {
font-family: 'Libertinus Serif', serif;
font-size: 2rem;
font-weight: 600;
color: var(--primary-green);
margin-bottom: 2rem;
text-align: center;
position: relative;
}
.faq-section-title::after {
content: '';
position: absolute;
bottom: -8px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 3px;
background: var(--primary-green);
border-radius: 2px;
}
.faq-item {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
margin-bottom: 1rem;
overflow: hidden;
transition: all 0.3s ease;
}
.faq-item:hover {
border-color: var(--primary-green);
box-shadow: 0 4px 15px var(--shadow-light);
}
.faq-question {
padding: 1.5rem;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
background: var(--bg-secondary);
transition: all 0.3s ease;
user-select: none;
}
.faq-question:hover {
background: var(--bg-tertiary);
}
.faq-question h3 {
font-family: 'Libertinus Serif', serif;
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
margin: 0;
padding-right: 1rem;
line-height: 1.4;
}
.faq-icon {
color: var(--primary-green);
font-size: 1.25rem;
transition: transform 0.3s ease;
flex-shrink: 0;
}
.faq-item.active .faq-icon {
transform: rotate(180deg);
}
.faq-answer {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease;
}
.faq-item.active .faq-answer {
max-height: 500px;
}
.faq-answer-content {
padding: 0 1.5rem 1.5rem;
color: var(--text-secondary);
line-height: 1.7;
font-size: 1rem;
}
.faq-answer-content p {
margin-bottom: 1rem;
}
.faq-answer-content ul {
padding-left: 1.5rem;
margin-bottom: 1rem;
}
.faq-answer-content li {
margin-bottom: 0.5rem;
}
.faq-answer-content strong {
color: var(--primary-green);
font-weight: 600;
}
.contact-cta {
background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
color: white;
padding: 3rem 2rem;
text-align: center;
margin-top: 3rem;
}
.contact-cta h2 {
font-family: 'Libertinus Serif', serif;
font-size: 2rem;
margin-bottom: 1rem;
}
.contact-cta p {
font-size: 1.125rem;
margin-bottom: 2rem;
opacity: 0.9;
}
.contact-btn {
display: inline-block;
background: white;
color: var(--primary-green);
padding: 1rem 2rem;
border-radius: 12px;
text-decoration: none;
font-weight: 600;
font-size: 1.125rem;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.contact-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
/* Responsive Design */
@media (max-width: 768px) {
.faq-hero {
padding: 2rem 1rem;
}
.faq-container {
padding: 3rem 1rem;
}
.faq-question {
padding: 1.25rem;
}
.faq-question h3 {
font-size: 1.125rem;
}
.faq-answer-content {
padding: 0 1.25rem 1.25rem;
}
.contact-cta {
padding: 2.5rem 1rem;
}
}
</style>
</head>
<body>
<!-- Navigation -->
<nav class="navbar">
<div class="navbar-content">
<div class="brand">
<a href="index.html" class="logo">AgriTech</a>
</div>
<div class="nav-buttons">
<!-- Responsive Search Bar -->
<div class="search-container">
<input type="text" placeholder="Search..." class="search-input" />
<button class="search-button">
<i class="fas fa-search"></i>
</button>
</div>
<button class="theme-toggle btn" aria-label="Toggle dark/light mode">
<i class="fas fa-sun sun-icon"></i>
<i class="fas fa-moon moon-icon"></i>
<span class="theme-text">Dark</span>
</button>
<a href="about.html" class="btn btn-secondary">About</a>
<a href="faq.html" class="btn btn-secondary">FAQ</a>
<a href="login.html" class="btn btn-secondary">Login</a>
<a href="register.html" class="btn btn-primary">Register</a>
</div>
</div>
</nav>
<!-- FAQ Hero Section -->
<section class="faq-hero">
<div class="faq-hero-content">
<h1 class="serif">Frequently Asked Questions</h1>
<p>
Find quick answers to common questions about AgriTech platform, user registration,
transactions, and more. We're here to help you navigate our agricultural ecosystem seamlessly.
</p>
</div>
</section>
<!-- FAQ Container -->
<div class="faq-container">
<!-- Getting Started Section -->
<div class="faq-section">
<h2 class="faq-section-title serif">Getting Started</h2>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>What is AgriTech and how does it work?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>AgriTech is a comprehensive agricultural technology platform that connects all stakeholders in India's farming ecosystem. Our platform serves as a digital marketplace and resource hub that brings together:</p>
<ul>
<li><strong>Farmers</strong> - List and sell their produce directly to buyers</li>
<li><strong>Buyers</strong> - Source fresh produce with transparent pricing</li>
<li><strong>Equipment Suppliers</strong> - Provide modern agricultural equipment and services</li>
<li><strong>Grocery Sellers</strong> - Access reliable supply chains for fresh produce</li>
</ul>
<p>The platform works by creating direct connections between these stakeholders, eliminating middlemen, ensuring fair pricing, and providing smart tools for crop recommendation, yield prediction, and disease detection.</p>
</div>
</div>
</div>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>How do I register as a Farmer, Buyer, or Supplier?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>Registration is simple and free:</p>
<ul>
<li>Click the <strong>"Register"</strong> button in the header</li>
<li>Select your role: Farmer, Buyer, Equipment Supplier, or Grocery Seller</li>
<li>Fill in your basic information including name, contact details, and location</li>
<li>Provide role-specific information (farm details for farmers, business info for buyers, etc.)</li>
<li>Verify your email address and phone number</li>
<li>Complete your profile with additional details and preferences</li>
</ul>
<p>Once registered, you'll have access to your personalized dashboard with tools and features specific to your role.</p>
</div>
</div>
</div>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>Is it free to use the AgriTech platform, or are there any fees?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>AgriTech platform registration and basic features are <strong>completely free</strong>:</p>
<ul>
<li>Free account creation and profile setup</li>
<li>Free access to crop recommendation and planning tools</li>
<li>Free product listing for farmers and suppliers</li>
<li>Free browsing and search capabilities for buyers</li>
<li>Free access to market prices and weather information</li>
</ul>
<p>We may introduce <strong>premium features</strong> in the future for advanced analytics, priority listing, or enhanced support, but our core mission is to keep essential farming tools accessible to all.</p>
</div>
</div>
</div>
</div>
<!-- Using the Platform Section -->
<div class="faq-section">
<h2 class="faq-section-title serif">Using the Platform</h2>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>How can I list my produce or agricultural equipment for sale?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>Listing your products is straightforward:</p>
<ul>
<li>Log into your dashboard after registration</li>
<li>Navigate to <strong>"Add Listing"</strong> or <strong>"My Products"</strong></li>
<li>Select the type of product (crops, equipment, services)</li>
<li>Add detailed information: product name, description, quantity, price</li>
<li>Upload high-quality photos of your product</li>
<li>Set your location, availability, and preferred contact method</li>
<li>Review and publish your listing</li>
</ul>
<p>Your listings will be visible to relevant buyers in your area and across the platform. You can edit, update, or remove listings at any time from your dashboard.</p>
</div>
</div>
</div>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>What is the process for a buyer to find and purchase products?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>Buyers can easily find and purchase products:</p>
<ul>
<li>Use the <strong>search bar</strong> to find specific products or browse categories</li>
<li>Filter results by location, price range, quantity, and quality ratings</li>
<li>View detailed product information, photos, and seller profiles</li>
<li>Contact sellers directly through the platform's messaging system</li>
<li>Negotiate prices, quantities, and delivery terms</li>
<li>Arrange payment and delivery methods with the seller</li>
<li>Rate and review the transaction after completion</li>
</ul>
<p>Our platform facilitates the connection but allows you to handle transactions directly with sellers for maximum flexibility.</p>
</div>
</div>
</div>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>How are payments and deliveries handled between users?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>Currently, payments and deliveries are handled directly between buyers and sellers:</p>
<ul>
<li><strong>Payment Methods:</strong> Cash on delivery, bank transfers, UPI payments, or any method agreed upon by both parties</li>
<li><strong>Delivery Options:</strong> Self-pickup, local delivery by seller, or third-party logistics arranged by either party</li>
<li><strong>Terms & Conditions:</strong> Both parties negotiate and agree on payment terms, delivery timelines, and quality standards</li>
</ul>
<p>We provide a secure messaging platform for communication and recommend best practices for safe transactions. Future updates may include integrated payment and delivery services for enhanced security and convenience.</p>
</div>
</div>
</div>
</div>
<!-- Safety & Security Section -->
<div class="faq-section">
<h2 class="faq-section-title serif">Safety & Security</h2>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>How is my personal and business information kept secure on the platform?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>We take data security seriously and implement multiple layers of protection:</p>
<ul>
<li><strong>Data Encryption:</strong> All sensitive data is encrypted using industry-standard SSL/TLS protocols</li>
<li><strong>Secure Servers:</strong> Your information is stored on secure, regularly monitored servers</li>
<li><strong>Privacy Controls:</strong> You control what information is visible to other users</li>
<li><strong>Verification Process:</strong> We verify user accounts to reduce fraudulent activity</li>
<li><strong>Regular Updates:</strong> Our security measures are continuously updated to address new threats</li>
<li><strong>No Data Selling:</strong> We never sell your personal information to third parties</li>
</ul>
<p>Contact details are only shared with verified users you choose to communicate with, and you can report any suspicious activity to our support team.</p>
</div>
</div>
</div>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>What should I do if I encounter fraudulent users or suspicious activity?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>If you encounter any suspicious activity, take these steps:</p>
<ul>
<li><strong>Report Immediately:</strong> Use the "Report User" button on any profile or listing</li>
<li><strong>Contact Support:</strong> Reach out to our support team with details of the incident</li>
<li><strong>Document Evidence:</strong> Save screenshots, messages, or any relevant information</li>
<li><strong>Avoid Direct Payment:</strong> Be cautious about advance payments without proper verification</li>
<li><strong>Meet in Safe Locations:</strong> For in-person transactions, meet in public, well-lit areas</li>
</ul>
<p>Our team investigates all reports promptly and takes appropriate action, including account suspension or removal when necessary.</p>
</div>
</div>
</div>
</div>
<!-- Smart Tools Section -->
<div class="faq-section">
<h2 class="faq-section-title serif">Smart Tools & Features</h2>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>What are the AI-powered smart tools available on AgriTech?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>AgriTech offers several AI-powered tools to help farmers make informed decisions:</p>
<ul>
<li><strong>Crop Recommendation:</strong> Get suggestions for the best crops to plant based on soil type, climate, and market demand</li>
<li><strong>Yield Prediction:</strong> Estimate expected crop yields using historical data and current conditions</li>
<li><strong>Disease Detection:</strong> Upload photos of plants to identify diseases and get treatment recommendations</li>
<li><strong>Crop Planning:</strong> Create detailed farming schedules and track progress throughout the season</li>
<li><strong>Weather Integration:</strong> Access localized weather forecasts and alerts</li>
<li><strong>Market Price Tracking:</strong> Monitor real-time market prices for various crops</li>
</ul>
<p>These tools are designed to help both new and experienced farmers optimize their farming practices and increase productivity.</p>
</div>
</div>
</div>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>How accurate are the crop recommendations and disease detection features?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>Our AI tools are trained on extensive agricultural datasets and continuously improved:</p>
<ul>
<li><strong>Crop Recommendations:</strong> Based on regional agricultural data, soil analysis, and successful farming patterns in similar conditions</li>
<li><strong>Disease Detection:</strong> Trained on thousands of plant disease images with accuracy rates continually improving through machine learning</li>
<li><strong>Regular Updates:</strong> Our models are updated regularly with new data and feedback from users</li>
<li><strong>Local Expertise:</strong> We incorporate knowledge from local agricultural experts and successful farmers</li>
</ul>
<p><strong>Important:</strong> While our tools provide valuable insights, we always recommend consulting with local agricultural experts and following established best practices for critical farming decisions.</p>
</div>
</div>
</div>
</div>
<!-- Support Section -->
<div class="faq-section">
<h2 class="faq-section-title serif">Support & Contact</h2>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>How can I contact AgriTech support if I need help?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>We offer multiple ways to get support:</p>
<ul>
<li><strong>AI Assistant:</strong> Use our chatbot available on every page for instant answers</li>
<li><strong>Feedback Form:</strong> Submit detailed questions or issues through our feedback page</li>
<li><strong>Email Support:</strong> Contact us directly at support@agritech.com</li>
<li><strong>Phone Support:</strong> Call our helpline during business hours (details in your dashboard)</li>
<li><strong>Community Forum:</strong> Connect with other users and get peer support</li>
</ul>
<p>Our support team typically responds within 24 hours, and urgent issues are prioritized for faster resolution.</p>
</div>
</div>
</div>
<div class="faq-item">
<div class="faq-question" onclick="toggleFaq(this)">
<h3>What languages does AgriTech platform support?</h3>
<i class="fas fa-chevron-down faq-icon"></i>
</div>
<div class="faq-answer">
<div class="faq-answer-content">
<p>Currently, AgriTech is available in:</p>
<ul>
<li><strong>English</strong> - Full platform support</li>
<li><strong>Hindi</strong> - Core features and navigation</li>
</ul>
<p>We're working on expanding language support to include regional languages such as Telugu, Tamil, Marathi, Gujarati, and others based on user demand and regional requirements.</p>
<p>Language preferences can be set in your account settings, and our AI assistant can communicate in multiple languages to better serve our diverse user base.</p>
</div>
</div>
</div>
</div>
</div>
<!-- Contact CTA Section -->
<section class="contact-cta">
<h2 class="serif">Still Have Questions?</h2>
<p>
Can't find the answer you're looking for? Our support team is ready to help you
make the most of AgriTech platform.
</p>
<a href="feed-back.html" class="contact-btn">Contact Support</a>
</section>
<!-- Footer -->
<footer class="site-footer">
<div class="footer-inner">
<div class="footer-brand">
<div class="brand-header">
<img src="images/logo.png" alt="AgriTech logo" class="footer-logo">
<h3 class="serif">AgriTech</h3>
</div>
<div class="mission-statement">
<p>Empowering India's Farming Future with innovative <span class="no-break">technology</span> solutions that connect every stakeholder in the <span class="no-break">agricultural</span> ecosystem</p>
</div>
<div class="social-media">
<a href="https://instagram.com" target="_blank" aria-label="Follow us on Instagram">
<i class="fab fa-instagram"></i>
</a>
<a href="https://github.com/omroy07" target="_blank" aria-label="View our GitHub repositories">
<i class="fab fa-github"></i>
</a>
<a href="https://www.linkedin.com/in/om-roy-3b809628a/" target="_blank" aria-label="Connect with us on LinkedIn">
<i class="fab fa-linkedin"></i>
</a>
</div>
</div>
<div class="footer-links">
<h4 class="serif">Quick Links</h4>
<nav aria-label="Footer navigation">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="login.html" title="Login first to access dashboard">Dashboard</a></li>
<li><a href="feed-back.html">Feedback</a></li>
<li><a href="chat.html">AI Assistant</a></li>
<li><a href="terms-and-service.html">Terms & Service</a></li>
</ul>
</nav>
</div>
<div class="footer-links">
<h4 class="serif">Smart Tools</h4>
<nav aria-label="Smart tools navigation">
<ul>
<li><a href="Crop Recommendation/templates/index.html">Crop Recommendation</a></li>
<li><a href="Crop Yield Prediction/crop_yield_app/templates/index.html">Yield Prediction</a></li>
<li><a href="Disease prediction/template/index.html">Disease Detector</a></li>
<li><a href="Crop_Planning/templates/cropplan.html">Crop Planner</a></li>
</ul>
</nav>
</div>
</div>
<div class="footer-bottom">
<div class="footer-bottom-content">
<p class="copyright">© 2025 AgriTech. All rights reserved.</p>
<div class="footer-bottom-links">
<a href="terms-and-service.html">Terms of Service</a>
<span class="separator">•</span>
<a href="privacy-policy.html">Privacy Policy</a>
<span class="separator">•</span>
<a href="contact.html">Contact Us</a>
</div>
</div>
</div>
</footer>
<!-- Floating Chatbot Button -->
<a href="chat.html" id="chatbotBtn" title="Chat with us" aria-label="AI Assistant">
<i class="fas fa-robot"></i>
</a>
<!-- Scroll Button -->
<button class="scroll-btn" id="scrollBtn" title="Scroll">
<i class="fas fa-arrow-down" id="scrollIcon"></i>
</button>
<script>
// FAQ Accordion functionality
function toggleFaq(element) {
const faqItem = element.parentElement;
const isActive = faqItem.classList.contains('active');
// Close all FAQ items
document.querySelectorAll('.faq-item').forEach(item => {
item.classList.remove('active');
});
// Open clicked item if it wasn't active
if (!isActive) {
faqItem.classList.add('active');
}
}
// Theme toggle functionality
const themeToggle = document.querySelector('.theme-toggle');
const themeText = document.querySelector('.theme-text');
// Check for saved theme preference
const currentTheme = localStorage.getItem('theme') || 'dark';
document.documentElement.setAttribute('data-theme', currentTheme);
themeText.textContent = currentTheme === 'dark' ? 'Light' : 'Dark';
themeToggle.addEventListener('click', () => {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
themeText.textContent = newTheme === 'dark' ? 'Light' : 'Dark';
});
// Scroll button functionality
const scrollBtn = document.getElementById("scrollBtn");
const scrollIcon = document.getElementById("scrollIcon");
window.addEventListener("scroll", () => {
if (window.scrollY < 300) {
scrollBtn.classList.add("visible");
scrollIcon.classList.replace("fa-arrow-up", "fa-arrow-down");
} else {
scrollBtn.classList.add("visible");
scrollIcon.classList.replace("fa-arrow-down", "fa-arrow-up");
}
});
scrollBtn.addEventListener("click", () => {
if (scrollIcon.classList.contains("fa-arrow-down")) {
window.scrollTo({
top: document.body.scrollHeight,
behavior: "smooth",
});
} else {
window.scrollTo({
top: 0,
behavior: "smooth",
});
}
});
</script>
</body>
</html>