Skip to content

Commit 5014aae

Browse files
committed
sizing issue solved
1 parent b5dbecc commit 5014aae

File tree

1 file changed

+82
-16
lines changed

1 file changed

+82
-16
lines changed

css/style.css

Lines changed: 82 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ body.menu-open {
3333
overflow: hidden;
3434
}
3535

36+
3637
section,
3738
header,
3839
footer {
39-
max-width: 100vw;
4040
overflow-x: hidden;
4141
}
4242

@@ -208,7 +208,7 @@ img {
208208
background: linear-gradient(135deg, #0f172a, #0dcaf0);
209209
color: #ffffff;
210210
text-align: center;
211-
padding: 20px 24px;
211+
padding: 36px 24px;
212212
position: relative;
213213
overflow: hidden;
214214
}
@@ -289,11 +289,13 @@ img {
289289
.modal-content.secure-modal {
290290
position: relative;
291291
max-width: 480px;
292-
max-height: 80vh; /* Make modal scrollable if too tall */
292+
max-height: 80vh;
293+
/* Make modal scrollable if too tall */
293294
overflow-y: auto;
294-
margin: 5vh auto; /* Center vertically */
295+
margin: 5vh auto;
296+
/* Center vertically */
295297
background: linear-gradient(#ffffff, #ffffff) padding-box,
296-
linear-gradient(135deg, #0dcaf0, #fcd34d) border-box;
298+
linear-gradient(135deg, #0dcaf0, #fcd34d) border-box;
297299
border: 1px solid rgba(13, 202, 240, 0.45);
298300
padding: 32px;
299301
border-radius: 14px;
@@ -302,8 +304,15 @@ img {
302304
}
303305

304306
@keyframes modalFadeUp {
305-
from { opacity: 0; transform: translateY(30px); }
306-
to { opacity: 1; transform: translateY(0); }
307+
from {
308+
opacity: 0;
309+
transform: translateY(30px);
310+
}
311+
312+
to {
313+
opacity: 1;
314+
transform: translateY(0);
315+
}
307316
}
308317

309318
.modal-close {
@@ -435,17 +444,20 @@ img {
435444
margin-top: 12px;
436445
}
437446

438-
447+
439448

440449
/* =========================================================
441450
SECTIONS
442451
========================================================= */
443452

444453
section {
445-
max-width: 1500px;
446-
margin: 72px 40px;
447-
padding: 30px 40px;
454+
width: auto;
455+
margin: 72px 35px;
456+
padding: 40px 5%;
457+
/* % scales perfectly */
448458
border-radius: 12px;
459+
overflow: visible;
460+
box-sizing: border-box;
449461
}
450462

451463
.section-light {
@@ -501,7 +513,7 @@ ul li {
501513

502514
.services-grid {
503515
display: grid;
504-
grid-template-columns: repeat(4, 1fr);
516+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
505517
gap: 28px;
506518
margin-top: 26px;
507519
}
@@ -611,12 +623,28 @@ footer {
611623
backdrop-filter: blur(8px);
612624
z-index: 900;
613625
}
626+
627+
section {
628+
width: auto;
629+
margin: 72px 35%;
630+
padding: 40px 5%;
631+
/* % scales perfectly */
632+
border-radius: 12px;
633+
overflow: visible;
634+
box-sizing: border-box;
635+
}
636+
637+
.services-grid {
638+
display: grid;
639+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
640+
gap: 28px;
641+
margin-top: 26px;
642+
}
614643
}
615644

616645
/* =========================================================
617646
MOBILE
618647
========================================================= */
619-
620648
@media (max-width: 768px) {
621649

622650
.navbar {
@@ -662,8 +690,13 @@ footer {
662690
}
663691

664692
section {
665-
margin: 40px 40px;
666-
padding: 24px 40px;
693+
width: auto;
694+
margin: 72px 35px;
695+
padding: 40px 5%;
696+
/* % scales perfectly */
697+
border-radius: 12px;
698+
overflow: visible;
699+
box-sizing: border-box;
667700
}
668701

669702
.site-header {
@@ -672,8 +705,41 @@ footer {
672705
}
673706
}
674707

708+
@media (max-width: 480px) {
709+
710+
/* NEW: Extra small screens */
711+
section,
712+
.site-header {
713+
margin: 32px auto;
714+
padding: 24px 4%;
715+
}
716+
717+
.hero-heading {
718+
font-size: 24px;
719+
}
720+
721+
h2 {
722+
font-size: 24px;
723+
}
724+
725+
.services-grid {
726+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
727+
/* 2-col before 1 */
728+
gap: 20px;
729+
}
730+
}
731+
732+
@media (max-width: 360px) {
733+
734+
section,
735+
.site-header {
736+
padding: 20px 3%;
737+
}
738+
}
739+
740+
675741
@media (max-width: 640px) {
676742
.services-grid {
677-
grid-template-columns: 1fr;
743+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
678744
}
679745
}

0 commit comments

Comments
 (0)