/* V21 mobile/iOS Safari responsive hardening */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;width:100%;overflow-x:hidden}
body{width:100%;max-width:100%;overflow-x:hidden;-webkit-font-smoothing:antialiased}
img,svg,video,canvas{max-width:100%;height:auto}
input,select,textarea,button{font-size:16px;max-width:100%}
.container{width:min(1180px,calc(100% - 32px));max-width:100%;padding-left:0;padding-right:0}
.grid>*,.hero-grid>*,.challenge-grid>*,.about-grid>*,.product-detail>*,.course-detail>*,.challenge-detail>*,.shop-layout>*,.account-layout>*{min-width:0}
.site-header{padding-top:env(safe-area-inset-top,0)}
.nav{position:relative;min-width:0}
.brand-logo{min-width:0!important;flex:0 0 auto;padding:4px 0!important}
.brand-logo img,.site-header .brand-logo img{width:auto!important;height:46px!important;max-height:46px!important;max-width:145px!important;object-fit:contain!important}
.footer-logo img{width:auto!important;height:auto!important;max-height:58px!important;max-width:170px!important;object-fit:contain!important}
.footer-grid>*{min-width:0}
.enamad-box img,.aqaye-trust-box img{width:64px!important;height:auto!important;max-height:72px!important}

@media(max-width:900px){
  .container{width:calc(100% - 24px)}
  .nav{min-height:64px;gap:10px;justify-content:space-between}
  .brand-logo img,.site-header .brand-logo img{height:38px!important;max-height:38px!important;max-width:116px!important}
  .menu-btn{display:block!important;order:3;flex:0 0 40px;width:40px;height:40px;line-height:1;padding:0;font-size:24px}
  .nav nav{position:fixed!important;top:calc(64px + env(safe-area-inset-top,0px))!important;right:0!important;left:0!important;bottom:auto!important;width:100%!important;max-height:calc(100dvh - 64px - env(safe-area-inset-top,0px));overflow-y:auto;-webkit-overflow-scrolling:touch;background:#0A1322!important;padding:14px 18px 22px!important;gap:0!important;z-index:1000;box-shadow:0 14px 30px rgba(0,0,0,.24)}
  .nav nav a{display:block!important;width:100%;padding:11px 4px;border-bottom:1px solid rgba(255,255,255,.08);font-size:14px!important}
  .nav-actions{order:2;margin-right:auto;gap:7px;min-width:0;white-space:nowrap}
  .nav-actions .btn{display:none!important}
  .nav-actions .cart-link{font-size:12px;display:inline-flex;align-items:center;gap:4px}
  .badge{font-size:10px;padding:0 6px}
  .hero{padding:48px 0!important}
  .hero h1,.page-hero h1{font-size:clamp(28px,8vw,38px)!important;overflow-wrap:anywhere}
  .hero p{font-size:16px!important}
  .hero-photo{display:block!important;margin-top:22px}
  .hero-photo img{border-radius:14px!important}
  .hero-grid{grid-template-columns:1fr!important;gap:24px!important}
  .grid-4,.grid-3{grid-template-columns:1fr!important}
  .section{padding:44px 0!important}
  .section-head{align-items:flex-start!important;gap:12px;flex-direction:column}
  .section h2{font-size:26px!important}
  .card{padding:18px!important}
  .card-cover{height:auto!important;aspect-ratio:3/2;object-fit:cover}
  .card-cover.ebook{height:auto!important;aspect-ratio:8/11;max-height:420px;object-fit:cover}
  .product-main-cover,.feature-image,.wide-banner{max-width:100%!important;height:auto!important}
  .table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .table{min-width:620px}
  .auth-card{margin:28px auto!important;width:100%}
  .chat-btn{left:12px!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;padding:11px 15px!important}
  .chat-box{right:10px!important;left:10px!important;bottom:calc(68px + env(safe-area-inset-bottom,0px))!important;width:auto!important;max-width:none!important}
  footer{padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))}
  .footer-grid{gap:26px!important}
  .trust-badges{gap:8px!important}
}

@media(max-width:430px){
  .container{width:calc(100% - 20px)}
  .brand-logo img,.site-header .brand-logo img{height:34px!important;max-height:34px!important;max-width:102px!important}
  .nav{min-height:60px;gap:6px}
  .nav nav{top:calc(60px + env(safe-area-inset-top,0px))!important;max-height:calc(100dvh - 60px - env(safe-area-inset-top,0px))}
  .menu-btn{width:36px;height:36px;flex-basis:36px;font-size:22px}
  .nav-actions .cart-link{font-size:11px}
  .page-hero{padding:38px 0!important}
  .hero-actions{width:100%}
  .hero-actions .btn{width:100%}
  .big{font-size:27px!important}
  .footer-logo img{max-height:48px!important;max-width:145px!important}
}
