/* Service Producer – Mobile Upgrade v2.0
   Safe responsive override. Upload this file next to index.html and link it after all other CSS.
   Purpose: remove horizontal overflow, keep images inside layout, improve phone/tablet spacing.
*/

:root{
  --sp-mobile-gutter: clamp(16px, 5vw, 24px);
}

/* Global overflow protection */
html, body{
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body{
  min-width: 0;
}

*, *::before, *::after{
  box-sizing: border-box;
}

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

/* Long links / addresses / legal text should not push the viewport */
a, p, h1, h2, h3, h4, h5, h6, span, strong, address, li{
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Containers never exceed viewport */
.container,
.nav,
.header,
.hero,
.strip,
.contact,
.legal,
.footer,
section,
main{
  max-width: 100%;
}

/* Fix common 100vw / transform / background overflow issues */
.hero,
.dark-section,
.contact,
.strip{
  width: 100%;
  overflow: hidden;
}

.container{
  width: min(1240px, 100%);
}

/* Header / navigation */
.nav{
  width: 100%;
  min-width: 0;
}

.logo,
.navlinks,
.lang{
  min-width: 0;
}

.logo span:last-child{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Buttons and actions */
.actions{
  max-width: 100%;
}

.btn{
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

/* Grid/flex children need min-width:0 to avoid pushing right side */
.hero .container > *,
.grid-3 > *,
.grid-2 > *,
.service-list > *,
.split > *,
.contact-box > *,
.strip .container > *,
.card,
.service,
.hero-panel,
.nda-box,
.address{
  min-width: 0;
}

/* Background-image blocks must stay inside the design */
.photo{
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Image cards */
.image-card{
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.image-card img{
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Tablet */
@media (max-width: 1020px){
  .hero .container,
  .split,
  .contact-box{
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .grid-3,
  .grid-2,
  .service-list,
  .strip .container{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hero-panel{
    width: 100%;
  }
}

/* Phones */
@media (max-width: 680px){
  html, body{
    overflow-x: hidden;
  }

  .nav{
    padding-inline: var(--sp-mobile-gutter);
    gap: 12px;
  }

  .logo{
    max-width: calc(100vw - 112px);
    gap: 10px;
  }

  .logo-mark{
    flex: 0 0 auto;
  }

  .navlinks{
    flex: 0 0 auto;
  }

  .navlinks > a{
    display: none !important;
  }

  .lang{
    margin-left: 0;
  }

  .lang button{
    padding: 7px 9px;
  }

  .container{
    padding-inline: var(--sp-mobile-gutter);
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .hero .container{
    padding-top: 76px;
    padding-bottom: 68px;
    gap: 28px;
  }

  h1{
    font-size: clamp(40px, 12vw, 52px);
    line-height: .96;
    letter-spacing: -.055em;
    max-width: 100%;
  }

  h2{
    font-size: clamp(31px, 9vw, 42px);
    line-height: 1.06;
    letter-spacing: -.045em;
  }

  h3{
    font-size: 21px;
  }

  p,
  .lead{
    font-size: 17px;
  }

  .small,
  .service p,
  .card p,
  .legal p{
    font-size: 15.5px;
  }

  .actions{
    width: 100%;
  }

  .btn{
    width: 100%;
    min-height: 52px;
    padding-inline: 18px;
  }

  .hero-panel,
  .card,
  .service,
  .nda-box,
  .address{
    border-radius: 22px;
  }

  .hero-panel{
    padding: 22px;
  }

  .metric strong{
    font-size: 36px;
  }

  .strip .container,
  .grid-3,
  .grid-2,
  .service-list{
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .split{
    gap: 30px;
  }

  .photo{
    min-height: 280px;
    border-radius: 24px;
  }

  .image-card img{
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .image-card .content{
    padding: 22px;
  }

  .nda-box{
    padding: 28px 22px;
  }

  .contact-box{
    gap: 24px;
  }

  .address{
    padding: 22px;
  }

  .footer{
    padding-inline: var(--sp-mobile-gutter);
  }
}

/* Very small phones */
@media (max-width: 380px){
  .logo span:last-child{
    max-width: 150px;
  }

  h1{
    font-size: 38px;
  }

  .container{
    padding-inline: 16px;
  }

  .card,
  .service{
    padding: 22px;
  }
}

/* Fallback for older browsers without overflow: clip */
@supports not (overflow: clip){
  html, body{
    overflow-x: hidden;
  }
}
