/* AEI mobile app layout patch — additive styles only */
:root{--aei-red:#c51f2c;--aei-ink:#151a22;--aei-muted:#6b7280;--aei-line:#e4e7ec;--aei-bottom-nav-height:68px}
.aei-mobile-bottom-nav,.aei-more-sheet,.aei-more-backdrop,.aei-admin-menu-toggle{display:none}
img,video,iframe{max-width:100%}
.aei-wa-float{display:flex;align-items:center;justify-content:center;position:fixed;right:22px;bottom:22px;z-index:10040;width:56px;height:56px;border-radius:50%;background:#25d366;color:#fff;text-decoration:none;box-shadow:0 7px 22px rgba(37,211,102,.35);font-size:27px}
.aei-wa-float svg{width:28px;height:28px;fill:currentColor}
@media(max-width:768px){
  html{scroll-padding-bottom:calc(var(--aei-bottom-nav-height) + 18px)}
  body:not(.admin-body){padding-bottom:calc(var(--aei-bottom-nav-height) + env(safe-area-inset-bottom,0px) + 18px);overflow-x:hidden}
  body:not(.admin-body) .container,
  body:not(.admin-body) .wrap,
  body:not(.admin-body) .section-inner{width:min(100% - 28px,100%)!important;max-width:100%!important}
  body:not(.admin-body) h1{font-size:clamp(1.8rem,7vw,2.7rem);line-height:1.12}
  body:not(.admin-body) h2{font-size:clamp(1.4rem,5vw,2rem);line-height:1.2}
  body:not(.admin-body) p{overflow-wrap:anywhere}
  body:not(.admin-body) .site-header{position:sticky;top:0;z-index:1000}
  body:not(.admin-body) .site-header .container,
  body:not(.admin-body) header .container{gap:10px}
  body:not(.admin-body) .site-header img,
  body:not(.admin-body) header .logo img{max-height:52px;width:auto;object-fit:contain}
  body:not(.admin-body) .main-nav{max-width:100%;overflow-x:auto}
  body:not(.admin-body) .hero,.hero-section,.page-hero{min-height:unset!important;padding-top:38px!important;padding-bottom:38px!important}
  body:not(.admin-body) .hero-grid,
  body:not(.admin-body) .about-grid,
  body:not(.admin-body) .contact-grid,
  body:not(.admin-body) .two-column,
  body:not(.admin-body) .service-grid,
  body:not(.admin-body) .project-grid,
  body:not(.admin-body) .team-grid,
  body:not(.admin-body) .blog-grid,
  body:not(.admin-body) .insights-grid{grid-template-columns:minmax(0,1fr)!important}
  body:not(.admin-body) .project-card,
  body:not(.admin-body) .service-card,
  body:not(.admin-body) .team-card,
  body:not(.admin-body) .blog-card,
  body:not(.admin-body) .insight-card{min-width:0;max-width:100%}
  body:not(.admin-body) .blog-card,.blog-card{display:flex;flex-direction:column;height:100%}
  body:not(.admin-body) .blog-card .card-body,
  body:not(.admin-body) .blog-card .content,
  body:not(.admin-body) .blog-card .blog-content{display:flex;flex-direction:column;flex:1}
  body:not(.admin-body) .blog-card .read-more,
  body:not(.admin-body) .blog-card a.read-more{margin-top:auto}
  body:not(.admin-body) img{height:auto}
  body:not(.admin-body) input,body:not(.admin-body) select,body:not(.admin-body) textarea,body:not(.admin-body) button{max-width:100%;font-size:16px}
  body:not(.admin-body) .aei-mobile-bottom-nav{
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;z-index:10050;
    min-height:var(--aei-bottom-nav-height);padding:7px 5px calc(7px + env(safe-area-inset-bottom,0px));
    background:rgba(255,255,255,.97);backdrop-filter:blur(16px);border-top:1px solid #e5e7eb;
    box-shadow:0 -5px 24px rgba(15,23,42,.09)
  }
  .aei-mobile-bottom-nav a,.aei-mobile-bottom-nav button{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:transparent;color:#667085;
    text-decoration:none;font:600 10px/1.2 system-ui,sans-serif;min-width:0;padding:2px 0;cursor:pointer
  }
  .aei-mobile-bottom-nav .aei-nav-icon{font-size:20px;line-height:1.1}
  .aei-mobile-bottom-nav .is-active{color:var(--aei-red)}
  .aei-mobile-bottom-nav .is-active .aei-nav-icon{background:#fff0f1;border-radius:12px;padding:5px 12px}
  .aei-more-backdrop{display:block;position:fixed;inset:0;background:rgba(8,15,28,.45);z-index:10060;opacity:0;pointer-events:none;transition:opacity .2s}
  .aei-more-backdrop.is-open{opacity:1;pointer-events:auto}
  .aei-more-sheet{display:flex;flex-direction:column;gap:6px;position:fixed;left:12px;right:12px;bottom:calc(var(--aei-bottom-nav-height) + 12px + env(safe-area-inset-bottom,0px));z-index:10070;
    background:#fff;border:1px solid #e6e8ed;border-radius:20px;padding:18px;box-shadow:0 18px 60px rgba(0,0,0,.22);
    transform:translateY(18px);opacity:0;pointer-events:none;transition:transform .2s,opacity .2s;max-height:65vh;overflow:auto}
  .aei-more-sheet.is-open{opacity:1;pointer-events:auto;transform:translateY(0)}
  .aei-more-sheet .aei-more-title{font-weight:800;color:#151a22;margin:0 0 8px}
  .aei-more-sheet a{display:block;padding:12px 10px;border-radius:10px;color:#202938;text-decoration:none;border-bottom:1px solid #f0f1f4;font-size:14px}
  .aei-more-sheet a:active{background:#fff0f1;color:var(--aei-red)}
  .aei-wa-float{display:flex;align-items:center;justify-content:center;position:fixed;right:15px;bottom:calc(var(--aei-bottom-nav-height) + 17px + env(safe-area-inset-bottom,0px));z-index:10040;width:54px;height:54px;border-radius:50%;background:#25d366;color:#fff;text-decoration:none;box-shadow:0 7px 22px rgba(37,211,102,.35);font-size:27px}
  .aei-wa-float svg{width:28px;height:28px;fill:currentColor}
  /* Mobile admin becomes a compact app-style workspace */
  body.admin-body{overflow-x:hidden;padding-bottom:18px}
  .admin-sidebar{position:fixed!important;left:0;top:0;bottom:0;width:min(82vw,290px)!important;max-width:290px;z-index:10100;overflow-y:auto;transform:translateX(-105%);transition:transform .22s ease;box-shadow:10px 0 35px rgba(0,0,0,.18)}
  body.admin-menu-open .admin-sidebar{transform:translateX(0)}
  .aei-admin-backdrop{display:block;position:fixed;inset:0;z-index:10090;background:rgba(9,15,25,.48);opacity:0;pointer-events:none;transition:opacity .2s}
  body.admin-menu-open .aei-admin-backdrop{opacity:1;pointer-events:auto}
  .admin-main{margin-left:0!important;width:100%!important;min-width:0!important;padding:16px!important}
  .admin-top{display:flex!important;align-items:center;gap:12px;justify-content:flex-start!important;flex-wrap:wrap}
  .admin-top h1{font-size:clamp(1.5rem,6vw,2rem)!important;margin:5px 0}
  .admin-top>span{font-size:12px}
  .aei-admin-menu-toggle{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d7dce4;border-radius:10px;background:#fff;color:#18212d;width:42px;height:42px;font-size:21px;flex:0 0 auto}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .metric{min-width:0;padding:14px!important}
  .metric b{font-size:1.5rem!important}
  .panel{padding:14px!important;overflow:hidden}
  .admin-form .form-row,.form-row{grid-template-columns:minmax(0,1fr)!important}
  .admin-form input,.admin-form select,.admin-form textarea,.panel input,.panel select,.panel textarea{width:100%;min-width:0;box-sizing:border-box}
  .scroll-table{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
  .scroll-table table{min-width:640px}
  .admin-main button,.admin-main .btn{min-height:40px}
}
@media(min-width:769px){
  .aei-admin-backdrop{display:none!important}
}


/* HOTFIX 2026-10-28: restore the homepage hero slider on mobile.
   The earlier mobile rule set min-height:unset on .hero, collapsing absolutely positioned slides. */
@media (max-width: 768px) {
  body:not(.admin-body) .topbar { display: none !important; }
  body:not(.admin-body) .aei-slider,
  body:not(.admin-body) section.hero.aei-slider {
    display: block !important;
    position: relative !important;
    min-height: 610px !important;
    height: auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #111821 !important;
    color: #fff !important;
  }
  body:not(.admin-body) .aei-slider > .aei-slide {
    position: absolute !important;
    inset: 0 !important;
    min-height: 610px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    opacity: 0;
    visibility: hidden;
  }
  body:not(.admin-body) .aei-slider > .aei-slide.is-active {
    opacity: 1 !important;
    visibility: visible !important;
  }
  body:not(.admin-body) .aei-slider .hero-photo {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-position: center center !important;
    background-size: cover !important;
  }
  body:not(.admin-body) .aei-slider .hero-content {
    position: relative !important;
    z-index: 2 !important;
    width: calc(100% - 36px) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 64px 0 120px !important;
    box-sizing: border-box !important;
  }
  body:not(.admin-body) .aei-slider .hero-content h1 {
    display: block !important;
    max-width: 100% !important;
    margin: 14px 0 16px !important;
    color: #fff !important;
    font-size: clamp(2rem, 8.2vw, 3rem) !important;
    line-height: 1.1 !important;
    overflow-wrap: anywhere;
  }
  body:not(.admin-body) .aei-slider .hero-content p {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    color: #e6e9ed !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
  }
  body:not(.admin-body) .aei-slider .hero-content .actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 22px !important;
  }
  body:not(.admin-body) .aei-slider .hero-content .btn {
    min-height: 44px !important;
    padding: 12px 15px !important;
    font-size: 13px !important;
  }
  body:not(.admin-body) .aei-slider .aei-slider-controls {
    position: absolute !important;
    z-index: 5 !important;
    left: 50% !important;
    right: auto !important;
    bottom: 14px !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    max-width: calc(100% - 28px) !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 6px 9px !important;
    border-radius: 40px !important;
    white-space: nowrap !important;
  }
  body:not(.admin-body) .aei-slider .aei-slider-controls button { flex-shrink: 0; }
  body:not(.admin-body) .aei-slider .hero-index { display: none !important; }
  body:not(.admin-body) .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body:not(.admin-body) .stats-grid > div { padding: 18px 14px !important; min-width: 0; }
  body:not(.admin-body) .stats-grid > div:first-child { padding-left: 14px !important; }
  body:not(.admin-body) .stats-grid b { font-size: clamp(1.6rem, 7vw, 2rem) !important; }
  body:not(.admin-body) .section { padding: 54px 0 !important; }
  body:not(.admin-body) .split { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 20px !important; }
  body:not(.admin-body) .split > * { min-width: 0; }
  body:not(.admin-body) .lead { font-size: 1rem !important; line-height: 1.75 !important; }
}
@media (max-width: 380px) {
  body:not(.admin-body) .aei-slider,
  body:not(.admin-body) section.hero.aei-slider,
  body:not(.admin-body) .aei-slider > .aei-slide { min-height: 650px !important; }
  body:not(.admin-body) .aei-slider .hero-content { padding-top: 52px !important; }
  body:not(.admin-body) .aei-slider .hero-content .actions .btn { flex: 1 1 auto; }
}
