/* Mobile Optimization Layer (shared) */
@media (max-width: 768px) {
  :root {
    --mo-gap-section: 10px;
    --mo-gap-card: 8px;
    --mo-radius-card: 12px;
    --mo-radius-btn: 10px;
    --mo-font-title: 22px;
    --mo-font-body: 13px;
    --mo-font-meta: 12px;
    --mo-cta-height: 40px;
    --mo-cta-safe-space: 64px;
  }

  body.mo-mobile-ready {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    padding-bottom: max(var(--mo-cta-safe-space), env(safe-area-inset-bottom));
  }

  /* Sticky mobile header (Logo + menu) */
  body.mo-mobile-ready #m-header.u-header,
  body.mo-mobile-ready #m-header.homeHeader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 12000 !important;
  }
  body.mo-mobile-ready .select_menu {
    top: var(--mo-header-h, 60px) !important;
  }

  /* Typography baseline */
  body.mo-mobile-ready h1 { font-size: var(--mo-font-title); line-height: 1.2; }
  body.mo-mobile-ready p,
  body.mo-mobile-ready li,
  body.mo-mobile-ready .mo-text { font-size: var(--mo-font-body); line-height: 1.6; }

  /* Section & Card baseline */
  body.mo-mobile-ready .mo-section,
  body.mo-mobile-ready .af-mobile-section,
  body.mo-mobile-ready .af-intro-mobile-lead,
  body.mo-mobile-ready .af-intro-mobile-contact,
  body.mo-mobile-ready .af-contact-mobile-lead,
  body.mo-mobile-ready .af-hq-card,
  body.mo-mobile-ready .af-branch-card {
    border-radius: var(--mo-radius-card);
  }
  body.mo-mobile-ready .mo-stack > * + * { margin-top: var(--mo-gap-section); }

  /* Buttons baseline */
  body.mo-mobile-ready .mo-btn,
  body.mo-mobile-ready .goRegistryBtn,
  body.mo-mobile-ready .af-mobile-fixed-cta a,
  body.mo-mobile-ready .af-intro-fixed-cta a,
  body.mo-mobile-ready .af-contact-fixed-cta a {
    min-height: var(--mo-cta-height);
    border-radius: var(--mo-radius-btn);
  }

  /* Form baseline */
  body.mo-mobile-ready input,
  body.mo-mobile-ready textarea,
  body.mo-mobile-ready select {
    font-size: 16px; /* prevent iOS zoom */
  }
  body.mo-mobile-ready .af-mobile-lead-form,
  body.mo-mobile-ready .af-intro-mobile-lead form,
  body.mo-mobile-ready .af-contact-mobile-lead form {
    gap: 10px !important;
  }
  body.mo-mobile-ready .af-mobile-lead-form input,
  body.mo-mobile-ready .af-intro-mobile-lead input,
  body.mo-mobile-ready .af-contact-mobile-lead input {
    height: 44px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    line-height: 44px;
  }
  body.mo-mobile-ready .af-mobile-lead-form .af-mobile-lead-submit,
  body.mo-mobile-ready .af-intro-mobile-lead button,
  body.mo-mobile-ready .af-contact-mobile-lead button {
    height: 46px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 600;
    letter-spacing: 0.2px;
  }
  body.mo-mobile-ready .af-mobile-lead-sub,
  body.mo-mobile-ready .af-intro-mobile-lead p,
  body.mo-mobile-ready .af-contact-mobile-lead p {
    margin-bottom: 10px !important;
  }

  /* Accordion baseline */
  body.mo-mobile-ready .mo-accordion,
  body.mo-mobile-ready details.mo-accordion {
    border: 1px solid #edf0f5;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
  }
  body.mo-mobile-ready .mo-accordion > summary,
  body.mo-mobile-ready details.mo-accordion > summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
  }
  body.mo-mobile-ready .mo-accordion > summary::-webkit-details-marker,
  body.mo-mobile-ready details.mo-accordion > summary::-webkit-details-marker {
    display: none;
  }
  body.mo-mobile-ready .mo-accordion-body { padding: 0 12px 10px; }

  /* Horizontal tabs / anchor nav baseline */
  body.mo-mobile-ready .mo-tabs,
  body.mo-mobile-ready .mo-anchor-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 2px;
  }
  body.mo-mobile-ready .mo-tabs > a,
  body.mo-mobile-ready .mo-tabs > button,
  body.mo-mobile-ready .mo-anchor-nav > a {
    scroll-snap-align: start;
    white-space: nowrap;
    padding: 7px 10px;
    border: 1px solid #e8edf3;
    border-radius: 999px;
    background: #fff;
    color: #3f536c;
    text-decoration: none;
    font-size: var(--mo-font-meta);
  }

  /* Mobile nav menu opened state fallback */
  body.mo-mobile-ready .u-mobile-nav-btn[aria-expanded="true"] + .select_menu,
  body.mo-mobile-ready .select_menu.mo-open {
    display: block !important;
  }

  /* Fixed CTA wrappers (shared) */
  body.mo-mobile-ready .af-mobile-fixed-cta,
  body.mo-mobile-ready .af-fps-fixed-cta,
  body.mo-mobile-ready .af-intro-fixed-cta,
  body.mo-mobile-ready .af-contact-fixed-cta {
    position: fixed !important;
    z-index: 10000;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
    background: #fff !important;
    border-top: 1px solid #e3e8ef !important;
    box-shadow: 0 -6px 16px rgba(18, 25, 38, 0.08) !important;
  }

  body.mo-mobile-ready .af-mobile-fixed-cta a,
  body.mo-mobile-ready .af-fps-fixed-cta a,
  body.mo-mobile-ready .af-intro-fixed-cta a,
  body.mo-mobile-ready .af-contact-fixed-cta a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 40px !important;
    line-height: 40px !important;
    border-radius: 12px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 14px !important;
  }

  body.mo-mobile-ready .af-mobile-fixed-cta .call,
  body.mo-mobile-ready .af-mobile-fixed-cta .chat,
  body.mo-mobile-ready .af-fps-fixed-cta .call,
  body.mo-mobile-ready .af-fps-fixed-cta .chat,
  body.mo-mobile-ready .af-intro-fixed-cta .call,
  body.mo-mobile-ready .af-intro-fixed-cta .chat,
  body.mo-mobile-ready .af-contact-fixed-cta .call,
  body.mo-mobile-ready .af-contact-fixed-cta .chat {
    flex: 0 0 104px !important;
    border: 1px solid #dfe5ee !important;
    background: #fff !important;
    color: #48586e !important;
  }

  body.mo-mobile-ready .af-mobile-fixed-cta .demo,
  body.mo-mobile-ready .af-fps-fixed-cta .demo,
  body.mo-mobile-ready .af-intro-fixed-cta .demo,
  body.mo-mobile-ready .af-contact-fixed-cta .demo {
    flex: 0 0 132px !important;
    background: #dd1f2a !important;
    border: 1px solid #dd1f2a !important;
    color: #fff !important;
    font-weight: 700 !important;
  }

  body.mo-mobile-ready .af-mobile-fixed-cta a::before,
  body.mo-mobile-ready .af-fps-fixed-cta a::before,
  body.mo-mobile-ready .af-intro-fixed-cta a::before,
  body.mo-mobile-ready .af-contact-fixed-cta a::before {
    content: "";
    width: 14px;
    height: 14px;
    display: inline-block;
    background-repeat: no-repeat;
    background-size: 14px 14px;
    background-position: center;
    opacity: 0.9;
  }

  body.mo-mobile-ready .af-mobile-fixed-cta .call::before,
  body.mo-mobile-ready .af-fps-fixed-cta .call::before,
  body.mo-mobile-ready .af-intro-fixed-cta .call::before,
  body.mo-mobile-ready .af-contact-fixed-cta .call::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5.5 3.5h3l1.2 4.2-2 1.5a14 14 0 0 0 6.3 6.3l1.5-2 4.2 1.2v3c0 .6-.4 1-1 1C10.6 19.7 4.3 13.4 4.3 5.5c0-.6.4-1 1-1Z' stroke='%2348586e' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  body.mo-mobile-ready .af-mobile-fixed-cta .demo::before,
  body.mo-mobile-ready .af-fps-fixed-cta .demo::before,
  body.mo-mobile-ready .af-intro-fixed-cta .demo::before,
  body.mo-mobile-ready .af-contact-fixed-cta .demo::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3.5' y='4.5' width='17' height='16' rx='2.2' stroke='white' stroke-width='1.8'/%3E%3Cpath d='M8 2.8v3.4M16 2.8v3.4M7 10h10M7 14h6' stroke='white' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  }

  body.mo-mobile-ready .af-mobile-fixed-cta .chat::before,
  body.mo-mobile-ready .af-fps-fixed-cta .chat::before,
  body.mo-mobile-ready .af-intro-fixed-cta .chat::before,
  body.mo-mobile-ready .af-contact-fixed-cta .chat::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 6.8A2.8 2.8 0 0 1 6.8 4h10.4A2.8 2.8 0 0 1 20 6.8v6.4a2.8 2.8 0 0 1-2.8 2.8H10l-3.8 3.1V16H6.8A2.8 2.8 0 0 1 4 13.2V6.8Z' stroke='%2348586e' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  /* Bottom black footer nav accordion: keep submenu directly under each parent item */
  body.mo-mobile-ready .bottom-navigation .bottom-navigation-bottom-inner-top {
    display: block !important;
    padding-top: 4px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  body.mo-mobile-ready .bottom-navigation .bottom-navigation-bottom-inner {
    padding-top: 0 !important;
  }
  body.mo-mobile-ready .bottom-navigation .firm-info-column-item-mobile {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  body.mo-mobile-ready .bottom-navigation .firm-info-column-item-mobile + .firm-info-column-item-mobile {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  body.mo-mobile-ready .bottom-navigation .firm-info-column-item-mobile .slideTop {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 10px 0 !important;
    line-height: 1.4 !important;
  }
  body.mo-mobile-ready .bottom-navigation .firm-info-column-item-mobile .u-bpm-content {
    position: static !important;
    float: none !important;
    clear: both !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body.mo-mobile-ready .bottom-navigation .firm-info-column-item-mobile .u-bpm-content .firm-info-item {
    padding: 4px 0 !important;
    line-height: 1.5 !important;
  }
  body.mo-mobile-ready .bottom-navigation .firm-info {
    margin-top: 6px !important;
    padding-top: 0 !important;
  }
  body.mo-mobile-ready .bottom-navigation .firm-info .alphaFlowFooter {
    margin-top: 0 !important;
  }
}
