/* ============================================================
   RCU OFFLINE FIXES
   DESKTOP: Untouched — only @media (max-width: 768px) rules below
   ============================================================ */

/* --- BASE RESETS (safe for all viewports) --- */
*, *::before, *::after {
  box-sizing: border-box;
}

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* --- SCROLLING FIX (non-destructive, applies everywhere) --- */
html {
  overflow-y: scroll;
  height: auto;
}

body {
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
}

/* Kill any fixed wrappers that trap scroll */
#page,
.site,
.ast-site-content-width,
#content,
.entry-content,
.site-content,
.ast-container,
[data-elementor-type="wp-page"] {
  overflow: visible;
  height: auto;
  position: static;
}

/* --- LOCAL FONT FACES --- */
@font-face {
  font-family: eicons;
  src: url('../fonts/eicons.eot?5.25.0');
  src: url('../fonts/eicons.eot?5.25.0#iefix') format('embedded-opentype'),
       url('../fonts/eicons.woff2?5.25.0') format('woff2'),
       url('../fonts/eicons.woff?5.25.0') format('woff'),
       url('../fonts/eicons.ttf?5.25.0') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "ElementsKit Icon";
  src: url('../fonts/elementskit.woff?y24e1e') format('woff'),
       url('../fonts/elementskit.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 900;
  src: url('../webfonts/fa-solid-900.woff2') format('woff2'),
       url('../webfonts/fa-solid-900.woff') format('woff');
}

@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 400;
  src: url('../webfonts/fa-regular-400.woff2') format('woff2'),
       url('../webfonts/fa-regular-400.woff') format('woff');
}

@font-face {
  font-family: 'Font Awesome 5 Brands';
  font-style: normal;
  font-weight: 400;
  src: url('../webfonts/fa-brands-400.woff2') format('woff2'),
       url('../webfonts/fa-brands-400.woff') format('woff');
}

/* ============================================================
   MOBILE ONLY — max-width: 768px
   Desktop is 100% untouched below this line.
   ============================================================ */
@media (max-width: 768px) {

  /* === GLOBAL MOBILE BASICS === */
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }

  /* Force all text horizontal — prevent any vertical text */
  * {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
  }

  /* Prevent any element from being wider than screen */
  img, video, iframe, embed, object, table {
    max-width: 100% !important;
    height: auto !important;
  }

  /* === ELEMENTOR SECTION & COLUMN STACKING === */
  /* Stack columns vertically on mobile */
  .elementor-section > .elementor-container {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* All columns go full width */
  .elementor-column {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Prevent sections from overflowing */
  .elementor-section,
  .elementor-inner-section {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Stretched sections stay within viewport */
  .elementor-section.elementor-section-stretched {
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    position: relative !important;
  }

  /* === TOP BAR (6ff38517) — phone, email, contact, testimonials, award === */
  /* Keep it visible but stack the links for mobile */
  .elementor-element-6ff38517 {
    display: block !important;
  }

  /* The top bar has a desktop-only empty column — hide it */
  .elementor-element-4b1bdd04 {
    display: none !important;
  }

  /* Make the top bar icon-list wrap into two rows */
  .elementor-element-246aebdc .elementor-icon-list-items {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px 12px !important;
    padding: 6px 12px !important;
  }

  .elementor-element-246aebdc .elementor-icon-list-item {
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .elementor-element-246aebdc .elementor-icon-list-text {
    font-size: 11px !important;
  }

  /* === MAIN HEADER (55652731) — logo + hamburger === */
  /* Keep the header container as a row so logo and hamburger stay side by side */
  .elementor-element-55652731 > .elementor-container {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 12px !important;
  }

  /* Header columns — auto width, not 100% */
  .elementor-element-55652731 .elementor-column {
    width: auto !important;
    flex: 0 1 auto !important;
    padding: 4px 8px !important;
    max-width: 100% !important;
  }

  /* Logo image sizing */
  .elementor-element-55652731 .elementor-widget-image img {
    max-width: 160px !important;
    height: auto !important;
    width: auto !important;
  }

  /* Hamburger icon — ensure visible */
  .elementskit-menu-hamburger {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* === ABOUT SECTION & GENERAL CONTENT === */
  /* Headings */
  h1, .elementor-size-xxl {
    font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  h2, .elementor-size-xl {
    font-size: clamp(1.3rem, 5vw, 1.8rem) !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  h3 {
    font-size: clamp(1.1rem, 4vw, 1.4rem) !important;
    line-height: 1.3 !important;
  }
  p, li, td, th, .elementor-text-editor, span {
    font-size: clamp(14px, 3.5vw, 16px) !important;
    line-height: 1.6 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Buttons — full width centered */
  .elementor-button,
  .elementor-button-link {
    display: inline-block !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .elementor-widget-button .elementor-widget-container {
    text-align: center !important;
  }

  /* Images */
  .elementor-image img,
  .wp-post-image,
  .elementor-widget-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* === QUICK LINKS CARDS (4 stacked) === */
  .elementor-col-25,
  .elementor-col-33 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  /* === FOOTER === */
  footer .elementor-section > .elementor-container,
  [data-elementor-type="footer"] .elementor-section > .elementor-container {
    flex-direction: column !important;
    width: 100% !important;
  }

  footer .elementor-column,
  [data-elementor-type="footer"] .elementor-column {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    text-align: center !important;
    padding: 0 16px !important;
    margin-bottom: 20px !important;
  }

  footer .elementor-widget-wrap,
  [data-elementor-type="footer"] .elementor-widget-wrap {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  .elementor-social-icons-wrapper {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* === FORMS === */
  input, select, textarea {
    max-width: 100% !important;
    font-size: 16px !important; /* prevents iOS/Android auto-zoom */
    width: 100% !important;
  }

  /* === TABLES === */
  table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }

  /* === TAP TARGETS === */
  a, button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* === SIDEBAR (inner pages) === */
  .ast-container {
    display: flex !important;
    flex-direction: column !important;
  }

  #primary {
    order: 1 !important;
    width: 100% !important;
  }

  #secondary {
    order: 2 !important;
    width: 100% !important;
    margin-top: 30px !important;
  }
}