Fix mobile responsiveness with dynamic viewport units and fluid typography
All checks were successful
build-website / build (push) Successful in 1m32s
All checks were successful
build-website / build (push) Successful in 1m32s
- Implement dynamic viewport units (dvh) for proper mobile scaling - Add fluid typography using clamp() functions - Fix iOS-specific viewport issues with -webkit-fill-available - Add scroll-margin-top to prevent section overlaps - Improve touch targets to 50px minimum for mobile UX - Add CSS custom properties for consistent responsive spacing - Fix hero section to properly fill mobile viewport - Update service cards for better mobile layout
This commit is contained in:
@@ -1665,17 +1665,21 @@ html {
|
||||
.hero-voyage {
|
||||
padding: 0;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
padding: 15px;
|
||||
padding: clamp(1rem, 4vw, 2rem);
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
|
||||
/* Responsive logo */
|
||||
@@ -1687,49 +1691,50 @@ html {
|
||||
|
||||
.hero-logo img {
|
||||
height: auto;
|
||||
width: 90%;
|
||||
max-width: 340px;
|
||||
max-height: 200px;
|
||||
width: clamp(280px, 85vw, 380px);
|
||||
max-height: clamp(180px, 50vw, 240px);
|
||||
margin: 0 auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.hero-headline {
|
||||
font-size: 2.25rem;
|
||||
line-height: 1.2;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0 10px;
|
||||
font-size: clamp(2rem, 7vw, 2.5rem);
|
||||
line-height: 1.15;
|
||||
margin-bottom: var(--space-sm);
|
||||
padding: 0 var(--space-xs);
|
||||
}
|
||||
|
||||
.hero-subtext {
|
||||
font-size: 1rem;
|
||||
padding: 0 10px;
|
||||
margin-bottom: 2rem;
|
||||
line-height: 1.5;
|
||||
font-size: clamp(0.95rem, 2.5vw, 1.125rem);
|
||||
padding: 0 var(--space-sm);
|
||||
margin-bottom: var(--space-md);
|
||||
line-height: 1.6;
|
||||
text-align: center;
|
||||
max-width: 90%;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
padding: 0 15px;
|
||||
gap: 12px;
|
||||
padding: 0 var(--space-sm);
|
||||
gap: var(--space-sm);
|
||||
align-items: center;
|
||||
max-width: 380px;
|
||||
}
|
||||
|
||||
/* Smaller buttons on mobile */
|
||||
.btn-primary-warm,
|
||||
.btn-secondary-warm {
|
||||
width: 100%;
|
||||
max-width: 340px;
|
||||
padding: 14px 24px;
|
||||
font-size: 1rem;
|
||||
max-width: 360px;
|
||||
padding: clamp(14px, 3vw, 18px) clamp(24px, 5vw, 32px);
|
||||
font-size: clamp(1rem, 2.5vw, 1.125rem);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
gap: 0.5rem;
|
||||
min-height: 50px;
|
||||
min-height: 52px;
|
||||
}
|
||||
|
||||
.btn-primary-warm .btn-icon,
|
||||
@@ -1741,9 +1746,9 @@ html {
|
||||
}
|
||||
|
||||
.trust-badge {
|
||||
padding: 0.4rem 1rem;
|
||||
font-size: 0.8rem;
|
||||
margin-bottom: 1.5rem;
|
||||
padding: var(--space-xs) var(--space-sm);
|
||||
font-size: clamp(0.8rem, 2vw, 0.9rem);
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.scroll-indicator {
|
||||
@@ -1752,7 +1757,10 @@ html {
|
||||
|
||||
/* Fix all section padding for mobile */
|
||||
section {
|
||||
padding: 40px 15px !important;
|
||||
padding: var(--space-xl) var(--space-sm) !important;
|
||||
scroll-margin-top: 80px;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.welcome-section,
|
||||
@@ -1760,7 +1768,8 @@ html {
|
||||
.experience-stories,
|
||||
.portfolio-gallery,
|
||||
.booking-cta {
|
||||
padding: 40px 15px !important;
|
||||
padding: var(--space-xl) var(--space-sm) !important;
|
||||
margin-top: -1px; /* Prevent gaps between sections */
|
||||
}
|
||||
|
||||
.welcome-content {
|
||||
@@ -1770,15 +1779,47 @@ html {
|
||||
|
||||
.service-card {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
padding: var(--space-sm);
|
||||
}
|
||||
|
||||
.services-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 20px;
|
||||
gap: var(--space-md);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Fix service card content */
|
||||
.service-content {
|
||||
padding: var(--space-sm);
|
||||
}
|
||||
|
||||
.service-features li {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-xs);
|
||||
padding: var(--space-xs) 0;
|
||||
}
|
||||
|
||||
.service-features li::before {
|
||||
flex-shrink: 0;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Section titles for mobile */
|
||||
.section-title {
|
||||
font-size: clamp(1.75rem, 6vw, 2.25rem);
|
||||
line-height: 1.2;
|
||||
margin-bottom: var(--space-sm);
|
||||
padding: 0 var(--space-xs);
|
||||
}
|
||||
|
||||
.section-subtitle {
|
||||
font-size: clamp(0.95rem, 2.5vw, 1.125rem);
|
||||
line-height: 1.5;
|
||||
margin-bottom: var(--space-md);
|
||||
padding: 0 var(--space-xs);
|
||||
}
|
||||
|
||||
.yacht-card {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user