/* SOLFET v17 — robust mobile Home layout and navigation.
   Home-specific content rules are scoped to .home-page. */

.home-page{--mobile-card-shadow:0 12px 30px rgba(4,45,79,.08)}

@media (max-width:1050px){
  /* Strong, reliable mobile/tablet navigation on every page. */
  .header{position:sticky;top:0;z-index:1000;background:rgba(255,255,255,.99);backdrop-filter:blur(16px)}
  .nav{min-height:72px;gap:10px;z-index:1001}
  .menu-btn{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;min-width:48px;min-height:44px;padding:8px 10px!important;border:1px solid #d8e5eb!important;background:#f7fafc!important;border-radius:12px!important;color:#0b426c!important;z-index:1003;position:relative}
  .menu-btn svg{width:26px;height:26px;display:block;flex:0 0 26px}
  .menu-label{font-size:.72rem;font-weight:900;letter-spacing:.04em;text-transform:uppercase;line-height:1}
  .nav-links{display:none!important}
  .nav.open .nav-links{display:flex!important;position:fixed!important;left:0!important;right:0!important;top:var(--mobile-nav-top,72px)!important;bottom:0!important;width:100%!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain;flex-direction:column!important;align-items:stretch!important;gap:0!important;padding:14px 18px calc(34px + env(safe-area-inset-bottom))!important;background:#fff!important;border-top:1px solid #dce7ec!important;box-shadow:0 24px 60px rgba(4,45,79,.18)!important;z-index:1002!important}
  .nav.open .nav-links>a,.nav.open .nav-drop>button{display:flex!important;align-items:center;justify-content:space-between;width:100%!important;min-height:54px!important;padding:14px 6px!important;border:0!important;border-bottom:1px solid #edf3f6!important;background:#fff!important;color:#123f5d!important;text-align:left!important;font-size:1rem!important;font-weight:800!important}
  .nav.open .nav-links>a.active{color:#005baa!important}
  .nav.open .nav-cta{margin-top:12px!important;justify-content:center!important;background:#063b65!important;color:#fff!important;border-radius:14px!important;border-bottom:0!important;min-height:52px!important}
  .nav.open .mega{position:static!important;display:none!important;width:100%!important;opacity:1!important;visibility:visible!important;transform:none!important;box-shadow:none!important;border:0!important;padding:5px 0 10px!important;grid-template-columns:1fr!important;background:#f8fbfc!important;border-radius:0 0 14px 14px!important}
  .nav.open .nav-drop.open .mega{display:grid!important}
  .nav.open .nav-drop.open:hover .mega{display:grid!important}
  .nav.open .mega a{display:grid!important;grid-template-columns:38px 1fr!important;gap:10px!important;align-items:center!important;padding:11px 8px!important;border-bottom:1px solid #eaf1f4!important;border-radius:0!important;color:#123f5d!important}
  .nav.open .mega a:last-child{border-bottom:0!important}
  .nav.open .mega small{display:block!important;font-size:.72rem!important;line-height:1.4!important;color:#71808a!important}
  body.nav-menu-open{overflow:hidden!important;touch-action:none}
}

@media (max-width:767px){
  .home-page{background:#fff;background-image:none}
  .home-page .container{width:calc(100% - 28px);max-width:none}
  .home-page .topbar{display:none}
  .home-page .nav{min-height:68px}
  .home-page .brand-lockup{gap:7px;min-width:0;overflow:visible;flex:1}
  .home-page .brand img{height:36px;max-width:110px;width:auto;object-fit:contain}
  .home-page .brand-separator{height:29px;margin:0 1px}
  .home-page .dahua-authorised{width:92px;flex:0 1 92px;min-width:74px}
  .home-page .dahua-authorised img{width:100%;max-height:35px;object-fit:contain}
  .home-page .menu-btn{flex:0 0 auto;min-width:64px;padding:7px 9px!important}
  .home-page .menu-label{display:inline!important;font-size:.66rem}
  .home-page .nav.open .nav-links{top:var(--mobile-nav-top,68px)!important;padding-left:14px!important;padding-right:14px!important}

  /* Hero */
  .home-page .hero-grid{grid-template-columns:1fr;min-height:0;padding:36px 0 30px;gap:22px}
  .home-page .hero .eyebrow{font-size:.64rem;letter-spacing:.105em}
  .home-page .hero h1{font-size:clamp(2.08rem,10.4vw,2.75rem);line-height:1.02;letter-spacing:-.042em;margin:11px 0 16px;max-width:100%}
  .home-page .hero p{font-size:.94rem;line-height:1.62;margin:0;max-width:100%}
  .home-page .hero-actions{display:grid;grid-template-columns:1fr;margin:21px 0 18px;gap:9px}
  .home-page .hero-actions .btn{width:100%;min-height:48px;padding:12px 16px}
  .home-page .hero-trust{grid-template-columns:1fr 1fr;gap:8px 10px;font-size:.73rem}
  .home-page .hero-trust .trust-item:nth-child(n+3){display:none}
  .home-page .device-stage{min-height:0;width:100%;max-width:390px;margin:0 auto;padding:10px;border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.1),rgba(255,255,255,.035));border:1px solid rgba(255,255,255,.14);box-shadow:0 20px 48px rgba(0,0,0,.16)}
  .home-page .device-orbit,.home-page .device-card{display:none!important}
  .home-page .device-main{position:relative;inset:auto;width:100%;height:215px;padding:10px;background:#fff;border-radius:17px;filter:none;overflow:hidden;display:flex;align-items:center;justify-content:center}
  .home-page .device-main img{width:86%!important;height:86%!important;object-fit:contain!important;object-position:center!important;filter:drop-shadow(0 15px 20px rgba(3,35,59,.18));margin:auto!important}

  /* Section rhythm */
  .home-page .section{padding:48px 0;overflow:hidden}
  .home-page .section-head{display:block;margin-bottom:22px}
  .home-page .section-title{font-size:clamp(1.78rem,8.2vw,2.35rem);line-height:1.08;letter-spacing:-.035em;margin-top:8px}
  .home-page .section-copy{margin-top:10px;font-size:.9rem;line-height:1.58}
  .home-page .eyebrow{font-size:.64rem;letter-spacing:.105em}

  /* Project proof */
  .home-page .home-proof-single{text-align:left;max-width:none}
  .home-page .home-proof-single .section-copy{margin-inline:0}
  .home-page .proof-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:18px}
  .home-page .proof-metrics>div{padding:12px 8px;border-radius:14px;text-align:center;box-shadow:none;background:#fff}
  .home-page .proof-metrics strong{font-size:1.34rem;line-height:1;color:#005baa}
  .home-page .proof-metrics span{font-size:.61rem;line-height:1.3;margin-top:5px}

  /* Products: one clean, full-width snap card. No cut-off adjacent cards. */
  .home-page .home-category-grid{display:grid!important;grid-auto-flow:column!important;grid-template-columns:none!important;grid-template-rows:1fr!important;grid-auto-columns:100%!important;gap:12px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory;scroll-padding-inline:0;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:2px 0 14px!important;margin:0!important}
  .home-page .home-category-grid::-webkit-scrollbar{display:none}
  .home-page .home-category-grid .product-card{scroll-snap-align:center;scroll-snap-stop:always;width:100%;min-width:100%;border-radius:20px;box-shadow:var(--mobile-card-shadow);min-height:0;overflow:hidden}
  .home-page .home-category-grid .product-card:hover{transform:none}
  .home-page .home-category-grid .product-image{height:210px!important;padding:10px 18px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;background:linear-gradient(145deg,#f7fbfc,#eef7f7)!important}
  .home-page .home-category-grid .product-image:before{width:150px!important;height:150px!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important}
  .home-page .home-category-grid .product-image img{display:block!important;width:auto!important;height:auto!important;max-width:82%!important;max-height:168px!important;object-fit:contain!important;object-position:center!important;margin:auto!important;position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;z-index:2!important;transform:translateY(-48px) scale(1.18)!important;transform-origin:center!important;filter:drop-shadow(0 13px 17px rgba(6,45,73,.16))!important}
  .home-page .home-category-grid .product-body{padding:18px 18px 19px}
  .home-page .home-category-grid .product-kicker{font-size:.61rem}
  .home-page .home-category-grid .product-card h3{font-size:1.16rem;line-height:1.2;margin:7px 0 8px}
  .home-page .home-category-grid .product-card p{font-size:.82rem;line-height:1.5;margin-bottom:13px}
  .home-page .home-category-grid .card-link{font-size:.8rem}

  /* Integrated engineering section */
  .home-page .feature-split{grid-template-columns:1fr;gap:22px}
  .home-page .feature-copy h2{font-size:clamp(1.9rem,8.4vw,2.5rem);line-height:1.06;margin:9px 0 13px}
  .home-page .feature-copy>p{font-size:.9rem;line-height:1.58}
  .home-page .feature-points{gap:10px;margin-top:17px}
  .home-page .feature-point{grid-template-columns:38px 1fr;gap:10px}
  .home-page .feature-icon{width:38px;height:38px;border-radius:11px}
  .home-page .feature-point b{font-size:.86rem}
  .home-page .feature-point span{font-size:.77rem;line-height:1.45}
  .home-page .product-collage{min-height:235px;border-radius:20px;display:flex!important;align-items:center!important;justify-content:center!important;padding:14px!important}
  .home-page .collage-img.b,.home-page .collage-img.c{display:none!important}
  .home-page .collage-img.a{position:relative!important;width:82%!important;height:175px!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;padding:10px!important;margin:auto!important;border-radius:15px!important;display:flex!important;align-items:center!important;justify-content:center!important}
  .home-page .collage-img.a img{display:block!important;width:auto!important;height:auto!important;max-width:90%!important;max-height:150px!important;object-fit:contain!important;object-position:center!important;margin:auto!important}
  .home-page .collage-label{left:50%!important;bottom:10px!important;transform:translateX(-50%)!important;width:max-content;max-width:90%;text-align:center;white-space:normal;font-size:.66rem;padding:8px 10px;border-radius:11px}

  /* Delivery stages: vertical list, no horizontal clipping. */
  .home-page .steps{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto!important;grid-auto-flow:row!important;gap:9px!important;overflow:visible!important;padding:0!important;margin:0!important}
  .home-page .step{min-height:0!important;padding:14px 15px!important;border:1px solid rgba(255,255,255,.13)!important;border-radius:14px!important;background:rgba(255,255,255,.04)!important;display:grid!important;grid-template-columns:34px 1fr!important;column-gap:11px!important;align-items:start!important}
  .home-page .step:after{display:none!important}
  .home-page .step-num{position:static!important;width:31px!important;height:31px!important;margin:0!important;grid-row:1/3}
  .home-page .step h3{font-size:.91rem;margin:1px 0 4px;color:#fff}
  .home-page .step p{font-size:.74rem;line-height:1.45;color:#b9cdd9}

  /* Industry and client content can still swipe, but cards are fully visible. */
  .home-page .industry-grid,.home-page .client-logo-grid,.home-page .local-seo-grid{display:grid!important;grid-auto-flow:column!important;grid-template-columns:none!important;grid-template-rows:1fr!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:2px 0 14px!important;margin:0!important}
  .home-page .industry-grid::-webkit-scrollbar,.home-page .client-logo-grid::-webkit-scrollbar,.home-page .local-seo-grid::-webkit-scrollbar{display:none}
  .home-page .industry-grid{grid-auto-columns:100%!important;gap:11px}
  .home-page .industry-card{scroll-snap-align:center;min-height:190px;padding:21px;border-radius:19px}
  .home-page .industry-card h3{font-size:1.24rem;margin:27px 0 7px}
  .home-page .industry-card p{font-size:.79rem;line-height:1.5}
  .home-page .industry-card a{font-size:.77rem;margin-top:14px}

  .home-page .client-showcase{padding-bottom:42px}
  .home-page .client-logo-grid{grid-auto-columns:48%!important;gap:10px}
  .home-page .client-logo-card{scroll-snap-align:start;min-height:132px;padding:9px;border-radius:16px;box-shadow:var(--mobile-card-shadow)}
  .home-page .client-logo-media{height:74px;padding:4px}
  .home-page .client-logo-media img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}
  .home-page .client-logo-meta{padding-top:8px}
  .home-page .client-logo-meta strong{font-size:.71rem;line-height:1.22}
  .home-page .client-logo-meta span{display:none}

  .home-page .local-seo-grid{grid-auto-columns:100%!important;gap:10px}
  .home-page .local-seo-grid a{scroll-snap-align:center;min-height:138px;padding:16px;border-radius:16px;gap:7px;box-shadow:var(--mobile-card-shadow)}
  .home-page .local-seo-grid a:hover{transform:none}
  .home-page .local-seo-grid svg{width:30px;height:30px}
  .home-page .local-seo-grid strong{font-size:.87rem}
  .home-page .local-seo-grid span{font-size:.73rem;line-height:1.45}

  /* CTA and footer */
  .home-page .cta{grid-template-columns:1fr;padding:27px 20px;border-radius:20px;gap:16px}
  .home-page .cta h2{font-size:clamp(1.75rem,8vw,2.25rem);line-height:1.08;margin:7px 0 9px}
  .home-page .cta p{font-size:.86rem;line-height:1.55}
  .home-page .cta .btn{width:100%;min-height:48px;background:#fff;color:#07375f}
  .home-page .footer-partners{padding:17px 0}
  .home-page .footer-partners-head{flex-direction:row;align-items:center;margin-bottom:9px;gap:10px}
  .home-page .partner-slide{width:132px;height:58px;padding:7px 10px}
  .home-page .partner-slide img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}
  .home-page .footer-main{padding:34px 0;grid-template-columns:1fr 1fr;gap:24px 18px}
  .home-page .footer-brand{grid-column:1/-1}
  .home-page .footer-brand p{font-size:.8rem;line-height:1.5;margin-bottom:0}
  .home-page .footer-main>div:nth-child(2){grid-column:1/-1;columns:2;column-gap:22px}
  .home-page .footer-main>div:nth-child(2) h4{column-span:all}
  .home-page .footer h4{font-size:.87rem;margin-bottom:9px}
  .home-page .footer a{font-size:.76rem;line-height:1.4;margin:7px 0;break-inside:avoid}
  .home-page .footer-bottom{flex-direction:column;gap:5px;padding:14px 0;font-size:.68rem}
  .home-page .whatsapp{right:12px;bottom:calc(12px + env(safe-area-inset-bottom));width:54px;height:54px;min-width:54px}
}

@media (max-width:420px){
  .home-page .container{width:calc(100% - 24px)}
  .home-page .brand img{height:33px;max-width:98px}
  .home-page .brand-separator{height:25px}
  .home-page .dahua-authorised{width:78px;flex-basis:78px;min-width:68px}
  .home-page .dahua-authorised img{max-height:31px}
  .home-page .hero-grid{padding-top:31px}
  .home-page .hero h1{font-size:clamp(1.95rem,10vw,2.42rem)}
  .home-page .device-main{height:195px}
  .home-page .proof-metrics{grid-template-columns:1fr;gap:7px}
  .home-page .proof-metrics>div{display:grid;grid-template-columns:54px 1fr;align-items:center;text-align:left;gap:8px;padding:10px 12px}
  .home-page .proof-metrics strong{font-size:1.26rem}
  .home-page .proof-metrics span{font-size:.65rem;margin:0}
  .home-page .home-category-grid .product-image{height:195px!important}
  .home-page .home-category-grid .product-image img{max-height:158px!important;transform:translateY(-15px) scale(1.1)!important}
  .home-page .client-logo-grid{grid-auto-columns:47%!important}
  .home-page .footer-main{grid-template-columns:1fr 1fr;gap:22px 14px}
}

@media (max-width:350px){
  .home-page .brand img{height:31px;max-width:88px}
  .home-page .dahua-authorised{width:68px;flex-basis:68px}
  .home-page .menu-label{display:none!important}
  .home-page .menu-btn{min-width:42px;padding:7px!important}
  .home-page .hero h1{font-size:1.82rem}
  .home-page .device-main{height:180px}
  .home-page .footer-main{grid-template-columns:1fr}
  .home-page .footer-main>div:nth-child(2),.home-page .footer-main>div:last-child{grid-column:1}
}

@media (prefers-reduced-motion:reduce){
  .home-page .home-category-grid,.home-page .industry-grid,.home-page .client-logo-grid,.home-page .local-seo-grid{scroll-behavior:auto}
}
