/* Swipeable homepage cards on phones. Desktop layouts stay in their section styles. */
@media (max-width: 700px) {
  .fl25-home .fl26-lifecycle-grid,
  .figma-lio.fl27-home .fl27-benefits-v2 .fl27-benefit-grid,
  .figma-lio.fl27-home .fl-resources .fl-resource-posts {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    width: 100vw;
    max-width: none;
    margin: 0 0 0 calc(50% - 50vw) !important;
    padding: 0 20px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .fl25-home .fl26-lifecycle-grid::-webkit-scrollbar,
  .figma-lio.fl27-home .fl27-benefits-v2 .fl27-benefit-grid::-webkit-scrollbar,
  .figma-lio.fl27-home .fl-resources .fl-resource-posts::-webkit-scrollbar {
    display: none;
  }

  .fl25-home .fl26-lifecycle-grid > .fl26-lifecycle-card,
  .figma-lio.fl27-home .fl27-benefits-v2 .fl27-benefit-grid .fl27-benefit-card,
  .figma-lio.fl27-home .fl-resources .fl-resource-posts > .wp-block-post {
    flex: 0 0 min(84vw, 360px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  /* Flatten the desktop pairs into one continuous six-card rail. */
  .figma-lio.fl27-home .fl27-benefits-v2 .fl27-benefit-row {
    display: contents;
  }
  .figma-lio.fl27-home .fl27-benefits-v2 .fl27-benefit-grid .fl27-benefit-row > .fl27-benefit-card {
    height: clamp(360px, 110vw, 440px) !important;
    aspect-ratio: auto !important;
  }

  .figma-lio.fl27-home .fl-resources .fl-resource-posts > .wp-block-post:first-child {
    grid-row: auto;
  }
}
