/* ═══════════════════════════════════════
   PROBLEM 섹션 — problem.css (C-2안)
   번호 좌상단 / 아이콘 우상단 크게
   daphone-landing-page
═══════════════════════════════════════ */

/* ── 섹션 기본 ── */
.problem {
  background: var(--black);
  padding: 100px 9%;
}

.problem__head {
  text-align: left;
  margin-bottom: 64px;
}

/* ── 3×2 그리드 ── */
.problem__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ── 카드 ── */
.problem__card {
  background: var(--black3);
  padding: 32px 28px 32px;
  display: grid;
  grid-template-areas:
    'num icon'
    'title title'
    'desc desc';
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: 20px 16px;
  align-items: start;
  border-top: 3px solid rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    background 0.25s ease;

  /* 슬라이드업 초기 상태 */
  opacity: 0;
  transform: translateY(48px);
}

/* 애니메이션 트리거 */
.problem__card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.problem__card:hover {
  border-color: var(--gold);
  background: var(--black4);
}

/* 하단 구분선 */
.problem__card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
}

/* ── 번호 (좌상단) ── */
.problem__num {
  grid-area: num;
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold);
  opacity: 0.55;
  align-self: center;
  transition: opacity 0.25s ease;
}

.problem__card:hover .problem__num {
  opacity: 1;
}

/* ── 아이콘 (우상단 / 크게) ── */
.problem__icon {
  grid-area: icon;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 192, 0, 0.05);
  border: 1px solid rgba(240, 192, 0, 0.1);
  flex-shrink: 0;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.problem__card:hover .problem__icon {
  background: rgba(240, 192, 0, 0.1);
  border-color: rgba(240, 192, 0, 0.4);
  transform: scale(1.05);
}

.problem__icon video {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* ── 구분선 (번호-아이콘 아래) ── */
.problem__divider {
  grid-area: title;
  align-self: start;
}

/* ── 제목 ── */
.problem__title {
  grid-area: title;
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.45;
  word-break: keep-all;
  transition: color 0.25s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
  margin-top: -4px;
}

.problem__card:hover .problem__title {
  color: var(--gold);
}

/* ── 설명 ── */
.problem__desc {
  grid-area: desc;
  font-size: 0.875rem;
  color: var(--gray2);
  line-height: 1.8;
  word-break: keep-all;
}

/* ══════════════════════════════════════
   반응형 — 태블릿 (900px)
══════════════════════════════════════ */
@media (max-width: 900px) {
  .problem {
    padding: 72px 7%;
  }

  .problem__head {
    margin-bottom: 48px;
  }

  .problem__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .problem__card {
    padding: 28px 22px 28px;
  }

  .problem__icon {
    width: 80px;
    height: 80px;
  }

  .problem__icon video {
    width: 52px;
    height: 52px;
  }

  .problem__title {
    font-size: 1rem;
    padding-top: 16px;
  }
}

/* ══════════════════════════════════════
   반응형 — 모바일 (640px)
══════════════════════════════════════ */
@media (max-width: 640px) {
  .problem {
    padding: 60px 5%;
  }

  .problem__head {
    margin-bottom: 36px;
    text-align: left;
  }

  .problem__grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .problem__card {
    padding: 24px 18px;
    gap: 14px 12px;
  }

  .problem__num {
    font-size: 0.88rem;
  }

  .problem__icon {
    width: 68px;
    height: 68px;
  }

  .problem__icon video {
    width: 44px;
    height: 44px;
  }

  .problem__title {
    font-size: 0.98rem;
    padding-top: 14px;
  }

  .problem__desc {
    font-size: 0.84rem;
    line-height: 1.75;
  }

  .problem__card::before {
    left: 18px;
    right: 18px;
  }
}

/* ══ 초소형 (360px) ══ */
@media (max-width: 360px) {
  .problem {
    padding: 52px 4%;
  }

  .problem__card {
    padding: 20px 14px;
  }

  .problem__icon {
    width: 60px;
    height: 60px;
  }

  .problem__icon video {
    width: 38px;
    height: 38px;
  }

  .problem__title {
    font-size: 0.92rem;
  }

  .problem__desc {
    font-size: 0.8rem;
  }
}

/* ════════════════════════════════════════════════════════════════
   [부분 수정] assets/css/sections/problem.css
   ════════════════════════════════════════════════════════════════
   
   기존 problem.css 파일의 맨 아래에 다음 블록을 추가하세요.
   기존 .problem__card 스타일은 손대지 않습니다 (위험 회피).
   modifier 클래스 .problem__card--image 만 추가하여 변경 범위 최소화.
   ════════════════════════════════════════════════════════════════ */

.problem__card--image {
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  position: relative;
}

.problem__card--image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* 호버 시 살짝 확대 (PC만, 모바일에선 효과 없음) */
@media (hover: hover) {
  .problem__card--image {
    transition: transform 0.3s ease;
    cursor: default;
  }
  .problem__card--image:hover {
    transform: translateY(-4px);
  }
  .problem__card--image img {
    transition: transform 0.4s ease;
  }
  .problem__card--image:hover img {
    transform: scale(1.03);
  }
}

/* 모바일에서 카드 사이 간격 살짝 보장 (기존 grid gap에 의존하지 않음) */
@media (max-width: 768px) {
  .problem__card--image {
    margin-bottom: 0;
  }
}
