-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnews-card.css
More file actions
117 lines (99 loc) · 1.95 KB
/
news-card.css
File metadata and controls
117 lines (99 loc) · 1.95 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
/* ===================================
News Card Styles - Shared Component
=================================== */
section.news-stories {
margin: 0;
width: 100%;
max-width: 100%;
padding: 0;
background-color: #f9f9f9;
}
.news-stories div.container {
margin: 0 auto;
padding: 2rem 2rem;
max-width: 1200px;
}
.news-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2rem;
margin-top: 2rem;
}
.news-card {
background: white;
border-radius: 10px;
overflow: hidden;
height: 25em;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
transition: transform 0.3s ease;
display: block;
text-decoration: none;
color: inherit;
}
.news-card:hover {
transform: translateY(-10px);
}
.news-header {
height: 150px;
background-size: cover;
background-position: center;
position: relative;
}
.news-logo {
position: absolute;
bottom: -20px;
left: 20px;
background: white;
border-radius: 50%;
padding: 5px;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.news-logo img {
max-width: 100%;
max-height: 100%;
}
.news-content {
padding: 1.5rem;
padding-top: 1.8rem;
}
.news-content h3 {
margin-top: 0;
color: #333;
}
/* Responsive Styles */
@media (max-width: 768px) {
.news-grid {
grid-template-columns: repeat(2, 1fr);
}
.news-header {
height: 130px;
}
.news-stories div.container {
padding: 3rem 1.5rem;
}
}
@media (max-width: 480px) {
.news-grid {
grid-template-columns: 1fr;
gap: 1.5rem;
}
.news-stories div.container {
padding: 2rem 1rem;
}
.news-content {
padding: 1.2rem;
}
.news-header {
height: 120px;
}
}
@media (min-width: 1400px) {
.news-grid {
grid-template-columns: repeat(3, 1fr);
}
}