/* Responsive system — tablet and app-like mobile experience */
@media (max-width:1080px){
  .container{width:min(94%,920px)}
  .nav{gap:22px}.menu{gap:18px}.quote-btn{padding-inline:14px}
  .hero{height:auto;min-height:650px;margin-inline:12px}
  .hero-title{font-size:58px}.hero-content{padding-top:80px}
  .hero-stats{width:min(620px,62%);gap:48px}
  .section{padding:88px 0}.cards{grid-template-columns:repeat(2,1fr);gap:22px}
  .product-card,.product-card:nth-child(even){margin-top:0;height:430px}
  .why-grid{gap:50px}.why-photo{height:500px}.features{gap:14px}
  .project-strip{margin-right:3%;width:97%}
}
@media (max-width:860px){
  html{scroll-padding-top:84px}
  body.menu-open{overflow:hidden}
  body:after{content:"";position:fixed;inset:0;background:rgba(8,25,66,.46);backdrop-filter:blur(5px);z-index:98;opacity:0;visibility:hidden;transition:.3s}
  body.menu-open:after{opacity:1;visibility:visible}
  .topbar{display:none}.header{height:82px;position:sticky;top:0;z-index:100}
  .nav{width:calc(100% - 28px);gap:10px}.brand{margin-left:auto}.brand img{width:52px;height:52px}.brand strong{font-size:18px}
  .quote-btn{display:none}
  .menu-btn{display:flex;position:relative;z-index:102;width:46px;height:46px;border:1px solid #dbeafe;background:#eff6ff;border-radius:15px;align-items:center;justify-content:center;flex-direction:column;gap:5px;cursor:pointer;transition:.3s}
  .menu-btn i{display:block;width:21px;height:2px;border-radius:4px;background:#2563eb;transition:.3s}
  .menu-btn.active{background:#2563eb;border-color:#2563eb}
  .menu-btn.active i{background:#fff}.menu-btn.active i:nth-child(1){transform:translateY(7px) rotate(45deg)}.menu-btn.active i:nth-child(2){opacity:0;transform:scaleX(0)}.menu-btn.active i:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
  .menu{display:flex!important;position:fixed;z-index:101;right:0;top:0;width:min(370px,88vw);height:100dvh;background:linear-gradient(180deg,#fff,#f4f8ff);padding:110px 22px 28px;flex-direction:column;align-items:stretch;gap:9px;box-shadow:-24px 0 70px rgba(15,50,120,.2);transform:translateX(110%);transition:transform .42s cubic-bezier(.22,.8,.25,1);overflow-y:auto}
  .menu:before{content:"منوی بهار صنعت";position:absolute;right:24px;top:32px;font-size:14px;font-weight:900;color:#17345f}
  .menu:after{content:"باربندسازی تخصصی در کرج";margin-top:auto;padding:18px;border-radius:18px;background:linear-gradient(135deg,#2563eb,#38bdf8);color:#fff;font-size:12px;text-align:center}
  .menu.open{transform:translateX(0)}
  .menu a{display:flex;align-items:center;min-height:54px;padding:0 17px;border-radius:16px;background:#fff;border:1px solid #e5edfb;color:#274567;font-size:16px;font-weight:700;transition:.25s}
  .menu a:before{content:"";width:8px;height:8px;border-radius:50%;background:#bfdbfe;margin-left:12px;transition:.25s}
  .menu a:hover,.menu a.active{background:#eaf3ff;color:#1d4ed8;border-color:#bfdbfe;transform:translateX(-4px)}
  .menu a:hover:before,.menu a.active:before{background:#2563eb;box-shadow:0 0 0 5px rgba(37,99,235,.1)}
  .menu a:after{display:none}
  .hero{display:flex;flex-direction:column;height:auto;min-height:0;margin:0 10px;background:#fff;border-radius:0 0 30px 30px;box-shadow:0 18px 50px rgba(37,99,235,.12)}
  .hero-photo{position:relative;display:block;inset:auto;width:100%;height:auto;aspect-ratio:2/1;object-fit:contain;background:#edf6ff;order:1}
  .hero-shade{display:none}
  .hero-content{order:2;position:relative;width:100%;padding:40px 34px 42px;background:linear-gradient(145deg,#164eac,#2563eb);color:#fff}
  .hero-title{font-size:50px;margin:14px 0}.hero-content>p{max-width:650px}.hero-actions{flex-wrap:wrap}
  .hero-stats{order:3;position:relative;inset:auto;width:100%;height:auto;min-height:112px;border-radius:0;background:#fff;box-shadow:none;animation:none;padding:22px;justify-content:space-around;gap:12px}
  .hero-stats>div{align-items:center;text-align:center}
  .trust-ticker{margin-top:14px}
  .intro-grid{grid-template-columns:1fr;gap:22px}.section-title h2{font-size:36px}.lead{max-width:680px}
  .why-grid{grid-template-columns:1fr;gap:48px}.why-copy{grid-row:1}.why-photo{height:auto;padding:10px;transform:none}.why-photo img{height:auto;max-height:560px}.badge{left:20px;bottom:-22px}
  .features{grid-template-columns:repeat(2,1fr)}
  .contact-grid{grid-template-columns:1fr;gap:30px}.contact-details{grid-template-columns:1fr 1fr}
  .footer-inner{flex-wrap:wrap;gap:24px}
}
@media (max-width:560px){
  .container{width:calc(100% - 28px)}.header{height:76px}.nav{width:calc(100% - 24px)}
  .brand img{width:47px;height:47px}.brand strong{font-size:16px}.brand small{font-size:9px}.menu-btn{width:44px;height:44px;border-radius:14px}
  .menu{width:min(340px,91vw);padding:98px 16px 20px}.menu:before{top:29px;right:18px}
  .hero{margin:0 6px;border-radius:0 0 25px 25px}
  .hero-photo{height:auto;aspect-ratio:2/1}
  .hero-content{padding:34px 22px 36px}
  .eyebrow{font-size:11px}.hero-title{font-size:38px;line-height:1.3;letter-spacing:-1.3px}.hero-content>p{font-size:13px;line-height:1.95;margin-bottom:23px}
  .hero-actions{width:100%;display:grid;grid-template-columns:1fr}.btn{width:100%;min-height:55px}.btn.ghost{justify-content:center}
  .hero-stats{min-height:96px;padding:18px 8px}.hero-stats strong{font-size:21px}.hero-stats small{font-size:9px}.hero-stats{gap:5px}
  .ticker-track{font-size:11px}.section{padding:68px 0}.section-title h2{font-size:29px;line-height:1.48}.lead{font-size:13px}
  .cards{grid-template-columns:1fr;gap:18px}.product-card,.product-card:nth-child(even){height:390px;border-radius:22px}
  .why-grid{gap:42px}.why-photo{min-height:0}.why-photo img{max-height:none;width:100%}.badge{width:125px;height:112px;left:10px;bottom:-20px}.badge strong{font-size:30px}
  .features{grid-template-columns:1fr;gap:8px}.features>div{padding:13px 8px}
  .section-head{align-items:flex-end;gap:15px}.section-head h2{font-size:25px}.slider-nav{flex:none}.slider-nav button{width:40px;height:40px}
  .project-strip{width:calc(100% - 14px);margin-right:14px;gap:14px}.project-strip figure{min-width:82vw;height:370px;border-radius:22px}
  .contact-intro h2{font-size:25px;line-height:1.55}.contact-details{grid-template-columns:1fr;padding:20px;border-radius:22px}.contact-socials{grid-column:auto}.contact-socials a{flex:1;text-align:center}.map-btn{grid-column:auto}
  .cta{padding:58px 0}.footer-inner{flex-direction:column;text-align:center}.footer-brand{margin:0}.footer-inner>p{order:3}.ap-footer-bottom{width:calc(100% - 28px);flex-direction:column;gap:9px}
  .whatsapp-float{right:15px;bottom:15px;width:56px;height:56px}
}
@media (max-width:370px){
  .hero-content{padding-inline:17px}.hero-title{font-size:33px}.hero-stats strong{font-size:18px}.hero-stats small{font-size:8px}
  .section-title h2{font-size:26px}.product-card,.product-card:nth-child(even){height:350px}
}
@media (prefers-reduced-motion:reduce){.menu,.menu-btn i,body:after{transition:none!important}}
/* Larger, sharper brand presentation */
.header{height:104px}.brand{gap:15px}.brand img{width:76px;height:76px;object-fit:contain;image-rendering:auto;transform:none!important;animation:none!important}.brand strong{font-size:24px}.brand small{font-size:11px}.nav>.brand:before{width:70px;height:70px;right:3px}.footer-brand img{width:68px;height:68px}.footer-brand strong{font-size:18px}
@media(max-width:860px){.header{height:92px}.brand img{width:66px;height:66px}.brand strong{font-size:19px}.brand small{font-size:10px}.nav>.brand:before{width:61px;height:61px}.menu{padding-top:112px}.menu:before{top:35px}}
@media(max-width:560px){.header{height:86px}.brand{gap:9px}.brand img{width:60px;height:60px}.brand strong{font-size:17px}.brand small{font-size:9px}.nav>.brand:before{width:56px;height:56px}.menu{padding-top:106px}.footer-brand img{width:62px;height:62px}}
@media(max-width:370px){.brand img{width:55px;height:55px}.brand strong{font-size:15px}.brand small{font-size:8px}}

/* Extra-large crisp logo */
.header{height:120px}.brand img{width:94px;height:94px}.brand strong{font-size:26px}.nav>.brand:before{width:86px;height:86px}.footer-brand img{width:80px;height:80px}
@media(max-width:860px){.header{height:104px}.brand img{width:78px;height:78px}.brand strong{font-size:20px}.nav>.brand:before{width:72px;height:72px}.menu{padding-top:124px}.menu:before{top:41px}}
@media(max-width:560px){.header{height:96px}.brand img{width:70px;height:70px}.brand strong{font-size:18px}.nav>.brand:before{width:64px;height:64px}.menu{padding-top:116px}.footer-brand img{width:72px;height:72px}}
@media(max-width:370px){.brand img{width:64px;height:64px}.brand strong{font-size:16px}}

/* Final overflow and small-screen hardening */
html,body{width:100%;max-width:100%;overflow-x:clip}body{min-width:280px}*,*:before,*:after{max-width:100%}img{display:block;max-width:100%;height:auto}.container,.nav,.hero,.trust-ticker,main,footer{min-width:0}.menu{max-width:min(370px,88vw)}
@media(max-width:860px){
  .trust-ticker{width:100%;max-width:100%;margin-inline:0;transform:none}
  .ticker-track{max-width:none}
  .hero{width:calc(100% - 20px);max-width:calc(100% - 20px)}
  .project-strip{box-sizing:border-box;max-width:100%;padding-left:14px}
  .why:after,.intro:before{max-width:none}
  .cards>*,.why-grid>*,.contact-grid>*,.contact-details>*{min-width:0}
}
@media(max-width:560px){
  .hero{width:calc(100% - 12px);max-width:calc(100% - 12px)}
  .project-strip{width:100%;max-width:100%;margin-right:0;padding-inline:14px}
  .project-strip figure{max-width:82vw}
  .contact-row p,.contact-intro p,.lead{overflow-wrap:anywhere}
}

/* Definitive tablet/mobile width and drawer fix */
@media(max-width:860px){
  html,body{margin:0!important;padding:0!important;width:100%!important;max-width:none!important;overflow-x:hidden!important}
  body{position:relative!important}
  .header,main,main>section,.trust-ticker,footer{display:block;width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
  .header{display:block!important}.nav{display:flex!important;width:calc(100% - 28px)!important;max-width:none!important;margin-inline:auto!important}
  .hero{display:flex!important;width:100%!important;max-width:none!important;margin:0!important;border-radius:0 0 30px 30px!important}
  .hero-photo,.hero-content,.hero-stats{width:100%!important;max-width:none!important;margin-inline:0!important}
  .hero-content.container{width:100%!important;max-width:none!important;margin:0!important}
  .trust-ticker{transform:none!important}
  .menu{display:flex!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;transform:translate3d(105%,0,0)!important;max-width:88vw!important}
  body.menu-open .menu,.menu.open{visibility:visible!important;opacity:1!important;pointer-events:auto!important;transform:translate3d(0,0,0)!important}
  .menu-btn{display:flex!important;pointer-events:auto!important;touch-action:manipulation}
}
@media(max-width:560px){
  .nav{width:calc(100% - 20px)!important}
  .hero{border-radius:0 0 24px 24px!important}
  .hero-content{padding-inline:20px!important}
  .hero-stats{padding-inline:8px!important}
}

/* Larger mobile logo */
@media(max-width:560px){
  .header{height:108px!important}
  .brand img{width:82px!important;height:82px!important}
  .brand strong{font-size:19px!important}
  .brand small{font-size:9px!important}
  .nav>.brand:before{width:76px!important;height:76px!important}
  .menu{padding-top:130px!important}
  .menu:before{top:43px!important}
}
@media(max-width:370px){
  .header{height:102px!important}
  .brand img{width:76px!important;height:76px!important}
  .menu{padding-top:124px!important}
}

/* Desktop navigation: keep every item on one line */
@media(min-width:861px){
  .nav{flex-wrap:nowrap!important;gap:22px!important}
  .brand{flex:0 0 auto!important;white-space:nowrap!important}
  .menu{display:flex!important;flex:1 1 auto!important;min-width:0!important;flex-wrap:nowrap!important;justify-content:center!important;gap:18px!important}
  .menu a{display:block!important;white-space:nowrap!important;word-break:keep-all!important;flex:0 0 auto!important;font-size:16px!important;font-weight:700!important}
  .quote-btn{flex:0 0 auto!important;white-space:nowrap!important;padding-inline:16px!important;margin-inline-start:18px!important}
}
@media(min-width:861px) and (max-width:1100px){
  .nav{gap:13px!important}
  .menu{gap:11px!important}
  .menu a{font-size:14px!important}
  .quote-btn{display:none!important}
  .brand{gap:9px!important}.brand strong{font-size:20px!important}.brand small{display:none!important}.brand img{width:78px!important;height:78px!important}
  .header{height:100px!important}
}

/* Consultation link inside the mobile drawer */
.quote-icon,.mobile-quote-link{display:none}
@media(max-width:860px){
  .quote-btn{display:none!important}
  .menu .mobile-quote-link{display:flex!important;margin-top:8px;background:linear-gradient(135deg,#2563eb,#38bdf8)!important;border-color:transparent!important;color:#fff!important;font-weight:800!important;justify-content:center!important}
  .menu .mobile-quote-link:before{display:none!important}
  .menu .mobile-quote-link i{margin-left:10px;font-size:18px}
}

/* Show the complete hero image on tablet and mobile. */
@media(max-width:860px){
  .hero-photo{height:auto!important;aspect-ratio:auto!important;object-fit:contain!important;background:transparent!important}
  .hero-shade{display:none!important}
}

/* Keep one consultation action per viewport. */
.menu .mobile-quote-link{display:none!important}
@media(max-width:860px){
  .menu:after{display:none!important;content:none!important}
  .menu .mobile-quote-link{display:flex!important}
}
/* Keep the hero edge-to-edge and fully covered after all responsive rules */
.hero{position:relative!important;display:block!important;width:100%!important;max-width:none!important;height:680px!important;min-height:0!important;margin:0!important;border-radius:0!important;overflow:hidden!important;background:transparent!important}
.hero-photo{position:absolute!important;inset:0!important;display:block!important;width:100%!important;max-width:none!important;height:100%!important;aspect-ratio:auto!important;object-fit:cover!important;object-position:center center!important;background:transparent!important;order:initial!important}
.hero-photo-bg{display:none!important}
.hero-shade{display:block!important}
.hero-content{position:relative!important;width:min(1180px,calc(100% - 48px))!important;margin:auto!important;padding-top:110px!important;background:transparent!important;order:initial!important}
.hero-stats{position:absolute!important;order:initial!important}
@media(max-width:900px){.hero{height:650px!important}.hero-content{padding-top:90px!important}}
@media(max-width:620px){
  .hero{height:710px!important}
  .hero-photo{object-fit:cover!important;object-position:center center!important}
  .hero-content{width:calc(100% - 32px)!important;padding:80px 0 0!important;background:transparent!important}
  .hero-stats{position:absolute!important;bottom:12px!important;left:12px!important;width:calc(100% - 24px)!important}
}
/* Polished mobile hero content */
@media(max-width:620px){
  .hero{height:730px!important;padding:0 14px!important;display:flex!important;align-items:flex-start!important}
  .hero-photo{inset:0!important}
  .hero-shade{inset:0!important}
  .hero-content.container{width:calc(100% - 28px)!important;max-width:440px!important;margin:58px auto 0!important;padding:25px 22px 27px!important;border:1px solid rgba(255,255,255,.2)!important;border-radius:24px!important;background:linear-gradient(145deg,rgba(8,20,48,.76),rgba(15,56,120,.55))!important;box-shadow:0 20px 55px rgba(3,12,34,.3)!important;backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}
  .hero .eyebrow{font-size:11px;line-height:1.7;margin:0 0 8px;gap:8px}
  .hero .eyebrow:before{width:20px}
  .hero .hero-title{font-size:32px!important;line-height:1.45!important;letter-spacing:-.8px!important;margin:8px 0 12px!important}
  .hero-content>p{font-size:13px!important;line-height:1.9!important;margin:0 0 20px!important;color:rgba(255,255,255,.88)!important}
  .hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important}
  .hero-actions .btn{width:100%!important;min-height:52px!important;padding:0 18px!important;border-radius:14px!important}
  .hero-stats{bottom:14px!important;left:14px!important;width:calc(100% - 28px)!important;border-radius:20px!important}
}
@media(max-width:380px){
  .hero{height:750px!important;padding-inline:10px!important}
  .hero-content.container{width:calc(100% - 20px)!important;margin-top:42px!important;padding:22px 18px 24px!important}
  .hero .hero-title{font-size:28px!important}
  .hero-content>p{font-size:12px!important}
}
/* Keep the mobile hero image clear and visible */
@media(max-width:620px){
  .hero-photo{object-position:center top!important;filter:none!important}
  .hero-shade{background:linear-gradient(180deg,rgba(3,10,24,.08) 0%,rgba(3,10,24,.16) 42%,rgba(3,10,24,.52) 100%)!important}
  .hero-shade:after{display:none!important}
  .hero-content.container{background:linear-gradient(135deg,rgba(5,17,39,.24),rgba(10,40,88,.1))!important;border-color:rgba(255,255,255,.28)!important;box-shadow:0 12px 35px rgba(3,12,34,.14)!important;backdrop-filter:blur(2px)!important;-webkit-backdrop-filter:blur(2px)!important}
  .hero .eyebrow,.hero .hero-title,.hero-content>p{text-shadow:0 2px 10px rgba(0,0,0,.7),0 1px 2px rgba(0,0,0,.8)}
}
/* Mobile hero: show the complete banner without cropping */
@media(max-width:620px){
  .hero{display:flex!important;flex-direction:column!important;align-items:stretch!important;height:auto!important;min-height:0!important;padding:0!important;background:#123b8f!important;overflow:hidden!important}
  .hero-photo{position:relative!important;inset:auto!important;order:1!important;width:100%!important;height:auto!important;aspect-ratio:2/1!important;object-fit:contain!important;object-position:center!important;background:#fff!important;filter:none!important}
  .hero-shade{display:none!important}
  .hero-content.container{position:relative!important;order:2!important;width:100%!important;max-width:none!important;margin:0!important;padding:32px 22px 34px!important;border:0!important;border-radius:0!important;background:linear-gradient(145deg,#164eac,#2563eb)!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  .hero .eyebrow,.hero .hero-title,.hero-content>p{text-shadow:none!important}
  .hero-stats{position:relative!important;inset:auto!important;order:3!important;width:100%!important;min-height:96px!important;margin:0!important;border-radius:0!important;box-shadow:none!important}
}
@media(max-width:380px){
  .hero-content.container{margin:0!important;padding:28px 18px 30px!important}
}
/* Mobile hero overlay with a less-cropped foreground image */
@media(max-width:620px){
  .hero{position:relative!important;display:flex!important;flex-direction:row!important;align-items:flex-start!important;width:100%!important;height:730px!important;min-height:0!important;padding:0 14px!important;background:#101827!important;overflow:hidden!important}
  .hero-photo-bg{position:absolute!important;display:block!important;inset:-12px!important;width:calc(100% + 24px)!important;height:calc(100% + 24px)!important;max-width:none!important;object-fit:cover!important;object-position:center!important;filter:blur(12px) brightness(.72)!important;transform:scale(1.03)!important;z-index:-2!important}
  .hero-photo{position:absolute!important;display:block!important;inset:0!important;order:initial!important;width:100%!important;height:100%!important;aspect-ratio:auto!important;object-fit:contain!important;object-position:center!important;background:transparent!important;filter:none!important;z-index:-1!important}
  .hero-shade{position:absolute!important;display:block!important;inset:0!important;background:linear-gradient(180deg,rgba(3,10,24,.05),rgba(3,10,24,.12) 45%,rgba(3,10,24,.5))!important}
  .hero-content.container{position:relative!important;order:initial!important;width:calc(100% - 28px)!important;max-width:440px!important;margin:58px auto 0!important;padding:25px 22px 27px!important;border:1px solid rgba(255,255,255,.28)!important;border-radius:24px!important;background:linear-gradient(135deg,rgba(5,17,39,.22),rgba(10,40,88,.08))!important;box-shadow:0 12px 35px rgba(3,12,34,.14)!important;backdrop-filter:blur(2px)!important;-webkit-backdrop-filter:blur(2px)!important}
  .hero .eyebrow,.hero .hero-title,.hero-content>p{text-shadow:0 2px 9px rgba(0,0,0,.72)!important}
  .hero-stats{position:absolute!important;order:initial!important;bottom:14px!important;left:14px!important;width:calc(100% - 28px)!important;min-height:96px!important;margin:0!important;border-radius:20px!important;box-shadow:0 14px 35px rgba(3,12,34,.2)!important}
}
@media(max-width:380px){
  .hero{height:750px!important;padding-inline:10px!important}
  .hero-content.container{width:calc(100% - 20px)!important;margin:42px auto 0!important;padding:22px 18px 24px!important}
}
/* Dedicated desktop/mobile hero images */
.hero-photo-mobile{display:none!important}
@media(max-width:620px){
  .hero-photo-desktop{display:none!important}
  .hero-photo-mobile{position:absolute!important;display:block!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;aspect-ratio:auto!important;object-fit:cover!important;object-position:center!important;background:transparent!important;z-index:-1!important}
  .hero-photo-bg{display:none!important}
}