/* Mobile tuning: smooth scrolling, stable layout, consistent gutters.
   Loaded on every page after the theme CSS. Keeps all entrance animations/transitions. */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { touch-action: manipulation; }          /* no double-tap zoom delay */
body { overflow-x: clip; }                          /* stop sideways wobble without breaking sticky */
img, video, svg { max-width: 100%; }
img[width][height] { height: auto; }                /* reserve space from width/height attrs: no jumps */
.elementor-widget-image img, .elementor-image-box-img img { height: auto; }

/* Entrance animations: run on the compositor only */
.animated, .elementor-invisible { backface-visibility: hidden; }

@media (max-width: 1024px) {
  /* Fixed-attachment backgrounds repaint on every scroll frame on mobile */
  * { background-attachment: scroll !important; }
  /* Theme uses `transition: all` widely; on touch devices limit it to cheap properties */
  a, button, .elementor-button, .elementor-icon, .menu-link {
    transition-property: color, background-color, border-color, opacity, transform, box-shadow !important;
  }
  /* Fixed header: own layer so it does not repaint the page while scrolling */
  #site-header, #scroll-top { transform: translateZ(0); will-change: transform; }
  /* Shape dividers are wider than the screen by design; clip them inside their section */
  .elementor-shape { overflow: hidden; }
}

@media (max-width: 767px) {
  /* One consistent 20px side gutter for page content (footer keeps its own layout) */
  [data-elementor-type="wp-page"] .elementor-section > .elementor-container { padding-left: 20px !important; padding-right: 20px !important; }
  [data-elementor-type="wp-page"] .elementor-section > .elementor-container > .elementor-column > .elementor-widget-wrap { padding-left: 0 !important; padding-right: 0 !important; }
  [data-elementor-type="wp-page"] .elementor-section .elementor-inner-section > .elementor-container { padding-left: 0 !important; padding-right: 0 !important; }

  /* Images and illustrations: centered, never wider than the gutter */
  [data-elementor-type="wp-page"] .elementor-widget-image img { margin-left: auto; margin-right: auto; display: block; }
  [data-elementor-type="wp-page"] .eael-tab-content-item img { display: block; margin: 0 auto 12px; }

  /* No overflowing long words/emails */
  [data-elementor-type="wp-page"] .elementor-widget-text-editor, [data-elementor-type="wp-page"] .elementor-heading-title { overflow-wrap: break-word; }

  /* Forms: full width, 16px inputs so iOS does not zoom in on focus */
  .elementor-form .elementor-field, .elementor-form textarea, .elementor-form input { font-size: 16px !important; }
  .elementor-form .elementor-field-group { width: 100% !important; }
  .elementor-form .elementor-button { width: 100%; }
}

/* ---------- Footer: centered columns that fill the footer (all sizes) ---------- */
[data-elementor-type="footer"] .elementor-column.elementor-col-25 > .elementor-widget-wrap { justify-content: center; align-content: flex-start; text-align: center; }
[data-elementor-type="footer"] .elementor-column.elementor-col-25 .elementor-widget,
[data-elementor-type="footer"] .elementor-column.elementor-col-25 .elementor-text-editor,
[data-elementor-type="footer"] .elementor-column.elementor-col-25 .elementor-widget-container,
[data-elementor-type="footer"] .elementor-column.elementor-col-25 .elementor-button-wrapper,
[data-elementor-type="footer"] .elementor-column.elementor-col-25 .elementor-image { text-align: center !important; }
[data-elementor-type="footer"] .elementor-column.elementor-col-25 .elementor-button-content-wrapper { justify-content: center; }
[data-elementor-type="footer"] .elementor-column.elementor-col-25 img { margin-left: auto; margin-right: auto; }
[data-elementor-type="footer"] .elementor-widget-text-editor:last-child p:only-child { text-align: center; }

/* Three footer columns (LinkedIn | contact + address | links), evenly spread */
@media (min-width: 768px) {
  [data-elementor-type="footer"] .elementor-column.elementor-col-25 { width: 33.333% !important; }
}
[data-elementor-type="footer"] .elementor-element-ab8da80 strong { font-weight: 700; color: #DCE6F0; }
[data-elementor-type="footer"] .elementor-element-ab8da80 a { color: inherit; text-decoration: none; }
[data-elementor-type="footer"] .elementor-element-ab8da80 a:hover { color: #759AC0; }

/* Phone: stacked, centered blocks with even spacing; nav links wrap into rows */
@media (max-width: 767px) {
  [data-elementor-type="footer"] .elementor-column.elementor-col-25 { padding: 14px 0; }
  [data-elementor-type="footer"] .elementor-column.elementor-col-25 > .elementor-widget-wrap { padding-left: 20px !important; padding-right: 20px !important; }
  [data-elementor-type="footer"] .elementor-column.elementor-col-25 .elementor-widget-spacer { display: none; }
  [data-elementor-type="footer"] .elementor-element-a20f385 { margin-top: 14px; }
  [data-elementor-type="footer"] .elementor-column.elementor-col-25 { padding: 10px 0; }
  [data-elementor-type="footer"] .elementor-column.elementor-col-25 .elementor-widget-image:empty,
  [data-elementor-type="footer"] .elementor-element-0142cae { display: none; }
  [data-elementor-type="footer"] .elementor-column.elementor-col-25:not(:last-child) .elementor-widget-button { margin-bottom: 16px !important; }
  [data-elementor-type="footer"] .elementor-column.elementor-col-25:last-child > .elementor-widget-wrap { column-gap: 6px; row-gap: 0; }
  [data-elementor-type="footer"] .elementor-column.elementor-col-25:last-child .elementor-widget-button { width: auto !important; flex: 0 0 auto; margin-bottom: 0 !important; }
}
[data-elementor-type="footer"] .elementor-element-74fbfee, [data-elementor-type="footer"] .elementor-element-74fbfee p { text-align: center !important; }
[data-elementor-type="footer"] .elementor-element-74fbfee img { display: block; margin-left: auto !important; margin-right: auto !important; }

/* ---------- Tech-stack tiles on phones: even 2-up grid, lone tiles centered ---------- */
@media (max-width: 767px) {
  .elementor-inner-section:has(.elementor-widget-image-box.elementor-position-left) > .elementor-container { display: flex; flex-wrap: wrap; justify-content: center; }
  .elementor-inner-section:has(.elementor-widget-image-box.elementor-position-left) > .elementor-container > .elementor-column,
  .elementor-inner-section:has(.elementor-widget-image-box.elementor-position-left) > .elementor-container > .elementor-column > .elementor-widget-wrap { display: contents; }
  .elementor-inner-section:has(.elementor-widget-image-box.elementor-position-left) .elementor-widget { width: 100% !important; max-width: 100%; margin-bottom: 0 !important; }
  .elementor-inner-section:has(.elementor-widget-image-box.elementor-position-left) .elementor-widget-image-box { width: 50% !important; max-width: 50%; flex: 0 0 50%; padding: 10px 0; }
  .elementor-inner-section:has(.elementor-widget-image-box.elementor-position-left) .elementor-widget-spacer { display: none; }
}

/* ---------- Home "Looking for help?" illustration: centered on every size ---------- */
.elementor-element-3459526, .elementor-element-3459526 .elementor-widget-container { text-align: center !important; }
.elementor-element-3459526 img { display: block; margin-left: auto !important; margin-right: auto !important; }
@media (max-width: 767px) {
  .elementor-element-1cc0cef { width: 100% !important; }
  .elementor-element-a2dc320, .elementor-element-0568e76 { display: none !important; }
  .elementor-element-a714444:not(:has(img, a, p:not(:empty))), .elementor-element-1f53732:not(:has(img, a, p:not(:empty))) { display: none !important; }
}

/* Contact form button: normal case ("Send", "Sending...", "Sent! Talk soon.") */
#send_message, #send_message .elementor-button-text { text-transform: none !important; }

/* About > Our team: role list (with its accent line) centered under "N+ Team members" */
.elementor-element-8ed57ae > .elementor-widget-container { width: fit-content; max-width: 100%; margin-left: auto !important; margin-right: auto !important; }
