From 0560b86b87fbd591d415622361f0449226693688 Mon Sep 17 00:00:00 2001 From: Aravind R Date: Mon, 15 Jun 2026 18:20:48 +0530 Subject: [PATCH] fix mobile view issue --- public/css/site.css | 95 ++++++++- src/app/globals.css | 188 ++++++++++++++++-- src/components/layout/Header.tsx | 5 +- src/components/layout/LoadingScreen.tsx | 13 +- src/components/sections/AboutCTA.tsx | 27 ++- src/components/sections/AboutHero.tsx | 2 +- src/components/sections/BlogGrid.tsx | 33 ++- src/components/sections/BlogPostFooter.tsx | 6 + src/components/sections/BlogsHero.tsx | 15 +- src/components/sections/CompetitiveEdge.tsx | 6 +- .../sections/ConnectedLogistics.tsx | 45 ++++- src/components/sections/EVLogisticSection.tsx | 53 ++++- src/components/sections/EVSection.tsx | 113 ++++++++++- src/components/sections/HowItWorksHero.tsx | 27 ++- src/components/sections/IndustrySolutions.tsx | 63 +++++- src/components/sections/IndustryStack.tsx | 2 +- src/components/sections/IntelligenceGrid.tsx | 16 +- src/components/sections/MileTruthHero.tsx | 19 +- src/components/sections/OurTeam.tsx | 29 ++- src/components/sections/SingleBlog.tsx | 6 + src/components/sections/SolutionsHero.tsx | 29 ++- src/components/sections/WhyChooseDoormile.tsx | 8 +- src/components/sections/WomenSection.tsx | 146 +++++++++++++- src/components/strategy/StrategyCanvas.tsx | 56 +++++- src/components/strategy/StrategySection.tsx | 53 ++++- 25 files changed, 956 insertions(+), 99 deletions(-) diff --git a/public/css/site.css b/public/css/site.css index afba797..2fdabe1 100644 --- a/public/css/site.css +++ b/public/css/site.css @@ -5776,12 +5776,12 @@ body:not(.block-editor-page) .content-wrapper .widget p { @media (max-width: 1024px) { .elementor-element.elementor-element-99768ba .elementor-widget-container img.wp-image-4481 { width: 100% !important; - max-width: 450px !important; + max-width: 600px !important; /* Prevent oversized/zoomed appearance on tablets */ height: auto !important; aspect-ratio: auto !important; /* Maintain original proportions */ - object-fit: contain !important; + object-fit: cover !important; /* Ensure no cropping of important content */ margin: 0 auto !important; /* Centering */ @@ -5799,10 +5799,10 @@ body:not(.block-editor-page) .content-wrapper .widget p { /* Specific scaling for small mobile phones */ @media (max-width: 767px) { .elementor-element.elementor-element-99768ba .elementor-widget-container img.wp-image-4481 { - max-width: 90% !important; + max-width: 100% !important; /* Reduce scale on small screens */ margin: 0 auto !important; - border-radius: 18px !important; + border-radius: 25px !important; /* Consistent rounded edges */ } } @@ -18154,3 +18154,90 @@ img:is([sizes=auto i]){contain-intrinsic-size:3000px 1500px} background-repeat: no-repeat !important; background-size: cover !important; } + +/* STYLE BLOCK 51: unified mobile gutters for card/content sections */ +@media (max-width: 767px) { + :root { --dm-mobile-gutter: 10px; } + + .elementor.elementor-61 .elementor-element.elementor-element-89a0ca1, + .elementor.elementor-61 .elementor-element.elementor-element-88745f4, + .elementor.elementor-86 .elementor-element.elementor-element-c2c601a, + .elementor.elementor-104 .elementor-element.elementor-element-c70681e { + --padding-left: var(--dm-mobile-gutter) !important; + --padding-right: var(--dm-mobile-gutter) !important; + padding-left: var(--dm-mobile-gutter) !important; + padding-right: var(--dm-mobile-gutter) !important; + box-sizing: border-box !important; + } + + .elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc { + --padding-left: 10px !important; + --padding-right: 10px !important; + padding-left: 10px !important; + padding-right: 10px !important; + box-sizing: border-box !important; + } + + .elementor.elementor-61 .elementor-element.elementor-element-89a0ca1 > .e-con-inner, + .elementor.elementor-61 .elementor-element.elementor-element-88745f4 > .e-con-inner, + .elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc > .e-con-inner, + .elementor.elementor-86 .elementor-element.elementor-element-c2c601a > .e-con-inner, + .elementor.elementor-104 .elementor-element.elementor-element-c70681e > .e-con-inner { + width: 100% !important; + max-width: 100% !important; + margin-left: auto !important; + margin-right: auto !important; + padding-left: 0 !important; + padding-right: 0 !important; + box-sizing: border-box !important; + } + + .elementor.elementor-61 .elementor-element.elementor-element-89a0ca1 > .e-con-inner > .e-con, + .elementor.elementor-61 .elementor-element.elementor-element-88745f4 > .e-con-inner > .e-con, + .elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc > .e-con-inner > .e-con, + .elementor.elementor-86 .elementor-element.elementor-element-c2c601a > .e-con-inner > .e-con, + .elementor.elementor-104 .elementor-element.elementor-element-c70681e > .e-con-inner > .e-con { + --padding-left: 0px !important; + --padding-right: 0px !important; + width: 100% !important; + max-width: 100% !important; + padding-left: 0 !important; + padding-right: 0 !important; + box-sizing: border-box !important; + } + + .elementor.elementor-61 .elementor-element.elementor-element-6829276 { + --e-con-grid-template-columns: minmax(0, 1fr) !important; + --grid-justify-content: stretch !important; + --justify-items: stretch !important; + grid-template-columns: minmax(0, 1fr) !important; + justify-content: stretch !important; + justify-items: stretch !important; + min-width: 0 !important; + } + + .elementor.elementor-61 .industry-solutions-grid, + .elementor.elementor-61 .industry-card-link { + width: 100% !important; + max-width: 100% !important; + min-width: 0 !important; + } + + .comparison-section .container { + width: calc(100% - (var(--dm-mobile-gutter) * 2)) !important; + max-width: calc(100% - (var(--dm-mobile-gutter) * 2)) !important; + margin-left: auto !important; + margin-right: auto !important; + padding-left: 0 !important; + padding-right: 0 !important; + box-sizing: border-box !important; + } + + .wcd-inner { + width: 100% !important; + max-width: 100% !important; + padding-left: 0 !important; + padding-right: 0 !important; + box-sizing: border-box !important; + } +} diff --git a/src/app/globals.css b/src/app/globals.css index c9ec0ec..068e7e5 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -25,6 +25,7 @@ html { --space-section: clamp(40px, 5vw, 64px); --space-section-lg: clamp(52px, 6vw, 80px); --space-hero-gap: clamp(36px, 4.5vw, 64px); + --dm-mobile-gutter: 10px; } .dm-section { @@ -460,7 +461,7 @@ body { @media (max-width: 720px) { .dm-contact-left { min-height: auto; - padding: 42px 22px 58px; + padding: 42px 20px 58px; } .dm-contact-title { @@ -478,43 +479,43 @@ body { } .dm-contact-card { - margin: 0 16px 32px; - padding: 44px 22px 34px; - border-radius: 24px; + margin: 0 20px 28px; + padding: 28px 20px 24px; + border-radius: 28px; } .dm-contact-card h3 { - margin-bottom: 34px; + margin-bottom: 24px; } .dm-contact-form { - gap: 20px; + gap: 18px; } .dm-contact-form input { - height: 60px; - padding: 0 20px; + height: 56px; + padding: 0 18px; } .dm-contact-form textarea { - min-height: 190px; - padding: 20px; + min-height: 170px; + padding: 18px; } .dm-contact-submit { width: 100%; - height: 64px; + height: 60px; } .dm-contact-submit span:first-child { flex: 1 1 auto; min-width: 0; - padding: 0 22px; + padding: 0 20px; } .dm-contact-submit-icon { - width: 64px; - min-width: 64px; + width: 60px; + min-width: 60px; } } @@ -537,7 +538,131 @@ body { .industry-solutions-grid { grid-template-columns: 1fr; } -}.industry-card-link { + .elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc { + --padding-left: 10px !important; + --padding-right: 10px !important; + padding-left: 10px !important; + padding-right: 10px !important; + box-sizing: border-box !important; + } + .elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc > .e-con-inner { + width: 100% !important; + max-width: 100% !important; + margin-left: auto !important; + margin-right: auto !important; + padding-left: 0 !important; + padding-right: 0 !important; + } +} + +@media (max-width: 767px) { + .elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc > .e-con-inner { + max-width: 100% !important; + width: 100% !important; + margin-left: auto !important; + margin-right: auto !important; + padding-left: 0 !important; + padding-right: 0 !important; + } + + .elementor.elementor-61 .elementor-element.elementor-element-d602f7f, + .elementor.elementor-61 .elementor-element.elementor-element-f64bd88, + .elementor.elementor-61 .elementor-element.elementor-element-5ed2dbb, + .elementor.elementor-61 .elementor-element.elementor-element-6829276 { + --padding-left: 0px !important; + --padding-right: 0px !important; + --margin-left: 0px !important; + --margin-right: 0px !important; + width: 100% !important; + max-width: 100% !important; + margin-left: 0 !important; + margin-right: 0 !important; + padding-left: 0 !important; + padding-right: 0 !important; + box-sizing: border-box; + } + + .elementor.elementor-61 .elementor-element.elementor-element-6829276 { + --e-con-grid-template-columns: minmax(0, 1fr) !important; + --grid-justify-content: stretch !important; + --justify-items: stretch !important; + grid-template-columns: minmax(0, 1fr) !important; + justify-content: stretch !important; + justify-items: stretch !important; + min-width: 0 !important; + } + + .elementor.elementor-61 .industry-solutions-grid, + .elementor.elementor-61 .industry-card-link { + max-width: 100%; + width: 100%; + min-width: 0; + } + + .elementor.elementor-61 .industry-solutions-grid { + margin-left: 0 !important; + margin-right: 0 !important; + } +} + +@media (max-width: 767px) { + .elementor.elementor-61 .elementor-element.elementor-element-89a0ca1, + .elementor.elementor-61 .elementor-element.elementor-element-88745f4, + .elementor.elementor-86 .elementor-element.elementor-element-c2c601a, + .elementor.elementor-104 .elementor-element.elementor-element-c70681e { + --padding-left: var(--dm-mobile-gutter) !important; + --padding-right: var(--dm-mobile-gutter) !important; + padding-left: var(--dm-mobile-gutter) !important; + padding-right: var(--dm-mobile-gutter) !important; + box-sizing: border-box !important; + } + + .elementor.elementor-61 .elementor-element.elementor-element-89a0ca1 > .e-con-inner, + .elementor.elementor-61 .elementor-element.elementor-element-88745f4 > .e-con-inner, + .elementor.elementor-86 .elementor-element.elementor-element-c2c601a > .e-con-inner, + .elementor.elementor-104 .elementor-element.elementor-element-c70681e > .e-con-inner { + width: 100% !important; + max-width: 100% !important; + margin-left: auto !important; + margin-right: auto !important; + padding-left: 0 !important; + padding-right: 0 !important; + box-sizing: border-box !important; + } + + .elementor.elementor-61 .elementor-element.elementor-element-89a0ca1 > .e-con-inner > .e-con, + .elementor.elementor-61 .elementor-element.elementor-element-88745f4 > .e-con-inner > .e-con, + .elementor.elementor-86 .elementor-element.elementor-element-c2c601a > .e-con-inner > .e-con, + .elementor.elementor-104 .elementor-element.elementor-element-c70681e > .e-con-inner > .e-con { + --padding-left: 0px !important; + --padding-right: 0px !important; + width: 100% !important; + max-width: 100% !important; + padding-left: 0 !important; + padding-right: 0 !important; + box-sizing: border-box !important; + } + + .comparison-section .container { + width: calc(100% - (var(--dm-mobile-gutter) * 2)) !important; + max-width: calc(100% - (var(--dm-mobile-gutter) * 2)) !important; + margin-left: auto !important; + margin-right: auto !important; + padding-left: 0 !important; + padding-right: 0 !important; + box-sizing: border-box !important; + } + + .wcd-inner { + width: 100% !important; + max-width: 100% !important; + padding-left: 0 !important; + padding-right: 0 !important; + box-sizing: border-box !important; + } +} + +.industry-card-link { position: relative; height: 600px; border-radius: 30px; @@ -899,12 +1024,14 @@ body { to 600px at <= 840px. Earlier this card shrank at <= 1536px, which is why the About hero looked smaller than Home on MacBook M1/Pro (their ~1440-1512px logical width falls below 1536px). Match the home breakpoint instead. */ -@media (max-width: 840px) { +@media (max-width: 1024px) { .custom-standard-hero-container { - /* No top gap on mobile: the hero card sits flush to the top so the floating + /* No top gap on mobile/tablet: the hero card sits flush to the top so the floating navbar rests directly on the hero instead of leaving a band above it. */ padding: 0 10px 10px 10px !important; } +} +@media (max-width: 840px) { .custom-standard-hero-card { height: 600px !important; min-height: 600px !important; @@ -929,5 +1056,30 @@ body { .miletruth-hero-container { margin-top: 0 !important; } -} + /* Audit & align section rhythm on mobile/tablet across all content pages */ + .elementor-86 #women-entrepreneurship.elementor-element-bbc6760, + .elementor-86 .comparison-section, + .elementor-86 .elementor-element.elementor-element-bbc6760:not(#women-entrepreneurship), + .elementor-86 .elementor-element.elementor-element-c2c601a, + .elementor-59 .elementor-element.elementor-element-bbc6760, + .elementor-104 .elementor-element.elementor-element-c70681e { + margin-top: var(--space-section) !important; + margin-bottom: 0 !important; + } + + /* Solutions page: First section under Solutions Hero gets the hero gap */ + .elementor-59 .elementor-element.elementor-element-3b4a7cc { + margin-top: var(--space-hero-gap) !important; + margin-bottom: 0 !important; + } + + /* About page: First section under About Hero gets the hero gap */ + .elementor-86 .elementor-element.elementor-element-88745f4:first-of-type { + margin-top: var(--space-hero-gap) !important; + } + /* About page: Subsequent sections get standard section spacing */ + .elementor-86 .elementor-element.elementor-element-88745f4 ~ .elementor-element.elementor-element-88745f4 { + margin-top: var(--space-section) !important; + } +} diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index 18862c5..787172e 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -775,6 +775,9 @@ export default function Header() { /* Responsive logo adjustment on mobile/tablet */ @media (max-width: 1024px) { + #masthead .elementor-element.elementor-element-466de1b { + top: 18px !important; + } #masthead .elementor-element.elementor-element-846e53d .hfe-site-logo .hfe-site-logo-container img { width: 150px !important; height: auto !important; @@ -793,7 +796,7 @@ export default function Header() { to the top once scrolled past 50px, matching desktop behaviour. */ #masthead .elementor-element.elementor-element-466de1b.dm-header-scrolled { position: fixed !important; - top: 0 !important; + top: 18px !important; left: 0 !important; right: 0 !important; } diff --git a/src/components/layout/LoadingScreen.tsx b/src/components/layout/LoadingScreen.tsx index 6023a36..3ce3315 100644 --- a/src/components/layout/LoadingScreen.tsx +++ b/src/components/layout/LoadingScreen.tsx @@ -118,11 +118,20 @@ export default function LoadingScreen() { const originalPushState = window.history.pushState; const originalReplaceState = window.history.replaceState; + const scheduleHistoryTransition = (targetPath: string) => { + const currentPath = getRoutePath(new URL(window.location.href)); + if (targetPath === currentPath) return; + + window.setTimeout(() => { + startTransition(targetPath, true); + }, 0); + }; + window.history.pushState = function patchedPushState(...args) { const urlArg = args[2]; if (typeof urlArg === "string" || urlArg instanceof URL) { const url = new URL(urlArg, window.location.href); - if (url.origin === window.location.origin) startTransition(getRoutePath(url)); + if (url.origin === window.location.origin) scheduleHistoryTransition(getRoutePath(url)); } return originalPushState.apply(this, args); }; @@ -131,7 +140,7 @@ export default function LoadingScreen() { const urlArg = args[2]; if (typeof urlArg === "string" || urlArg instanceof URL) { const url = new URL(urlArg, window.location.href); - if (url.origin === window.location.origin) startTransition(getRoutePath(url)); + if (url.origin === window.location.origin) scheduleHistoryTransition(getRoutePath(url)); } return originalReplaceState.apply(this, args); }; diff --git a/src/components/sections/AboutCTA.tsx b/src/components/sections/AboutCTA.tsx index b6502f1..fc3cdf2 100644 --- a/src/components/sections/AboutCTA.tsx +++ b/src/components/sections/AboutCTA.tsx @@ -3,7 +3,31 @@ import Link from "next/link"; export default function AboutCTA() { return ( -
+ <> +