/*
 * Lwaibh Group — responsive overrides
 * Mobile + Tablet only. Desktop design remains controlled by style.css.
 */

/* Prevent accidental horizontal scrolling on all devices. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

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

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

input, select, textarea, button {
  max-width: 100%;
  font: inherit;
}

/* Avoid iOS zooming inputs on focus. */
@media (max-width: 767px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ---------- Tablets / small laptops ---------- */
@media (max-width: 1180px) {
  .container {
    width: min(100% - 40px, 1120px) !important;
    max-width: none !important;
    margin-inline: auto !important;
  }

  .header-inner {
    gap: 18px !important;
  }

  .brand {
    min-width: 0 !important;
    flex: 0 1 auto !important;
  }

  .brand-logo {
    width: clamp(52px, 6vw, 68px) !important;
    height: auto !important;
    flex: 0 0 auto !important;
  }

  .brand-text {
    min-width: 0 !important;
  }

  .brand-text strong {
    font-size: clamp(18px, 2vw, 24px) !important;
    line-height: 1.2 !important;
  }

  .brand-text small {
    font-size: clamp(11px, 1.2vw, 14px) !important;
  }

  .main-nav {
    gap: 8px !important;
  }

  .main-nav a {
    padding-inline: 9px !important;
    white-space: nowrap !important;
  }

  .header-call {
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }

  .hero {
    min-height: 360px !important;
    height: clamp(360px, 46vw, 560px) !important;
  }

  .hero-media,
  .hero-photo,
  .hero-shade {
    width: 100% !important;
    max-width: 100% !important;
  }

  .contact-grid {
    display: grid !important;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.35fr) !important;
    gap: 28px !important;
    align-items: start !important;
  }

  .contact-info,
  .form-card,
  .service-card,
  .service-body {
    min-width: 0 !important;
  }

  .form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  .field-full {
    grid-column: 1 / -1 !important;
  }

  .field input,
  .field select,
  .field textarea {
    width: 100% !important;
  }

  .services-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }

  .service-card {
    width: 100% !important;
    overflow: hidden !important;
  }

  .service-image {
    width: 100% !important;
    background-size: cover !important;
    background-position: center !important;
  }

  .about-inner {
    gap: 24px !important;
  }

  .footer-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 28px 36px !important;
  }
}

/* ---------- Tablets portrait + large phones ---------- */
@media (max-width: 900px) {
  .container {
    width: min(100% - 32px, 860px) !important;
  }

  .site-header {
    position: relative !important;
    z-index: 1000 !important;
  }

  .header-inner {
    min-height: 78px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
    flex-wrap: nowrap !important;
  }

  .brand {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    max-width: calc(100% - 70px) !important;
  }

  .brand-logo {
    width: 54px !important;
  }

  .brand-text strong {
    font-size: 19px !important;
  }

  .brand-text small {
    font-size: 11px !important;
  }

  .header-call {
    display: none !important;
  }

  .nav-toggle {
    display: inline-flex !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    padding: 10px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    z-index: 1002 !important;
  }

  .nav-toggle span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    flex: 0 0 2px !important;
  }

  .main-nav {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    inset-inline: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    padding: 12px !important;
    border-radius: 14px !important;
    z-index: 1001 !important;
    box-shadow: 0 16px 40px rgba(0,0,0,.18) !important;
  }

  .main-nav.is-open {
    display: flex !important;
  }

  .main-nav a {
    display: block !important;
    width: 100% !important;
    padding: 12px 14px !important;
    white-space: normal !important;
    text-align: right !important;
  }

  .hero {
    height: clamp(300px, 52vw, 430px) !important;
    min-height: 300px !important;
  }

  .hero-photo {
    background-size: cover !important;
    background-position: center center !important;
  }

  .contact-section,
  .services-section {
    padding-block: clamp(42px, 7vw, 64px) !important;
  }

  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .contact-info,
  .form-card {
    width: 100% !important;
  }

  .info-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .info-item {
    min-width: 0 !important;
    height: 100% !important;
  }

  .info-item p,
  .info-item a,
  .footer-grid a,
  .footer-grid span {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .section-heading h2 {
    font-size: clamp(26px, 4vw, 36px) !important;
    line-height: 1.25 !important;
  }

  .service-card h3 {
    font-size: clamp(20px, 3vw, 27px) !important;
    line-height: 1.35 !important;
  }

  .about-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .about-inner .btn {
    align-self: flex-start !important;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .container {
    width: calc(100% - 28px) !important;
    margin-inline: auto !important;
  }

  .header-inner {
    min-height: 68px !important;
  }

  .brand-logo {
    width: 48px !important;
  }

  .brand-text strong {
    font-size: 17px !important;
  }

  .brand-text small {
    font-size: 10px !important;
    letter-spacing: 0 !important;
  }

  .nav-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
  }

  .hero {
    height: clamp(230px, 67vw, 330px) !important;
    min-height: 230px !important;
  }

  .contact-section,
  .services-section {
    padding-block: 38px !important;
  }

  .contact-info,
  .form-card,
  .callout-card {
    border-radius: 16px !important;
  }

  .contact-info,
  .form-card {
    padding: 20px !important;
  }

  .info-list {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .info-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  .info-item .icon {
    flex: 0 0 auto !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .field,
  .field-full {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .field input,
  .field select,
  .field textarea {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    padding-inline: 13px !important;
  }

  .field textarea {
    min-height: 150px !important;
    resize: vertical !important;
  }

  .submit-btn {
    width: 100% !important;
    min-height: 50px !important;
  }

  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .service-card {
    width: 100% !important;
  }

  .service-image {
    min-height: 190px !important;
    height: min(56vw, 240px) !important;
  }

  .service-symbol {
    min-height: 130px !important;
  }

  .service-body {
    padding: 20px !important;
  }

  .service-body p {
    line-height: 1.8 !important;
  }

  .about-strip {
    padding-block: 34px !important;
  }

  .about-inner {
    text-align: right !important;
  }

  .about-inner .btn,
  .btn-primary {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .footer-brand-lockup {
    align-items: center !important;
  }

  .footer-logo {
    max-width: 58px !important;
    height: auto !important;
  }

  .footer-bottom {
    text-align: center !important;
    line-height: 1.7 !important;
    padding-inline: 8px !important;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .container {
    width: calc(100% - 20px) !important;
  }

  .header-inner {
    min-height: 62px !important;
  }

  .brand {
    gap: 8px !important;
    max-width: calc(100% - 56px) !important;
  }

  .brand-logo {
    width: 42px !important;
  }

  .brand-text strong {
    font-size: 15px !important;
  }

  .brand-text small {
    font-size: 9px !important;
  }

  .nav-toggle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }

  .main-nav {
    top: calc(100% + 4px) !important;
    padding: 8px !important;
    border-radius: 12px !important;
  }

  .main-nav a {
    padding: 11px 12px !important;
  }

  .hero {
    height: 220px !important;
    min-height: 220px !important;
  }

  .contact-info,
  .form-card {
    padding: 16px !important;
    border-radius: 14px !important;
  }

  .section-heading h2 {
    font-size: 24px !important;
  }

  .section-heading p,
  .service-body p,
  .form-note {
    font-size: 14px !important;
  }

  .service-body {
    padding: 17px !important;
  }

  .service-card h3 {
    font-size: 20px !important;
  }

  .service-image {
    min-height: 170px !important;
    height: 185px !important;
  }
}

/* Landscape phones: keep hero from taking the whole screen. */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  .hero {
    height: 250px !important;
    min-height: 250px !important;
  }
}

/* Respect notches / safe areas on modern phones. */
@supports (padding: max(0px)) {
  @media (max-width: 900px) {
    .site-header .header-inner,
    .site-footer .container {
      padding-left: max(0px, env(safe-area-inset-left)) !important;
      padding-right: max(0px, env(safe-area-inset-right)) !important;
    }
  }
}


/* NINET developer credit */
.ninet-credit-wrap{
  width:min(1120px,calc(100% - 32px));
  margin:12px auto 0;
  padding:14px 0 4px;
  border-top:1px solid rgba(255,255,255,.08);
  text-align:center;
}
.ninet-credit{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  color:#0176AD;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
  line-height:1.4;
  max-width:100%;
  transition:color .2s ease, transform .2s ease;
}
.ninet-credit-logo{
  display:block;
  width:24px;
  height:24px;
  flex:0 0 24px;
  object-fit:contain;
}
.ninet-credit:hover,
.ninet-credit:focus-visible{
  color:#00C1DA;
  outline:none;
}
.ninet-credit:hover{
  transform:translateY(-1px);
}

@media (max-width:900px){
  .ninet-credit-wrap{
    width:min(100% - 32px,760px);
    margin-top:10px;
    padding-top:12px;
  }
}

@media (max-width:600px){
  .ninet-credit-wrap{
    width:calc(100% - 24px);
    padding-top:11px;
  }
  .ninet-credit{
    font-size:12px;
    gap:6px;
  }
  .ninet-credit-logo{
    width:22px;
    height:22px;
    flex-basis:22px;
  }
}

@media (max-width:390px){
  .ninet-credit-wrap{
    width:calc(100% - 18px);
  }
  .ninet-credit{
    font-size:11.5px;
  }
  .ninet-credit-logo{
    width:20px;
    height:20px;
    flex-basis:20px;
  }
}
