-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGallery.css
More file actions
94 lines (86 loc) · 3.19 KB
/
Gallery.css
File metadata and controls
94 lines (86 loc) · 3.19 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
@import url('base.css');
body { background: #0e1c14; }
.gallery-wrap { padding: 40px 24px 64px; max-width: 1100px; margin: 0 auto; }
.gallery-header {
text-align: center; margin-bottom: 36px;
}
.gallery-header h2 {
font-family: 'Playfair Display', serif; color: #b8d4bc;
font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 8px;
}
.gallery-header p { color: rgba(184,212,188,0.6); font-size: 0.9rem; }
.gallery-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 16px;
}
.gallery-item {
position: relative; border-radius: 12px; overflow: hidden;
aspect-ratio: 4/3; cursor: pointer;
background: #1a3a2a; border: 1px solid rgba(122,171,130,0.18);
/* reveal via JS */
}
.gallery-item img {
width: 100%; height: 100%; object-fit: cover; display: block;
transition: transform 0.55s cubic-bezier(0.4,0,0.2,1), filter 0.4s;
filter: brightness(0.82) saturate(1.1);
}
.gallery-item:hover img { transform: scale(1.08); filter: brightness(1) saturate(1.3); }
.gallery-item::after {
content: '';
position: absolute; inset: 0;
background: linear-gradient(to top, rgba(26,58,42,0.65) 0%, transparent 55%);
opacity: 0; transition: opacity 0.3s;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item-label {
position: absolute; bottom: 14px; left: 16px; right: 16px;
color: #faf8f2; font-size: 0.82rem; font-weight: 500;
opacity: 0; transform: translateY(6px);
transition: opacity 0.3s, transform 0.3s;
z-index: 2;
}
.gallery-item:hover .gallery-item-label { opacity: 1; transform: translateY(0); }
/* zoom icon overlay */
.gallery-item::before {
content: '⊕';
position: absolute; top: 50%; left: 50%;
transform: translate(-50%, -50%) scale(0);
font-size: 2rem; color: rgba(255,255,255,0.8);
z-index: 3; transition: transform 0.3s;
pointer-events: none;
}
.gallery-item:hover::before { transform: translate(-50%, -50%) scale(1); }
/* Lightbox */
.lightbox {
display: none; position: fixed; inset: 0;
background: rgba(10,20,14,0.96); z-index: 999;
align-items: center; justify-content: center;
backdrop-filter: blur(10px);
}
.lightbox.open { display: flex; animation: lbIn 0.3s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
max-width: 90vw; max-height: 88vh; border-radius: 12px;
box-shadow: 0 24px 80px rgba(0,0,0,0.7);
border: 1px solid rgba(122,171,130,0.25);
animation: imgIn 0.35s cubic-bezier(0.4,0,0.2,1);
}
@keyframes imgIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lightbox-close {
position: absolute; top: 24px; right: 32px;
color: #b8d4bc; font-size: 2rem; cursor: pointer; line-height: 1;
transition: color 0.2s, transform 0.2s;
}
.lightbox-close:hover { color: #c8903a; transform: rotate(90deg); }
/* nav arrows */
.lb-prev, .lb-next {
position: absolute; top: 50%; transform: translateY(-50%);
color: rgba(184,212,188,0.7); font-size: 2.5rem; cursor: pointer;
transition: color 0.2s, transform 0.2s;
user-select: none; padding: 10px;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover { color: #c8903a; transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { color: #c8903a; transform: translateY(-50%) translateX(3px); }