/* Site-wide responsive, touch and bug fixes */
/* ===== Responsive + touch polish ===== */
/* Ways to work together: let the cards run edge to edge */
.mj-hscroll:not(.mj-sv-proc) { width: calc(100% + (2 * var(--mj-space-x))) !important; max-width: none !important; }

/* Touch screens: no sticky hover, roll on press instead */
@media (hover: none) {
  a:hover .mj-roll > span, button:hover .mj-roll > span, .mj-btn:hover .mj-roll > span { transform: none !important; }
  a:active .mj-roll > span, button:active .mj-roll > span, .mj-btn:active .mj-roll > span { transform: translateY(-100%) !important; }
}
/* Bigger tap areas without moving anything */
@media (pointer: coarse) {
  .mj-nav-link a { padding-block: 10px; margin-block: -10px; }
  .mj-footer a { display: inline-block; padding-block: 8px; margin-block: -8px; }
}

@media (max-width: 767px) {
  /* Swipe cards: show a slice of the next one so it's obviously swipeable */
  .mj-hs-track { width: 100% !important; max-width: none; }
  .mj-hs-track > * { flex: 0 0 84% !important; min-width: 0 !important; max-width: 84% !important; }
  .mj-panel > .mj-smiley { top: auto !important; bottom: -16px !important; right: -16px !important; width: 76px !important; height: 76px !important; }
  /* Hero titles flow naturally on phones instead of breaking at desktop line ends */
  .mj-hero-flow .mj-line { display: inline; padding: 0; margin: 0; overflow: visible; }
  .mj-hero-flow .mj-line > .mj-line-in { display: inline; transform: none !important; transition: none; }
  .mj-hero-flow .mj-line + .mj-line::before { content: " "; }
  .mj-js .mj-hero-flow { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform 1s cubic-bezier(.22,1,.36,1); }
  .mj-ready .mj-hero-flow { opacity: 1; transform: none; }
  /* Work cards: title first, tags underneath */
  .mj-card-meta { flex-direction: column !important; align-items: flex-start !important; justify-content: flex-end !important; gap: 10px; }
  .mj-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .mj-card-tags span { margin: 0; }
  /* Room for the accessibility button at the very bottom */
  .mj-footer { padding-bottom: 96px !important; }
}
@media (prefers-reduced-motion: reduce) { .mj-js .mj-hero-flow { opacity: 1 !important; transform: none !important; } }

/* Filters: everyone sees every option, and the bar steps aside once the list ends */
.mj-jn-filter{transition:top .5s cubic-bezier(.22,1,.36,1),transform .45s cubic-bezier(.22,1,.36,1),opacity .3s ease}
.mj-jn-filter.is-gone{transform:translateY(-110%);opacity:0;pointer-events:none}
@media (max-width:600px){
  .mj-jn-filter{flex-wrap:wrap;overflow:visible;gap:8px;padding-block:12px!important}
  .mj-jn-filter button{padding:11px 16px;font-size:14px}
}

/* Say hello: stack on tablets and phones, keep the email on one line */
.mj-ct-mail,.mj-ct-mail a{white-space:nowrap}
@media (max-width:1024px){
  .mj-ct-hello{flex-direction:column!important;align-items:flex-start!important;gap:28px!important}
  .mj-ct-hello > *{width:100%!important;max-width:none!important}
}
@media (max-width:767px){.mj-ct-mail,.mj-ct-mail a{font-size:min(28px,6.4vw)!important}}

/* Journal post body: always the site font, readable size on phones */
.mj-jn-body .elementor-widget-theme-post-content, .mj-jn-body .elementor-widget-theme-post-content > .elementor-widget-container { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; letter-spacing: normal !important; }
.mj-jn-body :is(p, li, figcaption, blockquote, cite, a, strong, em, b, i, span, td, th) { font-family: inherit; }
.mj-jn-body p, .mj-jn-body li { font-size: inherit; line-height: inherit; font-weight: 400; letter-spacing: normal; }
.mj-jn-body .mj-lede { font-weight: 700; }
.mj-jn-body figcaption { font-size: 14px; line-height: 1.4; }
@media (max-width: 1100px) {
  .mj-jn-body blockquote, .mj-jn-body .wp-block-quote, .mj-jn-body figure, .mj-jn-body .wp-block-image { margin-left: 0 !important; margin-right: 0 !important; }
}
@media (max-width: 767px) {
  .mj-jn-body .mj-lede { font-size: 22px; }
  .mj-jn-body blockquote, .mj-jn-body .wp-block-quote { font-size: 30px; }
}
/* Keep reading: hide it entirely when there's nothing else to read yet */
.mj-jn-more.is-empty { display: none !important; }
/* Links in post text sit on the same line as the words around them */
.mj-jn-body p a .mj-roll, .mj-jn-body li a .mj-roll { height: 1.65em; line-height: 1.65; vertical-align: bottom; }
/* Rolling text: the second line is drawn here rather than repeated in the page */
.mj-roll--css > span { position: relative; }
.mj-roll--css > span::after { content: attr(data-t); content: attr(data-t) / ""; position: absolute; left: 0; top: 100%; white-space: nowrap; color: var(--mj-roll2, currentColor); }

/* Fosters case study: the hero is a device mockup, so show all of it on phones rather than cropping */
@media (max-width: 767px) {
  .postid-2883 .mj-cs-frame { background: #f9f3e5; height: 58vw !important; min-height: 0 !important; }
  .postid-2883 .mj-cs-frame img { object-fit: contain !important; }
}
/* Fosters mockup used as a card image: on phones, frame the headline rather than the middle of the laptop */
@media (max-width: 767px) {
  img[src*="fosters-website-hero"] { object-position: 24% 50% !important; }
  .postid-2883 .mj-cs-frame img[src*="fosters-website-hero"] { object-position: 50% 50% !important; }
}

/* Legal pages: every section open, no accordion */
.mj-legal .mj-sv-faq-a { max-height: none !important; overflow: visible !important; padding-bottom: 28px !important; }
.mj-legal .mj-sv-faq-q::after { display: none !important; }
.mj-legal .mj-sv-faq-q { cursor: default; }
.mj-legal .mj-sv-faq-a a, .mj-legal .mj-jn-lede a { color: var(--mj-blue); text-decoration: underline; text-underline-offset: 3px; }
.mj-legal .mj-jn-lede { max-width: 40ch; }

/* Homepage service panels: plain lists, the button does the linking */
.mj-panel li::after { content: none !important; }
/* Buttons on the lime, orange and white panels go black so they stand out */
.mj-panel ~ .mj-panel .mj-btn { background-color: var(--mj-black) !important; color: var(--mj-white) !important; }
.mj-panel ~ .mj-panel .mj-btn * { color: inherit !important; }

/* Case study quotes stay hidden until real testimonials arrive */
.mj-cs-quote{display:none!important}
