/* 1446.kr 포털 헤더/푸터 — 그누보드 뉴스 테마 연동 */

body.news1446-site {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f7f8fa;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.news1446-site #hd_login_msg {
  display: none !important;
}

body.news1446-site #hd,
body.news1446-site header#hd {
  display: none !important;
}

body.news1446-site #ft,
body.news1446-site #top_btn {
  display: none !important;
}

body.news1446-site #wrapper {
  flex: 1;
  width: 100%;
  background: #f7f8fa;
}

body.news1446-site #container_wr {
  width: min(1200px, calc(100% - 32px)) !important;
  margin: 0 auto;
  padding: 24px 0 48px;
  box-sizing: border-box;
}

body.news1446-site #container {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

body.news1446-site #aside {
  display: none !important;
}

body.news1446-site .sound_only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px);
}

/* 탑바 확장 */
.news-topbar .topbar-logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.news-topbar .topbar-news-sep {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

.news-topbar .topbar-news-title {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.news-topbar .topbar-news-title:hover {
  color: #dbeafe;
}

.news-topbar .topbar-search {
  display: flex;
  margin-left: auto;
}

.news-topbar .topbar-search .search-box {
  width: 220px;
  max-width: 34vw;
}

.news-topbar .topbar-search-toggle {
  display: none;
}

.news-topbar .topbar-right {
  margin-left: 8px;
}

/* 뉴스 서브헤더: 게시판 탭 + 회원 메뉴 */
.news-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #f0f2f5;
  border-bottom: 1px solid #e0e3e8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.news-subheader .news-category-tabs {
  position: static;
  flex: 1 1 auto;
  min-width: 0;
  border-bottom: none;
}

.news-member-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.news-member-nav a {
  color: #2d3e50;
  text-decoration: none;
  font-weight: 600;
}

.news-member-nav a:hover {
  color: #1e40af;
  text-decoration: underline;
}

.news-member-nav__nick {
  color: #4b5563;
  font-weight: 500;
}

.news-member-nav__sep {
  color: #9aa3ad;
}

.news-member-nav__admin {
  color: #1e40af !important;
}

/* 토글 메뉴 — 뉴스 게시판 카테고리 (상단) */
.news-board-menu-section {
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.news-board-menu-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.news-board-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 16px;
  border: 1px solid #d0d4da;
  background: #fff;
  color: #2d3e50;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.news-board-menu-link:hover {
  border-color: #2d3e50;
  color: #1e40af;
  background: #f8fafc;
}

.news-board-menu-link.active {
  background: #2d3e50;
  border-color: #2d3e50;
  color: #fff;
}

@media (max-width: 768px) {
  .news-topbar {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
  }

  .news-topbar .topbar-logo-group {
    flex: 1 1 auto;
    min-width: 0;
  }

  .news-topbar .topbar-right {
    margin-left: auto;
  }

  .news-topbar .topbar-logo-group .topbar-logo span {
    font-size: 1.2rem;
  }

  .news-topbar .topbar-news-title {
    font-size: 1rem;
  }

  /* 모바일: 기본은 돋보기만, 열리면 탑바 안 2행으로 펼침 (fixed 분리 금지) */
  .news-topbar .topbar-search,
  .news-topbar .topbar-search.news-topbar-search {
    display: none !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
    order: 20;
    margin: 0;
    padding: 10px 0 2px;
    box-sizing: border-box;
    background: transparent;
    box-shadow: none;
    z-index: auto;
  }

  body.search-open .news-topbar .topbar-search,
  body.search-open .news-topbar .topbar-search.news-topbar-search {
    display: flex !important;
  }

  .news-topbar .topbar-search .search-box {
    width: 100%;
    max-width: none;
  }

  .news-topbar .topbar-search-toggle {
    display: inline-flex;
  }

  .news-subheader {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .news-member-nav {
    justify-content: flex-end;
    padding: 8px 12px 10px;
    border-top: 1px solid #e0e3e8;
    background: #eef1f4;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .news-member-nav::-webkit-scrollbar {
    display: none;
  }

  .news-category-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .news-category-tabs::-webkit-scrollbar {
    display: none;
  }

  .news-category-tabs .category-tab {
    flex: 0 0 auto;
  }

  .news-category-tab--account {
    margin-left: 0;
  }
}

/* 본문 영역 — 포털 톤과 맞춤 */
body.news1446-site #container_title {
  color: #2d3e50;
  border-bottom-color: #e0e3e8;
}

body.news1446-site .ha-hero {
  border-radius: 12px;
}

body.news1446-site .ha-btn-primary {
  background: #2d3e50;
}

body.news1446-site .ha-btn-primary:hover {
  background: #1a2533;
}

body.news1446-site .ha-eyebrow,
body.news1446-site .ha-stats strong,
body.news1446-site .ha-banner-link {
  color: #1e40af !important;
}

body.news1446-site .ha-btn-ghost {
  border-color: rgba(255, 255, 255, 0.55);
}

/* 모바일 그누보드 레이아웃 */
body.news1446-site.ha-mobile-site #container {
  padding-top: 0;
}

body.news1446-site.ha-mobile-site #container_wr {
  width: 100% !important;
  padding: 16px 16px 40px;
}

/* PC 버전 보기 — 기본 테마 2em 버튼 대신 푸터에 맞는 작은 링크 */
body.news1446-site #device_change {
  display: block;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 10px auto 28px;
  padding: 6px 12px;
  line-height: 1.3;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #6b7280 !important;
  font-size: 0.8rem !important;
  font-weight: 500;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  box-sizing: border-box;
}

body.news1446-site #device_change:hover {
  color: #374151 !important;
}

/* 상단으로 / 공유 버튼 (1446.kr footer.php 와 동일) */
body.news1446-site .gotop-wrap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99;
}

body.news1446-site .gotop-btn {
  width: 48px;
  height: 47px;
  border-radius: 7px;
  border: none;
  background: #74839eaa;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

body.news1446-site .gotop-btn:hover {
  background: #74839edd;
}

body.news1446-site .dropup {
  position: fixed;
  right: 15px;
  bottom: 73px;
  display: inline-block;
  z-index: 99;
}

body.news1446-site .dropbtn {
  background-color: rgba(255, 255, 255, 0);
  padding: 0;
  border: none;
}

body.news1446-site .dropup-content {
  display: none;
  position: absolute;
  bottom: 50px;
  z-index: 1;
}

body.news1446-site .dropup-content a {
  display: block;
  padding: 0 0 5px;
}

body.news1446-site .dropup:hover .dropup-content {
  display: block;
}

body.news1446-site .share {
  width: 50px;
  height: auto;
  opacity: 0.9;
}
