/* Mobile fixes for the home page (loaded after responsive.css). */

@media (max-width: 575px) {
  /* Header: smaller logo + tighter bar. Sizes follow the screen width (vw) so they also shrink
     on narrow / zoomed-in phones (Chrome "Page zoom", large display size). */
  #header {
    padding: 10px 0 !important;
  }
  #header .logo-box img {
    max-width: clamp(84px, 27vw, 116px) !important;
  }

  /* Hero: headline, image and spacing scaled to the screen */
  #homeBanner .text-box h2 {
    font-size: clamp(30px, 10vw, 42px) !important;   /* "we" */
    line-height: 1 !important;
  }
  #homeBanner .text-box h2 span:not(.mobile) {
    font-size: clamp(40px, 14vw, 58px) !important;   /* "ideate", "create", ... */
    letter-spacing: -3px !important;
    margin-top: -10px !important;
  }
  #homeBanner .text-box p {
    font-size: clamp(13px, 3.6vw, 15px) !important;
  }
  #homeBanner .img-box img {
    max-height: clamp(120px, 40vw, 168px) !important;
    width: auto !important;
    max-width: 100% !important;
  }
  #homeBanner .swiper-slide > .row {
    gap: 22px !important;
  }

  /* Slider: the theme fixes it at 80vh (~675px); the tallest slide is now ~417px */
  #homeBanner .homeBanner-box .swiper,
  #homeBanner .swiper {
    height: 430px !important;
    min-height: 0 !important;
  }
}

@media (max-width: 767px) {
  /* "our Services": the hover-flip tiles can't flip on touch screens, but their hidden back
     content still made every tile ~260px tall (10 tiles ≈ 2800px of scrolling).
     Show a compact 2-column grid of icon + title; the whole tile opens the service. */
  #digital .list-box > ul {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  #digital .list-box > ul > li,
  #digital .list-box > ul > li:nth-last-child(2),
  #digital .list-box > ul > li:last-child {
    width: auto !important;
    margin: 0 !important;
  }
  #digital .list-box ul li .box {
    position: relative;
    min-height: 148px !important;
    height: 100%;
    padding: 18px 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #digital .list-box ul li .box .end-box {
    display: none !important;
  }
  #digital .list-box ul li .box .top-box,
  #digital .list-box ul li .box:hover .top-box {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    padding: 0 !important;
    opacity: 1 !important;
    text-align: center;
  }
  #digital .list-box ul li .box .top-box img {
    max-width: 46px;
    max-height: 46px;
    margin: 0 auto 12px;
  }
  #digital .list-box ul li .box h6 {
    margin: 0;
    letter-spacing: .5px;
    line-height: 1.35;
  }
  #digital .list-box ul li .box h6 a {
    display: inline;
    font-size: 13px;
    letter-spacing: 1.5px;
    line-height: 1.35;
  }
  /* make the whole tile tappable */
  #digital .list-box ul li .box h6 a::after {
    content: "";
    position: absolute;
    inset: 0;
  }

  /* "K n o w   M o r e": 10px letter-spacing is unreadable on phones */
  .know-more-btn a,
  .col-lg-4 > .box.box-1 > a,
  .col-lg-4 > .box.box-2 > a,
  .col-lg-4 > .box.box-3 > a {
    letter-spacing: 3px !important;
  }
}

/* Very narrow screens (small phones, or big phones with Chrome "Page zoom" / large display size) */
@media (max-width: 340px) {
  #digital .list-box ul li .box h6 a {
    font-size: 12px;
    letter-spacing: .5px;
  }
}
@media (max-width: 260px) {
  /* two columns no longer fit the service names — one per row */
  #digital .list-box > ul {
    grid-template-columns: 1fr;
  }
  #digital .list-box ul li .box {
    min-height: 120px !important;
  }
}

/* Labels under 11px are hard to read on phones */
@media (max-width: 767px) {
  a.connect {
    font-size: 11px !important;
  }
  .touch small {
    font-size: 11px !important;
  }
}
