/* css/company.css */

.industry-hub-wrapper {
  background-color: #ffffff;
  color: #0f172a;
}

/* Category menu list styling */
.category-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  background-color: transparent;
  text-align: left;
  font-weight: 700;
  color: #64748b;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.category-btn:hover {
  background-color: #f8fafc;
  color: #0f172a;
  padding-left: 1.75rem;
}

.category-btn.active {
  background-color: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
}

/* Directory Tree Branch layout */
.tree-container {
  border-left: 2px dashed #e2e8f0;
  padding-left: 1.5rem;
  margin-left: 0.5rem;
}

/* 트리 내 이모지 아이콘 흑백(모노톤) 처리 — 다크 슬레이트 톤앤매너 유지 */
.tree-node,
.tree-sub-node {
  filter: grayscale(1);
}

.tree-node {
  position: relative;
  margin-bottom: 2rem;
}

.tree-node::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  left: -1.5rem;
  width: 1.25rem;
  height: 2px;
  background-color: #e2e8f0;
}

.tree-sub-node {
  position: relative;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
}

.tree-sub-node::before {
  content: '';
  position: absolute;
  top: 0.6rem;
  left: 0;
  width: 1rem;
  height: 2px;
  background-color: #cbd5e1;
}

/* Panel display toggles */
.industry-panel {
  display: none;
  opacity: 0;
}

.industry-panel.active {
  display: block;
  animation: organicFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Organic staggered animation for tree nodes (sliding left to right) */
.industry-panel.active .tree-node {
  opacity: 0;
  animation: organicSlideInNode 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.industry-panel.active .tree-node:nth-child(1) { animation-delay: 0.04s; }
.industry-panel.active .tree-node:nth-child(2) { animation-delay: 0.10s; }
.industry-panel.active .tree-node:nth-child(3) { animation-delay: 0.16s; }
.industry-panel.active .tree-node:nth-child(4) { animation-delay: 0.22s; }

/* Sub-node cascade delays */
.industry-panel.active .tree-sub-node {
  opacity: 0;
  animation: organicSlideInSubNode 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.industry-panel.active .tree-node:nth-child(1) .tree-sub-node:nth-child(1) { animation-delay: 0.08s; }
.industry-panel.active .tree-node:nth-child(1) .tree-sub-node:nth-child(2) { animation-delay: 0.14s; }
.industry-panel.active .tree-node:nth-child(1) .tree-sub-node:nth-child(3) { animation-delay: 0.20s; }

.industry-panel.active .tree-node:nth-child(2) .tree-sub-node:nth-child(1) { animation-delay: 0.14s; }
.industry-panel.active .tree-node:nth-child(2) .tree-sub-node:nth-child(2) { animation-delay: 0.20s; }

@keyframes organicFadeIn {
  from {
    opacity: 0;
    transform: translateX(-15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes organicSlideInNode {
  from {
    opacity: 0;
    transform: translateX(-25px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes organicSlideInSubNode {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Custom Table for SEO / GEO */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

.comparison-table th {
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 700;
  padding: 1rem 1.25rem;
  text-align: left;
  border: 1px solid #1e293b;
}

.comparison-table td {
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.6;
}

.comparison-table tr:nth-child(even) {
  background-color: #f8fafc;
}

/* =========================================
   [Mobile] 디렉토리 트리 뱃지 줄바꿈 처리 (1023px 이하)
   좁은 화면에서 라벨+뱃지가 한 줄에 몰려 뱃지가 찌그러지거나
   넘치는 현상 방지 — 라벨 아래로 뱃지가 깔끔히 줄바꿈되게.
   ========================================= */
@media (max-width: 1023px) {
  .tree-node > a,
  .tree-sub-node > a {
    flex-wrap: wrap;
    row-gap: 0.4rem;
  }

  .tree-node > a > span,
  .tree-sub-node > a > span {
    flex-shrink: 0;
    margin-left: 0;
    white-space: nowrap;
  }
}
