/* Mobile cleanup: no entrance overlays, no empty template panels. */
@media (max-width: 900px) {
  html { scroll-padding-top: 88px; scroll-padding-bottom: 84px; }
  [data-pws-animation], .elementor-invisible, .animated {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  main section, main article, main [id],
  [data-elementor-type="wp-page"] [id] {
    scroll-margin-top: 0;
    scroll-margin-bottom: 0;
  }
}

/* A menu is visible only when explicitly opened, never an empty hover box. */
@media (max-width: 1100px) {
  .pws-compact-header .static-nav .nav-items {
    max-height: calc(100dvh - 160px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .pws-compact-header .pages-menu:not([open]) > div { display: none !important; }
  .pws-compact-header .pages-menu[open] > div { display: block !important; }
  .pws-compact-header .pages-menu > summary { display: block; width: 100%; min-height: 44px; }
  .pws-compact-header .static-nav .menu-button,
  .pws-compact-header .static-nav .menu-button:hover,
  .pws-compact-header .static-nav .menu-button:focus,
  .pws-compact-header .static-nav .menu-button:active {
    background: transparent !important;
    color: #fff !important;
    border: 1px solid #ffffff66 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }
  .pws-compact-header .menu-button::before,
  .pws-compact-header .menu-button::after { display: none !important; }
  .pws-compact-header .menu-button svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
  }
}

@media (max-width: 767px) {
  /* Keep important content in ordinary document flow. */
  .elementor-widget-spacer, .elementor-spacer,
  .pws-top { display: none !important; }
  main, .staffing-content { min-width: 0; }
  .pws-compact-header + main,
  .pws-compact-header + [data-elementor-type="wp-page"] {
    margin-top: 0 !important;
    display: flow-root;
  }
  [data-elementor-type="wp-page"] > .e-con:first-child { margin-top: 0 !important; }
  main p, main h1, main h2, main h3,
  .elementor-widget-text-editor p { overflow-wrap: anywhere; }

  /* Employer / Hire Talent and other information pages. */
  .staffing-hero { padding: 32px 20px !important; }
  .staffing-hero > span { display: none; }
  .staffing-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(28px, 8vw, 34px) !important;
    line-height: 1.16 !important;
  }
  .staffing-hero > p { margin: 0; font-size: 16px; line-height: 1.7; }
  .staffing-hero .staffing-button {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 13px 18px;
    margin-top: 24px;
    text-align: center;
  }
  .staffing-sections {
    padding: 28px 20px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }
  .staffing-sections > article {
    min-width: 0;
    padding: 20px;
    border: 1px solid #d8e2e7;
    border-radius: 10px;
  }
  .staffing-sections h2 { font-size: 22px; line-height: 1.25; margin: 0 0 12px; }
  .staffing-sections p { font-size: 16px; line-height: 1.7; margin: 0; }

  /* Homepage: one clear introduction and two useful paths, not floating cards. */
  [data-id="41af337"] {
    background: #102341 !important;
    background-image: none !important;
    padding: 32px 20px !important;
    min-height: 0 !important;
    height: auto !important;
  }
  [data-id="41af337"]::before { background: none !important; opacity: 0 !important; }
  [data-id="41af337"] > .e-con-inner {
    width: 100%; max-width: none; padding: 0 !important; gap: 0 !important;
  }
  [data-id="41af337"] .e-con { min-height: 0 !important; height: auto !important; }
  [data-id="89271aa"], [data-id="b7b50ef"], [data-id="8baed76"] {
    width: 100% !important; padding: 0 !important; gap: 18px !important;
  }
  [data-id="fd6ca28"], [data-id="95a295d"] { display: none !important; }
  [data-id="0e46edf"] h1 { font-size: 34px !important; line-height: 1.15 !important; margin: 0; }
  [data-id="6cf7183"] p { font-size: 16px !important; line-height: 1.65 !important; margin: 0; }
  [data-id="9d6409f"] {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 12px !important;
    margin-top: 4px;
  }
  [data-id="21ec37e"] { display: block !important; }
  [data-id="9d6409f"] .elementor-button {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 48px; padding: 13px 8px !important;
    font-size: 14px !important;
  }

  /* Job board first; decorative fact strips must not bury the actual board. */
  .jobs-hero { padding: 32px 20px !important; }
  .jobs-hero h1 { font-size: 32px; line-height: 1.15; }
  .jobs-hero > p { font-size: 16px; line-height: 1.7; }
  .jobs-hero__facts { display: none; }
  .jobs-hero__actions { gap: 12px; margin-top: 24px; }
  .jobs-hero__actions .staffing-button { margin-top: 0; }
  .jobs-board, .jobs-section { padding-top: 32px; }
  .jobs-board__panel, .jobs-role, .jobs-support { padding: 22px 20px; }
  .jobs-roles, .jobs-support-grid, .jobs-steps { gap: 16px; margin-top: 24px; }

  /* Forms and footer links retain proper touch areas without giant line boxes. */
  .contact-form input, .contact-form textarea, .contact-form select { font-size: 16px; }
  .contact-form input, .contact-form button { min-height: 48px; }
  footer a { line-height: 1.5; padding-top: 10px; padding-bottom: 10px; }
  body { padding-bottom: calc(var(--pws-tabbar-h, 58px) + 20px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Shared CTA alignment: center text and icons as one content group. */
.elementor-button,
.staffing-button,
.jobs-button--ghost,
.contact-form button {
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  gap: .5em;
  text-align: center !important;
  vertical-align: middle;
  line-height: 1.25;
  min-height: 44px;
}
button {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.elementor-button .elementor-button-content-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
}
.elementor-button .elementor-button-text {
  flex-grow: 0;
  align-self: center;
}
.elementor-button .elementor-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: none;
  margin: 0;
  line-height: 1;
}
.elementor-button .elementor-button-icon svg,
.elementor-button .elementor-button-icon i { display: block; line-height: 1; }

/* Homepage FAQ: clean rows instead of nested square button outlines. */
.elementor-100 .e-n-accordion .e-n-accordion-item {
  border: 0 !important;
  border-bottom: 1px solid #d8e2e7 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: visible;
}
.elementor-100 .e-n-accordion .e-n-accordion-item-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  background: transparent !important;
}
.elementor-100 .e-n-accordion .e-n-accordion-item-title-header {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.elementor-100 .e-n-accordion .e-n-accordion-item-title-icon {
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.elementor-100 .e-n-accordion .e-n-accordion-item-title-icon > span {
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.elementor-100 .e-n-accordion .e-n-accordion-item-title-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}
.elementor-100 .e-n-accordion .e-n-accordion-item-title:hover {
  background: #f1f6f8 !important;
}
.elementor-100 .e-n-accordion .e-n-accordion-item-title:focus-visible {
  outline: 2px solid #005c99 !important;
  outline-offset: 3px;
}

/* Keep branding in the header; omit the footer logo and its empty wrapper at every width. */
footer img.pathway-footer-logo,
footer .elementor-widget-image:has(img.pathway-footer-logo) {
  display: none !important;
}

/* Homepage services: remove the empty mint/blue template panels on mobile. */
@media (max-width: 900px) {
  .elementor-100 [data-id="58440f9d"],
  .elementor-100 [data-id="32ace916"] { display: none !important; }
  .elementor-100 [data-id="3b753806"] {
    padding: 32px 20px !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box;
  }
  .elementor-100 [data-id="3b753806"] > .e-con-inner {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .elementor-100 [data-id="3760e15b"],
  .elementor-100 [data-id="2a0f9f19"] {
    display: block !important;
    position: static !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
  }
  .elementor-100 [data-id="54410ca6"] {
    width: 100% !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    gap: 12px !important;
    text-align: left;
  }
  .elementor-100 [data-id="177ed1e0"] h2 {
    font-size: clamp(26px, 5vw, 32px) !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }
  .elementor-100 [data-id="2df756f6"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .elementor-100 [data-id="2df756f6"] > .e-con {
    position: static !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 20px !important;
    border: 1px solid #d8e2e7 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  .elementor-100 [data-id="2df756f6"] .elementor-widget-icon-box {
    width: 100% !important;
    margin: 0 !important;
  }
  .elementor-100 [data-id="2df756f6"] .elementor-widget-container {
    padding: 0 !important;
    border: 0 !important;
  }
  .elementor-100 [data-id="2df756f6"] .elementor-icon-box-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 14px !important;
    text-align: left !important;
  }
  .elementor-100 [data-id="2df756f6"] .elementor-icon-box-icon {
    flex: 0 0 44px;
    margin: 0 !important;
  }
  .elementor-100 [data-id="2df756f6"] .elementor-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    padding: 12px !important;
    color: #fff !important;
    background: #005c99 !important;
    border-radius: 50%;
  }
  .elementor-100 [data-id="2df756f6"] .elementor-icon svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor;
  }
  .elementor-100 [data-id="2df756f6"] .elementor-icon-box-content { min-width: 0; }
  .elementor-100 [data-id="2df756f6"] .elementor-icon-box-title {
    font-size: 20px !important;
    line-height: 1.25 !important;
    text-align: left !important;
    margin: 0 0 8px !important;
  }
  .elementor-100 [data-id="2df756f6"] .elementor-icon-box-description {
    font-size: 16px !important;
    line-height: 1.65 !important;
    text-align: left !important;
    margin: 0 !important;
    color: #36536a !important;
  }
}
