/* ========= Reset & Base ========= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* 기본 폰트 크기: 모바일에서도 15px 내외로 고정해서 가독성 확보 */
html {
  font-size: 15px;
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  /* 모바일에서 터치 영역 최소 44px 보장 */
  button,
  a,
  input,
  .card,
  .category-filter-btn {
    min-height: 44px;
  }
}

body {
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  line-height: 1.8;
  color: #1a1a2e;
  background: radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.12), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.1), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08), transparent 60%),
    linear-gradient(135deg, #faf5ff 0%, #f0f9ff 50%, #fef3f2 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
}

/* ========= Header ========= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 245, 255, 0.95));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.08), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* 브랜드: 대문자 변환 제거, 자간 줄여서 자연스럽게 */
.brand {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #1a1a2e;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
}

/* 작은 포인트 아래 라인 */
.brand::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  margin-top: 6px;
  background: linear-gradient(90deg, #8b5cf6, #ec4899, #3b82f6);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  min-height: 36px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
}

.nav a:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
  color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
  transform: translateY(-1px);
}

.nav a:active {
  transform: translateY(0);
}

/* 모바일에서도 헤더는 가로 정렬 유지 + 높이/여백만 줄이기 */
@media (max-width: 768px) {
  .header-inner {
    height: 60px;
    padding: 8px 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .site-header .container {
    padding: 0 18px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand::after {
    width: 36px;
    height: 2.5px;
    margin-top: 5px;
  }

  .nav a {
    padding: 7px 14px;
    min-height: 38px;
    font-size: 0.78rem;
  }
}

/* ========= Hero (메인 상단) ========= */

.hero {
  padding: 32px 0 20px;
}

.hero-inner {
  position: relative;
  border-radius: 28px;
  background: linear-gradient(
    135deg,
    rgba(250, 245, 255, 0.9) 0%,
    rgba(240, 249, 255, 0.9) 50%,
    rgba(254, 243, 242, 0.9) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 28px 24px 30px;
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.12), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.hero-inner::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.25), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.2), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15), transparent 60%);
  opacity: 0.8;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(5%, 5%) scale(1.1);
  }
}

.hero-inner > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 800;
  background: linear-gradient(135deg, #1a1a2e 0%, #4c1d95 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.hero p {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: #374151;
}

/* 검색 폼 */

.search-form {
  max-width: 520px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 8px 8px 8px 16px;
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.1), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  flex: 1;
  color: #1a1a2e;
  transition: all 0.2s ease;
  min-height: 44px;
}

.search-input::placeholder {
  color: #9ca3af;
  opacity: 0.8;
}

.search-input:focus {
  color: #1a1a2e;
}

.search:focus-within {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1), 0 12px 32px rgba(139, 92, 246, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transform: translateY(-1px);
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-btn {
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 10px 20px;
  min-height: 44px;
  color: #ffffff;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #3b82f6 100%);
  background-size: 200% 200%;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
}

.search-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.5), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  filter: brightness(1.05);
  background-position: 100% 0;
}

.search-btn:hover::before {
  opacity: 1;
}

.search-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

@media (max-width: 640px) {
  .hero {
    padding: 24px 0 16px;
  }

  .hero-inner {
    padding: 22px 18px 24px;
    border-radius: 24px;
  }

  .hero h1 {
    margin-bottom: 14px;
  }

  .search {
    padding: 6px 6px 6px 14px;
    border-radius: 14px;
  }

  .search-input {
    font-size: 0.82rem;
    min-height: 42px;
  }

  .search-btn {
    padding: 9px 16px;
    min-height: 42px;
    font-size: 0.78rem;
  }
}

/* ========= 공통 섹션 ========= */

.section {
  padding: 16px 0 8px;
}

@media (max-width: 640px) {
  .section {
    padding: 12px 0 6px;
  }
}

.section-collection {
  padding-top: 18px;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .section-title {
    font-size: 0.9rem;
  }
}

/* ========= 카드 그리드 ========= */

.grid {
  display: grid;
  gap: 16px;
}

@media (max-width: 640px) {
  .grid {
    gap: 14px;
  }
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* 카드 */

.card {
  position: relative;
  padding: 18px 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.15);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.08), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-card {
  display: block;
  height: 100%;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
    background 0.18s ease;
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.link-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.2), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  border-color: rgba(139, 92, 246, 0.4);
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.6), rgba(240, 249, 255, 0.6));
}

.card-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.1));
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.3);
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.6;
}

.ext {
  font-size: 0.95rem;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
  .card {
    padding: 16px 16px 18px;
    border-radius: 18px;
  }

  .card-label {
    padding: 3px 10px;
    font-size: 0.72rem;
    margin-bottom: 8px;
  }

  .card h3 {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .card p {
    display: none;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 14px 14px 16px;
  }

  .grid {
    gap: 12px;
  }
}

/* 검색 결과 헤더 */
.search-results-header {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.8), rgba(240, 249, 255, 0.8));
  border-radius: 18px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.08);
  backdrop-filter: blur(10px);
}

.search-results-count {
  margin: 0 0 14px 0;
  font-size: 0.88rem;
  font-weight: 600;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 카테고리 필터 래퍼 */
.category-filters-wrapper {
  margin-top: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.8), rgba(240, 249, 255, 0.8));
  border-radius: 18px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.08);
  backdrop-filter: blur(10px);
}

/* 카테고리 필터 버튼 */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.category-filter-btn {
  padding: 8px 16px;
  min-height: 36px;
  border-radius: 12px;
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  touch-action: manipulation;
}

.category-filter-btn:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
  color: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.category-filter-btn.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #3b82f6 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

/* 검색어 하이라이트 */
.search-highlight {
  background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
  color: #854d0e;
  box-shadow: 0 1px 3px rgba(133, 77, 14, 0.2);
}

/* 검색 결과 없음 */
.no-results {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #6b7280;
  text-align: center;
  padding: 32px 24px;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.5), rgba(240, 249, 255, 0.5));
  border-radius: 16px;
  border: 1.5px dashed rgba(139, 92, 246, 0.3);
  backdrop-filter: blur(10px);
}

@media (max-width: 640px) {
  .no-results {
    padding: 24px 20px;
    font-size: 0.78rem;
  }
}

/* 스크롤 투 탑 버튼 */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #3b82f6 100%);
  background-size: 200% 200%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  touch-action: manipulation;
  backdrop-filter: blur(10px);
}

.scroll-to-top:not([hidden]) {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  filter: brightness(1.1);
  background-position: 100% 0;
}

.scroll-to-top:active {
  transform: translateY(-2px) scale(1.02);
}

@media (max-width: 640px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 14px;
  }

  .search-results-header {
    padding: 14px 16px;
    margin-bottom: 16px;
  }

  .search-results-count {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  .category-filters-wrapper {
    margin-top: 14px;
    padding: 12px 14px;
  }

  .category-filters {
    gap: 6px;
  }

  .category-filter-btn {
    padding: 7px 14px;
    min-height: 38px;
    font-size: 0.78rem;
  }
}

/* ========= Footer ========= */

.site-footer {
  margin-top: 40px;
  padding: 24px 0 20px;
}

.footer-inner {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 245, 255, 0.9));
  border-radius: 24px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  padding: 20px 22px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  backdrop-filter: blur(10px);
}

.footer-inner .biz strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: #111827;
}

.footer-inner p {
  margin: 0;
  font-size: 0.76rem;
  color: #6b7280;
}

.footer-bottom {
  margin-top: 10px;
  text-align: center;
  font-size: 0.7rem;
  color: #9ca3af;
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
  }
}

/* ========= 블로그 페이지 ========= */

.blog-article {
  max-width: 860px;
  margin: 32px auto 40px;
  padding: 26px 20px 40px;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  word-break: keep-all;
  text-wrap: pretty;
  font-size: 0.92rem;
  line-height: 1.9;
}

/* 상단 제목 */

.blog-title-h2 {
  margin: 0 auto 18px;
  max-width: 72ch;
  font-size: clamp(1.35rem, 1.7rem, 1.85rem);
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

/* 섹션 */

.section-wrap {
  margin: 0 auto 24px;
  max-width: 72ch;
}

.section-title-h2 {
  margin: 32px auto 14px;
  max-width: 72ch;
  font-size: clamp(1.05rem, 1.2rem, 1.3rem);
  font-weight: 700;
  color: #111827;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.08), rgba(14, 165, 233, 0.04));
  border-bottom: 1px solid #e5e7eb;
}

.section-subtitle-h3 {
  margin: 22px auto 8px;
  max-width: 72ch;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2563eb;
}

/* 기본 텍스트 */

.blog-p {
  margin: 10px auto;
  max-width: 72ch;
  font-size: 0.92rem;
  color: #111827;
}

.blog-ul,
.blog-ol {
  margin: 8px auto 10px 1.2rem;
  max-width: 72ch;
  padding-left: 0;
}

.blog-li {
  margin: 4px 0;
  font-size: 0.9rem;
}

/* 구분선 */

.blog-divider {
  margin: 22px auto;
  max-width: 72ch;
  border: 0;
  height: 1px;
  background: #e5e7eb;
}

/* 이미지 & 캡션 */

.blog-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px auto;
  border-radius: 12px;
}

.blog-caption {
  margin: 6px auto 12px;
  max-width: 72ch;
  font-size: 0.8rem;
  text-align: center;
  color: #6b7280;
}

/* ========= 목차 ========= */

.blog-toc-wrap {
  margin: 16px auto 26px;
  max-width: 72ch;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border-radius: 18px;
  padding: 16px 16px 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.blog-toc-title {
  margin: 0 0 8px 2px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
}

.blog-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-toc-item {
  margin: 4px 0;
}

.blog-toc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 12px;
  font-size: 0.86rem;
  color: #111827;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.blog-toc-link:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.blog-toc-index {
  flex: none;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  color: #4f46e5;
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.25);
}

.blog-toc-text {
  flex: 1;
}

/* ========= CTA / 노트 / 쿠팡 ========= */

.cta-box {
  display: block;
  width: 100%;
  max-width: 72ch;
  margin: 26px auto 0;
  padding: 16px 16px 18px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  text-align: center;
  box-sizing: border-box;
}

.cta-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: #4b5563;
}

.cta-button {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 8px auto 4px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 0;
  background: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}

.cta-button-text {
  display: inline-block;
  color: #f9fafb;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

/* 쿠팡 파트너스 안내 */

.coupang-disclosure {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #4b5563;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.08), rgba(34, 211, 238, 0.08));
  padding: 10px 12px;
  margin: 10px auto 22px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  max-width: 72ch;
  box-sizing: border-box;
}

.coupang-disclosure-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
  flex: none;
  margin-right: 2px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* 쿠팡 배너 영역 – 가로 스크롤 없애고 반응형으로 */
.coupang-wrap {
  max-width: 100%;
  margin: 18px auto;
  text-align: center;
  overflow-x: hidden;
}

.coupang-wrap iframe,
.coupang-wrap img {
  display: block;
  max-width: 100%;
  width: 100% !important;
  height: auto;
  margin: 0 auto;
}

/* 노트 박스 */

.note-box {
  margin: 12px auto;
  max-width: 72ch;
  padding: 14px 14px 14px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px dashed #d4d4d8;
  font-size: 0.9rem;
  color: #374151;
  box-sizing: border-box;
}

/* ========= 반응형 (블로그) ========= */

@media (max-width: 768px) {
  .blog-article {
    margin: 26px auto 32px;
    padding: 22px 16px 32px;
    border-radius: 20px;
  }

  .blog-title-h2 {
    font-size: clamp(1.25rem, 1.4rem, 1.5rem);
  }

  .section-title-h2 {
    margin-top: 26px;
  }

  .cta-button {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .blog-article {
    padding: 20px 14px 28px;
  }

  .blog-toc-wrap {
    padding: 12px 12px 10px;
  }

  .note-box {
    padding: 12px 12px;
  }
}
body > ins.adsbygoogle {
  display: block !important;
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}

/* ========= 페이지네이션 ========= */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.pagination-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.pagination-btn:hover:not(:disabled):not(.active) {
  border-color: rgba(139, 92, 246, 0.4);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
  color: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.pagination-btn.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #3b82f6 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: #9ca3af;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .pagination {
    gap: 6px;
    margin-top: 24px;
    padding: 16px 0;
  }

  .pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.8rem;
  }
}

/* 로딩 애니메이션 */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* 검색 히스토리 */
.search-history {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.search-form {
  position: relative;
}

.search-history.show {
  display: block;
}

.search-history-item {
  padding: 12px 18px;
  min-height: 44px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  font-size: 0.85rem;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: space-between;
  touch-action: manipulation;
}

.search-history-item:last-child {
  border-bottom: none;
}

.search-history-item:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(236, 72, 153, 0.05));
  padding-left: 22px;
}

.search-history-item .history-text {
  flex: 1;
}

.search-history-item .history-delete {
  opacity: 0;
  transition: opacity 0.15s ease;
  color: #9ca3af;
  padding: 4px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.search-history-item:hover .history-delete {
  opacity: 1;
}

.search-history-item .history-delete:hover {
  color: #ef4444;
}

.search-history-header {
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  background: #f9fafb;
}

.search-history-clear {
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.search-history-clear:hover {
  background: #e5e7eb;
  color: #374151;
}

/* 스무스 스크롤 */
html {
  scroll-behavior: smooth;
}

/* 섹션 페이드인 애니메이션 */
.section {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
