/* NESkills v186 — mobile visual QA corrections */
@media (max-width: 767px) {
  /* The All Courses cards previously kept their CTA absolutely positioned.
     Longer copy could therefore run underneath the link. Keep the CTA in flow. */
  .courses87-page .courses87-core-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 340px !important;
    height: auto !important;
  }

  .courses87-page .courses87-core-card > a {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 44px !important;
    margin-top: auto !important;
    padding: 16px 0 0 !important;
  }

  /* Text CTAs inside sticky cards need a dependable mobile tap area. */
  .mobile-sticky-stack[data-sticky-ready="true"] > * > a:not(.btn),
  .mobile-sticky-stack[data-sticky-ready="true"] > * > button:not(.btn) {
    min-height: 44px;
    align-items: center;
  }

  /* Keep the consent choice usable without covering most of a phone viewport. */
  .analytics-consent {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    max-height: calc(100svh - 24px);
    gap: 12px;
    padding: 16px;
    overflow-y: auto;
    border-radius: 14px;
  }

  .analytics-consent h2 {
    font-size: 16px;
  }

  .analytics-consent p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.48;
  }

  .analytics-consent-actions {
    gap: 8px;
  }

  .analytics-consent-actions button {
    min-height: 44px;
    padding: 9px 13px;
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .mobile-sticky-stack[data-sticky-ready="true"] > * a:not(.btn),
  .mobile-sticky-stack[data-sticky-ready="true"] > * button:not(.btn) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: 8px;
  }
}
