Mobile Menu Optimization ✓ Fixed duplicate script loading issue Improved menu closing behavior after item selection Added smooth scroll for anchor links Enhanced touch targets for better mobile usability Added proper ARIA attributes for accessibility Implemented fade animation for menu transitions Responsive Design Improvements ✓ Adjusted menu height to use viewport units Added proper padding for notched phones Improved touch target sizes Enhanced menu item spacing and interaction feedback Fixed menu scrolling on long content Performance & Accessibility Enhancements ✓ Added meta description for SEO Implemented proper aria-expanded states Added smooth animations with performance considerations Improved event listener efficiency Added empty favicon to prevent 404 errors Code Quality Improvements ✓ Removed duplicate code Improved event handling Enhanced error handling Better organization of CSS media queries Added proper touch device detection All changes maintain existing functionality while improving user experience, accessibility, and performance. The mobile menu now behaves more naturally, with proper closing behavior and smooth transitions.
243 lines
4.1 KiB
CSS
243 lines
4.1 KiB
CSS
/* Tablet Devices */
|
|
@media (max-width: 768px) {
|
|
.container {
|
|
padding: 0 1.5rem;
|
|
}
|
|
|
|
header {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.logo-text {
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.h1-hero {
|
|
font-size: 2rem !important;
|
|
margin: 1rem !important;
|
|
padding: 1rem !important;
|
|
}
|
|
|
|
.mission-vision {
|
|
grid-template-columns: 1fr;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.service-card {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.welcome-quote {
|
|
font-size: 1rem;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.logo-sub {
|
|
font-size: 0.85rem;
|
|
padding: 1.5rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.mobile-menu-toggle {
|
|
display: block;
|
|
padding: 0.5rem;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
.mobile-menu-toggle:active {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.nav-menu {
|
|
display: none;
|
|
position: fixed;
|
|
top: 55px;
|
|
left: 0;
|
|
right: 0;
|
|
background: var(--bg-card);
|
|
min-height: calc(100vh - 55px);
|
|
flex-direction: column;
|
|
align-items: center;
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding: 2rem 1rem;
|
|
gap: 1.5rem;
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.nav-menu.active {
|
|
display: flex;
|
|
animation: fadeIn 0.3s ease-in-out;
|
|
}
|
|
|
|
.nav-menu a {
|
|
padding: 0.75rem 1.5rem;
|
|
width: 100%;
|
|
text-align: center;
|
|
border-radius: 0.25rem;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
.nav-menu a:hover {
|
|
background-color: var(--hover-color);
|
|
}
|
|
}
|
|
|
|
/* Mobile Devices */
|
|
@media (max-width: 480px) {
|
|
.container {
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
header {
|
|
padding: 0.75rem;
|
|
max-height: 120px;
|
|
}
|
|
|
|
.logo-text {
|
|
font-size: 1.6rem;
|
|
}
|
|
|
|
main {
|
|
margin-top: 1rem;
|
|
padding: 1rem 0;
|
|
}
|
|
|
|
section {
|
|
margin: 2rem 0;
|
|
}
|
|
|
|
h1.h1-hero {
|
|
font-size: 1.75rem !important;
|
|
margin: 0.5rem !important;
|
|
padding: 0.5rem !important;
|
|
}
|
|
|
|
.welcome-quote {
|
|
font-size: 0.95rem;
|
|
padding: 0.5rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.service-card {
|
|
padding: 1.25rem;
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.service-card h3 {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.contact-info {
|
|
padding: 1.5rem;
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.contact-info a {
|
|
padding: 0.5rem 0;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.logo-sub {
|
|
font-size: 0.8rem;
|
|
line-height: 1.4;
|
|
padding: 1.5rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.nav-menu {
|
|
top: 50px;
|
|
min-height: calc(100vh - 50px);
|
|
}
|
|
}
|
|
|
|
/* Small Mobile Devices */
|
|
@media (max-width: 320px) {
|
|
header {
|
|
padding: 0.5rem;
|
|
max-height: 100px;
|
|
}
|
|
|
|
.logo-text {
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
h1.h1-hero {
|
|
font-size: 1.5rem !important;
|
|
}
|
|
|
|
.service-card {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.contact-info {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.welcome-quote {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.logo-sub {
|
|
font-size: 0.75rem;
|
|
padding: 0.75rem;
|
|
}
|
|
}
|
|
|
|
/* Ensure touch targets are large enough on mobile */
|
|
@media (hover: none) {
|
|
.contact-info a,
|
|
.nav-menu a {
|
|
padding: 0.75rem;
|
|
min-height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.service-card {
|
|
transition: none;
|
|
}
|
|
|
|
.service-card:hover {
|
|
transform: none;
|
|
}
|
|
|
|
header:hover {
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
/* Fix for notched phones */
|
|
@supports (padding: max(0px)) {
|
|
header {
|
|
padding-left: max(1rem, env(safe-area-inset-left));
|
|
padding-right: max(1rem, env(safe-area-inset-right));
|
|
}
|
|
|
|
.nav-menu {
|
|
padding-left: max(1rem, env(safe-area-inset-left));
|
|
padding-right: max(1rem, env(safe-area-inset-right));
|
|
padding-bottom: max(1rem, env(safe-area-inset-bottom));
|
|
}
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|