feat: add responsive mobile hamburger menu and fix horizontal overflow
This commit is contained in:
+217
-1
@@ -16,6 +16,8 @@
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
* {
|
||||
@@ -32,6 +34,9 @@ body {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.container {
|
||||
@@ -49,6 +54,7 @@ header.site-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 50;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav-wrapper {
|
||||
@@ -66,6 +72,7 @@ header.site-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.logo span {
|
||||
@@ -91,6 +98,51 @@ nav.main-nav a.active {
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
/* Mobile Hamburger Toggle */
|
||||
.mobile-toggle {
|
||||
display: none;
|
||||
background: transparent;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
z-index: 100;
|
||||
transition: background 0.2s, border-color 0.2s;
|
||||
}
|
||||
|
||||
.mobile-toggle:hover, .mobile-toggle:focus-visible {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border-color: var(--accent);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.mobile-toggle .bar {
|
||||
width: 22px;
|
||||
height: 2px;
|
||||
background-color: var(--text-main);
|
||||
border-radius: 2px;
|
||||
transition: transform 0.25s ease, opacity 0.25s ease;
|
||||
}
|
||||
|
||||
.mobile-toggle.open .bar:nth-child(1) {
|
||||
transform: translateY(7px) rotate(45deg);
|
||||
}
|
||||
|
||||
.mobile-toggle.open .bar:nth-child(2) {
|
||||
opacity: 0;
|
||||
transform: scaleX(0);
|
||||
}
|
||||
|
||||
.mobile-toggle.open .bar:nth-child(3) {
|
||||
transform: translateY(-7px) rotate(-45deg);
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -152,6 +204,7 @@ nav.main-nav a.active {
|
||||
line-height: 1.15;
|
||||
margin-bottom: 20px;
|
||||
letter-spacing: -0.02em;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.hero h1 .highlight {
|
||||
@@ -173,6 +226,7 @@ nav.main-nav a.active {
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.95em;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
@@ -208,7 +262,7 @@ section.features, section.steps, section.contact {
|
||||
|
||||
.grid-3 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
@@ -376,3 +430,165 @@ footer.site-footer {
|
||||
.footer-links a:hover {
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
/* ================= RESPONSIVE MOBILE STYLES ================= */
|
||||
@media (max-width: 820px) {
|
||||
.mobile-toggle {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
nav.main-nav {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 72px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: calc(100vh - 72px);
|
||||
background: rgba(11, 15, 25, 0.97);
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
flex-direction: column;
|
||||
padding: 24px 20px 40px;
|
||||
gap: 14px;
|
||||
overflow-y: auto;
|
||||
z-index: 90;
|
||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
nav.main-nav.open {
|
||||
display: flex;
|
||||
animation: fadeInNav 0.22s ease forwards;
|
||||
}
|
||||
|
||||
nav.main-nav a {
|
||||
font-size: 1.1rem;
|
||||
padding: 12px 14px;
|
||||
border-radius: var(--radius-md);
|
||||
display: block;
|
||||
text-align: left;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
nav.main-nav a:hover,
|
||||
nav.main-nav a.active {
|
||||
background: rgba(56, 189, 248, 0.12);
|
||||
border-color: rgba(56, 189, 248, 0.3);
|
||||
}
|
||||
|
||||
nav.main-nav .btn {
|
||||
margin-top: 8px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 12px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.hero {
|
||||
padding: 48px 0 32px;
|
||||
}
|
||||
|
||||
.hero-badge {
|
||||
font-size: 0.78rem;
|
||||
padding: 5px 12px;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 1.95rem;
|
||||
}
|
||||
|
||||
.hero p {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.hero-actions .btn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.features {
|
||||
padding: 40px 0 60px;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.section-header h2 {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.grid-3 {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 22px 18px;
|
||||
}
|
||||
|
||||
.steps {
|
||||
padding: 40px 0 60px;
|
||||
}
|
||||
|
||||
.contact-cta {
|
||||
padding: 50px 0;
|
||||
}
|
||||
|
||||
.cta-box {
|
||||
padding: 30px 18px;
|
||||
}
|
||||
|
||||
.cta-box h2 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.cta-box p {
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.content-section {
|
||||
padding: 36px 0;
|
||||
}
|
||||
|
||||
.content-box {
|
||||
padding: 22px 16px;
|
||||
}
|
||||
|
||||
.content-box h1 {
|
||||
font-size: 1.7rem;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeInNav {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-8px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user