-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
105 lines (92 loc) · 2.46 KB
/
styles.css
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
header {
background-color: #4CAF50;
color: white;
padding: 1em 0;
text-align: center;
}
h1 {
margin: 0; /* Removes default margins */
}
/* Apply flexbox to the entire page */
body {
display: flex;
flex-direction: column;
min-height: 100vh; /* Ensure the body covers the full viewport height */
margin: 0; /* Remove default body margins */
font-family: 'Poppins', sans-serif;
font-size: 1rem;
line-height: 1.5;
background: linear-gradient(to bottom, #f9f9f9, #ffffff);
color: #333;
}
/* Main content grows to fill available space */
main {
flex: 1; /* Allows the main content to take up remaining space */
}
/* Footer styling */
footer {
text-align: center; /* Center the text */
padding: 10px 0;
background-color: #f1f1f1; /* Optional: Light background color */
border-top: 1px solid #ddd; /* Optional: Top border for separation */
}
/* Default styles for larger screens */
.gallery {
display: grid;
grid-template-columns: repeat(3, 1fr); /* 3 cards per row by default */
gap: 20px; /* Space between cards */
padding: 20px;
justify-items: center; /* Centers the cards within their columns */
}
.card {
background: white;
border: 1px solid #ddd;
border-radius: 5px;
text-align: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
width: 90%; /* Limits the card width */
max-width: 300px; /* Ensures cards aren't too wide */
}
.card img {
max-width: 100%;
border-bottom: 1px solid #ddd;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.card h2 {
margin: 10px 0;
font-size: 1.1em; /* Adjusted font size for smaller cards */
}
/* Medium screens (tablets): 2 cards per row */
@media (max-width: 768px) {
.gallery {
grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
}
}
/* Small screens (mobile): 1 card per row */
@media (max-width: 480px) {
.gallery {
grid-template-columns: 1fr; /* 1 card per row */
}
}
.card:hover {
transform: scale(1.03);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
a:hover {
color: #007BFF; /* Add a distinct hover color */
text-decoration: underline;
}
.card {
opacity: 0;
transform: translateY(20px);
animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
to {
opacity: 1;
transform: translateY(0);
}
}