/* ==========================================================================
   Mobile optimisation brief (Nov 2026) - loaded after style.css, responsive.css
   and mobile-fixes.css. Page-template inline <style> blocks load later, so a few
   rules use "html body" for specificity.
   ========================================================================== */

/* ---------- Shared buttons ---------- */
.bt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: "CeraPro-Medium", sans-serif;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.bt-btn-primary { background: #0941a7; color: #fff; }
.bt-btn-primary:hover, .bt-btn-primary:focus-visible { background: #1a3349; color: #fff; }
.bt-btn-wa { background: #fff; color: #128c4b; border-color: #25d366; }
.bt-btn-wa:hover, .bt-btn-wa:focus-visible { background: #25d366; color: #fff; }
.bt-btn-outline { background: transparent; color: #0941a7; border-color: #0941a7; }
.bt-btn-outline:hover, .bt-btn-outline:focus-visible { background: #0941a7; color: #fff; }

/* ---------- Homepage hero intro (H1 + one line + CTA) ---------- */
/* Desktop keeps the existing hero; the H1 stays for SEO but is visually hidden */
@media (min-width: 768px) {
  .bt-hero-intro {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .bt-mnav-extra { display: none !important; }
}

@media (max-width: 767px) {
  .bt-hero-intro {
    padding: 20px 0 8px;
    text-align: left;
  }
  .bt-hero-intro h1 {
    margin: 0 0 10px;
    font-family: "CeraPro-Bold", sans-serif;
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
    color: #1a3349;
  }
  .bt-hero-intro p {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.5;
    color: #495565;
  }
  .bt-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .bt-hero-cta .bt-btn { flex: 1 1 140px; }

  /* Hero animation: graphic shrunk, rotating word in a fixed-height box so nothing below moves */
  html body #homeBanner .homeBanner-box { padding-bottom: 8px; }
  html body #homeBanner .img-box img {
    max-height: min(26vh, 190px) !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto;
    display: block;
  }
  html body #homeBanner .swiper-slide > .row { gap: 8px !important; }
  html body #homeBanner .text-box h2 {
    height: 84px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
  }
  html body #homeBanner .text-box h2 span img {
    max-height: 58px;
    width: auto;
    max-width: 100%;
  }
  html body #homeBanner .text-box p {
    font-size: 16px !important;
    line-height: 1.5;
    min-height: 6em;           /* reserves 4 lines: text below never shifts */
    margin: 8px 0 0;
  }
  html body #homeBanner .homeBanner-box .swiper,
  html body #homeBanner .swiper {
    height: 480px !important;   /* fallback; mobile-optimise.js fits it to the tallest slide */
    min-height: 0 !important;   /* theme sets 90vh - left a big gap on large phones */
  }
  /* the hero already has the CTA above; the round "Let's connect" circle was pushed off screen */
  html body #homeBanner .button-box { display: none !important; }
}

/* ---------- Header + mobile menu ---------- */
@media (max-width: 767px) {
  html body #header .main-nav nav {
    padding: 72px 16px calc(24px + env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  html body #header .main-nav nav ul li { padding: 0; }
  html body #header .main-nav nav #primary-menu > li > a,
  html body #header .bt-mnav-services > summary {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 8px;
    font-family: "CeraPro-Medium", sans-serif;
    font-size: 18px;
    letter-spacing: .02em;
    text-transform: none;
    color: #1a3349;
    border-bottom: 1px solid rgba(26, 51, 73, .08);
  }
  html body #header .bt-mnav-services > summary {
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
  }
  html body #header .bt-mnav-services > summary::-webkit-details-marker { display: none; }
  html body #header .bt-mnav-services > summary::after {
    content: "+";
    font-size: 24px;
    line-height: 1;
    color: #0941a7;
  }
  html body #header .bt-mnav-services[open] > summary::after { content: "\2212"; }
  html body #header .bt-mnav-services-list { margin: 4px 0 8px; padding: 0 0 0 12px; }
  html body #header .bt-mnav-services-list li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
    font-size: 16px;
    letter-spacing: 0;
    text-transform: none;
    color: #495565;
  }
  html body #header .bt-mnav-cta {
    display: flex;
    gap: 10px;
    margin: 24px 0 16px;
  }
  html body #header .bt-mnav-cta .bt-btn { flex: 1 1 0; }
  /* Close button: 44x44 tap area */
  html body #header .main-nav .cancel-menu {
    top: 6px;
    max-width: none;
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 24px;
    text-align: center;
  }
  html body #header .main-nav .cancel-menu.show { left: calc(100% - 56px); }
  html body #header .main-nav .click-menu {
    min-width: 44px;
    min-height: 44px;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
  }
  html body #header .logo-box a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  /* Social icons in the menu: one row, 44px tap area */
  html body #header .icon-box.mobile { width: 100%; margin-top: 4px; }
  html body #header .icon-box.mobile ul li { margin: 0 !important; padding: 0; }
  html body #header .icon-box.mobile ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    justify-content: space-evenly;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  html body #header .icon-box.mobile ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
}

/* ---------- Scroll animations ---------- */
/* Animations run on phones too (settings in footer.php). Cards sliding in from the side start
   100px off-screen: clip them per section so the page never scrolls sideways. */
@media (max-width: 767px) {
  #page section { overflow-x: clip; }
}
@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .swiper-slide, .odometer { transition: none !important; }
}

/* ---------- Typography (phones) ---------- */
@media (max-width: 767px) {
  html body #page p { font-size: 16px; line-height: 1.5; }
  html body #page p strong { font-size: inherit; }
  html body .stats-tag,
  html body small,
  html body .touch-quick .tq-text small,
  html body #digital .list-box ul li .box h6 a,
  html body a.connect { font-size: 14px !important; }
  html body .bt-recaptcha-note { font-size: 14px; }
  /* Section headings: one font (CeraPro) instead of Playfair Display */
  html body #about-sec-home .about-right h2 {
    font-family: "CeraPro-Bold", sans-serif;
    font-size: clamp(26px, 6vw, 40px);
    line-height: 1.15;
    letter-spacing: 0;
  }
  html body #about-sec-home .about-right p { text-align: left; }
}

/* ---------- Tap targets (phones) ---------- */
@media (max-width: 767px) {
  html body .know-more-btn a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
  }
  html body .col-lg-4 > .box > a,
  html body a.connect,
  html body .recentDetail ul li a,
  html body #blogInner .blogInner-content a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  /* Footer: every link 44px tall, 8px apart */
  html body #footer .bt-footer-services ul,
  html body #footer .box2 ul { row-gap: 8px; }
  html body #footer .bt-footer-services ul li a,
  html body #footer .box2 ul li a,
  html body #footer .bt-footer-contact li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 15px;
    line-height: 1.3;
  }
  html body #footer .bt-footer-offices ul li {
    min-height: 32px;
    font-size: 15px;
  }
  html body #footer .bt-footer-social ul { gap: 8px; }
  html body #footer .bt-footer-social ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  html body #footer .footer-copyright-box p { font-size: 14px; }
  /* reCAPTCHA notice links */
  html body .bt-recaptcha-note a { padding: 6px 0 !important; }
}

/* ---------- Floating chat button: keep page content clear of it ---------- */
@media (max-width: 767px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ---------- Decorative layers (phones) ---------- */
@media (max-width: 767px) {
  /* big outline background words ("digitalstrategy", "Generatinggrowth", "ourservices"...) were cut off */
  html body .title-box::after { display: none !important; }
  /* Bluetick doodle: half the height */
  html body #about-sec-home .about-left img {
    display: block;
    max-width: 62%;
    height: auto;
    margin: 0 auto;
  }
}

/* ---------- Stats counters ---------- */
@media (max-width: 767px) {
  html body #about-sec-home .stat-box h4 {
    font-family: "CeraPro-Bold", sans-serif;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-height: 1.2em;
  }
  html body #about-sec-home .stat-box h4 .odometer,
  html body #about-sec-home .stat-box h4 .odometer * {
    font-family: inherit !important;
    font-variant-numeric: tabular-nums;
  }
  html body #about-sec-home .stat-box h4 .odometer { min-width: 3ch; text-align: right; }
}

/* ---------- Process steps (Idea > Research > ...): full contrast, all visible ---------- */
@media (max-width: 767px) {
  html body #growth h4,
  html body #growth h4.ceraProLight { color: #1a3349 !important; opacity: 1 !important; }
}

/* ---------- About page ---------- */
@media (max-width: 767px) {
  html body #about .about-part .text-box {
    left: auto;
    max-width: none;
    margin: -40px 0 0;
    padding: 72px 16px 32px;
  }
  html body #tesxtSection .text-box {
    max-width: 100%;
    padding: 32px 16px;
  }
  html body #tesxtSection .box { overflow-x: clip; }
}

/* ---------- Blogs page: compact list cards on phones ---------- */
.bt-load-more-wrap { text-align: center; margin: 8px 0 32px; }
@media (max-width: 767px) {
  html body #blogInner .blogInnerBox {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
  }
  html body #blogInner .blogInner-img {
    flex: 0 0 112px;
    height: 84px;
    border-radius: 6px;
  }
  html body #blogInner .blogInner-img img {
    position: static;
    transform: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  html body #blogInner .blogInner-content { padding: 0; }
  html body #blogInner .blogInner-content h4 {
    font-size: 16px;
    line-height: 1.35;
    margin: 0 0 2px;
  }
  .bt-load-more-wrap .bt-btn { width: 100%; }
}

/* ---------- Forms (CF7) ---------- */
@media (max-width: 767px) {
  .wpcf7 input:not([type=submit]):not([type=checkbox]):not([type=radio]),
  .wpcf7 select,
  .wpcf7 textarea { font-size: 16px !important; }
  .wpcf7 input[type=submit],
  .wpcf7 button[type=submit] {
    width: 100%;
    min-height: 48px;
  }
}

/* ---------- Header height: 56-64px on phones ---------- */
@media (max-width: 767px) {
  html body #header { padding: 6px 0 !important; }
  html body #header .logo-box img { max-height: 40px; width: auto; }
}

/* ---------- Hero intro collapses on the first scroll (phones, see mobile-optimise.js) ---------- */
@media (max-width: 767px) {
  .bt-hero-intro {
    overflow: hidden;
    transition: max-height .35s ease, opacity .25s ease, padding .35s ease;
  }
  .bt-hero-intro.is-collapsed {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
  }
  .bt-hero-intro.no-anim { transition: none; }
}
