/* Build 40.6.4 — Mobile Homepage / Header / CTA polish */
@media(max-width:640px){
  /* Never break important headings in the middle of words */
  h1,h2,h3,h4{overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important}

  /* Compact, balanced mobile header */
  .site-header .header-row{
    height:64px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
  }
  .site-header .brand{
    min-width:0!important;
    width:auto!important;
    flex:1 1 auto!important;
  }
  .site-header .brand strong{
    display:block!important;
    font-size:20px!important;
    line-height:1!important;
    white-space:nowrap!important;
    letter-spacing:-1px!important;
  }
  .site-header .brand small{display:none!important}
  .site-header .head-actions{
    order:2!important;
    flex:0 0 auto!important;
    gap:0!important;
  }
  .site-header .head-actions span:not(:first-child),
  .site-header .head-actions a{display:none!important}
  .site-header .head-actions span:first-child{
    display:grid!important;
    place-items:center!important;
    width:42px!important;
    height:42px!important;
    font-size:18px!important;
  }
  .site-header .nan-mobile-nav-toggle{
    order:3!important;
    flex:0 0 44px!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
    margin:0!important;
    border-radius:10px!important;
    font-size:19px!important;
  }
  .site-header .nav.nan-mobile-collapsible-nav{
    position:absolute!important;
    left:11px!important;
    right:11px!important;
    top:64px!important;
    z-index:200!important;
    width:auto!important;
    padding:8px!important;
    background:#fff!important;
    border:1px solid #dfe5e1!important;
    border-radius:0 0 14px 14px!important;
    box-shadow:0 18px 34px rgba(11,35,25,.16)!important;
  }
  .site-header .nav.nan-mobile-collapsible-nav a{
    color:#10241d!important;
    min-height:44px!important;
    display:flex!important;
    align-items:center!important;
    padding:10px 12px!important;
  }

  /* Hero becomes a deliberate full-width mobile story */
  .hero{
    min-height:auto!important;
    border-bottom:0!important;
  }
  .hero>.container{
    width:100%!important;
  }
  .hero-inner{
    min-height:510px!important;
    display:block!important;
    position:relative!important;
    overflow:hidden!important;
  }
  .hero-car{
    display:block!important;
    position:absolute!important;
    inset:0!important;
    min-height:510px!important;
    opacity:.46!important;
    background:#050907!important;
  }
  .hero-car::after{
    content:"";
    position:absolute;
    inset:0;
    background:
      linear-gradient(90deg,rgba(3,10,7,.96) 0%,rgba(3,10,7,.74) 50%,rgba(3,10,7,.28) 100%),
      linear-gradient(0deg,rgba(3,10,7,.98) 0%,rgba(3,10,7,.18) 58%);
    pointer-events:none;
  }
  .hero-car img{
    width:100%!important;
    height:510px!important;
    max-width:none!important;
    object-fit:cover!important;
    object-position:62% center!important;
    transform:none!important;
  }
  .hero-copy{
    position:relative!important;
    z-index:3!important;
    max-width:none!important;
    width:100%!important;
    padding:40px 24px 34px!important;
  }
  .hero h1{
    max-width:335px!important;
    margin:0 0 20px!important;
    font-size:36px!important;
    line-height:1.01!important;
    letter-spacing:-1.5px!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  .hero h1 span{
    display:block!important;
    margin-top:5px!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  .hero p{
    max-width:310px!important;
    margin:0!important;
    font-size:14px!important;
    line-height:1.55!important;
    color:#fff!important;
  }
  .hero-trust{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:9px 12px!important;
    max-width:330px!important;
    margin-top:22px!important;
    font-size:10px!important;
    line-height:1.35!important;
  }

  /* Search must be below the hero, never on top of it */
  .search-panel{
    position:relative!important;
    z-index:10!important;
    margin-top:0!important;
    padding:12px 0 0!important;
    background:#fff!important;
  }
  .search-panel .container{
    width:calc(100% - 22px)!important;
  }
  .premium-search{
    border-radius:12px!important;
    box-shadow:0 10px 24px rgba(3,27,18,.13)!important;
  }
  .search-tabs{
    display:flex!important;
    overflow-x:auto!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-width:none!important;
    white-space:nowrap!important;
  }
  .search-tabs::-webkit-scrollbar{display:none!important}
  .search-tabs button{
    flex:0 0 auto!important;
    min-width:118px!important;
    min-height:46px!important;
    padding:11px 12px!important;
    font-size:10px!important;
  }
  .home-search-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    padding:12px!important;
    gap:8px!important;
  }
  .premium-search .search-field{
    min-height:54px!important;
    margin:0!important;
    padding:8px 11px!important;
    border:1px solid #303940!important;
  }
  .premium-search .search-submit{
    padding:0!important;
  }
  .premium-search .btn-primary{
    min-height:50px!important;
  }
  .premium-search .advanced{
    padding:4px 14px 14px!important;
    line-height:1.4!important;
  }
  .premium-search .global-note{
    display:block!important;
    margin:6px 0 0!important;
  }
  .home-live-search{
    padding:12px!important;
  }
  .live-search-control{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }

  /* Fixed listing launcher must remain useful without covering the experience */
  .nan-global-list-launcher{
    right:10px!important;
    bottom:10px!important;
  }
  .nan-global-list-trigger{
    min-height:46px!important;
    padding:10px 14px!important;
    gap:7px!important;
    font-size:11px!important;
    box-shadow:0 8px 20px rgba(3,39,28,.20)!important;
  }
  .nan-global-list-trigger>span{
    font-size:18px!important;
  }
  .nan-global-list-menu{
    width:min(340px,calc(100vw - 20px))!important;
  }
}

@media(max-width:380px){
  .hero h1{font-size:33px!important;max-width:305px!important}
  .hero-copy{padding-left:20px!important;padding-right:20px!important}
  .hero-trust{grid-template-columns:1fr!important;gap:7px!important}
  .nan-global-list-trigger{padding:9px 12px!important;font-size:10px!important}
}
