/* ============================
   Benefit Section (고급형 개량판)
   ============================ */

/* 전체 섹션 */
.benefit-section {
  width: 100%;
  padding: 20px 0;
  background: #fafafa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

/* 컨테이너 */
.benefit-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 12px;
  text-align: center;
}

/* 제목 */
.benefit-title {
  font-size: 26px;
  font-weight: 800;
  color: #222;
  margin-bottom: 36px;
  position: relative;
  display: inline-block;
}

.benefit-title::after {
  content: "";
  display: block;
  margin: 10px auto 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #7b34ff, #b28dff);
  border-radius: 3px;
}

/* 카드 레이아웃 */
.benefit-grid {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

/* 카드 */
.benefit-card {
  flex: 1;
  background: #fff;
  border-radius: 14px;
  padding: 26px 20px;
  position: relative;
  overflow: hidden;
  border: 0.6px solid rgba(210, 210, 210, 0.38);

  /* 노이즈 */
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aW...");
  background-size: 140px;

  transition: transform .25s, box-shadow .25s;
}

/* 얇은 그라데이션 테두리 */
.benefit-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 0.3px; /* ❗ 테두리 훨씬 얇게 */
  background: linear-gradient(135deg, #7b34ff, #b28dff);
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.14; /* 과하지 않게 */
  pointer-events: none;
}

/* hover */
@media (hover: hover){
  .benefit-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  }
}

/* ======================
   아이콘 애니메이션
   ====================== */

/* 아이콘 기본 */
.benefit-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;

  filter: invert(24%) sepia(62%) saturate(3500%)
          hue-rotate(238deg) brightness(86%) contrast(92%);

  opacity: 0;
  transform: translateY(14px) rotate(0deg);
}

/* 등장 + 흔들림 효과 */
.benefit-card.show .benefit-icon {
  animation: iconPop .65s ease-out forwards,
             iconWiggle 1.8s ease-in-out infinite 0.7s; /* ❗흔들림 */
}

/* 등장 (위→원래자리) */
@keyframes iconPop {
  0% { transform: translateY(14px) scale(0.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* 살짝 흔들리는 wiggle */
@keyframes iconWiggle {
  0%   { transform: translateY(0) rotate(0deg); }
  25%  { transform: translateY(-2px) rotate(1deg); }
  50%  { transform: translateY(0) rotate(0deg); }
  75%  { transform: translateY(-2px) rotate(-1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* 카드 텍스트 */
.benefit-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: #333;
  margin-bottom: 8px;
}

.benefit-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* 등장 애니메이션 */
.fade-bene {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(3px);
  transition: all .65s cubic-bezier(.21,.44,.15,1.01);
}

.fade-bene.show {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* 모바일 */
/* 모바일: 가로 스크롤 + 슬라이드 */
@media (max-width: 768px){
  .benefit-grid {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth; /* 자동 슬라이드 부드럽게 */
  }

  .benefit-card {
    min-width: 100%;        /* 화면 꽉 차게 */
    scroll-snap-align: start;
  }

  .benefit-grid::-webkit-scrollbar {
    display: none;
  }
}


/* 모바일 dots */
@media (max-width:768px){
  .benefit-dots {
    display: flex;
    justify-content: center;
    margin-top: 14px;
    gap: 6px;
  }

  .benefit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d5d5d5;
    transition: background .3s, transform .3s;
  }

  .benefit-dot.active {
    background: #7b34ff;
    transform: scale(1.32);
  }
}
