/* ═══════════════════════════════════════════════════════
   GROWTHUP INSIGHTS — Magazine Editorial CSS
   Phase 10 | BLACK × WHITE × MINIMAL
═══════════════════════════════════════════════════════ */

/* ── Page Wrapper ───────────────────────────────────── */
.insights-page {
  background: var(--color-bg, #000);
  color: var(--color-text, #fff);
  min-height: 100vh;
}

/* ── Hero ───────────────────────────────────────────── */
.insights-hero {
  padding: 160px 0 80px;
  border-bottom: 1px solid #262626;
  position: relative;
  overflow: hidden;
}

.insights-hero::before {
  content: "INSIGHTS";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(80px, 15vw, 200px);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #111;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.insights-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12, 48px);
  align-items: end;
}

.insights-hero-label {
  font-size: var(--text-xs, 11px);
  letter-spacing: var(--tracking-wider, 0.15em);
  text-transform: uppercase;
  color: #A0A0A0;
  margin-bottom: var(--space-4, 16px);
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
}

.insights-hero-label::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: #A0A0A0;
}

.insights-hero h1 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  margin: 0 0 var(--space-6, 24px);
}

.insights-hero-desc {
  font-size: var(--text-base, 15px);
  color: #A0A0A0;
  line-height: 1.7;
  max-width: 360px;
  margin-left: auto;
}

.insights-hero-meta {
  display: flex;
  gap: var(--space-8, 32px);
  margin-top: var(--space-8, 32px);
}

.insights-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.insights-hero-stat-num {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
}

.insights-hero-stat-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #A0A0A0;
}

/* ── Filter Bar ─────────────────────────────────────── */
.insights-filter-bar {
  position: sticky;
  top: 64px; /* 헤더 높이 */
  z-index: 50;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #1a1a1a;
}

.insights-filter-inner {
  display: flex;
  gap: 0;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
}

.insights-filter-inner::-webkit-scrollbar {
  display: none;
}

.insights-filter-tab {
  padding: 18px 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #A0A0A0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.insights-filter-tab:hover {
  color: #fff;
}

.insights-filter-tab.active {
  color: #fff;
  border-bottom-color: #fff;
}

/* 구분선 */
.filter-divider {
  width: 1px;
  height: 20px;
  background: #262626;
  flex-shrink: 0;
  margin: 0 4px;
}

/* 주제 필터 (2행) */
.insights-topic-bar {
  background: #0A0A0A;
  border-bottom: 1px solid #1a1a1a;
}

.insights-topic-inner {
  display: flex;
  gap: var(--space-2, 8px);
  align-items: center;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.insights-topic-inner::-webkit-scrollbar {
  display: none;
}

.insights-topic-tag {
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #A0A0A0;
  background: transparent;
  border: 1px solid #333;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.insights-topic-tag:hover,
.insights-topic-tag.active {
  color: #000;
  background: #fff;
  border-color: #fff;
}

/* ── Main Content Grid ──────────────────────────────── */
.insights-content {
  padding: 64px 0 120px;
}

/* ── Magazine Layout ────────────────────────────────── */
.insights-magazine {
  display: grid;
  gap: 2px;
}

/* Featured row — 1 large + 2 small */
.magazine-row {
  display: grid;
  gap: 2px;
  margin-bottom: 2px;
}

.magazine-row--featured {
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 480px;
}

.magazine-row--duo {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 360px;
}

.magazine-row--trio {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 320px;
}

.magazine-row--wide {
  grid-template-columns: 2fr 3fr;
  grid-template-rows: 440px;
}

.magazine-row--list {
  grid-template-columns: 1fr;
  gap: 1px;
}

/* ── Card ────────────────────────────────────────────── */
.insight-card {
  position: relative;
  overflow: hidden;
  background: #0A0A0A;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: #fff;
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  cursor: pointer;
}

.insight-card:hover {
  transform: scale(1.005);
}

.insight-card:hover .card-img {
  transform: scale(1.04);
}

.insight-card:hover .card-arrow {
  transform: translate(3px, -3px);
}

/* 이미지 */
.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}

/* 이미지 없을 때 배경 */
.card-img-placeholder {
  position: absolute;
  inset: 0;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-placeholder svg {
  opacity: 0.15;
}

/* 그라디언트 오버레이 */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.92) 0%,
    rgba(0,0,0,0.5) 40%,
    rgba(0,0,0,0.1) 70%,
    transparent 100%
  );
}

/* 카드 바디 */
.card-body {
  position: relative;
  z-index: 2;
  padding: 24px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.card-source-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
  border-radius: 2px;
}

.card-source-badge--tistory  { border-color: rgba(255,102,0,0.5); color: #ff8533; }
.card-source-badge--blog     { border-color: rgba(0,200,80,0.5); color: #00c850; }
.card-source-badge--instagram { border-color: rgba(193,53,132,0.5); color: #e1306c; }
.card-source-badge--news     { border-color: rgba(100,150,255,0.5); color: #7da4ff; }
.card-source-badge--press    { border-color: rgba(255,220,0,0.5); color: #ffd700; }

.card-date {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
}

.card-title {
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-arrow {
  display: inline-block;
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  transition: transform 0.3s ease, color 0.3s ease;
}

.insight-card:hover .card-arrow {
  color: #fff;
}

/* ── List Row Card (가로형) ─────────────────────────── */
.magazine-row--list .insight-card {
  flex-direction: row;
  align-items: center;
  height: auto;
  min-height: 100px;
  padding: 0;
  border-bottom: 1px solid #1a1a1a;
}

.magazine-row--list .insight-card:hover {
  transform: none;
  background: #0f0f0f;
}

.list-card-thumb {
  width: 120px;
  height: 100px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.list-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-card-body {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: var(--space-6, 24px);
}

.list-card-content {
  flex: 1;
}

.list-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.list-card-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-card-arrow {
  font-size: 20px;
  color: #333;
  transition: color 0.3s, transform 0.3s;
}

.magazine-row--list .insight-card:hover .list-card-arrow {
  color: #fff;
  transform: translate(3px, -3px);
}

/* ── Loading / Empty States ─────────────────────────── */
.insights-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 0;
  gap: var(--space-6, 24px);
}

.insights-loading-dots {
  display: flex;
  gap: 6px;
}

.insights-loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: dotPulse 1.2s ease-in-out infinite;
}

.insights-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.insights-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%            { opacity: 1;   transform: scale(1); }
}

.insights-empty-state {
  padding: 120px 0;
  text-align: center;
}

.insights-empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: var(--space-6, 24px);
  opacity: 0.3;
}

.insights-empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-3, 12px);
}

.insights-empty-state p {
  font-size: 13px;
  color: #A0A0A0;
  line-height: 1.7;
}

.insights-error-bar {
  background: #1a0a00;
  border: 1px solid #3a1a00;
  border-radius: 4px;
  padding: 12px 20px;
  margin-bottom: var(--space-8, 32px);
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  font-size: 12px;
  color: #ff8533;
}

/* ── Load More ──────────────────────────────────────── */
.insights-load-more {
  text-align: center;
  padding: 64px 0 0;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3, 12px);
  padding: 16px 40px;
  border: 1px solid #333;
  background: transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-load-more:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* ── PRESS Manual Section ───────────────────────────── */
.press-section {
  padding: 80px 0 0;
  border-top: 1px solid #262626;
  margin-top: 80px;
}

.press-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
}

.press-section-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.press-notice {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffd700;
  border: 1px solid rgba(255,215,0,0.3);
  padding: 4px 10px;
  border-radius: 2px;
}

/* ── Instagram Manual Cards ─────────────────────────── */
.instagram-section {
  padding: 60px 0 0;
  margin-top: 60px;
  border-top: 1px solid #262626;
}

.instagram-section-header {
  margin-bottom: 32px;
}

.instagram-accounts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.instagram-account-card {
  background: #0A0A0A;
  padding: 32px 24px;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 16px);
  border: 1px solid #1a1a1a;
  transition: background 0.2s, border-color 0.2s;
}

.instagram-account-card:hover {
  background: #111;
  border-color: #333;
}

.ig-account-handle {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #e1306c;
  font-weight: 600;
}

.ig-account-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ig-account-desc {
  font-size: 12px;
  color: #A0A0A0;
  line-height: 1.6;
  flex: 1;
}

.ig-account-cta {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.5;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.instagram-account-card:hover .ig-account-cta {
  opacity: 1;
}

/* ── Pagination / Status ────────────────────────────── */
.insights-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  margin-bottom: 48px;
  font-size: 11px;
  color: #A0A0A0;
  letter-spacing: 0.06em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00c850;
  animation: statusPulse 2s ease-in-out infinite;
  display: inline-block;
  margin-right: 6px;
}

.status-dot--error {
  background: #ff4444;
  animation: none;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .magazine-row--featured {
    grid-template-columns: 1fr;
    grid-template-rows: 400px 320px;
  }

  .magazine-row--wide {
    grid-template-columns: 1fr;
    grid-template-rows: 360px 360px;
  }

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

@media (max-width: 768px) {
  .insights-hero {
    padding: 120px 0 60px;
  }

  .insights-hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8, 32px);
  }

  .insights-hero-desc {
    max-width: 100%;
    margin-left: 0;
  }

  .insights-hero-meta {
    display: none;
  }

  .magazine-row--duo,
  .magazine-row--trio {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .magazine-row--duo .insight-card,
  .magazine-row--trio .insight-card {
    height: 280px;
  }

  .magazine-row--featured {
    grid-template-rows: 340px 260px;
  }

  .magazine-row--featured .insight-card:first-child {
    height: 340px;
  }

  .magazine-row--list .list-card-thumb {
    width: 80px;
    height: 80px;
  }

  .magazine-row--list .list-card-body {
    padding: 16px;
  }

  .instagram-accounts-grid {
    grid-template-columns: 1fr;
  }

  .press-section-header {
    flex-direction: column;
    gap: var(--space-3, 12px);
    align-items: flex-start;
  }

  .insights-filter-tab {
    padding: 16px 16px;
    font-size: 10px;
  }
}

/* ── HOME Preview Section ───────────────────────────── */
.insights-home-preview {
  padding: 100px 0;
  border-top: 1px solid #1a1a1a;
}

.insights-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 48px;
  margin-bottom: 48px;
}

.preview-card {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: #0A0A0A;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.3s ease;
}

.preview-card:hover {
  transform: scale(1.005);
}

.preview-card:hover .preview-card-img {
  transform: scale(1.05);
}

.preview-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.preview-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}

.preview-card-body {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.preview-card-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #A0A0A0;
  margin-bottom: 8px;
  display: block;
}

.preview-card-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preview-card-date {
  font-size: 10px;
  color: #A0A0A0;
  margin-top: 6px;
  display: block;
}

/* 첫 번째 미리보기 카드는 크게 */
.preview-card--featured {
  grid-column: span 2;
  height: 400px;
}

.preview-card--featured .preview-card-title {
  font-size: 20px;
  -webkit-line-clamp: 3;
}

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

  .preview-card--featured {
    grid-column: span 1;
    height: 280px;
  }

  .preview-card {
    height: 240px;
  }
}
