|
1 | 1 | .what-we-do-container { |
2 | 2 | padding: 20px; |
3 | 3 | text-align: left; |
4 | | - max-width: 1200px; /* Center the container */ |
| 4 | + max-width: 1200px; |
5 | 5 | margin: 0 auto; |
| 6 | + overflow-x: hidden; /* Prevent horizontal overflow */ |
6 | 7 | } |
7 | 8 |
|
8 | 9 | .what-we-do-container h2 { |
9 | 10 | font-size: 2rem; |
10 | 11 | color: #333; |
11 | 12 | margin-bottom: 16px; |
| 13 | + word-wrap: break-word; |
12 | 14 | } |
13 | 15 |
|
14 | 16 | .what-we-do-grid { |
15 | 17 | display: grid; |
16 | | - grid-template-columns: repeat(3, 1fr); /* Fixed 3 columns */ |
17 | | - gap: 16px; |
| 18 | + grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Increased min-width for longer text */ |
| 19 | + gap: 20px; /* Increased gap for better spacing */ |
18 | 20 | margin-top: 16px; |
| 21 | + width: 100%; |
19 | 22 | } |
20 | 23 |
|
21 | 24 | .what-we-do-item { |
22 | 25 | display: flex; |
23 | | - align-items: flex-start; /* Align image and text to the top */ |
24 | | - gap: 12px; /* Space between image and text */ |
25 | | - text-decoration: none; /* Remove underline from anchor */ |
26 | | - color: inherit; /* Inherit text color */ |
27 | | - padding: 8px; /* Padding for clickable area */ |
28 | | - border-radius: 8px; /* Match image border-radius */ |
29 | | - transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth hover transition */ |
30 | | - cursor: pointer; /* Indicate clickability */ |
| 26 | + align-items: flex-start; |
| 27 | + gap: 16px; /* Increased gap between image and text */ |
| 28 | + text-decoration: none; |
| 29 | + color: inherit; |
| 30 | + padding: 16px; /* Increased padding */ |
| 31 | + border-radius: 8px; |
| 32 | + transition: background-color 0.3s ease, box-shadow 0.3s ease; |
| 33 | + cursor: pointer; |
| 34 | + min-width: 0; |
| 35 | + overflow: hidden; |
| 36 | + min-height: fit-content; /* Allow natural height expansion */ |
31 | 37 | } |
32 | 38 |
|
33 | 39 | .what-we-do-item:hover { |
34 | | - background-color: #f5f5f5; /* Subtle background on hover */ |
35 | | - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow on hover */ |
| 40 | + background-color: #f5f5f5; |
| 41 | + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); |
36 | 42 | } |
37 | 43 |
|
38 | 44 | .what-we-do-item img { |
39 | | - width: 100px; /* Fixed width for consistency */ |
40 | | - height: auto; |
| 45 | + width: 80px; |
| 46 | + height: 80px; |
| 47 | + object-fit: cover; |
41 | 48 | border-radius: 8px; |
42 | | - flex-shrink: 0; /* Prevent image from shrinking */ |
43 | | -} |
44 | | - |
45 | | -.what-we-do-item img:hover { |
46 | | - transform: scale(1.05); |
47 | | - transition: transform 0.3s ease; |
| 49 | + flex-shrink: 0; |
48 | 50 | } |
49 | 51 |
|
50 | 52 | .what-we-do-text { |
51 | 53 | display: flex; |
52 | 54 | flex-direction: column; |
53 | | - flex: 1; /* Take remaining space */ |
54 | | - min-width: 0; /* Prevent text overflow */ |
| 55 | + flex: 1; |
| 56 | + min-width: 0; |
55 | 57 | } |
56 | 58 |
|
57 | 59 | .what-we-do-text h3 { |
58 | | - margin: 0 0 8px 0; |
| 60 | + margin: 0 0 12px 0; /* Increased margin */ |
59 | 61 | font-size: 1.1rem; |
60 | 62 | color: #333; |
61 | 63 | line-height: 1.3; |
| 64 | + word-wrap: break-word; |
| 65 | + overflow-wrap: break-word; |
62 | 66 | } |
63 | 67 |
|
64 | 68 | .what-we-do-text p { |
65 | 69 | margin: 0; |
66 | 70 | font-size: 0.85rem; |
67 | 71 | color: #666; |
68 | | - line-height: 1.4; |
69 | | - overflow-wrap: break-word; /* Handle long descriptions */ |
70 | | -} |
71 | | - |
72 | | -/* Responsive design for smaller screens */ |
73 | | -@media (max-width: 768px) { |
74 | | - .what-we-do-grid { |
75 | | - grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */ |
76 | | - } |
| 72 | + line-height: 1.5; /* Improved line height for readability */ |
| 73 | + word-wrap: break-word; |
| 74 | + overflow-wrap: break-word; |
| 75 | + hyphens: auto; |
| 76 | + |
| 77 | + /* REMOVED: Text clamping - now shows full text */ |
| 78 | + /* display: -webkit-box; */ |
| 79 | + /* -webkit-line-clamp: 4; */ |
| 80 | + /* -webkit-box-orient: vertical; */ |
| 81 | + /* overflow: hidden; */ |
77 | 82 | } |
78 | 83 |
|
79 | | -@media (max-width: 480px) { |
| 84 | +/* Improved responsive breakpoints */ |
| 85 | +@media (max-width: 1024px) { |
80 | 86 | .what-we-do-grid { |
81 | | - grid-template-columns: 1fr; /* 1 column on small screens */ |
82 | | - } |
83 | | - .what-we-do-item { |
84 | | - flex-direction: column; /* Stack image and text on small screens */ |
85 | | - align-items: flex-start; |
86 | | - } |
87 | | - .what-we-do-item img { |
88 | | - margin-bottom: 8px; /* Space between image and text when stacked */ |
| 87 | + grid-template-columns: repeat(2, 1fr); |
| 88 | + gap: 18px; |
89 | 89 | } |
90 | 90 | } |
91 | 91 |
|
92 | | -/* Dark mode support */ |
93 | | -.user-collaboration-dark-mode .what-we-do-container h2, |
94 | | -.user-collaboration-dark-mode .what-we-do-text h3 { |
95 | | - color: #fff; |
96 | | -} |
97 | | - |
98 | | -.user-collaboration-dark-mode .what-we-do-text p { |
99 | | - color: #ccc; |
100 | | -} |
101 | | - |
102 | | -.user-collaboration-dark-mode .what-we-do-item:hover { |
103 | | - background-color: #444; /* Darker background on hover in dark mode */ |
104 | | -} |
105 | | - |
106 | | -/* Enhanced mobile styles */ |
107 | 92 | @media (max-width: 768px) { |
108 | 93 | .what-we-do-container { |
109 | | - padding: 16px; /* Reduce padding on tablets */ |
| 94 | + padding: 16px; |
110 | 95 | } |
111 | 96 |
|
112 | 97 | .what-we-do-grid { |
113 | | - grid-template-columns: repeat(2, 1fr); |
114 | | - gap: 12px; /* Slightly smaller gap */ |
| 98 | + grid-template-columns: 1fr; |
| 99 | + gap: 20px; |
115 | 100 | } |
116 | 101 |
|
117 | | - .what-we-do-container h2 { |
118 | | - font-size: 1.75rem; /* Slightly smaller heading */ |
| 102 | + .what-we-do-item { |
| 103 | + padding: 16px; |
119 | 104 | } |
120 | 105 | } |
121 | 106 |
|
122 | 107 | @media (max-width: 480px) { |
123 | 108 | .what-we-do-container { |
124 | | - padding: 12px; /* More compact padding */ |
125 | | - } |
126 | | - |
127 | | - .what-we-do-grid { |
128 | | - grid-template-columns: 1fr; |
129 | | - gap: 16px; /* More space between items when stacked */ |
| 109 | + padding: 12px; |
130 | 110 | } |
131 | 111 |
|
132 | 112 | .what-we-do-container h2 { |
133 | | - font-size: 1.5rem; /* Smaller heading for phones */ |
134 | | - text-align: center; /* Center the main heading */ |
135 | | - margin-bottom: 20px; |
| 113 | + font-size: 1.5rem; |
| 114 | + text-align: center; |
136 | 115 | } |
137 | 116 |
|
138 | 117 | .what-we-do-item { |
139 | 118 | flex-direction: column; |
140 | | - align-items: center; /* Center everything on mobile */ |
| 119 | + align-items: center; |
141 | 120 | text-align: center; |
142 | | - padding: 12px; |
| 121 | + padding: 20px; /* More padding for mobile */ |
143 | 122 | } |
144 | 123 |
|
145 | 124 | .what-we-do-item img { |
146 | | - width: 80px; /* Slightly smaller images on mobile */ |
147 | | - margin-bottom: 12px; |
| 125 | + width: 100px; /* Larger image on mobile since text is below */ |
| 126 | + height: 100px; |
| 127 | + margin-bottom: 16px; |
148 | 128 | } |
149 | 129 |
|
150 | 130 | .what-we-do-text h3 { |
151 | | - font-size: 1rem; /* Adjust heading size */ |
152 | | - margin-bottom: 6px; |
| 131 | + font-size: 1.2rem; /* Larger heading on mobile */ |
| 132 | + margin-bottom: 12px; |
153 | 133 | } |
154 | 134 |
|
155 | 135 | .what-we-do-text p { |
156 | | - font-size: 0.8rem; /* Slightly smaller text */ |
157 | | - line-height: 1.5; /* Better readability */ |
| 136 | + font-size: 0.9rem; /* Slightly larger text for better readability */ |
| 137 | + line-height: 1.6; |
| 138 | + /* Full text displayed - no truncation */ |
158 | 139 | } |
159 | 140 | } |
160 | 141 |
|
161 | | -/* Extra small screens */ |
162 | 142 | @media (max-width: 320px) { |
163 | 143 | .what-we-do-container { |
164 | | - padding: 8px; |
| 144 | + padding: 10px; |
| 145 | + } |
| 146 | + |
| 147 | + .what-we-do-grid { |
| 148 | + gap: 16px; |
| 149 | + } |
| 150 | + |
| 151 | + .what-we-do-item { |
| 152 | + padding: 16px; |
165 | 153 | } |
166 | 154 |
|
167 | 155 | .what-we-do-item img { |
168 | | - width: 70px; /* Even smaller images for very small screens */ |
| 156 | + width: 90px; |
| 157 | + height: 90px; |
169 | 158 | } |
170 | 159 |
|
171 | 160 | .what-we-do-text h3 { |
172 | | - font-size: 0.95rem; |
| 161 | + font-size: 1.1rem; |
173 | 162 | } |
174 | 163 |
|
175 | 164 | .what-we-do-text p { |
176 | | - font-size: 0.75rem; |
| 165 | + font-size: 0.85rem; |
| 166 | + /* Still showing full text */ |
177 | 167 | } |
178 | 168 | } |
179 | 169 |
|
180 | | -/* Optional: Add touch-friendly hover states */ |
| 170 | +/* Dark mode support */ |
| 171 | +.user-collaboration-dark-mode .what-we-do-container h2, |
| 172 | +.user-collaboration-dark-mode .what-we-do-text h3 { |
| 173 | + color: #fff; |
| 174 | +} |
| 175 | + |
| 176 | +.user-collaboration-dark-mode .what-we-do-text p { |
| 177 | + color: #ccc; |
| 178 | +} |
| 179 | + |
| 180 | +.user-collaboration-dark-mode .what-we-do-item:hover { |
| 181 | + background-color: #444; |
| 182 | +} |
| 183 | + |
| 184 | +/* Touch-friendly states */ |
181 | 185 | @media (hover: none) and (pointer: coarse) { |
182 | 186 | .what-we-do-item:hover { |
183 | | - background-color: transparent; /* Remove hover on touch devices */ |
| 187 | + background-color: transparent; |
184 | 188 | box-shadow: none; |
185 | 189 | } |
186 | 190 |
|
187 | 191 | .what-we-do-item:active { |
188 | | - background-color: #f0f0f0; /* Add active state for touch */ |
| 192 | + background-color: #f0f0f0; |
189 | 193 | } |
190 | 194 | } |
191 | | - |
|
0 commit comments