/* =====================================================================
   Floating Reasons Grid — prisha-misuy.co.il /hahzarei-mas/
   Created 2026-05-09
   Inspired by wintax.co.il + finupp.meitavdash.co.il floating-pill UIs.
   21 reasons → 21 colorful icon pills, gently floating, organized in a grid.
   ===================================================================== */

.fr-section {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 100%);
  padding: 50px 24px;
  border-radius: 20px;
  margin: 32px auto;
  max-width: 1100px;
  position: relative;
  overflow: hidden;
}
.fr-section::before {
  content: "";
  position: absolute;
  top: -80px; right: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(201,162,77,0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.fr-section::after {
  content: "";
  position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(11,46,74,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.fr-section-heading {
  text-align: center;
  margin: 0 0 32px;
  position: relative;
  z-index: 2;
}
.fr-section-heading h2 {
  color: #0B2E4A;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  margin: 0 0 8px;
  line-height: 1.25;
}
.fr-section-heading p {
  color: #4b5563;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  margin: 0;
  font-weight: 500;
}

.fr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px 16px;
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
}

/* Each pill button */
.fr-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid rgba(11, 46, 74, 0.08);
  border-radius: 999px;
  text-decoration: none;
  color: #0B2E4A;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 2px 8px rgba(11, 46, 74, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: fr-float 6s ease-in-out infinite;
  will-change: transform;
}
.fr-pill:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 10px 24px rgba(11, 46, 74, 0.18);
  border-color: var(--fr-color, #C9A24D);
}
.fr-pill:focus-visible {
  outline: 3px solid #C9A24D;
  outline-offset: 2px;
}

/* Icon bubble */
.fr-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--fr-bg, rgba(11, 46, 74, 0.08));
  color: var(--fr-color, #0B2E4A);
  transition: transform 0.2s;
}
.fr-pill:hover .fr-icon { transform: scale(1.08) rotate(-3deg); }
.fr-icon svg { width: 22px; height: 22px; }

.fr-label {
  flex: 1;
  line-height: 1.25;
  text-align: right;
}

/* Floating animation — staggered via nth-child */
@keyframes fr-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.fr-pill:nth-child(2n)   { animation-duration: 7s; animation-delay: -0.6s; }
.fr-pill:nth-child(3n)   { animation-duration: 8s; animation-delay: -1.2s; }
.fr-pill:nth-child(4n)   { animation-duration: 6.5s; animation-delay: -2.0s; }
.fr-pill:nth-child(5n)   { animation-duration: 7.5s; animation-delay: -2.6s; }
.fr-pill:nth-child(6n)   { animation-duration: 8.5s; animation-delay: -3.2s; }
.fr-pill:nth-child(7n)   { animation-duration: 6.2s; animation-delay: -3.8s; }
.fr-pill:nth-child(8n)   { animation-duration: 7.8s; animation-delay: -4.4s; }
.fr-pill:nth-child(9n)   { animation-duration: 8.2s; animation-delay: -1.6s; }
.fr-pill:nth-child(10n)  { animation-duration: 6.8s; animation-delay: -5.0s; }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .fr-pill { animation: none !important; }
  .fr-pill:hover { transform: translateY(-2px) !important; }
}

/* Mobile */
@media (max-width: 768px) {
  .fr-section {
    padding: 30px 16px;
    margin: 22px 8px;
    border-radius: 16px;
  }
  .fr-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .fr-pill {
    padding: 11px 13px;
    font-size: 0.84rem;
    gap: 8px;
  }
  .fr-icon { width: 32px; height: 32px; border-radius: 10px; }
  .fr-icon svg { width: 18px; height: 18px; }
}

@media (max-width: 480px) {
  .fr-grid { grid-template-columns: repeat(2, 1fr); }
  .fr-pill { padding: 10px 11px; font-size: 0.8rem; }
}

@media (max-width: 360px) {
  .fr-grid { grid-template-columns: 1fr; }
}
