/* Consistent phone behaviour for every card section on the home page.
   Loaded only by templates/index.html. */

/* The hint is a phone-only affordance. */
.rail-hint { display: none; }

@media (max-width: 640px) {
  /* ---------- Industries: same swipe rail as Solutions and Products ---------- */
  #industries.ixc .ixc-grid {
    display: flex;
    grid-template-columns: none;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    padding: 4px 16px 10px;
    margin: 0 -15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  #industries.ixc .ixc-grid::-webkit-scrollbar { display: none; }
  #industries.ixc .ixc-grid .ixc-card { flex: 0 0 78%; scroll-snap-align: start; }

  /* ---------- Resources / About Company: the carousel gets the same peek ----------
     slick already swipes on touch; this just shows part of the next card so the
     gesture is discoverable, and drops the arrows, which are a desktop target. */
  .ixc .ixc-slider .slick-list { padding-right: 15% !important; }
  .ixc .ixc-slider .slick-prev,
  .ixc .ixc-slider .slick-next { display: none !important; }

  /* ---------- Swipe hint ----------
     Shown by CSS alone so it cannot depend on JavaScript; the script only fades
     it out after the row has been swiped. */
  .rail-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 0 !important;
    padding: 0 16px;
    color: #8a8078 !important;
    font-size: 12px !important;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    transition: opacity 0.4s ease;
  }

  .rail-hint.is-done { opacity: 0; }

  .rail-hint i {
    color: #9d2f2f;
    font-size: 13px;
    animation: railNudge 1.6s ease-in-out infinite;
  }

  @keyframes railNudge {
    0%, 100% { transform: translateX(0); opacity: 0.55; }
    50% { transform: translateX(5px); opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .rail-hint i { animation: none; }
}
