File size: 2,893 Bytes
a7b8df9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
.card-spotlight {
  position: relative;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem;
  overflow: hidden;
  --mouse-x: 50%;
  --mouse-y: 50%;
  --spotlight-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-spotlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card-spotlight:hover::before,
.card-spotlight:focus-within::before {
  opacity: 0.8;
}

.card-spotlight:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Enhanced text visibility within spotlight cards */
.card-spotlight h1,
.card-spotlight h2,
.card-spotlight h3,
.card-spotlight h4,
.card-spotlight h5,
.card-spotlight h6 {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 2;
}

.card-spotlight p,
.card-spotlight span,
.card-spotlight div,
.card-spotlight li {
  color: rgba(255, 255, 255, 0.85) !important;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card-spotlight {
    padding: 1.5rem;
    border-radius: 1rem;
  }
  
  .card-spotlight:hover {
    transform: translateY(-2px);
  }
  
  .card-spotlight::before {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 60%);
  }
}

@media (max-width: 480px) {
  .card-spotlight {
    padding: 1rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card-spotlight {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
  }
  
  .card-spotlight h1,
  .card-spotlight h2,
  .card-spotlight h3,
  .card-spotlight h4,
  .card-spotlight h5,
  .card-spotlight h6 {
    color: white !important;
    text-shadow:
      0 0 0 rgba(0, 0, 0, 1),
      0 2px 4px rgba(0, 0, 0, 1);
  }
  
  .card-spotlight p,
  .card-spotlight span,
  .card-spotlight div,
  .card-spotlight li {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow:
      0 0 0 rgba(0, 0, 0, 1),
      0 1px 2px rgba(0, 0, 0, 1);
  }
}