/* ============================================================
   Canyon / Colorado 커넥터 정보 — 전용 스타일시트
   (style.css 의 공통 변수 및 레이아웃 재사용)
   ============================================================ */

/* ── 페이지 내비게이션 ── */
.page-nav {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.nav-link {
  display: inline-block;
  padding: 6px 18px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 20px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .85rem;
  transition: all .2s;
}
.nav-link:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.nav-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── 커넥터 그리드 ── */
.connector-grid {
  max-width: 1300px;
  margin: 0 auto;
  padding: 16px 24px 60px;
}

/* ── 섹션 ── */
.conn-section {
  margin-bottom: 28px;
}
.conn-section.is-hidden { display: none; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #1F3864;
  background: var(--primary, #1F3864);
  color: #fff;
  border-radius: 10px 10px 0 0;
  border-radius: var(--radius, 10px) var(--radius, 10px) 0 0;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.section-title:hover { background: #2E75B6; background: var(--accent, #2E75B6); }
.section-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.section-icon.component { background: rgba(255,255,255,.18); }
.section-icon.inline    { background: rgba(46,117,182,.5); }
.section-icon.fuse      { background: rgba(237,125,49,.5); }
.section-label { flex: 1; }
.section-label h3 { font-size: .95rem; font-weight: 600; }
.section-label p  { font-size: .75rem; opacity: .7; margin-top: 2px; }
.section-count {
  background: rgba(255,255,255,.2);
  padding: 3px 12px;
  border-radius: 12px;
  font-size: .78rem;
  white-space: nowrap;
}
.section-chevron {
  transition: transform .25s;
  opacity: .7;
}
.section-title.open .section-chevron { transform: rotate(180deg); }

/* ── 카드 리스트 (접힘/펼침) ── */
.conn-card-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
  background: #ffffff;
  background: var(--white, #ffffff);
  border: 1.5px solid #BDD7EE;
  border: 1.5px solid var(--border, #BDD7EE);
  border-top: none;
  border-radius: 0 0 10px 10px;
  border-radius: 0 0 var(--radius, 10px) var(--radius, 10px);
}
.conn-card-list.open {
  max-height: 12000px;
}

/* ── 개별 카드 ── */
.conn-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  padding: 16px;
}

.conn-card {
  background: #f4f6fb;
  background: var(--bg, #f4f6fb);
  border: 1.5px solid #BDD7EE;
  border: 1.5px solid var(--border, #BDD7EE);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  color: #1a1a2e;
  color: var(--text, #1a1a2e);
}
.conn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  border-color: var(--accent);
}
.conn-card.is-hidden { display: none; }

.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.card-code {
  background: #1F3864;
  background: var(--primary, #1F3864);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 700;
  font-family: 'Consolas', 'Monaco', monospace;
  white-space: nowrap;
  flex-shrink: 0;
}
.card-names { flex: 1; min-width: 0; }
.card-ko {
  font-size: .88rem;
  font-weight: 600;
  color: #1a1a2e;
  color: var(--text, #1a1a2e);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-en {
  font-size: .76rem;
  color: #64748b;
  color: var(--text-muted, #64748b);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-note {
  font-size: .68rem;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.card-img-icon {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  background: var(--white);
}

/* ── 퓨즈박스 특수 그리드 (전체 이미지 갤러리) ── */
.fuse-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  padding: 16px;
}
.fuse-thumb {
  aspect-ratio: 4/3;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  background: #fafafa;
}
.fuse-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  border-color: var(--accent);
}
.fuse-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.fuse-label {
  text-align: center;
  font-size: .72rem;
  color: var(--text-muted);
  padding: 4px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

/* ── 모달 네비게이션 (커넥터 전용) ── */
.modal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}
.modal-nav-btn {
  padding: 6px 16px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--primary);
  font-size: .82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.modal-nav-btn:hover {
  background: var(--accent-lt);
  border-color: var(--accent);
}
.modal-nav-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}
.modal-counter {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── 하이라이트 ── */
.conn-card mark {
  background: #fef08a;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* ── 인쇄 ── */
@media print {
  .controls-bar, .cat-nav, .page-nav, .btn-print, footer,
  .modal-overlay, .card-img-icon { display: none !important; }
  .conn-card-list { max-height: none !important; }
  .connector-grid { padding: 0; margin: 0; }
  .conn-card { break-inside: avoid; }
}

/* ── 반응형 ── */
@media (max-width: 768px) {
  .connector-grid { padding: 10px 14px 40px; }
  .conn-cards { grid-template-columns: 1fr; gap: 8px; }
  .fuse-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .card-en { display: none; }
  .card-note { font-size: .62rem; }
}
@media (max-width: 480px) {
  .conn-cards { padding: 10px; }
  .section-title { padding: 10px 14px; }
  .section-label h3 { font-size: .85rem; }
}
