/* insight.css — 전략/전망 모듈 스타일. 다크핀테크 + 골드 포인트 */

/* ===== 공통 레이아웃 ===== */
.strategy-page, .outlook-page {
  animation: fadeIn .4s ease-out;
}

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

/* 헤더 */
.strategy-header, .outlook-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--line);
}

.strategy-title h1, .outlook-title h1 {
  font-size: 32px;
  margin: 0 0 6px;
  background: linear-gradient(135deg, var(--gold) 0%, #FFE066 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.strategy-title p, .outlook-title p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.strategy-header .btn, .outlook-header .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ===== 탭 ===== */
.strategy-tabs, .outlook-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.tab-btn, .sector-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 14px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
  font-family: var(--font-body);
}

.tab-btn:hover, .sector-btn:hover {
  color: var(--gold);
}

.tab-btn.active, .sector-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ===== 모달 ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg-2);
  z-index: 10;
}

.modal-header h2 {
  font-size: 20px;
  margin: 0;
  flex: 1;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .15s;
}

.modal-close:hover {
  color: var(--txt);
}

.modal-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-form label {
  margin: 0;
  font-weight: 500;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
  font-size: 14px;
}

.modal-form textarea {
  resize: vertical;
  min-height: 200px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.modal-footer .btn {
  flex: 1;
}

/* ===== 전략 카드 (Strategy) ===== */
.strategy-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.strategy-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(255, 196, 61, .05) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.strategy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
  opacity: 0;
  transition: opacity .3s;
}

.strategy-card:hover {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(255, 196, 61, .1) 100%);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(255, 196, 61, .15);
}

.strategy-card:hover::before {
  opacity: 1;
}

.strategy-badge {
  display: inline-block;
  background: var(--gold);
  color: #1a1400;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 4px;
  width: fit-content;
  text-transform: uppercase;
}

.strategy-card h3 {
  font-size: 18px;
  margin: 0;
  line-height: 1.4;
  color: var(--txt);
}

.strategy-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.strategy-meta .author {
  font-weight: 500;
  color: var(--txt);
}

.strategy-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.strategy-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 전망 카드 (Outlook) ===== */
.outlook-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.outlook-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(61, 214, 196, .05) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.outlook-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan) 0%, transparent 100%);
  opacity: 0;
  transition: opacity .3s;
}

.outlook-card:hover {
  border-color: var(--cyan);
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(61, 214, 196, .1) 100%);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(61, 214, 196, .15);
}

.outlook-card:hover::before {
  opacity: 1;
}

.outlook-sector {
  display: inline-block;
  background: rgba(61, 214, 196, .2);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 4px 8px;
  border-radius: 4px;
  width: fit-content;
  text-transform: uppercase;
}

.outlook-card h3 {
  font-size: 18px;
  margin: 0;
  line-height: 1.4;
  color: var(--txt);
}

.outlook-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.outlook-meta .author {
  font-weight: 500;
  color: var(--txt);
}

.outlook-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.outlook-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 페이지네이션 ===== */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.pag-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.pag-btn {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  font-family: var(--font-body);
}

.pag-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.pag-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1400;
  font-weight: 700;
}

/* ===== 빈 상태 ===== */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 16px;
}

/* ===== 반응형 ===== */
@media (max-width: 720px) {
  .strategy-header, .outlook-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .strategy-header .btn, .outlook-header .btn {
    width: 100%;
  }

  .strategy-list, .outlook-list {
    grid-template-columns: 1fr;
  }

  .strategy-tabs, .outlook-tabs {
    gap: 8px;
  }

  .tab-btn, .sector-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .modal-box {
    width: 95%;
  }

  .strategy-card, .outlook-card {
    padding: 14px;
  }

  .strategy-card h3, .outlook-card h3 {
    font-size: 16px;
  }
}
