/*
Theme Name: MJ News
Theme URI: https://media-journalist.com/
Description: MoreNews 기반 자식 테마 — 종합지(중앙일보) 스타일의 레이아웃/색/타이포그래피. 부모(MoreNews) 엔진을 그대로 물려받고 디자인 톤만 덮어씁니다.
Author: Henson Choi
Template: morenews
Version: 0.1.0
Text Domain: mj-news
*/

/* =====================================================================
   디자인 토큰 (중앙일보 분해 리포트 기준)
   ===================================================================== */
:root {
  --mj-accent:      #f6330a;  /* 시그니처 레드 — 속보·링크·강조 */
  --mj-accent-dark: #d62a06;
  --mj-text:        #111111;  /* 제목·본문 메인 */
  --mj-meta:        #666666;  /* 보조·메타 */
  --mj-section-bg:  #f4f5fa;  /* 섹션 구분 배경 */
  --mj-border:      #cdcdcd;  /* 얇은 회색 보더 */
  --mj-serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --mj-sans:  "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

/* =====================================================================
   타이포그래피 — 제목=명조(Serif), 본문=고딕(Sans)
   ===================================================================== */
body,
button, input, select, textarea,
.site-content, p, li {
  font-family: var(--mj-sans);
  color: var(--mj-text);
}

h1, h2, h3, h4,
.entry-title, .post-title,
.site-title,
.widget-title, .block-title,
.section-title {
  font-family: var(--mj-serif);
  font-weight: 600;
  color: var(--mj-text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* 타입 스케일 (리포트: 메타12-13 / 본문14-16 / 부제18-20 / 섹션24 / 톱32) */
.entry-meta, .posted-on, .byline, .post-meta { font-size: 13px; color: var(--mj-meta); }
.site-content p, .entry-content { font-size: 16px; line-height: 1.75; }
.entry-title { font-size: 20px; }
.widget-title, .block-title, .section-title { font-size: 24px; }
.main-featured .entry-title,
.featured-post .entry-title,
.post-thumb-large .entry-title { font-size: 32px; }

/* =====================================================================
   색상 — 흰 배경 + 거의 검정 텍스트 + 단 하나의 레드 포인트
   ===================================================================== */
a { color: var(--mj-text); }
a:hover,
a:focus,
.entry-title a:hover,
.post-title a:hover { color: var(--mj-accent); }

/* 섹션/위젯 제목 좌측 레드 바 — 종합지 특유의 강조 */
.widget-title,
.block-title,
.section-title {
  border-left: 4px solid var(--mj-accent);
  padding-left: 10px;
  margin-bottom: 16px;
}

/* 카테고리 라벨·속보 뱃지 */
.cat-links a,
.category a,
.post-category a {
  color: var(--mj-accent);
  font-family: var(--mj-sans);
  font-weight: 700;
  font-size: 12px;
}

/* 버튼/포인트 배경 */
.btn, button, .more-link, input[type="submit"] {
  background: var(--mj-accent);
  border-color: var(--mj-accent);
  color: #fff;
}
.btn:hover, button:hover, .more-link:hover, input[type="submit"]:hover {
  background: var(--mj-accent-dark);
}

/* =====================================================================
   레이아웃/밀도 — 종합지 고밀도 리스트 느낌
   ===================================================================== */
/* 교차 섹션 배경 */
.home .widget-area .widget:nth-child(even),
.section-alt { background: var(--mj-section-bg); }

/* 리스트 항목 얇은 회색 구분선 */
.post-list li,
.article-list li,
.widget li {
  border-bottom: 1px solid var(--mj-border);
  padding: 10px 0;
}
.post-list li:last-child,
.widget li:last-child { border-bottom: 0; }

/* 본문 가독성: 방문한 링크도 톤 유지 */
.entry-content a { color: var(--mj-accent); text-decoration: none; border-bottom: 1px solid rgba(246,51,10,.35); }
.entry-content a:visited { color: var(--mj-accent-dark); }

/* 내부 페이지 사이트 제목 — WordPress는 첫 페이지만 h1, 나머지는 p 태그 사용.
   p.site-title이 h1.site-title과 동일하게 보이도록 폰트·크기 명시 고정. */
.site-header .site-branding p.site-title {
  font-family: 'Oswald', 'Noto Sans KR', sans-serif;
  font-size: 50px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  text-transform: uppercase;
}

/* 네비게이션 바 — 흰 배경 + 검은 텍스트 + 레드 hover (중앙일보 스타일) */
div#main-navigation-bar {
  background: #ffffff;
  border-bottom: 2px solid var(--mj-accent);
}

#main-navigation-bar .main-navigation ul li,
#main-navigation-bar .main-navigation ul li a {
  font-family: 'Oswald', 'Noto Sans KR', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 19px;
  color: #111111 !important;
}

#main-navigation-bar .main-navigation ul li a:hover {
  color: var(--mj-accent) !important;
}

/* 검색 아이콘 색상도 어두운 색으로 */
#main-navigation-bar .search-watch svg,
#main-navigation-bar .search-watch .search-icon {
  color: #111111;
  fill: #111111;
}

/* ==============================================
   작성자 소개 — 모든 화면 크기에서 중앙 정렬
   ============================================== */

/* "작성자 소개" 제목 + 빨간 세로바 숨김 */
.morenews-author-bio .af-title-subtitle-wrap {
    display: none !important;
}

/* 본문 영역 중앙 정렬 */
.morenews-author-bio .author-box-content {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

.morenews-author-bio .author-box-content .author-avatar {
    margin: 0 auto !important;
}

.morenews-author-bio .author-box-content .author-info {
    text-align: center !important;
    width: 100% !important;
}

.morenews-author-bio .author-website-and-posts {
    justify-content: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

/* ==============================================
   공유 버튼 — 중앙 정렬
   ============================================== */
.addtoany_share_save_container,
.addtoany_content {
    text-align: center !important;
}

.a2a_kit.addtoany_list {
    justify-content: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

/* ==============================================
   기사 상단 버튼 영역 — 줄 바꿈 없이 한 줄 정렬
   (wrapper를 span으로 만들어 inline 유지)
   ============================================== */
#tmj-action-buttons-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    gap: 4px !important;
}

.tmj-action-buttons {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* 카카오채널+ 버튼 — 카카오 노랑 */
a.tmj-kakao-btn {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px 10px !important;
    background: #FEE500 !important;
    color: #3C1E1E !important;
    font-size: 12px !important;
    font-weight: bold !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    border: none !important;
    text-decoration: none !important;
    line-height: 1.8 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

a.tmj-kakao-btn:hover,
a.tmj-kakao-btn:visited {
    color: #3C1E1E !important;
    background: #F7E000 !important;
    text-decoration: none !important;
}

/* 북마크 · 링크복사 아이콘 버튼 — 기본 button 빨강 스타일 리셋 */
.tmj-bookmark-btn,
.tmj-copy-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    background: #f0f2f5 !important;
    color: #555 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    padding: 0 !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.tmj-bookmark-btn:hover,
.tmj-copy-btn:hover {
    background: #e4e6ea !important;
    color: #333 !important;
}

.tmj-bookmark-btn.bookmarked {
    background: #e3f2fd !important;
    color: #1565c0 !important;
}

/* 모바일 최적화: 버튼 영역 간격 */
@media (max-width: 480px) {
    .tmj-sub-inline-btn {
        padding: 3px 8px !important;
        font-size: 11px !important;
    }
    a.tmj-kakao-btn {
        padding: 3px 8px !important;
        font-size: 11px !important;
    }
}

/* ==============================================
   날짜 상단 바 + 라이브 버튼 숨김
   ============================================== */
.top-header { display: none !important; }
.custom-menu-link { display: none !important; }

/* ==============================================
   기사 본문 위 구분선 (날짜·읽기시간 아래)
   ============================================== */
.single-post .read-single > .color-pad:not(.aft-post-excerpt-and-meta),
.single .read-single > .color-pad:not(.aft-post-excerpt-and-meta) {
    border-top: 1px solid #cdcdcd;
    padding-top: 1.5em;
    margin-top: 0.5em;
}

/* =====================================================================
   푸터 위젯 영역 배경 투명 처리 (흰 배경 제거)
   ===================================================================== */
.primary-footer-area .widget-area.color-pad,
.primary-footer-area .color-pad {
  background: transparent !important;
  background-color: transparent !important;
}

/* =====================================================================
   푸터 위젯 흰 카드 배경·그림자 제거 (morenews-widget 클래스 덮어쓰기)
   ===================================================================== */
.aft-default-mode footer.site-footer .morenews-widget,
footer.site-footer .morenews-widget {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* =====================================================================
   푸터 메뉴 (.footer-menu) — .widget li의 테두리·패딩 리셋
   모든 항목이 "정정·반론보도 정책"(마지막 항목)처럼 테두리 없이 표시
   ===================================================================== */
.footer-menu li {
  border-bottom: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* =====================================================================
   푸터 법정기재사항 — 모든 텍스트 흰색 강제
   (body p { color:#111 } 규칙이 div 인라인 color 상속을 덮어쓰므로 !important 필요)
   ===================================================================== */
footer.site-footer .morenews-widget p,
footer.site-footer .morenews-widget strong,
footer.site-footer .morenews-widget div,
footer.site-footer .morenews-widget span,
footer.site-footer .morenews-widget a {
  color: #ffffff !important;
}

/* =====================================================================
   더미디어저널리스트 창간스토리 박스 — 사이드바 타이포그래피 위젯
   PC·모바일 동일 스타일
   ===================================================================== */
.tmj-launch-box {
  background: #0e0e0e;
  padding: 36px 24px 32px;
  text-align: center;
  font-family: var(--mj-sans);
  border-top: 4px solid var(--mj-accent);
  box-sizing: border-box;
  width: 100%;
}
.tmj-launch-tag {
  display: inline-block;
  background: var(--mj-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 4px 14px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.tmj-launch-ko {
  font-family: var(--mj-serif);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.tmj-launch-en {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #777777;
  margin: 0 0 22px;
  text-transform: uppercase;
}
.tmj-launch-hr {
  border: none;
  border-top: 1px solid rgba(246,51,10,0.5);
  margin: 0 auto 22px;
  width: 40px;
}
/* 슬로건 3줄 */
.tmj-launch-lines { margin-bottom: 20px; }
.tmj-ll1 {
  font-family: var(--mj-serif);
  font-size: 15px;
  font-weight: 600;
  color: #eeeeee;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  line-height: 1.5;
}
.tmj-ll2 {
  font-size: 13px;
  color: #bbbbbb;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.tmj-ll3 {
  font-size: 13px;
  color: #bbbbbb;
  margin: 0;
  letter-spacing: 0.01em;
}
/* 버전 정보 */
.tmj-launch-ver {
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.tmj-launch-ver p {
  font-size: 12px;
  color: #888888;
  margin: 0 0 4px;
  letter-spacing: 0.04em;
  font-family: var(--mj-sans);
}
.tmj-launch-ver p:last-child { margin: 0; }
/* 마지막 문장 */
.tmj-launch-closing {
  font-size: 11px;
  color: #555555;
  line-height: 1.7;
  margin: 0;
  letter-spacing: 0.01em;
}
/* 모바일 — 사이드바가 한 칸으로 내려올 때도 동일하게 */
@media (max-width: 768px) {
  .tmj-launch-box { padding: 32px 20px 28px; }
  .tmj-launch-ko  { font-size: 20px; }
  .tmj-ll1        { font-size: 14px; }
}

/* =====================================================================
   모바일 푸터 최적화
   ===================================================================== */
@media (max-width: 600px) {
  .footer-menu {
    gap: 6px 10px !important;
  }
  .footer-menu a {
    font-size: 11px !important;
  }
  footer.site-footer .footer-first-widgets-section {
    padding: 16px 14px !important;
  }
}
