/*
Theme Name: Latis News
Theme URI: https://news.nodeplugkorea.com
Author: Latis News
Description: Latis News custom news theme
Version: 1.0
*/

* { box-sizing: border-box; }
body {
	margin: 0;
	/* 영문/숫자는 Helvetica Neue로, 한글은 그 폰트에 글리프가 없어서 자동으로 다음 순위인 맑은 고딕 계열로 렌더링됨 */
	font-family: "Helvetica Neue", Arial, -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
	color: #222;
	background: #fff;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid #e5e5e5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 8px; }
.header-left { display: flex; align-items: center; gap: 16px; }
.site-logo { font-size: 26px; font-weight: 800; color: #1C1C28; letter-spacing: -1px; display: flex; align-items: center; }
.site-logo-img { height: 92px; width: auto; display: block; }
.site-logo span { color: #e8433a; }
.main-nav ul { list-style: none; display: flex; gap: 48px; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a { position: relative; font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 29px; font-weight: 550; color: #333333; display: inline-block; padding-bottom: 9px; transition: color .18s ease; }
.main-nav a:hover { text-decoration: none; }
.main-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ccc; transition: height .18s ease; }
.main-nav li.nav-cat-it a::after { background: #2D6CB5; }
.main-nav li.nav-cat-game a::after { background: #EF9B3B; }
.main-nav li.nav-cat-translation a::after { background: #D6473C; }
.main-nav li.nav-cat-it a:hover { color: #2D6CB5; }
.main-nav li.nav-cat-game a:hover { color: #EF9B3B; }
.main-nav li.nav-cat-translation a:hover { color: #D6473C; }
.main-nav li a:hover::after { height: 5px; }
.header-search { display: flex; align-items: center; background: #fff; border-radius: 20px; overflow: hidden; padding: 2px; }
.header-search input { border: none; padding: 8px 14px; font-size: 13px; outline: none; width: 180px; background: transparent; }
.header-search button { border: none; background: #1C1C28; color: #fff; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }

/* Ticker bar */
.ticker-bar { background: #1C1C28; color: #fff; }
.ticker-bar .wrap { display: flex; align-items: center; gap: 14px; padding: 8px 16px; font-size: 13px; }
.ticker-bar .ticker-label { font-weight: 800; color: #ffd23f; flex-shrink: 0; }
.ticker-bar a { color: #e8e8e8; }
.ticker-bar .header-search { flex-shrink: 0; }
.ticker-bar .header-search button { background: #1C1C28; color: #fff; }

/* Breadcrumb */
.breadcrumb { font-size: 14.4px; color: #888; padding: 28px 0 0; }
.breadcrumb a { color: #888; margin: 0 3px; }
.breadcrumb a:first-child { margin-left: 0; }
.breadcrumb a:hover { color: #2D6CB5; }
.breadcrumb .breadcrumb-current { color: var(--cat-color, #252525); font-weight: 700; margin-left: 3px; }
.breadcrumb a.breadcrumb-current:hover { color: #2D6CB5; }

/* Layout: content + sidebar */
.content-layout { display: flex; gap: 28px; padding: 20px 0 50px; align-items: stretch; }
.main-col { flex: 1; min-width: 0; padding-right: 16px; }
.side-col { width: 330px; flex-shrink: 0; border-left: 1px solid #ddd; padding-left: 24px; }

/* Hero (home) */
/* flex의 align-items:stretch 대신 grid를 쓴 이유: hero-thumb의 aspect-ratio로 정해지는 높이에
   맞춰 hero-side가 안정적으로 늘어나게 하려면 grid의 행 높이 계산 방식이 더 확실하게 동작함 */
.hero { display: grid; grid-template-columns: 836px 322px; gap: 10px; background: #fff; margin-top: 28px; }
.hero-main { position: relative; }
.hero-link { display: block; position: relative; color: inherit; }
.hero-link:hover { text-decoration: none; }
.hero-thumb { width: 100%; max-width: 836px; aspect-ratio: 836 / 557; background: #1C1C28; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 30px 30px; background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0)); color: #fff; }
.hero-cat { display: inline-block; background: #1C1C28; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; margin-bottom: 8px; }
.hero-caption .hero-cat { font-size: 14px; }
.hero-caption h2 { display: block; font-size: 32px; line-height: 1.4; margin: 0 0 8px; color: #fff; font-weight: 800; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; transition: text-decoration-color .18s ease, transform .18s ease; transform-origin: left center; }
.hero-link:hover .hero-caption h2 { text-decoration-color: #fff; transform: scale(1.03); }
.hero-caption .meta { font-size: 14px; color: #ddd; }
/* hero-side-item를 hover하면 hero-main 위에 해당 기사의 큰 이미지/제목/날짜 미리보기가 덮어씌워짐 */
/* opacity에 transition을 주면 꺼지는 이전 미리보기와 켜지는 새 미리보기가 겹쳐서 반투명하게 비쳐 보이는
   문제가 생기므로(전환 애니메이션 없이) 즉시 전환되게 함 */
.hero-preview { position: absolute; inset: 0; opacity: 0; visibility: hidden; z-index: 2; }
.hero-preview.active { opacity: 1; visibility: visible; }
.hero-side { position: relative; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.hero-side-item { flex: 1; display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 3px; border: 1px solid rgba(0,0,0,.08); border-left: 3px solid transparent; color: inherit; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .15s ease; }
.hero-side-item:hover { background: #f6f7f9; border-left-color: var(--accent, #1C1C28); box-shadow: 0 6px 16px rgba(0,0,0,.18); transform: translateY(-2px); text-decoration: none; }
.hero-side-thumb { width: 92px; height: 92px; background: #ddd; flex-shrink: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.hero-side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-side-text { flex: 1; min-width: 0; }
.hero-side-item .t { font-size: 15.2px; font-weight: 600; line-height: 1.4; margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Section title */
.section-title { font-size: 24px; font-weight: 600; border-left: 4px solid #1C1C28; padding-left: 10px; margin: 80px 0 22px; }

/* Popular grid */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-card { display: block; background: #fff; border: 1px solid #eee; border-top: 3px solid transparent; color: inherit; transition: box-shadow .18s ease, border-top-color .18s ease, transform .18s ease; }
.grid-card:hover { text-decoration: none; box-shadow: 0 6px 16px rgba(0,0,0,.1); border-top-color: var(--accent, #1C1C28); transform: translateY(-2px); }
.grid-card:hover .t { text-decoration: underline; }
.grid-card .thumb { width: 100%; aspect-ratio: 4/3; background: #cdd6e0; }
.grid-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.grid-card .body { padding: 10px 12px; }
.grid-card .t { font-size: 13px; line-height: 1.4; margin: 4px 0; font-weight: 600; }
.grid-card .d { font-size: 11px; color: #aaa; }

/* 홈 화면 "게임" 최신 뉴스 6개 그리드 (인기뉴스 아래) */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.game-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,.16); border-top-color: transparent; }
.game-card .thumb { overflow: hidden; }
.game-card .thumb img { transition: transform .25s ease; }
.game-card:hover .thumb img { transform: scale(1.06); }
.game-card .body { padding: 16px; box-sizing: border-box; min-height: 119px; }
.game-card .cat-text { display: block; font-size: 13.6px; margin-bottom: 6px; }
.game-card .t { font-size: 16px; line-height: 1.4; margin: 0 0 8px; font-weight: 700; }
.game-card .d { font-size: 13.6px; color: #999; }

/* 홈 화면 "IT 뉴스" 캐러셀 (인기뉴스와 같은 구조 + 전체보기 링크 + 점 인디케이터) */
.section-head-row { display: flex; align-items: center; justify-content: space-between; margin: 80px 0 22px; }
.section-head-row .section-title { margin: 0; }
.section-more { font-size: 14px; font-weight: 600; color: #666; }
.section-more:hover { color: #333; text-decoration: none; }
.it-card { border-radius: 10px; overflow: hidden; }
.it-card .thumb { aspect-ratio: 283 / 159; overflow: hidden; }
.it-card .thumb img { transition: transform .25s ease; }
.it-card:hover .thumb img { transform: scale(1.06); }
.it-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,.16); border-top-color: transparent; }
.it-card .body { padding: 16px; box-sizing: border-box; min-height: 164px; display: flex; flex-direction: column; }
.it-card .t { font-size: 16px; line-height: 1.4; margin: 0 0 8px; font-weight: 700; }
.it-card .x { font-size: 14.4px; line-height: 1.5; color: #777; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.it-card .d { font-size: 13.6px; color: #999; margin-top: auto; }

/* Category list */
.category-head { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 32px; padding-bottom: 16px; border-bottom: 2px solid #CCCCCC; }
.category-title { font-size: 32px; font-weight: 800; margin: 0; }
/* 뷰 전환 탭 프론트 노출 제거 - 요약형만 제공
.view-tabs { display: flex; gap: 8px; }
.view-tab { border: 1px solid #ddd; background: #fff; padding: 6px 14px; font-size: 13px; font-weight: 600; border-radius: 4px; cursor: pointer; color: #666; }
.view-tab.active { background: #1C1C28; color: #fff; border-color: #1C1C28; }
*/

.post-list-item { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid #eee; color: inherit; text-decoration: none; }
.post-list-item:visited { color: inherit; }
.post-list-item:hover { text-decoration: none; }
.post-list-item .thumb { width: 210px; height: 140px; flex-shrink: 0; background: #cdd6e0; overflow: hidden; }
.post-list-item .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .25s ease; }
.post-list-item:hover .thumb img { transform: scale(1.06); }
.post-list-item .body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.post-list-item .body h3 { font-size: 20px; margin: 0 0 8px; color: #000; transition: color .15s ease; }
.post-list-item:hover .body h3 { color: #2D6CB5; }
.post-list-item .body p { font-size: 15px; color: #777; line-height: 1.6; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-list-item .meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #747474; margin-top: auto; }
/* 카테고리 라벨은 latis_cat_text()가 인라인 style로 카테고리별 색을 직접 지정하므로,
   여기서는 !important로 덮어써야 나머지(기자명/날짜)와 동일한 명도(대비 4.68:1)로 통일됨 */
.post-list-item .meta .cat-text { color: #747474 !important; }
.cat-text { font-weight: 400; }
.meta-sep { color: #ddd; }

/* 제목형/포토형 프론트 노출 제거 - 요약형만 기본 제공
.post-list.view-title .post-list-item .thumb { display: none; }
.post-list.view-title .post-list-item .body p { display: none; }
.post-list.view-photo .post-list-item .thumb { width: 220px; height: 150px; }
.post-list.view-photo .post-list-item .body p { display: none; }
*/

/* Sidebar widgets */
.widget-box { margin-bottom: 20px; }
.widget-box h4 { font-size: 22px; font-weight: 800; color: #000; margin: 0; padding: 12px 0; border-top: 3px solid #1C1C28; border-bottom: 1px solid #ccc; }
.widget-list { list-style: disc; margin: 0; padding: 14px 0 0 18px; }
.widget-list li { padding: 6px 0; font-size: 14px; }
.widget-list li a { display: block; color: #000; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-list li a:hover { text-decoration: underline; }

.popular-list { list-style: none; margin: 0; padding: 14px 0 0; display: flex; flex-direction: column; }
.popular-list li { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #eee; }
.popular-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.popular-list .rank { font-size: 18px; font-weight: 800; color: #1C1C28; flex-shrink: 0; width: 18px; }
.popular-list .rank.top { color: #2D6CB5; }
.popular-list li a { font-size: 14px; line-height: 1.5; color: #000; font-weight: 500; }
.popular-list li a:hover { text-decoration: underline; }

/* Single post */
.single-title { font-size: 42px; font-weight: 800; line-height: 1.35; margin: 14px 0 14px; color: #212529; }
.single-meta { display: flex; align-items: center; gap: 10px; font-size: 14.4px; color: #888; padding: 14px 0; border-bottom: 1px solid #eee; margin-bottom: 20px; }
.single-meta .meta-item { display: flex; align-items: center; gap: 5px; }
.single-meta svg { flex-shrink: 0; display: block; color: #aaa; }
.single-meta .author-link { font-weight: 600; }
.single-subtitle { font-size: 18px; font-weight: 700; line-height: 1.7; color: #333; margin: 33px 0 40px; padding-left: 18px; background: none; border-left: 3px solid #1C1C28; }
.single-thumb { margin-bottom: 20px; text-align: center; }
.single-thumb img { max-width: 100%; height: auto; margin: 0 auto; }
.single-content { font-size: 16px; line-height: 1.9; }
.single-content p { margin: 0 0 20px; }
.single-content img { margin: 16px 0; max-width: 100%; height: auto; }
/* 에디터에서 지정한 이미지 정렬 (워드프레스 표준 정렬 클래스) */
.single-content img.alignleft { float: left; margin: 8px 24px 12px 0; }
.single-content img.alignright { float: right; margin: 8px 0 12px 24px; }
.single-content img.aligncenter { margin-left: auto; margin-right: auto; }
.single-content::after { content: ''; display: block; clear: both; }

.single-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; padding-top: 24px; border-top: 1px solid #eee; }
.keyword-chip { display: inline-block; background: #fff; border: 1px solid #e2e4e8; color: #666; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 6px; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.keyword-chip:hover { background: #20b6ae; border-color: #20b6ae; color: #fff; text-decoration: none; }

.single-author-box { display: flex; align-items: center; gap: 14px; margin-top: 32px; padding-top: 24px; border-top: 1px solid #eee; }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; background: #eee; color: #999; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-avatar { transition: transform .18s ease; }
.author-avatar:hover { transform: scale(1.1); }
.author-name { font-size: 16px; font-weight: 700; color: #222; }
.author-name .author-role { font-size: 14px; font-weight: 500; color: #888; margin-left: 8px; }
.author-link { color: inherit; }
.author-link:hover { color: #2D6CB5; text-decoration: underline; }

/* 기자소개 페이지 상단 프로필 박스 */
.author-profile-head { display: flex; align-items: center; gap: 24px; margin: 24px 0 40px; padding: 32px; border: 1px solid #eee; border-radius: 10px; }
.author-profile-avatar { width: 84px; height: 84px; border-radius: 50%; background: #eee; color: #999; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.author-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-profile-info h1 { font-size: 24px; margin: 0 0 6px; }
.author-profile-role { font-size: 14px; font-weight: 700; color: #2D6CB5; margin-bottom: 10px; }
.author-profile-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: #666; }
.author-profile-mail { display: flex; align-items: center; gap: 6px; }
.author-profile-mail svg { color: #999; }
.author-profile-badge { background: #f2f2f5; color: #666; padding: 3px 10px; border-radius: 5px; font-size: 12.5px; }
.author-profile-heading { font-size: 28px; font-weight: 800; color: #252525; margin: 0 0 8px; }
.author-email { font-size: 14px; color: #888; margin-top: 6px; }

.single-related { margin-top: 36px; padding-top: 28px; border-top: 1px solid #eee; }
.single-related h4 { font-size: 20px; font-weight: 800; margin: 0 0 20px; }
.related-articles-list { list-style: none; margin: 0; padding: 0; }
.related-articles-list li { position: relative; padding: 8px 12px 8px 24px; margin: 0 -12px 10px; border-radius: 6px; font-size: 15.5px; transition: background .15s ease; }
.related-articles-list li::before { content: '•'; position: absolute; left: 10px; color: #aaa; }
.related-articles-list li:hover { background: #eef2fc; }
.related-articles-list a { color: #333; }
.related-articles-list li:hover a { color: #3b6fd6; text-decoration: none; }

/* 기사 하단 "주요기사": 최신 기사 6개 썸네일 카드 그리드 */
.headline-section { margin-top: 36px; padding-top: 28px; padding-bottom: 12px; border-top: 1px solid #eee; }
.headline-section h4 { font-size: 24px; font-weight: 800; margin: 0 0 20px; }
.headline-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 20px; }
.headline-card { display: block; color: inherit; background: #fff; border: 1px solid #e5e7eb; transition: box-shadow .18s ease, border-color .18s ease; }
.headline-card:hover { text-decoration: none; box-shadow: 0 10px 24px rgba(0,0,0,.14); border-color: #d8dbe1; }
.headline-thumb { width: 100%; aspect-ratio: 266 / 160; background: #cdd6e0; overflow: hidden; }
.headline-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .25s ease; }
.headline-card:hover .headline-thumb img { transform: scale(1.06); }
.headline-title { padding: 12px; font-size: 15.5px; font-weight: 800; line-height: 1.45; color: #191919; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.headline-card:hover .headline-title { text-decoration: underline; }

@media (max-width: 720px) {
	.headline-grid { grid-template-columns: repeat(2, 1fr); }
}

.site-footer { background: #1C1C28; color: #cdd6e0; margin-top: 40px; }
.site-footer .wrap { padding: 24px 16px; font-size: 13px; text-align: center; }
.footer-info p { margin: 0 0 10px; }
.footer-info p:first-child { padding-top: 8px; }
.footer-info p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
	.content-layout { flex-direction: column; }
	.side-col { width: 100%; }
	.hero { grid-template-columns: 1fr; }
	.hero-side { width: 100%; border-top: 1px solid #eee; }
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
	.grid-3 { grid-template-columns: repeat(2, 1fr); }
	.main-nav ul { gap: 14px; }
	.post-list-item .thumb { width: 120px; }
}

.brand-stripe { height: 4px; background: #000; }

/* 기사 본문에서 여러 이미지를 콜라주로 삽입했을 때의 레이아웃 */
.la-image-collage { display: grid; gap: 4px; margin: 16px 0; overflow: hidden; border-radius: 6px; }
.la-image-collage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.la-image-collage-2 { grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1; }
.la-image-collage-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 9; }
.la-image-collage-3 img:first-child { grid-row: 1 / 3; }
.la-image-collage-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1 / 1; }
.la-image-collage-many { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.la-image-collage-many img { aspect-ratio: 1 / 1; }
.cat-tag, .hero-cat { display: inline-block; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; }


/* 최신뉴스 티커 슬라이드 */
.ticker-slide { position: relative; flex: 1; height: 18px; overflow: hidden; }
.ticker-slide-item { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transition: opacity .9s ease; color: #e8e8e8; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ticker-slide-item.active { opacity: 1; }

/* 인기뉴스 캐러셀 */
.pop-carousel { position: relative; padding: 0 30px; }
.pop-page { display: none; }
.pop-page.active { display: grid; }
.pop-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ddd; background: #fff; cursor: pointer; font-size: 18px; line-height: 1; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.pop-arrow.prev { left: 0; }
.pop-arrow.next { right: 0; }
.pop-arrow:disabled { opacity: .3; cursor: default; }

/* 기사 목록 하단 페이지네이션 (the_posts_pagination) */
.pagination .screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; white-space: nowrap; }
.pagination .nav-links { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 40px 0 10px; }
.pagination .page-numbers { font-size: 15px; color: #999; line-height: 1; }
.pagination a.page-numbers:hover { color: #555; }
.pagination .page-numbers.current { background: #20b6ae; color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 4px; }
.pagination .page-numbers.dots { color: #ccc; }
.pagination a.page-numbers.next, .pagination a.page-numbers.prev { color: #6366f1; font-weight: 600; }
.pagination a.page-numbers.next:hover, .pagination a.page-numbers.prev:hover { color: #4b4fd6; }
