/* ═══ template7/sub.css ════════════════════════════
 * 서브(sub) 페이지 전용 스타일
 * 투명 헤더 오버레이 + 오렌지 액센트
 * 서브 배너 + 탭바 + 콘텐츠 + 다른 기사
 * ═══════════════════════════════════════════════ */

/* ─── 서브 배너 ───────────────────────────────── */

.sub-banner {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: var(--dark-surface);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
}

.sub-banner__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--dark-surface-2);
}

.sub-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 9, 62, 0.65) 0%,
    rgb(0 0 0 / 52%) 100%);
  );
}

/* 오렌지 좌측 강조선 */
.sub-banner__overlay::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--orange);
}

.sub-banner__text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px 40px;
}

.sub-banner__section {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-banner__section::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--orange);
}

.sub-banner__title {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.3;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
  word-break: keep-all;
  max-width: 720px;
}

.sub-banner__subtitle {
  font-size:1.4rem;
  font-weight: 500;
  color: white;
  margin: 4px 0 0;
}

.sub-banner__desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  max-width: 560px;
  word-break: keep-all;
}

/* ─── 탭 바 (2depth) ─────────────────────────── */

.tab-bar {
  background: #ffffff;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 100;
}

.tab-bar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-bar__inner::-webkit-scrollbar { display: none; }

.tab-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  height: 52px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-sub);
  white-space: nowrap;
  letter-spacing: 0.1px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--ease), border-color var(--ease);
}

.tab-btn:hover { color: var(--ink); }

.tab-btn.is-active {
  color: var(--orange);
  font-weight: 800;
}

/* ─── 손자탭 (3depth) ─────────────────────────── */

.subtab-bar {
  background: black;
}

.subtab-bar.is-hidden { display: none; }

.subtab-bar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 2px;
}

.subtab-bar__inner::-webkit-scrollbar { display: none; }

.subtab-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #c5c5c5;
  white-space: nowrap;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color var(--ease), background var(--ease);
}

.subtab-btn:hover { color: white; background: rgba(0,0,0,0.04); }

.subtab-btn.is-active {
  color: white;
  font-weight: 800;
}


/* ─── 콘텐츠 본문 영역 ────────────────────────── */

.sub-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 78px 32px 64px;
}


@keyframes spin { to { transform: rotate(360deg); } }

/* ─── 다른 기사 섹션 ─────────────────────────── */

.other-section {
  background: #1a1a1a;
  padding: 52px 0;
}

.other-section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.other-section__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.2px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}


/* 썸네일 — 모든 카드의 이미지 높이 동일하게 (aspect-ratio 16:9 + cover) */
.other-card__thumb {
  aspect-ratio: 2 / 2.1;
  overflow: hidden;
  border-radius: var(--radius-sm, 4px);
}
.other-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 부제 — 두 줄 말줄임 + 한국어 단어 단위 줄바꿈(keep-all) */
.other-card__subtitle {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  color:white;
  margin-top: 10px;
  line-height: 1.3;
}
.other-card__subtitle:empty { display: none; }

.other-section__title::before {
  content: '';
  display: block;
  width: 24px;
  height: 3px;
  background: var(--orange);
}

/* 다른 기사 탭 */
.other-section__tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.other-tab-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.other-tab-btn:hover { color: #ffffff; border-color: rgba(255, 255, 255, 0.3); }
.other-tab-btn.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #ffffff;
}

/* 다른 기사 카드 목록 */
.other-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.other-cards { display: none; }
.other-cards.is-active { display: grid; }

.other-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}

.other-card:hover {
  background: black;
  border-color: var(--orange);
}

.other-card__body{
  padding: 10px 0px;
}
.other-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
  word-break: keep-all;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

  .content-title-pre{
    background: #dcf0f8;
    font-size: 1.3rem;
    padding: 10px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
  }
  .ta-center {
    text-align: center;
    font-size:1.4rem;
  }
/* ─── 반응형 ───────────────────────────────────── */

@media (max-width: 1024px) {
  .other-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .sub-banner { height: 300px; }
  .sub-banner__text { padding: 0 20px 32px; }
  .tab-bar__inner { padding: 0px; justify-content: center; }
  .subtab-bar__inner { padding: 0 16px; }
  .sub-content { padding: 32px 16px 48px; }
  .other-section { padding: 36px 0; }
  .other-section__inner { padding: 0 16px; }
  .other-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .other-cards { grid-template-columns: 1fr; }
}
