-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.php
More file actions
1533 lines (1400 loc) · 72.6 KB
/
404.php
File metadata and controls
1533 lines (1400 loc) · 72.6 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
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php include('header.php'); ?>
<?php
// PHP Error Reporting for Development
// This ensures that all PHP errors are displayed, which is helpful for debugging during development.
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Set the default timezone to Asia/Kolkata for consistent date and time handling.
date_default_timezone_set('Asia/Kolkata');
// Database Connection
// Establishes a connection to the MySQL database.
// Parameters: host (localhost), username (root), password (empty), database name (meditronix_new).
// IMPORTANT: In a production environment, 'root' and an empty password are highly insecure.
// Always use strong, unique credentials and consider environment variables or secure configuration files.
$db = mysqli_connect("localhost", "root", "", "meditronix_new");
// Check if the database connection was successful.
if (!$db) {
// If connection fails, terminate the script and display an error message.
die("Database connection failed: " . mysqli_connect_error());
}
/**
* Function to sanitize input data.
* This function helps prevent SQL injection and Cross-Site Scripting (XSS) attacks.
* It trims whitespace, removes backslashes, converts special characters to HTML entities,
* and escapes special characters for use in SQL statements.
*
* @param string $data The input string to sanitize.
* @return string The sanitized string.
*/
function sanitize_input($data) {
global $db; // Access the global database connection variable.
$data = trim($data); // Remove whitespace from the beginning and end of the string.
$data = stripslashes($data); // Remove backslashes added by functions like addslashes().
$data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8'); // Convert special characters to HTML entities, ensuring UTF-8 encoding for security.
return mysqli_real_escape_string($db, $data); // Escape special characters for SQL to prevent SQL injection.
}
// ------------ BACKEND CRUD OPERATIONS (NOT DISPLAYED ON FRONT-END) -----------------
// These operations are handled on the server-side but do not have visible buttons
// or direct user interaction on this specific front-end page, as requested.
/**
* Handle Add Feedback operation.
* This block executes when a POST request with 'add_feedback' is received.
* It sanitizes input, constructs an SQL INSERT query, and attempts to add a new feedback record.
*/
if (isset($_POST['add_feedback'])) {
// Sanitize and validate input data for the new feedback.
$patient_id = sanitize_input($_POST['patient_id']);
$patients_name = sanitize_input($_POST['patients_name']); // Added patients' _name
$message = sanitize_input($_POST['message']);
$rating = intval($_POST['rating']); // Convert to integer for safety.
$status = sanitize_input($_POST['status']);
$created_at = date('Y-m-d H:i:s'); // Get the current server timestamp.
// SQL INSERT query to add a new feedback record to the `feedback` table.
// Note: `patients' _name` needs to be escaped with backticks due to the space and apostrophe.
$insert_query = "INSERT INTO `feedback` (`patient_id`, `patients' _name`, `message`, `rating`, `status`, `created_at`) VALUES ('$patient_id', '$patients_name', '$message', $rating, '$status', '$created_at')";
// Execute the query and check for success or failure.
if (mysqli_query($db, $insert_query)) {
// Success message for backend operation (commented out as no front-end display).
// echo "<script>window.onload = function() { showCustomAlert('Feedback added successfully!', 'success'); }</script>";
} else {
// Error message for backend operation (commented out).
// echo "<script>window.onload = function() { showCustomAlert('Error adding feedback: " . mysqli_error($db) . "', 'error'); }</script>";
}
}
/**
* Handle Edit Feedback operation.
* This block executes when a POST request with 'edit_feedback' is received.
* It sanitizes input, constructs an SQL UPDATE query, and attempts to modify an existing feedback record.
*/
if (isset($_POST['edit_feedback'])) {
// Sanitize and validate input data for editing a feedback.
$id = intval($_POST['id']); // The ID of the feedback to be edited.
$patient_id = sanitize_input($_POST['patient_id']);
$patients_name = sanitize_input($_POST['patients_name']); // Added patients' _name
$message = sanitize_input($_POST['message']);
$rating = intval($_POST['rating']);
$status = sanitize_input($_POST['status']);
// SQL UPDATE query to modify an existing feedback record.
$update_query = "UPDATE `feedback` SET `patient_id`='$patient_id', `patients' _name`='$patients_name', `message`='$message', `rating`=$rating, `status`='$status' WHERE id=$id";
// Execute the query and check for success or failure.
if (mysqli_query($db, $update_query)) {
// Success message (commented out).
// echo "<script>window.onload = function() { showCustomAlert('Feedback updated successfully!', 'success'); }</script>";
} else {
// Error message (commented out).
// echo "<script>window.onload = function() { showCustomAlert('Error updating feedback: " . mysqli_error($db) . "', 'error'); }</script>";
}
}
/**
* Handle Delete Feedback operation.
* This block executes when a GET request with 'delete_id' is received.
* It sanitizes the ID, constructs an SQL DELETE query, and attempts to remove a feedback record.
*/
if (isset($_GET['delete_id'])) {
// Sanitize and validate the ID for deletion.
$deleteId = intval($_GET['delete_id']); // Convert to integer for safety.
$delete_query = "DELETE FROM `feedback` WHERE id=$deleteId";
// Execute the query and check for success or failure.
if (mysqli_query($db, $delete_query)) {
// Success message (commented out).
// echo "<script>window.onload = function() { showCustomAlert('Feedback deleted successfully!', 'success'); }</script>";
} else {
// Error message (commented out).
// echo "<script>window.onload = function() { showCustomAlert('Error deleting feedback: " . mysqli_error($db) . "', 'error'); }</script>";
}
}
// ------------ FETCH ALL FEEDBACK FOR DISPLAY -----------------
// This section fetches all relevant feedback data from the database
// to be displayed dynamically on the front-end.
// SQL SELECT query to retrieve all columns from the `feedback` table.
// Note: `patients' _name` needs to be escaped with backticks due to the space and apostrophe.
// The data is ordered by created_at in descending order to show recent feedback first.
$feedback_result = mysqli_query($db, "SELECT id, patient_id, `patients' _name`, message, rating, status, created_at FROM `feedback` ORDER BY created_at DESC");
// Check the number of rows returned by the query.
$feedback_count = mysqli_num_rows($feedback_result);
// Prepare dummy data if no actual feedback records are found in the database.
// This ensures the page always has content to display for demonstration purposes.
$dummy_feedback_items = [];
if ($feedback_count === 0) {
$dummy_feedback_items = [
[
'id' => 101,
'patient_id' => 'P-001',
'patients\' _name' => 'Rohan Kapri',
'message' => 'The staff were incredibly kind and attentive. My experience at Meditronix was outstanding!',
'rating' => 5,
'status' => 'Approved',
'created_at' => date('Y-m-d H:i:s', strtotime('-7 days'))
],
[
'id' => 102,
'patient_id' => 'P-002',
'patients\' _name' => 'Priya Sharma',
'message' => 'Good service overall, but waiting times for appointments could be shorter. Otherwise, a positive visit.',
'rating' => 4,
'status' => 'Approved',
'created_at' => date('Y-m-d H:i:s', strtotime('-10 days'))
],
[
'id' => 103,
'patient_id' => 'P-003',
'patients\' _name' => 'Amit Singh',
'message' => 'I had some concerns regarding the clarity of post-treatment instructions. Room for improvement.',
'rating' => 3,
'status' => 'Pending',
'created_at' => date('Y-m-d H:i:s', strtotime('-15 days'))
],
[
'id' => 104,
'patient_id' => 'P-004',
'patients\' _name' => 'Neha Gupta',
'message' => 'Exceptional care from start to finish. The doctors were very knowledgeable and reassuring. Highly recommended!',
'rating' => 5,
'status' => 'Approved',
'created_at' => date('Y-m-d H:i:s', strtotime('-20 days'))
],
[
'id' => 105,
'patient_id' => 'P-005',
'patients\' _name' => 'Rajesh Kumar',
'message' => 'The facility was clean and modern. My only suggestion would be to improve the online booking system.',
'rating' => 4,
'status' => 'Approved',
'created_at' => date('Y-m-d H:i:s', strtotime('-25 days'))
],
[
'id' => 106,
'patient_id' => 'P-006',
'patients\' _name' => 'Sneha Verma',
'message' => 'My experience was not satisfactory. There was a significant delay in receiving my test results.',
'rating' => 2,
'status' => 'Archived',
'created_at' => date('Y-m-d H:i:s', strtotime('-30 days'))
],
[
'id' => 107,
'patient_id' => 'P-007',
'patients\' _name' => 'Vikram Patel',
'message' => 'A truly compassionate and professional team. They made a difficult time much easier to navigate. Thank you!',
'rating' => 5,
'status' => 'Approved',
'created_at' => date('Y-m-d H:i:s', strtotime('-35 days'))
]
];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Meditronix: Patient Feedback Dashboard</title>
<!-- Sets the viewport for responsive design, ensuring proper scaling on all devices. -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Font Awesome for modern icons -->
<!-- This CDN link provides access to a wide range of vector icons. -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/*======================================================================
GLOBAL STYLES & BASE LAYOUT
This section defines root variables for consistent theming,
basic CSS resets, and the overall page structure, including the
subtle light multi-rainbow background.
========================================================================*/
:root {
/* Primary color palette for feedback - blushing bloom, very light pink, maroon */
--primary-accent: #ffb6c1; /* Light Pink (blushing bloom) */
--secondary-accent: #ff69b4; /* Hot Pink */
--tertiary-accent: #800000; /* Maroon */
--dark-accent: #4b0082; /* Indigo (for depth) */
/* Light pastel rainbow colors for a softer, changing background */
--pastel-color-1: #f0f8ff; /* Alice Blue */
--pastel-color-2: #e6f0ff; /* Very Light Blue */
--pastel-color-3: #f0fff8; /* Mint Cream */
--pastel-color-4: #fff0f5; /* Lavender Blush */
--pastel-color-5: #fdf5e6; /* Old Lace */
--pastel-color-6: #ffe4e1; /* Misty Rose */
--pastel-color-7: #e0ffff; /* Light Cyan */
/* Text colors for different levels of emphasis */
--text-color-dark: #222;
--text-color-medium: #555;
--text-color-light: #888;
/* Card background and border colors */
--card-bg-start: rgba(255, 255, 255, 0.95); /* Near white, start of card gradient */
--card-bg-end: rgba(245, 245, 245, 0.9); /* White Smoke, end of card gradient */
--card-border: rgba(255, 182, 193, 0.4); /* Light Pink border for cards */
/* Multi-gradient blushing bloom very light pink and maroon zebra cross lines for card background */
--zebra-gradient: linear-gradient(
45deg,
rgba(255, 240, 245, 0.95) 0%, /* Lavender Blush (very light pink) */
rgba(255, 240, 245, 0.95) 10%,
rgba(255, 228, 225, 0.9) 10%, /* Misty Rose (light blushing bloom) */
rgba(255, 228, 225, 0.9) 20%,
rgba(255, 240, 245, 0.95) 20%,
rgba(255, 240, 245, 0.95) 30%,
rgba(255, 228, 225, 0.9) 30%,
rgba(255, 228, 225, 0.9) 40%,
rgba(255, 240, 245, 0.95) 40%,
rgba(255, 240, 245, 0.95) 50%,
rgba(255, 228, 225, 0.9) 50%,
rgba(255, 228, 225, 0.9) 60%,
rgba(255, 240, 245, 0.95) 60%,
rgba(255, 240, 245, 0.95) 70%,
rgba(255, 228, 225, 0.9) 70%,
rgba(255, 228, 225, 0.9) 80%,
rgba(255, 240, 245, 0.95) 80%,
rgba(255, 240, 245, 0.95) 90%,
rgba(255, 228, 225, 0.9) 90%,
rgba(255, 228, 225, 0.9) 100%
);
--zebra-gradient-size: 40px; /* Size of one stripe cycle */
/* Shadow definitions for depth and visual hierarchy */
--shadow-light: 0 15px 50px rgba(0,0,0,0.15); /* Lighter shadow for general elements */
--shadow-hover: 0 25px 70px rgba(0,0,0,0.3); /* More prominent shadow on hover */
/* Border radius and padding for consistent styling */
--border-radius-xl: 35px; /* Extra large border radius for rounded elements */
--padding-xl: 3.5rem; /* Extra large padding for spacious layouts */
/* Transition properties for smooth animations */
--transition-speed: 0.6s; /* Default transition duration */
--transition-ease: cubic-bezier(0.4, 0, 0.2, 1); /* Material Design-like easing function */
}
/* Universal box-sizing for consistent layout calculations */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* Body styling: font, dynamic rainbow background, overflow, and text color */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
/* Dynamic, flowing light rainbow background for the entire page.
Uses multiple pastel colors to create a subtle, shifting gradient. */
background: linear-gradient(160deg, var(--pastel-color-1) 0%, var(--pastel-color-2) 15%, var(--pastel-color-3) 30%, var(--pastel-color-4) 45%, var(--pastel-color-5) 60%, var(--pastel-color-6) 75%, var(--pastel-color-7) 90%, var(--pastel-color-1) 100%);
background-size: 700% 700%; /* Larger background size for more subtle and continuous motion. */
animation: bgGradientMotion 90s ease-in-out infinite alternate; /* Slower, more elegant bi-directional animation. */
overflow-x: hidden; /* Prevents horizontal scrollbar on the body. */
color: var(--text-color-medium); /* Default text color. */
line-height: 1.8; /* Increased line height for better readability. */
position: relative; /* Establishes a positioning context for child elements. */
}
/* Keyframe animation for the background gradient motion, creating a subtle "wind" effect. */
@keyframes bgGradientMotion {
0% { background-position: 0% 50%; } /* Start position */
50% { background-position: 100% 50%; } /* Mid position */
100% { background-position: 0% 50%; } /* End position, returning to start */
}
/* Main wrapper styling: central container for the content */
.main-wrapper {
max-width: 2000px; /* Wider layout as requested, extending left and right. */
margin: 30px auto; /* Centers the wrapper horizontally with vertical margin. */
padding: 50px 40px; /* Increased padding on sides for an extended feel. */
background: rgba(255, 255, 255, 0.75); /* More translucent wrapper background for depth. */
border-radius: var(--border-radius-xl); /* Applies large rounded corners. */
box-shadow: 0 30px 90px rgba(0,0,0,0.2); /* Stronger shadow for a lifted effect. */
backdrop-filter: blur(20px); /* Stronger blur effect for elements behind the wrapper. */
border: 1px solid rgba(255,255,255,0.85); /* More prominent white border. */
position: relative; /* Establishes positioning context. */
z-index: 1; /* Ensures the wrapper is above the background but below popups. */
perspective: 1000px; /* Establishes a 3D context for child transformations. */
transition: transform 0.8s var(--transition-ease), box-shadow 0.8s var(--transition-ease); /* Smooth transitions for hover effects. */
}
/* Hover effect for the main wrapper: subtle 3D tilt and scale. */
.main-wrapper:hover {
transform: rotateY(0.5deg) rotateX(0.5deg) scale(1.005); /* Slight rotation and scale for interactive feel. */
box-shadow: 0 40px 120px rgba(0,0,0,0.35); /* Enhanced shadow on hover. */
}
/*======================================================================
HEADER SECTION
Styling for the main title and introductory paragraph of the page.
========================================================================*/
.header-section {
text-align: center; /* Centers text content. */
margin-bottom: 80px; /* Increased bottom margin for spacing. */
padding: 45px; /* Increased padding around content. */
background: rgba(255,255,255,0.98); /* Nearly opaque header background. */
border-radius: var(--border-radius-xl); /* Applies large rounded corners. */
box-shadow: 0 20px 70px rgba(0,0,0,0.3); /* Stronger shadow. */
backdrop-filter: blur(22px); /* Stronger blur effect. */
border: 1px solid rgba(255,255,255,0.95); /* Prominent white border. */
animation: fadeIn 1.8s ease-out; /* Fade-in animation on load. */
position: relative; /* For potential future pseudo-elements or animations. */
}
/* Main heading (H1) styling with gradient shimmer and floating effect. */
.header-section h1 {
font-size: 5.8rem; /* Even larger, more impactful heading. */
/* Gradient background for text, clipped to text. */
background: linear-gradient(to right, var(--primary-accent), var(--secondary-accent), var(--tertiary-accent), var(--primary-accent));
-webkit-background-clip: text; /* Clips the background to the shape of the text. */
-webkit-text-fill-color: transparent; /* Makes the text transparent to show the background. */
animation: shimmer 7s ease-in-out infinite, floatingHeading 8s ease-in-out infinite alternate; /* Combines shimmer and floating animations. */
margin-bottom: 30px; /* Spacing below the heading. */
font-weight: 900; /* Extra bold font weight. */
letter-spacing: 4px; /* Increased letter spacing for emphasis. */
text-shadow: 5px 5px 15px rgba(0,0,0,0.25); /* More pronounced text shadow. */
position: relative; /* Ensures text-shadow and background-clip work well. */
display: inline-block; /* Required for text-shadow and background-clip to work well. */
}
/* Keyframe animation for the text shimmer effect. */
@keyframes shimmer {
0%, 100% { background-position: -500% 0; } /* Start and end positions for background pan. */
50% { background-position: 500% 0; } /* Mid position for background pan. */
}
/* Keyframe animation for a subtle floating effect on the heading. */
@keyframes floatingHeading {
0% { transform: translateY(0px) rotateX(0deg); } /* Start position. */
50% { transform: translateY(-10px) rotateX(1deg); } /* Subtle lift and tilt. */
100% { transform: translateY(0px) rotateX(0deg); } /* Return to start. */
}
/* Introductory paragraph styling. */
.header-section p {
font-size: 1.9rem; /* Larger introductory text. */
color: var(--text-color-dark); /* Darker text for better contrast. */
max-width: 1400px; /* Wider text block. */
margin: 0 auto; /* Centers the paragraph. */
line-height: 2.1; /* Increased line height for readability. */
text-shadow: 1px 1px 5px rgba(0,0,0,0.15); /* Slightly stronger text shadow. */
animation: slideInUp 1.5s ease-out 0.5s forwards; /* Subtle slide-in animation for text. */
opacity: 0; /* Hidden initially for animation. */
}
/* Keyframe animation for the slide-in-up effect. */
@keyframes slideInUp {
0% { transform: translateY(20px); opacity: 0; } /* Starts slightly below and transparent. */
100% { transform: translateY(0); opacity: 1; } /* Slides up and fades in. */
}
/*======================================================================
FEEDBACK CAROUSEL SECTION
Styling for the feedback cards carousel, including auto-sliding
and interactive click effects.
========================================================================*/
.feedback-carousel-section {
overflow-x: hidden; /* Ensures no horizontal scrollbar is visible. */
padding: 60px 0; /* More vertical padding for spacing. */
scroll-behavior: smooth; /* Enables smooth scrolling for programmatic scrolls. */
-webkit-overflow-scrolling: touch; /* Improves scrolling performance on touch devices. */
position: relative; /* Establishes positioning context. */
box-shadow: inset 0 0 30px rgba(0,0,0,0.12); /* Deeper inner shadow for depth. */
border-radius: var(--border-radius-xl); /* Applies large rounded corners. */
background: rgba(255,255,255,0.9); /* Slightly more opaque background. */
border: 1px solid var(--card-border); /* Card border. */
/* Background image for feedback section. */
background-image: url('https://cdn.pixabay.com/photo/2024/07/08/16/28/ai-generated-8881553_1280.jpg'); /* Light pink background */
background-size: cover; /* Ensures the background image covers the entire area. */
background-position: center; /* Centers the background image. */
background-blend-mode: overlay; /* Blends the image with the semi-transparent background. */
animation: backgroundPan 90s linear infinite alternate; /* Slower, subtle pan effect for the background. */
margin-bottom: 0 !important; /* Ensures no space below the carousel. */
}
/* Keyframe animation for the background image pan effect. */
@keyframes backgroundPan {
0% { background-position: 0% 50%; } /* Start position. */
100% { background-position: 100% 50%; } /* End position. */
}
/* Styling for the carousel track that holds the feedback cards. */
.feedback-carousel-track {
display: flex; /* Uses flexbox for horizontal arrangement of cards. */
gap: 70px; /* Increased gap between individual cards. */
padding: 40px; /* Increased padding inside the track. */
min-width: fit-content; /* Allows content to exceed container width, enabling scrolling. */
transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth transition for JavaScript-controlled sliding. */
}
/* Styling for individual feedback cards. */
.feedback-card {
flex: 0 0 650px; /* Sets fixed width for each card, preventing shrinking. */
min-width: 650px; /* Ensures minimum width even if flex tries to shrink. */
height: 1020px; /* Increased height for full icon visibility and more content space. */
background: var(--zebra-gradient); /* Zebra cross lines gradient background. */
background-size: var(--zebra-gradient-size) var(--zebra-gradient-size); /* Size of the zebra stripes */
border-radius: var(--border-radius-xl); /* Applies large rounded corners. */
padding: var(--padding-xl); /* Applies large padding inside the card. */
position: relative; /* Establishes positioning context for pseudo-elements. */
box-shadow: 0 12px 35px rgba(255, 182, 193, 0.15), /* Soft accent shadow. */
0 30px 90px rgba(0,0,0,0.2); /* General shadow for depth. */
transition: transform var(--transition-speed) var(--transition-ease), box-shadow var(--transition-speed) var(--transition-ease), background var(--transition-speed) var(--transition-ease); /* Smooth transitions for hover effects. */
overflow: hidden; /* Hides content that overflows the card boundaries. */
border: 3px solid var(--card-border); /* More prominent accent border. */
cursor: pointer; /* Changes cursor to pointer to indicate interactivity. */
display: flex; /* Uses flexbox for internal layout. */
flex-direction: column; /* Stacks content vertically. */
justify-content: space-between; /* Distributes space between items. */
z-index: 5; /* Ensures cards are above background effects. */
transform-style: preserve-3d; /* Enables 3D transformations for child elements. */
perspective: 1000px; /* Sets perspective for 3D effects. */
}
/* Hover effect for feedback cards: dramatic lift, scale, and 3D tilt. */
.feedback-card:hover {
transform: translateY(-30px) scale(1.08) rotateX(2.5deg) rotateY(2.5deg); /* More dramatic lift, scale, and 3D rotation. */
box-shadow: 0 18px 45px rgba(255, 182, 193, 0.25), /* Enhanced accent shadow. */
0 40px 110px rgba(0,0,0,0.4); /* More prominent general shadow. */
background: linear-gradient(145deg, #ffffff 0%, #fff0f5 100%); /* Slightly brighter crystal background on hover. */
}
/* Glittering Shine Effect on click (Shining Blade) */
/* This pseudo-element creates a "shining blade" effect that sweeps across the card on click. */
.feedback-card::before {
content: '';
position: absolute;
top: 0;
left: -400%; /* Starts far off-screen to the left. */
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent); /* Super bright white shine, fully opaque in the middle. */
transform: skewX(-45deg); /* Creates an angled "blade" shape. */
transition: left 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Slower, smoother transition for the sweep. */
pointer-events: none; /* Allows clicks to pass through this pseudo-element. */
z-index: 10; /* Ensures it's above other card content. */
opacity: 0; /* Hidden by default. */
}
/* Activates the shining blade effect when the card is clicked. */
.feedback-card.clicked::before {
left: 400%; /* Slides across to the right. */
opacity: 1; /* Makes it visible when clicked. */
animation: glitterShineBlade 1.8s forwards; /* Animation for the shine. */
}
/* Keyframe animation for the glitter shine blade effect. */
@keyframes glitterShineBlade {
0% { left: -400%; opacity: 0; } /* Starts off-screen, transparent. */
50% { left: 0%; opacity: 1; } /* Moves to center, fully opaque. */
100% { left: 400%; opacity: 0; } /* Moves off-screen, fades out. */
}
/* Crystal Water Effect on click (Expanding Radial Gradient) - Waterfall-like */
/* This pseudo-element creates an expanding radial gradient effect, like a water ripple. */
.feedback-card::after {
content: '';
position: absolute;
top: var(--mouse-y, 50%); /* Dynamic Y position based on mouse click. */
left: var(--mouse-x, 50%); /* Dynamic X position based on mouse click. */
width: 0;
height: 0;
border-radius: 50%; /* Ensures a circular ripple. */
background: radial-gradient(circle at center, rgba(255, 182, 193, 0.8), transparent 85%); /* Brighter, more expansive accent water ripple. */
opacity: 0;
transform: translate(-50%, -50%); /* Centers the pseudo-element relative to its top/left. */
transition: width 1.5s ease-out, height 1.5s ease-out, opacity 1.5s ease-out; /* Slower, more fluid expansion. */
pointer-events: none; /* Allows clicks to pass through. */
z-index: 9; /* Ensures it's above card content but below the shining blade. */
box-shadow: 0 0 60px 25px rgba(255, 182, 193, 0.6); /* Stronger glowing effect for water. */
}
/* Activates the crystal water effect when the card is clicked. */
.feedback-card.clicked::after {
width: 500%; /* Expands significantly. */
height: 500%;
opacity: 1; /* Becomes visible. */
}
/* Styling for the circular icon container at the top of each card. */
.feedback-icon-container {
width: 200px; /* Increased width for a larger circle */
height: 200px; /* Increased height for a larger circle */
background: linear-gradient(135deg, var(--primary-accent), var(--dark-accent)); /* Accent gradient background. */
border-radius: 50%; /* Ensures it's a perfect circle. */
display: flex; /* Uses flexbox for centering the icon. */
align-items: center; /* Centers vertically. */
justify-content: center; /* Centers horizontally. */
color: #fff; /* White icon color. */
font-size: 8rem; /* Increased icon font size for a "fuller" look */
margin: 0 auto 55px; /* Adjusted bottom margin for spacing. */
box-shadow: 0 20px 45px rgba(255, 182, 193, 0.9); /* Stronger accent shadow. */
transition: transform 0.9s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Springy animation for hover. */
position: relative; /* For pseudo-elements. */
overflow: hidden; /* Ensures content inside is clipped if it overflows. */
}
/* Pseudo-element for a pulsing glow effect inside the icon container. */
.feedback-icon-container::before {
content: '';
position: absolute;
top: -90%;
left: -90%;
width: 280%;
height: 280%;
background: radial-gradient(circle at center, rgba(255,255,255,0.7), transparent 90%);
animation: iconPulse 7s infinite alternate; /* Slower pulsing glow animation. */
}
/* Keyframe animation for the icon pulsing glow. */
@keyframes iconPulse {
0% { transform: scale(0.4); opacity: 0.9; } /* Starts smaller, slightly transparent. */
100% { transform: scale(1.6); opacity: 1; } /* Expands, becomes fully opaque. */
}
/* Hover effect for the icon container: dramatic rotate and scale. */
.feedback-card:hover .feedback-icon-container {
transform: rotate(40deg) scale(1.4); /* More dramatic rotation and scale on hover. */
}
/* Styling for the main title of the feedback (e.g., "Feedback ID"). */
.feedback-card h4 {
font-size: 3.2rem; /* Larger title font size. */
color: var(--text-color-dark);
margin-bottom: 18px;
font-weight: 900; /* Extra bold. */
text-shadow: 1px 1px 6px rgba(0,0,0,0.25);
text-align: center; /* Centered text. */
/* Glitter effect for feedback title using a gold shimmer gradient. */
background: linear-gradient(90deg, #fefefe, #ffd700, #fefefe, #ffd700, #fefefe);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-size: 400% 100%; /* Larger background size for more prominent shimmer. */
animation: textShine 6s linear infinite; /* Slower shimmer animation. */
}
/* Styling for individual feedback details (Patient ID, Name, Message, Rating, Created At). */
.feedback-card p {
color: var(--text-color-medium);
font-size: 1.5rem; /* Larger text. */
margin-bottom: 12px; /* Slightly reduced margin for denser info */
line-height: 1.7;
text-align: left; /* Aligns details to the left for readability. */
display: flex; /* Uses flexbox for icon alignment. */
align-items: flex-start; /* Aligns icon and text to the top */
gap: 20px; /* Space between icon and text. */
padding-left: 25px; /* Indents details slightly. */
position: relative; /* For icon styling. */
}
/* Styling for strong/bold text within paragraphs. */
.feedback-card p strong {
color: var(--text-color-dark);
font-weight: 700;
min-width: 150px; /* Ensure consistent alignment for labels */
}
/* Styling for Font Awesome icons within paragraphs. */
.feedback-card p i {
color: var(--primary-accent); /* Accent icon color. */
font-size: 1.8rem; /* Larger icon size. */
min-width: 35px; /* Ensures consistent spacing for icons. */
text-shadow: 0.8px 0.8px 3px rgba(255, 182, 193, 0.4); /* Icon shadow. */
}
/* Styling for the star rating */
.feedback-card .rating-stars {
color: #FFD700; /* Gold color for stars */
font-size: 2.2rem; /* Larger stars */
margin-left: 25px; /* Align with other content */
margin-top: 10px;
margin-bottom: 15px;
text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
/* Styling for the "Posted on" timestamp. */
.feedback-card small {
display: block; /* Ensures it takes full width. */
text-align: right; /* Aligns to the right. */
color: var(--text-color-light);
font-size: 1.2rem; /* Larger font size. */
margin-top: 25px; /* More space above. */
padding-top: 15px;
border-top: 1px dashed rgba(0,0,0,0.1); /* Subtle dashed line. */
}
/* Social Links within each card */
.card-social-links {
display: flex; /* Uses flexbox for arrangement. */
justify-content: center; /* Centers the social icons. */
gap: 25px; /* Space between icons. */
margin-top: 30px; /* Space from content above. */
padding-top: 20px;
border-top: 1px dashed rgba(0,0,0,0.1); /* Subtle separator line. */
}
/* Styling for individual social media links. */
.card-social-links a {
color: var(--primary-accent); /* Default icon color, now accent. */
font-size: 2.5rem; /* Large social icons. */
transition: transform 0.3s ease, color 0.3s ease, text-shadow 0.3s ease; /* Smooth transitions for hover. */
text-decoration: none; /* Removes underline from links. */
}
/* Hover effect for social media links: lift and slightly enlarge. */
.card-social-links a:hover {
transform: translateY(-5px) scale(1.1); /* Lifts and slightly enlarges on hover. */
}
/* Specific colors for social icons on hover for brand recognition. */
.card-social-links a.linkedin:hover { color: #0077B5; text-shadow: 0 0 15px rgba(0,119,181,0.6); }
.card-social-links a.youtube:hover { color: #FF0000; text-shadow: 0 0 15px rgba(255,0,0,0.6); }
.card-social-links a.instagram:hover {
/* Instagram gradient effect for hover. */
background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 0 15px rgba(214,36,159,0.6);
}
.card-social-links a.wikipedia:hover { color: #000; text-shadow: 0 0 15px rgba(0,0,0,0.6); }
/*======================================================================
POPUP MESSAGES (CUSTOM ALERTS/CONFIRMS)
Styling for the interactive popup message and confirmation modals.
========================================================================*/
.custom-modal {
display: none; /* Hidden by default. */
position: fixed; /* Fixed position relative to the viewport. */
z-index: 3000; /* Highest z-index to appear above all other content. */
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto; /* Enables scrolling if content overflows. */
background-color: rgba(0,0,0,0.75); /* Darker, semi-transparent overlay. */
backdrop-filter: blur(12px); /* Applies a blur effect to content behind the modal. */
animation: fadeIn 0.5s ease-out; /* Fade-in animation for the modal. */
justify-content: center; /* Centers content horizontally using flexbox. */
align-items: center; /* Centers content vertically using flexbox. */
}
/* Styling for the content area of the custom modal. */
.custom-modal-content {
background-color: #fefefe; /* Near-white background. */
margin: auto; /* Centers vertically and horizontally. */
padding: 60px; /* Even larger padding. */
border: 1px solid #888; /* Light gray border. */
width: 90%; /* Takes 90% of parent width. */
max-width: 700px; /* Larger maximum width. */
border-radius: var(--border-radius-xl); /* Applies large rounded corners. */
box-shadow: 0 30px 90px rgba(0,0,0,0.5); /* Stronger shadow. */
position: relative; /* For positioning the close button. */
animation: slideInTop 0.6s ease-out; /* Slide-in-from-top animation. */
text-align: center; /* Centers text content. */
}
/* Close button styling for modals. */
.custom-modal-content .close-button {
color: #aaa; /* Light gray color. */
font-size: 3.5rem; /* Larger font size. */
font-weight: bold;
position: absolute; /* Absolute positioning relative to modal content. */
top: 25px;
right: 35px;
cursor: pointer;
transition: color 0.3s ease; /* Smooth color transition on hover. */
}
/* Hover/focus effect for the close button. */
.custom-modal-content .close-button:hover,
.custom-modal-content .close-button:focus {
color: #333; /* Darker gray on hover. */
}
/* Heading (H3) styling within modals. */
.custom-modal-content h3 {
margin-bottom: 30px;
font-size: 3rem;
color: var(--text-color-dark);
}
/* Paragraph styling within modals. */
.custom-modal-content p {
margin-bottom: 40px;
font-size: 1.4rem;
line-height: 1.8;
}
/* Button container for modal actions. */
.custom-modal-content .modal-buttons button {
padding: 15px 35px;
border: none;
border-radius: 30px;
cursor: pointer;
font-size: 1.2rem;
font-weight: 700;
transition: background 0.4s ease, transform 0.3s ease; /* Smooth transitions. */
margin: 0 20px;
}
/* Styling for "OK" button in modals. */
.custom-modal-content .modal-buttons .btn-ok {
background: linear-gradient(to right, #28a745, #218838); /* Green gradient. */
color: #fff;
}
/* Hover effect for "OK" button. */
.custom-modal-content .modal-buttons .btn-ok:hover {
background: linear-gradient(to right, #218838, #28a745);
transform: translateY(-4px);
}
/* Styling for "Cancel" button in modals. */
.custom-modal-content .modal-buttons .btn-cancel {
background: linear-gradient(to right, #dc3545, #c82333); /* Red gradient. */
color: #fff;
}
/* Hover effect for "Cancel" button. */
.custom-modal-content .modal-buttons .btn-cancel:hover {
background: linear-gradient(to right, #c82333, #dc3545);
transform: translateY(-4px);
}
/* Specific styling for the initial "Welcome" popup message. */
#popup-message {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0); /* Starts hidden and scaled down. */
background: linear-gradient(45deg, var(--primary-accent) 0%, var(--secondary-accent) 99%, var(--tertiary-accent) 100%); /* Accent gradient background. */
padding: 60px 90px; /* Larger padding. */
border-radius: var(--border-radius-xl);
font-size: 3.5rem; /* Larger text. */
color: #fff;
text-shadow: 1px 1px 8px rgba(0,0,0,0.6);
box-shadow: 0 0 50px rgba(255, 182, 193, 1); /* Stronger shadow. */
opacity: 0; /* Hidden initially. */
transition: transform 1s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 1s ease; /* Smooth, springy transition. */
z-index: 2000; /* Highest z-index for initial display. */
border: 6px solid rgba(255,255,255,1); /* White border. */
font-weight: bold;
letter-spacing: 3px;
text-align: center;
}
/* Shows the welcome popup with animation. */
#popup-message.show {
transform: translate(-50%, -50%) scale(1); /* Scales up to full size. */
opacity: 1; /* Fades in. */
}
/* Firework Canvas for dynamic effects */
#fireworkCanvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none; /* Allows clicks to pass through to elements below. */
z-index: 1500; /* Below popups, above content. */
}
/*======================================================================
FOOTER & SOCIAL LINKS
Styling for the social media links and copyright information at the bottom of the page.
========================================================================*/
.footer-social-links {
text-align: center;
margin-top: 0 !important; /* IMPORTANT: Removes any default top margin. */
padding-top: 80px; /* More padding above social links. */
border-top: 1px solid rgba(0,0,0,0.4); /* More visible border above social links. */
padding-bottom: 60px;
}
/* Styling for individual social media icons in the footer. */
.footer-social-links a {
margin: 0 40px; /* Increased spacing between icons. */
color: var(--primary-accent); /* Accent color for footer links. */
font-size: 3.5rem; /* Larger icons. */
text-decoration: none;
transition: color 0.6s ease, transform 0.6s ease, text-shadow 0.6s ease; /* Smooth transitions for hover effects. */
}
/* Hover effect for footer social links: significant lift and scale. */
.footer-social-links a:hover {
transform: translateY(-15px) scale(1.5); /* More pronounced lift. */
color: var(--dark-accent); /* Darker accent on hover. */
text-shadow: 0 12px 25px rgba(255, 182, 193, 0.6); /* Shadow on hover. */
}
/* Footer copyright text styling. */
footer {
text-align: center;
margin-top: 0 !important; /* IMPORTANT: Removes any default top margin. */
padding: 40px 0;
border-top: 1px dashed rgba(0,0,0,0.25); /* Dashed border above copyright. */
color: var(--text-color-light);
font-size: 1.2rem;
}
/*======================================================================
RESPONSIVE DESIGN
Media queries for optimal viewing on various screen sizes,
ensuring the layout adapts gracefully from large desktops to small mobile devices.
========================================================================*/
/* Large screens (e.g., smaller desktops, large tablets in landscape) */
@media (max-width: 1800px) {
.main-wrapper {
max-width: 1600px;
padding: 40px 30px;
}
.feedback-card {
flex: 0 0 550px;
min-width: 550px;
height: 940px; /* Adjusted height */
padding: 3rem;
}
.feedback-icon-container {
width: 180px; /* Adjusted for responsiveness */
height: 180px; /* Adjusted for responsiveness */
font-size: 7rem; /* Adjusted for responsiveness */
margin-bottom: 50px; /* Adjusted for responsiveness */
}
.feedback-carousel-track {
gap: 60px;
padding: 30px;
}
}
/* Medium-large screens (e.g., typical desktops, large tablets) */
@media (max-width: 1400px) {
.main-wrapper {
max-width: 1200px;
padding: 30px 25px;
}
.header-section h1 {
font-size: 4.5rem;
}
.header-section p {
font-size: 1.6rem;
}
.feedback-card {
flex: 0 0 480px;
min-width: 480px;
height: 890px; /* Adjusted height */
padding: 2.8rem;
}
.feedback-icon-container {
width: 160px; /* Adjusted for responsiveness */
height: 160px; /* Adjusted for responsiveness */
font-size: 6rem; /* Adjusted for responsiveness */
margin-bottom: 45px; /* Adjusted for responsiveness */
}
.feedback-card h4 {
font-size: 2.8rem;
}
.feedback-card p {
font-size: 1.3rem;
}
.feedback-carousel-track {
gap: 50px;
padding: 25px;
}
.footer-social-links a {
font-size: 3rem;
margin: 0 30px;
}
}
/* Medium screens (e.g., smaller tablets, laptops) */
@media (max-width: 1024px) {
.main-wrapper {
max-width: 960px;
margin: 25px auto;
padding: 25px 20px;
}
.header-section {
margin-bottom: 60px;
padding: 35px;
}
.header-section h1 {
font-size: 3.8rem;
letter-spacing: 2px;
}
.header-section p {
font-size: 1.3rem;
}
.feedback-carousel-section {
padding: 50px 0;
}
.feedback-card {
flex: 0 0 420px; /* Adjust for smaller screens */
min-width: 420px;
padding: 2.5rem;
height: 820px; /* Adjusted height */
}
.feedback-carousel-track {
justify-content: flex-start;
padding-left: 15px;
padding-right: 15px;
gap: 40px;
}
.feedback-icon-container {
width: 140px; /* Adjusted for responsiveness */
height: 140px; /* Adjusted for responsiveness */
font-size: 5rem; /* Adjusted for responsiveness */
margin-bottom: 35px; /* Adjusted for responsiveness */
}
.feedback-card h4 {
font-size: 2.4rem;
}
.feedback-card p {
font-size: 1.1rem;
line-height: 1.8;
}
.footer-social-links {
padding-top: 60px;
padding-bottom: 40px;
}
.footer-social-links a {
font-size: 2.8rem;
margin: 0 25px;
}
#popup-message {
padding: 40px 60px;
font-size: 3rem;
}
}
/* Small to medium screens (e.g., tablets in portrait, large phones) */
@media (max-width: 768px) {
body {
padding: 10px 0;
}
.main-wrapper {
padding: 20px 15px;
margin: 15px auto;
}
.header-section {
padding: 25px;
margin-bottom: 40px;
}
.header-section h1 {
font-size: 3rem;
letter-spacing: 1px;
}
.header-section p {
font-size: 1.1rem;
}
.feedback-carousel-section {
padding: 40px 0;
}
.feedback-card {
flex: 0 0 95%; /* Take up almost full width on mobile */
min-width: 300px; /* Ensure it doesn't get too small */
margin: 0 auto; /* Center cards */