/* ═══════════════════════════════════════════════════════════
   NISHANT MOULDINGS — MOBILE-FIRST RESPONSIVE SYSTEM
   Breakpoints: 480 · 640 · 768 · 1024 · 1280 · 1440
   ═══════════════════════════════════════════════════════════ */

/* ── BASE RESETS & MOBILE SAFETY ────────────────────────── */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
body{overflow-x:hidden;min-width:320px;-webkit-tap-highlight-color:transparent}
img,video,iframe{max-width:100%;height:auto}
button,a,[role="button"]{min-height:44px;min-width:44px;cursor:pointer}
input,textarea,select{font-size:16px!important} /* prevent iOS zoom */

/* ── TOPBAR — hide on mobile ────────────────────────────── */
@media(max-width:639px){
  .topbar{display:none}
  .topbar{display:none}
}
@media(min-width:640px) and (max-width:767px){
  .topbar{font-size:.68rem;padding:6px 4%}
  .topbar-r{gap:12px}
  .tb-d{display:none}
}

/* ── NAVIGATION — MOBILE HAMBURGER ─────────────────────── */
.nm-mob-btn{display:none;background:none;border:none;cursor:pointer;padding:10px;color:var(--charcoal);align-items:center;justify-content:center;border-radius:4px;transition:background .2s}
.nm-mob-btn:hover{background:var(--red-light)}
.nm-mob-btn svg{width:26px;height:26px;stroke:var(--charcoal);fill:none;stroke-width:2.2}

/* Mobile slide-in drawer */
.nm-mobile-drawer{position:fixed;top:0;right:-100%;width:min(360px,90vw);height:100vh;background:#FDFAF6;z-index:9998;transition:right .35s cubic-bezier(.4,0,.2,1);overflow-y:auto;box-shadow:-8px 0 40px rgba(0,0,0,.18);display:flex;flex-direction:column}
.nm-mobile-drawer.open{right:0}
.nm-drawer-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:9997;opacity:0;pointer-events:none;transition:opacity .35s}
.nm-drawer-overlay.open{opacity:1;pointer-events:auto}
.nm-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--border);background:var(--black);flex-shrink:0}
.nm-drawer-logo{display:flex;align-items:center;gap:10px}
.nm-drawer-logo-mark{width:36px;height:36px;background:var(--red);border-radius:4px;display:flex;align-items:center;justify-content:center}
.nm-drawer-logo-mark span{color:#fff;font-weight:900;font-size:.95rem;font-family:var(--hf)}
.nm-drawer-logo-name{font-size:.9rem;font-weight:700;color:#fff;font-family:var(--hf);line-height:1.1}
.nm-drawer-close{background:none;border:none;cursor:pointer;padding:8px;color:rgba(255,255,255,.7);display:flex;align-items:center;justify-content:center;border-radius:4px;transition:color .2s,background .2s;min-height:40px;min-width:40px}
.nm-drawer-close:hover{color:#fff;background:rgba(255,255,255,.1)}
.nm-drawer-close svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2.2}
.nm-drawer-nav{flex:1;padding:12px 0;overflow-y:auto}
.nm-drawer-link{display:flex;align-items:center;justify-content:space-between;padding:14px 22px;font-size:.95rem;font-weight:600;color:var(--black);font-family:var(--hf);border-left:3px solid transparent;transition:all .2s;text-decoration:none}
.nm-drawer-link:hover,.nm-drawer-link.active{color:var(--red);border-left-color:var(--red);background:var(--red-light)}
.nm-drawer-link svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.5;transition:transform .25s}
.nm-drawer-link.open svg{transform:rotate(180deg)}
.nm-drawer-sub{display:none;background:var(--bg);border-left:3px solid var(--border)}
.nm-drawer-sub.open{display:block}
.nm-drawer-sub a{display:block;padding:11px 22px 11px 30px;font-size:.86rem;color:var(--grey);font-weight:500;text-decoration:none;transition:color .2s,background .2s}
.nm-drawer-sub a:hover{color:var(--red);background:var(--red-light)}
.nm-drawer-footer{padding:20px;border-top:1px solid var(--border);flex-shrink:0}
.nm-drawer-cta{display:block;width:100%;padding:14px;background:linear-gradient(135deg,var(--rust),var(--red));color:#fff;text-align:center;font-family:var(--hf);font-size:.85rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;border:none;border-radius:4px;text-decoration:none;cursor:pointer;transition:opacity .2s}
.nm-drawer-cta:hover{opacity:.9}
.nm-drawer-contact{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.nm-drawer-contact a{font-size:.8rem;color:var(--grey);display:flex;align-items:center;gap:8px;text-decoration:none}
.nm-drawer-contact a svg{width:15px;height:15px;stroke:var(--red);fill:none;stroke-width:1.8;flex-shrink:0}
.nm-drawer-contact a:hover{color:var(--red)}

@media(max-width:1023px){
  .nav-links,.nav-cta,.nav-srch{display:none!important}
  .nm-mob-btn{display:flex!important}
  .nav-inner{height:64px;padding:0 4%}
}
@media(min-width:1024px){
  .nm-mobile-drawer,.nm-drawer-overlay{display:none!important}
  .nm-mob-btn{display:none!important}
}

/* ── HERO SLIDER ────────────────────────────────────────── */
@media(max-width:479px){
  .hero-slider{height:100svh;min-height:520px;max-height:720px}
  .hero-content{padding:0 5%;max-width:100%}
  .hero-h1{font-size:clamp(1.8rem,8vw,2.4rem);margin-bottom:14px}
  .hero-sub{font-size:.9rem;line-height:1.7;margin-bottom:22px;max-width:100%}
  .hero-tag{font-size:.62rem;padding:5px 12px;margin-bottom:14px}
  .hero-btns{gap:10px}
  .hero-btns .btn-r,.hero-btns .btn-o{padding:11px 20px;font-size:.75rem;flex:1;justify-content:center}
  .hero-arrow{width:38px;height:38px}
  .hero-arrow.prev{left:10px}
  .hero-arrow.next{right:10px}
  .scroll-ind{display:none}
}
@media(min-width:480px) and (max-width:767px){
  .hero-slider{height:85svh;min-height:480px}
  .hero-content{padding:0 5%;max-width:100%}
  .hero-h1{font-size:clamp(2rem,7vw,2.8rem)}
  .hero-sub{font-size:.92rem;margin-bottom:24px}
  .hero-btns .btn-r,.hero-btns .btn-o{padding:11px 22px;font-size:.78rem}
}
@media(min-width:768px) and (max-width:1023px){
  .hero-slider{height:75vh;min-height:480px}
  .hero-h1{font-size:clamp(2.2rem,5vw,3rem)}
}

/* ── STAT STRIP ─────────────────────────────────────────── */
@media(max-width:479px){
  .stat-strip{display:grid;grid-template-columns:1fr 1fr}
  .stat-strip-item{padding:18px 12px;border-right:1px solid rgba(255,255,255,.18);border-bottom:1px solid rgba(255,255,255,.18)}
  .stat-strip-item:nth-child(2n){border-right:none}
  .stat-strip-item:nth-last-child(-n+2){border-bottom:none}
  .snum{font-size:1.7rem}
  .slbl{font-size:.65rem}
}
@media(min-width:480px) and (max-width:767px){
  .stat-strip{display:grid;grid-template-columns:repeat(2,1fr)}
  .stat-strip-item{padding:20px 14px;border-right:1px solid rgba(255,255,255,.18);border-bottom:1px solid rgba(255,255,255,.18)}
  .stat-strip-item:nth-child(2n){border-right:none}
  .snum{font-size:1.9rem}
}

/* ── PAGE HERO ──────────────────────────────────────────── */
@media(max-width:479px){
  .page-hero{padding:50px 5% 40px}
  .page-hero::before{display:none}
  .page-hero::after{display:none}
  .page-hero h1{font-size:clamp(1.6rem,7vw,2.2rem);margin-bottom:12px}
  .page-hero p{font-size:.88rem;line-height:1.7}
  .ph-label{font-size:.6rem;padding:5px 12px}
}
@media(min-width:480px) and (max-width:767px){
  .page-hero{padding:60px 5% 48px}
  .page-hero h1{font-size:clamp(1.8rem,6vw,2.4rem)}
  .page-hero::before{display:none}
}
@media(min-width:768px) and (max-width:1023px){
  .page-hero{padding:70px 5% 56px}
}

/* ── SECTIONS ───────────────────────────────────────────── */
@media(max-width:479px){
  .sec{padding:44px 5%}
  .sec-sm{padding:36px 5%}
  .sec-head{margin-bottom:32px}
  h2.title{font-size:clamp(1.5rem,6vw,2rem)}
  .desc{font-size:.88rem}
}
@media(min-width:480px) and (max-width:767px){
  .sec{padding:52px 5%}
  .sec-sm{padding:40px 5%}
  h2.title{font-size:clamp(1.6rem,5vw,2.1rem)}
}
@media(min-width:768px) and (max-width:1023px){
  .sec{padding:64px 5%}
}

/* ── BUTTONS — TOUCH FRIENDLY ───────────────────────────── */
@media(max-width:639px){
  .btn-r,.btn-o,.btn-gold,.btn-sage{padding:13px 24px;font-size:.78rem;min-height:48px}
  .btn-o.dark{padding:13px 24px}
}

/* ── CARD GRIDS ─────────────────────────────────────────── */
@media(max-width:479px){
  .card-grid-4,.card-grid-3,.card-grid-2{grid-template-columns:1fr;gap:16px}
  .card{padding:24px 20px}
}
@media(min-width:480px) and (max-width:767px){
  .card-grid-4{grid-template-columns:1fr 1fr;gap:14px}
  .card-grid-3{grid-template-columns:1fr 1fr;gap:14px}
  .card-grid-2{grid-template-columns:1fr;gap:16px}
}
@media(min-width:768px) and (max-width:1023px){
  .card-grid-4{grid-template-columns:repeat(2,1fr);gap:20px}
  .card-grid-3{grid-template-columns:repeat(2,1fr);gap:20px}
}
@media(min-width:1024px) and (max-width:1199px){
  .card-grid-4{grid-template-columns:repeat(2,1fr)}
}

/* ── PILLAR GRID ────────────────────────────────────────── */
@media(max-width:479px){
  .pillar-grid{grid-template-columns:1fr;border:1px solid #eee}
  .pillar{border-right:none;border-bottom:1px solid #eee;padding:28px 22px}
  .pillar:last-child{border-bottom:none}
}
@media(min-width:480px) and (max-width:767px){
  .pillar-grid{grid-template-columns:1fr 1fr}
  .pillar:nth-child(2n){border-right:none}
  .pillar{border-bottom:1px solid #eee;padding:28px 20px}
  .pillar:nth-last-child(-n+2){border-bottom:none}
}
@media(min-width:768px) and (max-width:1199px){
  .pillar-grid{grid-template-columns:1fr 1fr}
  .pillar:nth-child(2n){border-right:none}
  .pillar{border-bottom:1px solid #eee}
  .pillar:nth-last-child(-n+2){border-bottom:none}
}

/* ── PROCESS/TECH CARDS ─────────────────────────────────── */
@media(max-width:767px){
  .proc-grid{grid-template-columns:1fr!important;gap:16px}
}
@media(min-width:768px) and (max-width:1023px){
  .proc-grid{grid-template-columns:1fr 1fr!important}
}

/* ── MANUFACTURING TECHNOLOGY ROWS (index page) ─────────── */
@media(max-width:767px){
  .nm-tech-row{grid-template-columns:1fr!important;border-radius:6px;overflow:hidden}
  .nm-tech-row>div[style*="380px"]{min-height:200px!important;order:-1}
  .nm-tech-row>div[style*="1fr"]{padding:24px 20px!important}
  .nm-tech-row [style*="grid-template-columns:1fr 1fr 1fr"]{grid-template-columns:1fr 1fr!important;gap:12px}
  .nm-tech-row [style*="font-size:1.4rem"]{font-size:1.1rem!important}
  .nm-tech-row [style*="font-size:1.3rem"]{font-size:1.1rem!important}
}
@media(min-width:768px) and (max-width:1023px){
  .nm-tech-row{grid-template-columns:280px 1fr!important}
  .nm-tech-row>div[style*="padding:36px 40px"]{padding:28px 28px!important}
}

/* ── VIDEO SHOWCASE SECTION ─────────────────────────────── */
@media(max-width:767px){
  #video-showcase [style*="grid-template-columns:1fr 1fr"]{grid-template-columns:1fr!important}
  #video-showcase [style*="padding:70px 6%"]{padding:36px 5%!important}
  #video-showcase [style*="padding:70px 6% 60px"]{padding:36px 5% 32px!important}
  #video-showcase h2[style*="font-size:clamp"]{font-size:1.5rem!important}
  #video-showcase [style*="grid-template-columns:1fr 1fr"]{grid-template-columns:1fr 1fr!important}
  #video-showcase [style*="padding-bottom:42%"]{padding-bottom:60%!important}
  #video-showcase [style*="grid-template-columns:repeat(4"]{grid-template-columns:repeat(2,1fr)!important}
  #vid-btn{width:56px!important;height:56px!important}
}
@media(min-width:768px) and (max-width:1023px){
  #video-showcase [style*="padding:70px 6%"]{padding:48px 5%!important}
  #video-showcase [style*="padding-bottom:42%"]{padding-bottom:50%!important}
}

/* ── TESTIMONIAL ────────────────────────────────────────── */
@media(max-width:479px){
  .testi-section{padding:44px 4%}
  .testi-quote{padding:24px 20px}
  .testi-text{font-size:.9rem}
  .testi-quote::before{font-size:4rem;top:-5px;left:14px}
}
@media(min-width:480px) and (max-width:767px){
  .testi-section{padding:52px 5%}
  .testi-quote{padding:28px 24px}
}

/* ── SHOWCASE BLOCK ─────────────────────────────────────── */
@media(max-width:767px){
  .showcase{grid-template-columns:1fr!important;padding:44px 5%!important;gap:32px!important}
  .showcase-img{display:none} /* hide image on small screens */
  .sc-feats{grid-template-columns:1fr!important}
}
@media(min-width:768px) and (max-width:1023px){
  .showcase{grid-template-columns:1fr!important;padding:52px 5%!important;gap:32px!important}
  .showcase-img img{max-height:280px}
}

/* ── FOOTER ─────────────────────────────────────────────── */
@media(max-width:479px){
  .foot-top{padding:44px 5% 32px}
  .foot-grid{grid-template-columns:1fr;gap:32px}
  .foot-bot{flex-direction:column;align-items:flex-start;gap:12px;padding:16px 5%}
  .cert-chips{flex-wrap:wrap}
}
@media(min-width:480px) and (max-width:767px){
  .foot-top{padding:52px 5% 36px}
  .foot-grid{grid-template-columns:1fr 1fr;gap:28px}
  .foot-grid>*:first-child{grid-column:1/-1}
  .foot-bot{flex-direction:column;padding:16px 5%;gap:10px}
}
@media(min-width:768px) and (max-width:1023px){
  .foot-grid{grid-template-columns:1fr 1fr;gap:32px}
  .foot-grid>*:first-child{grid-column:1/-1}
}

/* ── CONTACT FORM ───────────────────────────────────────── */
@media(max-width:479px){
  .form-wrap{padding:24px 18px}
  .frow{grid-template-columns:1fr}
  .cg{grid-template-columns:1fr!important}
}
@media(min-width:480px) and (max-width:767px){
  .form-wrap{padding:28px 22px}
  .frow{grid-template-columns:1fr}
  .cg{grid-template-columns:1fr!important}
}

/* ── PRODUCTS PAGE ──────────────────────────────────────── */
@media(max-width:639px){
  .prod-filter-bar{flex-direction:column;gap:10px;align-items:stretch}
  .prod-filter-cats{display:flex;overflow-x:auto;gap:8px;padding-bottom:4px;-ms-overflow-style:none;scrollbar-width:none}
  .prod-filter-cats::-webkit-scrollbar{display:none}
  .prod-filter-cats button{white-space:nowrap;flex-shrink:0}
  .prod-grid{grid-template-columns:1fr 1fr!important;gap:12px}
  .prod-modal-body{grid-template-columns:1fr!important;padding:20px!important}
  .prod-modal-img{max-height:220px!important}
}
@media(min-width:640px) and (max-width:767px){
  .prod-grid{grid-template-columns:repeat(2,1fr)!important;gap:14px}
}
@media(min-width:768px) and (max-width:1023px){
  .prod-grid{grid-template-columns:repeat(3,1fr)!important}
}

/* ── CLIENT LOGOS ───────────────────────────────────────── */
@media(max-width:479px){
  .client-logos::before,.client-logos::after{width:30px}
  .client-track{gap:28px}
  .client-logo{width:90px;height:44px}
}

/* ── ABOUT PAGE ─────────────────────────────────────────── */
@media(max-width:767px){
  .about-grid,.cg-about{grid-template-columns:1fr!important}
  .about-img-wrap,.about-img-inner{min-height:240px!important;height:240px!important}
  .about-team-grid{grid-template-columns:1fr 1fr!important;gap:16px!important}
  .team-card-img{height:180px!important}
}
@media(min-width:768px) and (max-width:1023px){
  .about-grid,.cg-about{grid-template-columns:1fr!important}
}

/* ── MAP / LOCATION ─────────────────────────────────────── */
@media(max-width:767px){
  .map-wrap{grid-template-columns:1fr!important}
  .map-sidebar{max-height:240px;overflow-y:auto}
  #nm-map{height:280px!important}
}

/* ── TABLE ──────────────────────────────────────────────── */
@media(max-width:639px){
  .table-wrap{font-size:.75rem}
  thead th,tbody td{padding:10px 12px}
  thead th:first-child,tbody td:first-child{padding-left:14px}
}

/* ── COUNTERS / MID-STAT BAR ────────────────────────────── */
@media(max-width:479px){
  .counter-grid,.mid-stat-grid{grid-template-columns:1fr 1fr!important;gap:0}
  .mid-stat-item,.counter-item{padding:20px 12px!important;border-bottom:1px solid rgba(255,255,255,.1)}
  .mid-stat-n{font-size:1.8rem!important}
}
@media(min-width:480px) and (max-width:767px){
  .counter-grid,.mid-stat-grid{grid-template-columns:repeat(2,1fr)!important}
}

/* ── INNOVATIONS / ESG PAGE ─────────────────────────────── */
@media(max-width:767px){
  .inno-grid,.esg-grid{grid-template-columns:1fr!important;gap:16px}
  .esg-hero-grid{grid-template-columns:1fr!important}
}
@media(min-width:768px) and (max-width:1023px){
  .inno-grid,.esg-grid{grid-template-columns:1fr 1fr!important}
}

/* ── AWARDS PAGE ────────────────────────────────────────── */
@media(max-width:479px){
  .awards-grid{grid-template-columns:1fr!important}
  .cert-grid{grid-template-columns:1fr 1fr!important;gap:12px}
}
@media(min-width:480px) and (max-width:767px){
  .awards-grid{grid-template-columns:1fr 1fr!important;gap:14px}
  .cert-grid{grid-template-columns:1fr 1fr!important}
}

/* ── CAREERS PAGE ───────────────────────────────────────── */
@media(max-width:767px){
  .careers-grid,.jd-grid{grid-template-columns:1fr!important}
  .job-card{padding:22px 18px!important}
}

/* ── CLIENTS PAGE ───────────────────────────────────────── */
@media(max-width:479px){
  .clients-grid{grid-template-columns:repeat(2,1fr)!important;gap:12px}
}
@media(min-width:480px) and (max-width:767px){
  .clients-grid{grid-template-columns:repeat(3,1fr)!important;gap:14px}
}

/* ── MEGA MENU ──────────────────────────────────────────── */
@media(max-width:1023px){
  .nm-mega,.nm-mega-overlay{display:none!important}
}

/* ── INDUSTRY CARDS ─────────────────────────────────────── */
@media(max-width:479px){
  .ind-grid{grid-template-columns:1fr!important}
  .ind-card{padding:22px 18px}
}
@media(min-width:480px) and (max-width:767px){
  .ind-grid{grid-template-columns:1fr 1fr!important;gap:14px}
}
@media(min-width:768px) and (max-width:1023px){
  .ind-grid{grid-template-columns:repeat(2,1fr)!important}
}

/* ── QUICK LINKS ────────────────────────────────────────── */
@media(max-width:479px){
  .ql-grid{grid-template-columns:1fr!important}
}
@media(min-width:480px) and (max-width:767px){
  .ql-grid{grid-template-columns:1fr 1fr!important}
}

/* ── HERO DOTS — smaller touch targets on mobile ─────────── */
@media(max-width:639px){
  .hero-dot{width:12px;height:12px}
  .hero-dots{bottom:18px;gap:6px}
}

/* ── OVERFLOW PREVENTION ────────────────────────────────── */
section,header,footer,nav,.sec,.hero-slider{max-width:100%;overflow-x:hidden}
.nm-tech-row,.showcase,.foot-grid,.card-grid-4,.card-grid-3{min-width:0}

/* ── PRODUCT MODAL MOBILE ───────────────────────────────── */
@media(max-width:639px){
  .prod-modal{padding:8px}
  .prod-modal-box{border-radius:8px;max-height:92vh;overflow-y:auto}
  .prod-modal-close{top:10px;right:10px}
}

/* ── SERVICES PAGE ──────────────────────────────────────── */
@media(max-width:767px){
  .svc-grid,.svc-tabs{grid-template-columns:1fr!important}
  .svc-tab-bar{flex-direction:row;overflow-x:auto;gap:8px}
  .svc-tab-bar button{white-space:nowrap;flex-shrink:0}
}

/* ── SCROLL TO TOP BUTTON ───────────────────────────────── */
#scroll-top{position:fixed;bottom:24px;right:20px;width:44px;height:44px;background:var(--red);color:#fff;border:none;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,.22);z-index:888;opacity:0;transform:translateY(16px);transition:opacity .3s,transform .3s;pointer-events:none}
#scroll-top.visible{opacity:1;transform:translateY(0);pointer-events:auto}
#scroll-top:hover{background:var(--rust)}
#scroll-top svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2.5}

/* ── TOUCH RIPPLE EFFECT ────────────────────────────────── */
.btn-r,.btn-o,.btn-gold,.nm-drawer-cta{position:relative;overflow:hidden}
.btn-r::after,.btn-o::after,.btn-gold::after{content:'';position:absolute;inset:0;background:rgba(255,255,255,.15);opacity:0;transition:opacity .3s}
.btn-r:active::after,.btn-o:active::after,.btn-gold:active::after{opacity:1}

/* ── PRINT MEDIA ────────────────────────────────────────── */
@media print{
  .topbar,.nm-mob-btn,.hero-slider,.nm-mobile-drawer,.nm-drawer-overlay,#scroll-top,nav{display:none!important}
  body{background:#fff;color:#000}
  .sec{padding:20px 0}
}

/* ── HIGH-DPI / RETINA ──────────────────────────────────── */
@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){
  img{image-rendering:auto}
}

/* ── LANDSCAPE MOBILE FIX ───────────────────────────────── */
@media(max-width:767px) and (orientation:landscape){
  .hero-slider{height:100vw;min-height:320px;max-height:520px}
  .page-hero{padding:40px 5% 32px}
}

/* ── FOCUS VISIBLE FOR ACCESSIBILITY ───────────────────── */
:focus-visible{outline:2px solid var(--red);outline-offset:3px;border-radius:3px}
button:focus-visible,a:focus-visible{outline:2px solid var(--red);outline-offset:3px}

/* ── REDUCED MOTION ─────────────────────────────────────── */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
  .client-track{animation:none}
  .hero-slide{transition:opacity .3s}
}
