/* ===========================
   insights.css — web-renewal insights/page.tsx 디자인을 블로그 목록(/blog/)에 이식
   실데이터(Post/Category) 기반. renewal.css의 공통 클래스(.section-*, .r-*)를 재사용하고
   인사이트 전용 규칙만 여기에 둔다.
   =========================== */

/* ── 페이지 컨테이너 ── */
.insights {
  --insights-navy: #0d1b3e;
  --insights-orange: #ff7900;
  --insights-border: #c7cbce;
}

/* ── Hero ── */
.insights-hero {
  background-color: var(--insights-navy);
  position: relative;
  overflow: hidden;
  height: 579px;
}

.insights-hero__blob {
  position: absolute;
  right: 110px;
  top: 0;
  width: 686px;
  height: 890px;
  mix-blend-mode: color-dodge;
  transform: rotate(180deg);
  pointer-events: none;
}
.insights-hero__blob img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insights-hero__vec {
  position: absolute;
  left: 71.7%;
  top: 186px;
  width: 557px;
  height: 405px;
  pointer-events: none;
}

.insights-hero__illust {
  position: absolute;
  left: 61.4%;
  top: 78px;
  width: 651px;
  height: 484px;
  z-index: 1;
  pointer-events: none;
}

.insights-hero__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 200px 24px 0;
  position: relative;
  z-index: 2;
}

.insights-hero__title {
  font-size: 80px;
  font-weight: 800;
  color: #fff;
  line-height: 92px;
  letter-spacing: -1.5px;
  margin: 0;
}

.insights-hero__lead {
  font-size: 20px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  line-height: 33px;
  margin: 21px 0 0;
}

/* ── 카테고리 탭 바 ── */
.insights-tabs {
  background-color: var(--insights-navy);
  position: relative;
}

.insights-tabs__inner {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--insights-border);
}

.insights-tabs__shadow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 13px 25px 0 rgba(0, 0, 0, 0.15);
}

/* 탭 = 실제 카테고리 링크(전체 새로고침). 디자인의 button 룩을 a로 재현 */
.insights-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 47px;
  padding: 0 70px;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  opacity: 0.4;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.28px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.insights-tab:last-child {
  border-right: none;
}
.insights-tab:hover {
  opacity: 0.7;
}
.insights-tab.is-active {
  opacity: 1;
  font-weight: 800;
}

/* ── 검색 바 ── */
.insights-search-wrap {
  background-color: #fff;
}
.insights-search {
  max-width: 1440px;
  margin: 0 auto;
  padding: 60px 24px 0;
}
.insights-search__form {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.insights-search__input {
  width: 100%;
  padding: 18px 56px 18px 24px;
  border-radius: 14px;
  border: 0.88px solid var(--insights-border);
  background: #fff;
  font-size: 18px;
  color: #111;
  transition: box-shadow 0.2s, border-color 0.2s;
  font-family: inherit;
}
.insights-search__input::placeholder {
  color: #9aa0a6;
}
.insights-search__input:focus {
  outline: none;
  border-color: var(--insights-orange);
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.15);
}
.insights-search__submit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #9aa0a6;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.2s;
}
.insights-search__submit:hover {
  color: var(--insights-orange);
}
.insights-search__loading {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa0a6;
}
/* JS가 .hidden 토글로 패널/로딩을 제어한다. Tailwind CDN에 의존하지 않도록 자체 정의 */
.insights-search__suggestions.hidden,
.insights-search__loading.hidden {
  display: none;
}

.insights-search__suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  width: 100%;
  background: #fff;
  border: 1px solid #eef0f1;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(13, 27, 62, 0.12);
  z-index: 50;
  overflow: hidden;
}
.insights-suggest-item {
  display: block;
  padding: 12px 18px;
  text-decoration: none;
  transition: background-color 0.15s;
}
.insights-suggest-item:hover {
  background-color: #fff3e8;
}
.insights-suggest-item__title {
  font-weight: 600;
  color: #111;
}
.insights-suggest-item__snippet {
  font-size: 14px;
  color: #6b7177;
  margin-top: 2px;
}
.insights-suggest-item__meta {
  font-size: 12px;
  color: #9aa0a6;
  margin-top: 2px;
}
.insights-suggest-empty {
  padding: 12px 18px;
  font-size: 14px;
  color: #6b7177;
}
.insights-suggest-error {
  padding: 12px 18px;
  font-size: 14px;
  color: #e11d48;
}

/* ── 카드 그리드 영역 ── */
.insights-body {
  background-color: #fff;
}
.insights-body__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 60px 24px 140px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 15px;
  row-gap: 25px;
}

/* ── 카드 ── */
.insights-card {
  background-color: #fff;
  border: 0.88px solid var(--insights-border);
  border-radius: 14px;
  padding: 30.88px 25.88px;
  display: flex;
  flex-direction: column;
  gap: 35px;
  transition: box-shadow 0.2s;
}
.insights-card:hover {
  box-shadow: 0 12px 30px rgba(13, 27, 62, 0.12);
}

.insights-card__media {
  height: 227px;
  background-color: #b7b7b7;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #999;
}
.insights-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insights-card__body {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.insights-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.insights-card__tag {
  display: inline-block;
  background-color: var(--insights-orange);
  color: #fff;
  border-radius: 22px;
  padding: 5px 18px;
  font-size: 16px;
  font-weight: 600;
  line-height: 30px;
}

.insights-card__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insights-card__title {
  font-size: 34px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.48px;
  line-height: 44px;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.insights-card__title a {
  color: inherit;
  text-decoration: none;
}
.insights-card__title a:hover {
  color: var(--insights-orange);
}
.insights-card__desc {
  font-size: 20px;
  font-weight: 400;
  color: rgba(42, 42, 42, 0.72);
  line-height: 33px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.insights-card__date {
  font-size: 20px;
  font-weight: 500;
  color: #2a2a2a;
  line-height: 33px;
}

/* ── 빈 상태 / 상태 메시지 ── */
.insights-empty {
  text-align: center;
  color: #999;
  padding: 80px 0;
  font-size: 18px;
}

/* ── 페이지네이션 ── */
.insights-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 35px;
}
.insights-pagination__item {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--insights-border);
  background: transparent;
  font-size: 20px;
  font-weight: 600;
  color: #222;
  line-height: 33px;
  text-decoration: none;
}
.insights-pagination__item.is-active {
  border-color: var(--insights-orange);
  color: var(--insights-orange);
}
.insights-pagination__arrow {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  text-decoration: none;
  color: #222;
}

/* ── 반응형 ── */
@media (max-width: 1024px) {
  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .insights-hero__illust,
  .insights-hero__vec,
  .insights-hero__blob {
    display: none;
  }
}

@media (max-width: 768px) {
  .insights-hero {
    height: auto;
    min-height: 0;
  }
  .insights-hero__inner {
    padding: 100px 24px 60px;
  }
  .insights-hero__title {
    font-size: 44px;
    line-height: 52px;
    letter-spacing: -0.8px;
  }
  .insights-hero__lead {
    font-size: 16px;
    line-height: 26px;
  }
  .insights-tabs__inner {
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    min-height: 80px;
  }
  .insights-tab {
    flex-shrink: 0;
    height: 40px;
    padding: 0 28px;
    font-size: 18px;
  }
  .insights-body__inner {
    padding: 40px 16px 80px;
  }
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .insights-card__title {
    font-size: 24px;
    line-height: 32px;
  }
  .insights-card__desc,
  .insights-card__date {
    font-size: 16px;
    line-height: 24px;
  }
}
