-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathNavigation.css
More file actions
510 lines (449 loc) · 10.6 KB
/
Navigation.css
File metadata and controls
510 lines (449 loc) · 10.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
html {
scroll-behavior: smooth;
}
/* Add the body class to prevent scrolling when menu is open */
body.menu-open {
overflow: hidden;
height: 100vh;
margin: 0;
-webkit-overflow-scrolling: none;
touch-action: none;
}
.hero__nav {
position: relative;
z-index: 9999;
padding: 0.5rem 2rem;
margin-top: -0.5rem;
display: flex;
align-items: center;
width: 100%;
}
.nav-links {
display: flex;
justify-content: center;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
flex: 1;
@media (max-width: 935px) {
gap: 1.2rem;
}
@media (max-width: 865px) {
gap: 0.8rem;
}
@media (max-width: 810px) {
gap: 0.3rem;
}
}
.nav-logo {
position: relative;
top: -0.25rem;
}
.nav-logo-svu {
position: relative;
top: -0.25rem;
margin-left: auto; /* This helps push it to the right */
}
.nav-logo img {
width: 120px;
height: auto;
transition: transform 0.3s ease;
}
.nav-logo-svu img {
width: 120px;
height: auto;
transition: transform 0.3s ease;
@media (max-width: 768px) {
display: none;
}
}
.nav-logo img:hover {
transform: scale(1.1);
}
.hamburger {
display: none;
width: 30px;
height: 30px;
position: relative;
cursor: pointer;
margin-left: auto;
z-index: 100;
}
.hamburger span {
width: 25px;
height: 3px;
background-color: #fff;
display: block;
border-radius: 3px;
position: absolute;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger span:nth-child(1) { top: 5px; }
.hamburger span:nth-child(2) { top: 14px; }
.hamburger span:nth-child(3) { top: 23px; }
.hamburger.open span:nth-child(1) {
transform: rotate(45deg) translate(6px, 6px);
}
.hamburger.open span:nth-child(2) {
opacity: 0;
}
.hamburger.open span:nth-child(3) {
transform: rotate(-45deg) translate(7px, -7px);
}
/* Ensure no underline appears on links in ANY state */
.hero__nav a,
.hero__nav a:link,
.hero__nav a:visited,
.hero__nav a:hover,
.hero__nav a:active,
.hero__nav a:focus,
.hero__nav li.hovered a {
text-decoration: none !important;
border-bottom: none !important;
box-shadow: none !important;
outline: none !important;
}
/* Add this to remove any active state highlighting */
a:active, a:focus {
outline: 0;
border: none;
-moz-outline-style: none;
}
/* Override browser default focus styles */
*:focus {
outline: none !important;
}
/* Main navigation link styles */
.hero__nav a {
color: #fff;
text-decoration: none !important;
font-size: 1rem;
text-transform: uppercase;
letter-spacing: 1px;
transition: all 0.3s ease;
position: relative;
padding: 3px 10px;
z-index: 1;
}
.hero__nav li {
position: relative;
overflow: visible;
transition: all 0.3s ease;
will-change: transform;
-webkit-tap-highlight-color: transparent; /* Remove default mobile tap highlight */
}
/* Add yellow glow to text on hovered class instead of hover pseudo-class */
.hero__nav li.hovered a {
color: #fff;
transform: translateY(-2px);
text-shadow: 0 0 8px #ffff00, 0 0 12px #ffff00, 0 0 16px #ffff00;
transition: all 0.3s ease, text-shadow 0.5s ease;
will-change: transform, text-shadow;
}
/* Mobile styles with touch effect */
@media (max-width: 768px) {
.hamburger {
display: block;
z-index: 10001;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 0.5rem;
}
.nav-logo {
position: relative;
top: 0.5rem;
}
.nav-logo img {
width: 80px;
margin-top: 0;
}
.nav-links {
position: fixed;
top: 0;
right: 0;
width: 70%;
height: 100vh;
flex-direction: column;
align-items: center;
justify-content: flex-start;
background: #d41936;
/* Remove transition completely */
transition: none;
gap: 2rem;
z-index: 1000;
padding-left: 2rem;
padding-right: 2rem;
padding-top: 12vh;
padding-bottom: 0;
/* Starting state - ensure it's fully hidden */
transform: skewY(-12deg) translateX(100%);
transform-origin: top right;
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0);
box-shadow: none;
/* Optimize rendering */
will-change: transform;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
/* Force hidden initially to prevent flashing on page load */
opacity: 0;
pointer-events: none;
}
/* Make sure nav isn't visible on page load */
.nav-links:not(.active) {
transform: skewY(-12deg) translateX(100%);
opacity: 0;
animation: none;
/* Important to prevent any browser default behavior */
visibility: hidden;
}
/* Only apply animations when active is explicitly added */
.nav-links.active {
opacity: 1;
visibility: visible;
pointer-events: auto;
animation: menuSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards; /* Faster menu slide-in but starts after overlay */
animation-delay: 0.2s; /* Add delay to ensure overlay appears first */
}
@keyframes menuSlideIn {
0% {
transform: skewY(-12deg) translateX(100%);
box-shadow: none;
}
100% {
transform: skewY(-12deg) translateX(0%);
box-shadow: -15px 0px 35px rgba(0, 0, 0, 0.6);
}
}
@keyframes menuSlideOut {
0% {
transform: skewY(-12deg) translateX(0%);
box-shadow: -15px 0px 35px rgba(0, 0, 0, 0.6);
}
100% {
transform: skewY(-12deg) translateX(100%);
box-shadow: none;
}
}
/* Simplify menu item appearance */
.nav-links li {
transform: skewY(12deg) translateX(50px);
width: 100%;
margin-bottom: 0.5rem;
opacity: 0;
/* No transitions */
transition: none;
text-align: center;
will-change: transform, opacity;
}
/* Pure animation approach for menu items */
.nav-links.active li {
animation: menuItemAppear 0.45s ease-out forwards;
}
/* Staggered animation delays - adjust to start sooner after menu appears */
.nav-links.active li:nth-child(1) { animation-delay: 0.3s; } /* First item appears sooner after menu starts */
.nav-links.active li:nth-child(2) { animation-delay: 0.35s; }
.nav-links.active li:nth-child(3) { animation-delay: 0.4s; }
.nav-links.active li:nth-child(4) { animation-delay: 0.45s; }
.nav-links.active li:nth-child(5) { animation-delay: 0.5s; }
.nav-links.active li:nth-child(6) { animation-delay: 0.55s; }
@keyframes menuItemAppear {
0% {
transform: skewY(12deg) translateX(50px);
opacity: 0;
}
100% {
transform: skewY(12deg) translateX(0);
opacity: 1;
}
}
/* Simplified black and white overlay */
.menu-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.6);
z-index: 999;
opacity: 0;
visibility: hidden;
/* No transition */
transition: none;
backdrop-filter: grayscale(0%);
pointer-events: none;
will-change: opacity, backdrop-filter;
/* Force hidden initially */
display: none;
}
.menu-overlay.active {
opacity: 1;
visibility: visible;
pointer-events: auto;
animation: overlayAppear 0.4s forwards; /* Slightly faster overlay effect */
cursor: pointer;
/* Show when active */
display: block;
animation-delay: 0s; /* Ensure overlay starts immediately */
}
/* Non-active overlay gets hidden animation */
.menu-overlay:not(.active) {
animation: overlayDisappear 0.25s forwards;
}
@keyframes overlayAppear {
0% {
opacity: 0;
backdrop-filter: grayscale(0%);
}
100% {
opacity: 1;
backdrop-filter: grayscale(100%) brightness(0.8) contrast(1.2);
}
}
@keyframes overlayDisappear {
0% {
opacity: 1;
backdrop-filter: grayscale(100%) brightness(0.8) contrast(1.2);
visibility: visible;
}
100% {
opacity: 0;
backdrop-filter: grayscale(0%);
visibility: hidden;
}
}
/* Keep existing hamburger pulse animation */
.hamburger.open {
z-index: 10001;
animation: pulse 1.5s infinite alternate;
}
/* Adding back the pulse animation keyframes */
@keyframes pulse {
0% {
filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
}
100% {
filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
}
}
/* Rest of your mobile styles */
.nav-logo {
margin-right: 0;
}
.hero__nav a {
font-size: 1.5rem;
padding: 5px 15px;
color: #000;
font-weight: bold;
display: block;
width: 100%;
transform: skewX(-5deg);
text-align: center;
transition: color 0.2s ease;
}
.hero__nav a:active {
color: #fff !important;
}
.hero__nav li.hovered::before {
transform: scaleY(0);
}
.hero__nav li.hovered::after {
opacity: 0;
}
.hero__nav li a:hover {
color: #000;
}
.nav-logo img:hover {
transform: none;
}
.hero__nav li::before,
.hero__nav li::after {
display: none;
}
/* Hide the regular SVU logo in header */
.nav-logo-svu {
display: none;
}
/* Add SVU logo at the bottom of the mobile menu */
.nav-links.active::after {
content: '';
background-image: url('/assets/SVU_LOGO.svg');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
width: 220px;
height: 150px;
display: block;
margin: 20px auto 0;
opacity: 0;
transform: skewY(12deg); /* Reverse the skew to match menu items */
animation: suvLogoAppear 0.5s ease-out forwards;
animation-delay: 0.6s; /* Appear after the last menu item */
}
@keyframes suvLogoAppear {
0% {
opacity: 0;
transform: skewY(12deg) translateY(20px);
}
100% {
opacity: 1;
transform: skewY(12deg) translateY(0);
}
}
/* Additional styling for the mobile navbar */
.nav-links {
padding-bottom: 10vh; /* Reduce bottom padding to make room for logo */
}
}
@media (max-width: 480px) {
.nav-links {
width: 85%;
padding-left: 1.5rem;
padding-right: 1.5rem;
}
.hero__nav a {
font-size: 1.75rem;
}
.nav-logo img {
width: 70px;
}
}
@keyframes fadeFloat {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-5px);
}
}
/* Black and white overlay effect */
.menu-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.6);
z-index: 999;
opacity: 0;
visibility: hidden;
transition: opacity 0.4s ease, visibility 0.4s ease;
backdrop-filter: grayscale(0%);
pointer-events: none;
}
.menu-overlay.active {
opacity: 1;
visibility: visible;
pointer-events: auto;
animation: fadeToBlackAndWhite 0.5s forwards;
}
@keyframes fadeToBlackAndWhite {
0% {
backdrop-filter: grayscale(0%);
}
100% {
backdrop-filter: grayscale(100%) brightness(0.8) contrast(1.2);
}
}