/* Shared responsive layouts and menus. */
img,video,svg { max-width:100%; }
input,select,textarea { min-width:0; max-width:100%; }
[class*="grid"] > * { min-width:0; }
.grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.top-bar,.footer-col,.card p { overflow-wrap:anywhere; }
header { gap:16px; }
header .logo { margin-left:0; flex-shrink:0; }
header .logo img { height:65px; max-width:180px; }
header nav a { white-space:nowrap; }

.site-nav-toggle { display:none; }

/* Desktop Stable Mega Menu with Hover Bridge */
.dropdown-mega { position: relative; }
.dropdown-mega::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 35px;
    background: transparent;
}

.site-services > summary, .dropdown-mega > a { cursor:pointer; font-weight:600; color:#0f172a; white-space:nowrap; }

.site-service-panel, .mega-menu { 
    position:fixed !important; 
    top:85px !important; 
    left:50% !important;
    transform: translateX(-50%) !important;
    width: 90vw !important;
    max-width: 1250px !important;
    max-height:65vh; 
    overflow:auto; 
    background:white; 
    border:1px solid #d1fae5; 
    border-top: 4px solid #059669;
    border-radius:0 0 16px 16px; 
    padding:30px 4% !important; 
    box-shadow:0 15px 35px #0f172a26; 
    display:flex !important; 
    justify-content:space-between;
    gap:2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 9999;
    pointer-events: none;
}

.dropdown-mega:hover .site-service-panel,
.dropdown-mega:hover .mega-menu,
.site-service-panel:hover,
.mega-menu:hover,
.site-service-panel.site-open,
.mega-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.site-service-panel h4, .mega-menu-col h4 { margin-bottom:8px; color:#059669; text-transform: uppercase; font-size: 1.05rem; }
.site-service-panel a, .mega-menu-col a { display:block; font-size:13px; padding:4px 0; white-space:nowrap; color: #334155; text-decoration: none; }
.site-service-panel a:hover, .mega-menu-col a:hover { color: #ea580c; transform: translateX(6px); }
.site-service-group, .mega-menu-col { flex: 1; max-width: 280px; min-width:0; text-align: left; }
.mega-menu-col ul { list-style: none; padding: 0; margin: 0; }

.site-social { position:fixed; right:max(16px,env(safe-area-inset-right)); bottom:max(18px,env(safe-area-inset-bottom)); z-index:1100; display:flex; gap:10px; align-items:end; }
.site-social-button { width:48px; height:48px; display:grid; place-items:center; border-radius:50%; background:#059669; color:white; text-decoration:none; font-size:23px; box-shadow:0 4px 16px #0f172a33; cursor:pointer; border:0; }
.site-social summary { list-style:none; background:#0f172a; }
.site-social summary::-webkit-details-marker { display:none; }
.site-social-links { position:absolute; right:0; bottom:62px; display:flex; flex-direction:column; gap:4px; padding:10px; border-radius:14px; background:white; box-shadow:0 6px 28px #0f172a33; }
.site-social-links a { display:flex; align-items:center; gap:12px; padding:10px 16px; min-height:44px; white-space:nowrap; color:#0f172a; text-decoration:none; border-radius:8px; }
.site-social-links a:hover { background:#d1fae5; }
.scroll-top-btn { bottom:84px !important; right:16px !important; width:44px; height:44px; z-index:1050; }
:where(a,button,summary):focus-visible { outline:3px solid #ea580c; outline-offset:4px; }

/* FOOTER EXTRA SPACE FIXED (Neeche ki extra blank space bilkul khatam) */
footer, .footer-main { padding-bottom: 1.5rem !important; padding-top: 3rem !important; width: 100%; }
.footer-grid { max-width: 1350px; margin-inline: auto; padding: 0 5%; }
.footer-bottom { max-width: 1350px; margin: 0 auto; padding-inline: 5%; padding-top: 1rem !important; padding-bottom: 0.5rem !important; text-align: center; }

@media(max-width:1200px) {
 header { flex-wrap:wrap; padding:12px 5%; }
 .site-nav-toggle, .nav-toggle { display:inline-flex !important; align-items: center; justify-content: center; gap: 8px; margin-left:auto; background:#059669; color:white; border:0; padding:10px 16px; border-radius:8px; cursor:pointer; font-weight: 600; }
 header nav { display:none !important; width:100%; margin:0; max-height:65vh; overflow:auto; }
 .site-js header nav, header nav.site-open, header nav.active { display:block !important; }
 header nav > ul { display:flex; flex-direction:column; align-items:center; gap:12px; width:100%; padding-top: 10px; }
 header nav > ul > li > a { display:block; padding:8px 0; text-align: center; }
 
 /* Mobile Accordion Mega Menu */
 .site-service-panel, .mega-menu { 
     position:static !important; 
     width: 100% !important;
     transform: none !important;
     left: 0 !important;
     flex-direction: column !important;
     max-height:none !important; 
     padding:15px !important; 
     box-shadow:none !important; 
     background: #f8fafc !important;
     display: none !important;
     border-radius: 8px !important;
     margin-top: 10px;
 }
 .site-service-panel.site-open, .mega-menu.active {
     display: flex !important;
 }
 .site-service-group, .mega-menu-col {
     max-width: 100% !important;
     width: 100% !important;
     text-align: center !important;
     margin-bottom: 1.5rem;
 }
 .site-service-group h4, .mega-menu-col h4 { border-bottom: none !important; color: #ea580c !important; }
 .site-service-panel a, .mega-menu-col a { width: 100% !important; text-align: center !important; }

 .grid-4,.features-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media(max-width:768px) {
 .grid-2,.grid-3,.grid-4,.features-grid,.services-grid,.jobs-grid,.form-grid,.footer-grid { grid-template-columns:minmax(0,1fr) !important; gap:24px; }
 .hero { padding:52px 5% !important; }
 .hero h1 { font-size:clamp(1.8rem,7vw,2.6rem) !important; }
 .section-header h2 { font-size:clamp(1.5rem,6vw,2.2rem) !important; }
 .section-wrap { padding:48px 5%; }
 .contact-container { padding:24px 16px !important; }
 .contact-info-box,.contact-form-box { min-width:0; width:100%; flex-basis:100%; padding:24px 16px; }
 .contact-detail { overflow-wrap:anywhere; min-width:0; }
 .contact-detail > * { min-width:0; }
 .hero-content > div { flex-wrap:wrap; }
 .card { padding:24px 18px; }
 .btn { max-width:100%; padding:12px 18px; }
 .top-bar { font-size:12px; }
 header .logo img { height:48px; max-width:155px; }
 .footer-logo img { max-width:100%; height:auto !important; max-height:90px; }
}

@media(prefers-reduced-motion:reduce) {
 *,*::before,*::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; }
}