
/* REPUBLIC STUDIO MOBILE SAFE OVERRIDE
   This file is loaded after the main stylesheet. It prevents horizontal overflow
   and turns mobile navigation into always-visible buttons, so it works without JS. */

html,
body{
  width:100%;
  max-width:100%;
  margin:0;
  overflow-x:hidden!important;
}

body{
  position:relative;
}

img,
video,
iframe,
svg{
  max-width:100%;
}

*{
  box-sizing:border-box;
}

.mobile-toggle span{
  display:block;
  width:22px;
  height:2px;
  background:#fff;
  border-radius:2px;
  margin:4px 0;
}

@media (max-width: 920px){

  html,
  body{
    overflow-x:hidden!important;
    width:100%!important;
    max-width:100%!important;
  }

  .container{
    width:calc(100% - 24px)!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  .topbar,
  .site-header,
  main,
  section,
  footer{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }

  .topbar .container{
    min-height:auto!important;
    padding:9px 0 10px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:9px!important;
  }

  .topbar-left{
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:6px!important;
    font-size:.84rem!important;
    line-height:1.35!important;
  }

  .topbar-left a,
  .topbar-left span{
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    align-items:flex-start!important;
    gap:8px!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }

  .topbar-social{
    width:100%!important;
    display:flex!important;
    flex-wrap:wrap!important;
    gap:9px!important;
  }

  .social-dot{
    width:34px!important;
    height:34px!important;
    flex:0 0 34px!important;
  }

  .site-header{
    position:relative!important;
    top:auto!important;
    z-index:10!important;
    background:#050505!important;
    overflow:visible!important;
  }

  .navbar{
    width:100%!important;
    min-height:auto!important;
    padding:12px 0 14px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:12px!important;
  }

  .logo{
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
  }

  .logo img{
    width:72px!important;
    max-width:72px!important;
    height:auto!important;
  }

  .header-cta,
  .mobile-toggle{
    display:none!important;
  }

  #siteMenu.nav-links,
  .nav-links{
    position:static!important;
    inset:auto!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;

    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;

    display:grid!important;
    grid-template-columns:repeat(2, minmax(0, 1fr))!important;
    gap:8px!important;

    padding:0!important;
    margin:0!important;

    background:transparent!important;
    border:0!important;
    box-shadow:none!important;

    transform:none!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    overflow:visible!important;
  }

  #siteMenu.nav-links a,
  .nav-links a{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:42px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    padding:10px 8px!important;
    margin:0!important;

    background:#0d0d0d!important;
    border:1px solid rgba(244,162,30,.28)!important;
    border-radius:12px!important;

    color:#f7efe5!important;
    font-size:.94rem!important;
    line-height:1.15!important;
    font-weight:900!important;
    text-align:center!important;

    opacity:1!important;
    pointer-events:auto!important;
    transform:none!important;
    white-space:normal!important;
  }

  #siteMenu.nav-links a::after,
  .nav-links a::after{
    display:none!important;
  }

  #siteMenu.nav-links a.active,
  .nav-links a.active{
    color:#111!important;
    background:linear-gradient(135deg, var(--gold), var(--gold2))!important;
    border-color:transparent!important;
  }

  body.menu-open::before{
    display:none!important;
    content:none!important;
  }

  .hero{
    width:100%!important;
    max-width:100%!important;
    min-height:auto!important;
    display:block!important;
    padding:46px 0 38px!important;
    overflow:hidden!important;
    background:
      linear-gradient(90deg,rgba(0,0,0,.95) 0%,rgba(0,0,0,.78) 62%,rgba(0,0,0,.56) 100%),
      url('../img/hero.jpg') center center/cover no-repeat!important;
  }

  .hero::after{
    height:56px!important;
  }

  .hero-content{
    width:100%!important;
    max-width:100%!important;
    padding:0!important;
    margin:0!important;
  }

  .eyebrow{
    font-size:.7rem!important;
    letter-spacing:.12em!important;
    overflow-wrap:anywhere!important;
  }

  .hero h1,
  .page-hero h1{
    width:100%!important;
    max-width:100%!important;
    margin:0 0 14px!important;

    font-size:clamp(1.75rem, 8vw, 2.65rem)!important;
    line-height:1.08!important;
    letter-spacing:-.03em!important;

    white-space:normal!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    hyphens:auto!important;
  }

  .hero p,
  .page-hero p{
    width:100%!important;
    max-width:100%!important;
    margin:0 0 22px!important;

    font-size:.96rem!important;
    line-height:1.55!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
  }

  .hero-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }

  .hero-actions .btn,
  .btn{
    width:100%!important;
    max-width:100%!important;
    min-height:46px!important;
    padding:12px 14px!important;
    text-align:center!important;
    white-space:normal!important;
  }

  .hero-badges{
    margin-top:20px!important;
    gap:7px!important;
  }

  .hero-badge{
    font-size:.8rem!important;
    padding:8px 9px!important;
  }

  .page-hero{
    width:100%!important;
    min-height:auto!important;
    padding:48px 0!important;
    overflow:hidden!important;
  }

  .section{
    width:100%!important;
    max-width:100%!important;
    padding:54px 0!important;
    overflow:hidden!important;
  }

  .section-title{
    margin-bottom:24px!important;
  }

  .section-title h2,
  .about-content h2,
  .cta h2,
  .split h2{
    font-size:clamp(1.75rem, 8vw, 2.55rem)!important;
    line-height:1.12!important;
    overflow-wrap:break-word!important;
  }

  .services-grid,
  .stats,
  .platforms,
  .platforms.four,
  .why-grid,
  .footer-grid,
  .form-grid,
  .detail-services,
  .video-grid,
  .steps,
  .split,
  .about-grid,
  .cta-box,
  .social-layout{
    width:100%!important;
    max-width:100%!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:16px!important;
  }

  .service-card,
  .detail-card,
  .video-card,
  .platform,
  .stat,
  .why-card,
  .form-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  .service-card{
    min-height:auto!important;
  }

  .about-image,
  .social-photo{
    min-height:310px!important;
  }

  .gallery-grid{
    width:100%!important;
    max-width:100%!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }

  .gallery-item,
  .gallery-item.wide,
  .gallery-item.tall{
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:280px!important;
  }

  .detail-card{
    grid-template-columns:1fr!important;
  }

  .video-card img{
    height:240px!important;
  }

  .form-card{
    padding:18px!important;
  }

  .footer-logo img{
    width:86px!important;
    max-width:86px!important;
  }

  table,
  pre,
  code{
    max-width:100%!important;
    overflow-x:auto!important;
  }
}

@media (max-width:380px){
  .container{
    width:calc(100% - 18px)!important;
  }

  .topbar-left{
    font-size:.8rem!important;
  }

  .nav-links{
    grid-template-columns:1fr!important;
  }

  #siteMenu.nav-links,
  .nav-links{
    grid-template-columns:1fr!important;
  }

  .hero h1,
  .page-hero h1{
    font-size:clamp(1.6rem, 7.8vw, 2.25rem)!important;
  }

  .gallery-item,
  .gallery-item.wide,
  .gallery-item.tall{
    min-height:250px!important;
  }
}
