/* 리드마그넷 카드 CTA·팝업 (메인·SEO 페이지 공통) */

/* 카드 CTA */
.nnt-rp-cardcta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
.nnt-rp-cardcta__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand, #e0004d);
}
.nnt-rp-cardcta__text {
  margin: 0;
  flex: 1 1 180px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text, #fff);
}
.nnt-rp-cardcta__link {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand, #e0004d);
  text-decoration: none;
  white-space: nowrap;
}
.nnt-rp-cardcta__link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 슬라이드인 팝업 */
.nnt-rp-pop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card, #111);
  color: var(--text, #fff);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(224, 0, 77, 0.12);
  overflow: hidden;
  transform: translateY(24px);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease,
    visibility 0.35s;
}
.nnt-rp-pop.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
}
/* 팝업이 열려 있는 동안 '맨 위로' 버튼 숨김 */
body:has(.nnt-rp-pop.is-open) .to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* 문의 폼 입력 중에는 팝업이 폼을 가리지 않게 숨김 */
body:has(.contact-form:focus-within) .nnt-rp-pop {
  opacity: 0;
  visibility: hidden;
}
.nnt-rp-pop__thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  -o-object-fit: cover;
     object-fit: cover;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
}
.nnt-rp-pop__body {
  padding: 18px 20px 20px;
}
.nnt-rp-pop__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #ff5c8f;
  background: rgba(224, 0, 77, 0.12);
  border: 1px solid rgba(224, 0, 77, 0.28);
  border-radius: 20px;
  padding: 3px 10px;
}
.nnt-rp-pop__title {
  margin: 10px 0 6px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nnt-rp-pop__desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary, #a0a0a0);
}
.nnt-rp-pop__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  background: var(--brand, #e0004d);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    filter 0.15s,
    box-shadow 0.15s;
}
.nnt-rp-pop__btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 8px 28px rgba(224, 0, 77, 0.25);
}
.nnt-rp-pop__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.72);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.nnt-rp-pop__close:hover {
  background: rgba(10, 10, 10, 0.95);
}
.nnt-rp-pop :focus-visible,
.nnt-rp-cardcta :focus-visible {
  outline: 2px solid #ff5c8f;
  outline-offset: 3px;
}

/* 모바일: 하단 바 */
@media (max-width: 767px) {
  .nnt-rp-pop {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    border-radius: 12px;
  }
  .nnt-rp-pop__thumb {
    display: none;
  }
  .nnt-rp-pop__body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    align-items: center;
    padding: 14px 44px 14px 16px;
  }
  .nnt-rp-pop__tag {
    display: none;
  }
  .nnt-rp-pop__title {
    grid-column: 1;
    margin: 0;
    font-size: 14px;
  }
  .nnt-rp-pop__desc {
    display: none;
  }
  .nnt-rp-pop__btn {
    grid-column: 2;
    grid-row: 1;
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nnt-rp-pop {
    transition: none;
  }
}
