forked from apu52/Travel_Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
faq.css
228 lines (201 loc) · 4.28 KB
/
faq.css
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
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap");
* {
box-sizing: border-box;
border-radius: 20px;
}
:root {
--color-primary: #ffd54b;
--color-text: #545d7a;
--color-white: #fff;
--color-title: #242e4c;
--color-background: #f7f8fb;
--color-border: #dae1f5;
--transition: 0.4s ease-in-out;
--shadow: 0px 60px 56px -12px rgba(9, 40, 163, 0.05);
}
body {
font-family: "Poppins", sans-serif;
color: var(--color-text);
font-size: 16px;
font-weight: 400;
margin: 0;
padding: 0;
}
/* .container {
width: 100% !important;
margin: auto;
min-height: 100vh;
padding: 2rem;
display: grid;
place-items: center;
} */
.faq-container {
margin: 0 auto;
max-width: 900px !important;
width: 80%;
}
.faq {
background-color: rgb(176, 196, 242, 0.3);
border: 1px solid #9a9afb;
color: black;
border-radius: 25px;
margin: 20px 0;
overflow: hidden;
padding: 30px;
position: relative;
transition: 0.3s ease;
cursor: pointer;
opacity: 0;
transform: translateX(-100%);
animation: slideInFromLeft 2s ease-in-out forwards; /* Animation duration is now 2 seconds */
}
.faq.active {
background: rgb(239, 239, 239);
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.1);
}
.faq.active::before,
.faq.active::after {
color: #2ecc71;
content: "\f075";
font-family: "Poppins", sans-serif;
font-size: 7rem;
left: 20px;
opacity: 0.2;
position: absolute;
top: 20px;
z-index: 0;
}
.faq.active::before {
color: #3498db;
left: -30px;
top: -10px;
transform: rotateY(180deg);
}
.faq-title {
margin: 0 35px 0 0;
color: #3685fb;
transition: transform 0.3s ease;
}
.faq-title:hover {
transform: scale(1.1);
}
.faq-text {
margin: 30px 0 0;
color: black;
}
.faq-toggle {
align-items: center;
background: rgb(239, 239, 239);
border: 0;
border-radius: 50%;
cursor: pointer;
display: flex;
font-size: 1rem;
height: 30px;
justify-content: center;
padding: 0;
position: absolute;
right: 30px;
top: 10px; /* Moving toggle button to top to remove overlapping with faq-title */
width: 30px;
}
.faq-toggle .fa-times,
.faq.active .faq-toggle .fa-chevron-down {
display: none;
}
.accordion__wrapper {
background: url("https://img.freepik.com/free-photo/pouch-map-toy-airplane-blue-background-with-space-writing-text_23-2147958180.jpg")
no-repeat center center fixed;
background-size: cover;
box-shadow: var(--shadow);
border-radius: 10px;
width: 100%;
margin-top: 20px;
min-height: 100vh;
padding: 2rem;
display: grid;
place-items: center;
position: relative; /* Ensure position is relative for z-index to work */
z-index: 1; /* Ensure the FAQ wrapper is above the background image */
}
.accordion__title {
font-size: 25px;
font-weight: 800;
color: var(--color-title);
text-align: center;
margin-bottom: 4rem;
}
.accordion {
border-bottom: 0.1rem solid var(--color-border);
padding-bottom: 2rem;
margin-bottom: 3rem;
width: 100%;
}
.accordion__header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
cursor: pointer;
}
.accordion__icon {
background-color: var(--color-primary);
width: 2.2rem;
height: 2.2rem;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
color: var(--color-white);
flex-shrink: 0;
}
.accordion__question {
font-size: 18px;
font-weight: 700;
color: var(--color-title);
width: 100%;
}
.accordion__answer {
padding: 2rem 0;
font-size: 16px;
}
.accordion__content {
overflow: hidden;
height: 0;
transition: var(--transition);
}
@media screen and (min-width: 580px) {
.accordion__wrapper {
padding: 5rem 8rem;
}
}
.more {
padding: 50px;
background: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ9dwjbQHiWY1sgKRxCurFvyI4pwTMM9L2AVQ&s")
no-repeat center center fixed;
background-size: cover;
margin: 10px auto;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.more p {
color: grey;
}
.moreemail {
padding: 10px 20px;
font-size: 18px;
border-radius: 10px;
color: white;
background-color: rgb(40, 87, 241);
}
@keyframes slideInFromLeft {
0% {
opacity: 0;
transform: translateX(-100%);
}
100% {
opacity: 1;
transform: translateX(0);
}
}