/*
Theme Name:   Healthlife Herald
Theme URI:    https://www.healthlifeherald.com
Description:  헬스라이프헤럴드 전용 테마. 모터진(GeneratePress 기반) 레이아웃을 설치형 단일 테마로 옮긴 것. 첫 화면·카테고리 목록·기사 화면이 별도 플러그인 없이 동작한다.
Author:       Healthlife Herald
Version:      1.0.2
Requires at least: 6.5
Requires PHP: 8.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  healthlife

assets/css/gp-*.css, assets/js/menu.min.js·back-to-top.min.js·modal.js 는 GeneratePress(GPLv2+, Tom Usborne)에서 가져왔다.
*/

/* ── 상단 바: 내릴 때 숨고 올릴 때 나타남 ───────────────── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 500;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header.hlh-scrolled { box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.2); }
.site-header.hlh-hide { transform: translateY(-110%); }

/* 로고 이미지가 없을 때 글자 로고 */
.main-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.main-title a { text-decoration: none; }

/* ── 기사 화면 ───────────────────────────────────────── */
.breadcrumb { font-size: 13px; color: #6b7280; margin-bottom: 10px; }
.breadcrumb a { color: #6b7280; text-decoration: none; }
.breadcrumb a:hover { color: #111827; }
.breadcrumb .sep { margin: 0 6px; color: #c0c4cc; }

.entry-subtitle {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.5;
	color: #4b5563;
	margin: 6px 0 14px;
	word-break: keep-all;
}

.entry-meta .meta-icon { width: 12px; height: 12px; fill: currentColor; margin-right: 4px; vertical-align: -1px; }
.entry-meta .byline { margin-right: 14px; }

/* 공유 버튼 */
.hlh-share { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; }
.hlh-share a,
.hlh-share button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 32px;
	padding: 0 12px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #fff;
	color: #374151;
	font-size: 12px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
}
.hlh-share a:hover,
.hlh-share button:hover { border-color: #9ca3af; color: #111827; }
.hlh-share .hlh-copied { border-color: #2563eb; color: #2563eb; }

/* 기자 소개 */
.hlh-author-box {
	display: flex;
	gap: 16px;
	align-items: center;
	margin: 30px 0 20px;
	padding: 18px 20px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #f9fafb;
}
.hlh-author-box img { border-radius: 50%; flex-shrink: 0; }
.hlh-author-box .hlh-author-name { font-weight: 700; font-size: 15px; }
.hlh-author-box .hlh-author-name a { color: #111827; text-decoration: none; }
.hlh-author-box .hlh-author-desc { font-size: 13px; color: #6b7280; margin: 4px 0 0; }

/* ── 사이드바 ────────────────────────────────────────── */
.hlh-popular { list-style: none; margin: 0; padding: 0; counter-reset: hlhpop; }
.hlh-popular li {
	counter-increment: hlhpop;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 0;
	border-bottom: 1px solid #f3f4f6;
	margin: 0;
}
.hlh-popular li:last-child { border-bottom: 0; }
.hlh-popular li::before {
	content: counter(hlhpop);
	flex-shrink: 0;
	width: 20px;
	font-weight: 800;
	font-size: 16px;
	color: #2563eb;
	line-height: 1.4;
}
.hlh-popular a { color: #111827; text-decoration: none; font-size: 14px; line-height: 1.45; word-break: keep-all; }
.hlh-popular a:hover { color: #2563eb; }

/* ── 목록이 비었을 때 / 404 ──────────────────────────── */
.hlh-empty { padding: 60px 20px; text-align: center; color: #6b7280; }
.hlh-empty h1 { font-size: 24px; color: #111827; margin-bottom: 10px; }
.hlh-empty .search-form { max-width: 420px; margin: 20px auto 0; display: flex; gap: 6px; }
.hlh-empty .search-form input[type="search"] { flex: 1; }

/* ── 하단 발행정보(hlh-imprint)를 모터진 푸터 색으로 ─────── */
.site-footer .hlh-imprint {
	background: #272735 !important;
	color: #b8b8c8 !important;
	border-top: 0 !important;
	padding: 28px 16px !important;
}
.site-footer .hlh-imprint a { color: #fff !important; text-decoration: none; }
.site-footer .hlh-imprint strong { color: #fff; }

/* ── 모바일 첫 화면: 작은 기사 4개 제목이 위로 잘리지 않게 (모터진 원본에도 있던 문제) ── */
@media (max-width: 768px) {
	.hlgp-hero-sub .hlgp-hero-overlay { padding: 8px 10px; }
	.hlgp-hero-sub .hlgp-badge { display: none; }
	.hlgp-hero-sub-title { font-size: 14px; -webkit-line-clamp: 2; margin: 0 0 2px; }
	.hlgp-hero-sub .hlgp-date { font-size: 11px; }
}
