-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
338 lines (285 loc) · 5.96 KB
/
Copy pathstyle.css
File metadata and controls
338 lines (285 loc) · 5.96 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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
list-style: none;
}
body {
font-family: 'Arial', sans-serif;
background: radial-gradient(#7f3d9e, #6d00d9);
color: #fff;
overflow-x: hidden; /* Prevent horizontal scroll on small screens */
}
header {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: space-between;
width: 80vw;
z-index: 10;
flex-direction: row; /* Default for larger screens */
align-items: center; /* Align items in the header */
}
header h1 {
font-size: 24px;
font-weight: bold;
}
header nav ul {
display: flex;
gap: 20px;
}
header nav ul li {
cursor: pointer;
text-transform: uppercase;
font-weight: bold;
}
header nav ul li a {
color: #fff;
text-decoration: none;
transition: color 0.3s ease;
}
header nav ul li a:hover {
color: #beff1b;
}
section {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 20px; /* Add some padding for smaller screens */
box-sizing: border-box;
}
.content {
display: flex;
align-items: center;
justify-content: space-between;
width: 80vw;
margin: 0 auto;
flex-direction: row; /* Default for larger screens */
flex-wrap: wrap; /* Allow items to wrap on smaller screens */
gap: 40px; /* Add some gap between elements */
}
.car-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 20px;
align-items: flex-start;
margin-left: auto;
text-align: left;
min-width: 300px; /* Ensure car-info doesn't get too small */
}
.car-info .year {
font-size: 18px;
color: #fff;
opacity: 0.7;
}
.car-info h2 {
font-size: 3em;
line-height: 1.2;
color: #fff;
text-transform: uppercase;
}
.car-info p {
font-size: 12px;
color: #e0e0e0;
}
.car-info .info-btn {
background-color: #beff1b;
color: #000;
font-weight: bold;
text-transform: uppercase;
padding: 10px 20px;
border: none;
border-radius: 20px;
cursor: pointer;
}
.car-img {
flex: 1;
position: relative;
z-index: 2;
right: 0; /* Adjusted for better responsiveness */
display: flex;
justify-content: center; /* Center the image */
align-items: center;
min-width: 300px; /* Ensure car-img doesn't get too small */
}
.car-img img {
width: 100%; /* Make image responsive */
max-width: 600px; /* Keep original max-width */
height: auto; /* Maintain aspect ratio */
}
@keyframes slideIn {
0% {
transform: translateX(-100%) rotate(0deg);
}
50% {
transform: translateX(0) rotate(0deg);
}
100% {
transform: translateX(0) rotate(0deg);
}
}
.arrows {
position: absolute;
top: 50%;
width: 100%;
display: flex;
justify-content: space-between;
transform: translateY(-50%);
padding: 0 20px; /* Add padding to arrows */
box-sizing: border-box;
}
.arrow {
background-color: #fff;
border: none;
border-radius: 50%;
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
cursor: pointer;
transition: transform 0.3s ease;
}
.arrow img {
width: 20px;
}
.arrow:hover {
transform: scale(1.2);
}
.arrow.left img {
transform: scaleX(-1);
}
.indicators {
position: absolute;
bottom: 20px;
left: 50px;
display: flex;
align-items: center;
gap: 20px;
}
.indicators .number {
font-size: 24px;
font-weight: bold;
}
.indicators ul {
display: flex;
gap: 10px;
}
.indicators ul li {
width: 20px;
height: 2px;
background-color: #fff;
opacity: 0.5;
transition: opacity 0.3s;
}
.indicators ul li.active {
opacity: 1;
}
.line {
width: 40%;
height: 2px;
background-color: #fff;
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 1;
}
.line:first-of-type {
left: 10%;
}
.line:last-of-type {
right: 10%;
}
/* --- Media Queries --- */
/* For screens smaller than 768px (common tablet portrait breakpoint) */
@media (max-width: 768px) {
header {
flex-direction: column; /* Stack header items vertically */
top: 10px;
width: 90vw;
text-align: center;
}
header h1 {
margin-bottom: 10px;
}
header nav ul {
gap: 10px;
}
.content {
flex-direction: column; /* Stack content vertically */
text-align: center;
width: 90vw;
}
.car-info {
margin-left: 0; /* Remove auto margin */
align-items: center; /* Center content */
text-align: center;
}
.car-info h2 {
font-size: 2.5em; /* Slightly smaller font size */
}
.car-img {
right: 0; /* Reset right position */
order: -1; /* Place image above info on mobile */
margin-bottom: 20px; /* Add space below image */
}
.line {
display: none; /* Hide lines on smaller screens */
}
.arrows {
width: calc(100% - 40px); /* Adjust width considering padding */
padding: 0; /* Remove padding */
}
.indicators {
left: 50%;
transform: translateX(-50%);
bottom: 10px;
}
}
@media (max-width: 480px) {
header {
top: 5px;
}
header h1 {
font-size: 20px;
}
header nav ul {
flex-direction: column;
gap: 5px;
margin-top: 10px;
}
.car-info h2 {
font-size: 2em;
}
.car-info p {
font-size: 10px;
}
.car-info .info-btn {
padding: 8px 15px;
font-size: 0.9em;
}
.arrow {
width: 40px;
height: 40px;
}
.arrow img {
width: 15px;
}
.indicators {
font-size: 0.9em;
bottom: 5px;
gap: 10px;
}
.indicators .number {
font-size: 20px;
}
.indicators ul li {
width: 15px;
}
}