/* =========================================================
   Bene Child Theme - 매거진형 홈 스타일
   ========================================================= */

:root {
	--bene-navy: #1b2430;
	--bene-navy-2: #262f3d;
	--bene-red: #e6353b;
	--bene-amber: #f2b807;
	--bene-green: #1f9d68;
	--bene-blue: #2e6fdb;
	--bene-text: #222831;
	--bene-muted: #7a8290;
	--bene-border: #eceef1;
	--bene-bg: #f7f8fa;
}

body {
	background: #fff;
	color: var(--bene-text);
}

.bene-home a, .bene-related a { text-decoration: none; color: inherit; }

/* ---------- 상단 유틸바 ---------- */
.bene-top-bar {
	background: #fff;
	border-bottom: 1px solid var(--bene-border);
	font-size: 12px;
}
.bene-top-bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 20px;
}
.bene-top-links ul { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.bene-top-links a { color: var(--bene-muted); }
.bene-top-links a:hover { color: var(--bene-red); }
.bene-top-date { color: var(--bene-muted); }

/* ---------- 헤더 / 내비게이션 (GP 요소 재스타일) ---------- */
.site-header,
.site-header .inside-header {
	background: var(--bene-navy);
}
.site-header .site-title,
.site-header .site-title a {
	color: #fff;
	font-weight: 800;
	letter-spacing: -0.02em;
}
.site-header .site-description { color: #b7bec9; }

.main-navigation,
.main-navigation .inside-navigation,
.main-navigation .main-nav ul li a {
	background: var(--bene-navy-2);
	color: #fff;
}
.main-navigation .main-nav ul li a { font-weight: 600; }
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item > a {
	color: var(--bene-red);
	background: var(--bene-navy-2);
}
.main-navigation .menu-toggle { background: var(--bene-navy-2); color: #fff; }

/* ---------- 공통 배지 ---------- */
.bene-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 3px;
	color: #fff;
	margin-bottom: 6px;
}
.badge-red   { background: var(--bene-red); }
.badge-navy  { background: var(--bene-navy); }
.badge-green { background: var(--bene-green); }
.badge-amber { background: var(--bene-amber); color: #3a2b00; }
.badge-blue  { background: var(--bene-blue); }

/* ---------- 섹션 공통 헤더 ---------- */
.bene-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	border-bottom: 3px solid var(--bene-navy);
	padding-bottom: 10px;
	margin: 40px 0 18px;
}
.bene-section-head h2 {
	font-size: 21px;
	font-weight: 800;
	margin: 0;
}
.bene-section-date,
.bene-more-link { font-size: 13px; color: var(--bene-muted); }
.bene-more-link:hover { color: var(--bene-red); }
.bene-empty { color: var(--bene-muted); padding: 20px 0; }

/* ---------- 히어로 ---------- */
.bene-hero {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 18px;
	margin-top: 22px;
}
.bene-hero-main-link { display: block; position: relative; }
.bene-hero-thumb { position: relative; display: block; overflow: hidden; border-radius: 6px; }
.bene-hero-thumb img { width: 100%; height: auto; object-fit: cover; display: block; aspect-ratio: 16 / 9; }
.bene-top-story {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--bene-amber);
	color: #3a2b00;
	font-weight: 800;
	font-size: 11px;
	padding: 3px 9px;
	border-radius: 3px;
}
.bene-hero-body { display: block; padding: 14px 4px 0; }
.bene-hero-title {
	display: block;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.3;
	margin-bottom: 8px;
}
.bene-hero-main-link:hover .bene-hero-title { color: var(--bene-red); }
.bene-hero-excerpt { display: block; color: var(--bene-muted); font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.bene-hero-meta { display: block; color: var(--bene-muted); font-size: 12px; }

.bene-hero-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.bene-hero-card { display: block; }
.bene-hero-card-thumb { display: block; border-radius: 6px; overflow: hidden; }
.bene-hero-card-thumb img { width: 100%; height: auto; object-fit: cover; display: block; aspect-ratio: 16 / 9; }
.bene-hero-card-body { display: block; padding-top: 8px; }
.bene-hero-card-title {
	display: block;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.4;
}
.bene-hero-card:hover .bene-hero-card-title { color: var(--bene-red); }

/* ---------- 2단 구성 (최신 발행 글 / 인기글) ---------- */
.bene-split {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
	align-items: start;
}

.bene-latest-list { display: flex; flex-direction: column; gap: 22px; }
.bene-latest-item { display: flex; align-items: flex-start; gap: 16px; }
.bene-latest-thumb { flex-shrink: 0; width: 180px; border-radius: 6px; overflow: hidden; }
.bene-latest-thumb img { width: 100%; height: auto; object-fit: cover; display: block;  aspect-ratio: 4 / 3;}
.bene-latest-body { display: flex; flex-direction: column; }
.bene-latest-title { font-size: 17px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.bene-latest-item:hover .bene-latest-title { color: var(--bene-red); }
.bene-latest-excerpt { color: var(--bene-muted); font-size: 13.5px; line-height: 1.6; margin-bottom: 6px; }
.bene-latest-meta { color: #a4abb5; font-size: 12px; }

/* 인기글 */
.bene-trend-list { list-style: none; margin: 0 0 20px; padding: 0; }
.bene-trend-list li { border-bottom: 1px solid var(--bene-border); }
.bene-trend-list li:first-child { border-top: 1px solid var(--bene-border); }
.bene-trend-list a { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.bene-trend-rank { font-size: 19px; font-weight: 800; color: #c7cbd1; width: 28px; flex-shrink: 0; }
.bene-trend-rank.is-top { color: var(--bene-red); }
.bene-trend-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.bene-trend-list a:hover .bene-trend-title { color: var(--bene-red); }

.bene-split { margin-bottom: 60px; }

/* ---------- 본문(단일글) ---------- */
.single .entry-header .entry-title { font-size: 30px; line-height: 1.4; }
.single .entry-content { font-size: 17px; line-height: 1.9; }
.single .entry-content h2 {
	font-size: 21px;
	font-weight: 800;
	margin: 42px 0 16px;
}

.single .entry-content img { border-radius: 6px; }

.bene-related { margin-top: 50px; border-top: 3px solid var(--bene-navy); padding-top: 20px; }
.bene-related-title { font-size: 18px; font-weight: 800; margin: 0 0 16px; }
.bene-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bene-related-item { display: block; }
.bene-related-thumb { display: block; border-radius: 6px; overflow: hidden; }
.bene-related-thumb img { width: 100%; height: auto; object-fit: cover; display: block; aspect-ratio: 16 / 9; }
.bene-related-text { display: block; padding-top: 8px; }
.bene-related-heading { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.bene-related-item:hover .bene-related-heading { color: var(--bene-red); }

/* ---------- 푸터 ---------- */
.site-footer, .site-footer .footer-bar { background: var(--bene-navy); color: #b7bec9; }
.bene-footer { padding: 40px 20px 24px; }
.bene-footer-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 16px;
	border-bottom: 1px solid #333f4f;
	padding-bottom: 20px;
	margin-bottom: 16px;
}
.bene-footer-title { color: #fff; font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.bene-footer-desc { margin: 0; font-size: 13px; color: #9aa2ae; }
.bene-footer-links ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; }
.bene-footer-links a { font-size: 13px; color: #b7bec9; }
.bene-footer-links a:hover { color: #fff; }
.bene-footer-copy { font-size: 12px; color: #7d8694; margin: 0; }

/* ---------- 반응형 ---------- */
@media (max-width: 782px) {
	.bene-hero { grid-template-columns: 1fr; }
	.bene-hero-grid { grid-template-columns: 1fr 1fr; }
	.bene-split { grid-template-columns: 1fr; }
	.bene-related-grid { grid-template-columns: 1fr 1fr; }
	.bene-latest-thumb { width: 120px; }
	.bene-footer-top { flex-direction: column; }
}

/* Screenshot corrections: valid cards, readable navigation, bounded article image. */
.bene-home, .bene-home *, .bene-related, .bene-related * { box-sizing: border-box; }
.bene-hero > *, .bene-hero-grid > *, .bene-split > *, .bene-latest-body { min-width: 0; }
.bene-hero-grid { align-content: start; }
.bene-badge { width: fit-content; align-self: flex-start; line-height: 1.5; }
.bene-home a:hover, .bene-related a:hover { color: var(--bene-red); }
.bene-home a:focus-visible, .bene-related a:focus-visible { outline: 2px solid var(--bene-blue); outline-offset: 4px; }
.site-header .main-title a, .site-header .main-title a:visited { color: #fff; }
.main-navigation .main-nav ul li > a,
.main-navigation .main-nav ul li > a:visited,
.main-navigation .menu-bar-items a { color: #fff; }
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus-within > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a { color: #ffd24b; background: var(--bene-navy-2); }
.single-post :is(.post-image, .featured-image) { text-align: center; }
.single-post :is(.post-image, .featured-image) img { width: min(100%, 460px); height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 8px; }
.single-post .inside-article, .single-post .comments-area { max-width: 960px; margin-inline: auto; }
.single-post .entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.bene-related-thumb img { object-fit: cover; background: var(--bene-bg); aspect-ratio: 16 / 9; }
@media (max-width: 540px) {
 .bene-home .grid-container { padding-left: 16px; padding-right: 16px; }
 .bene-hero-thumb img { height: auto; aspect-ratio: 16 / 9; }
 .bene-hero-card-thumb img { height: auto; aspect-ratio: 16 / 9; }
 .bene-hero-title { font-size: 22px; }
 .bene-latest-thumb { width: 100px; }
 .bene-latest-thumb img { height: auto;  aspect-ratio: 4 / 3;}
 .bene-latest-title { font-size: 16px; }
 .bene-latest-excerpt { display: none; }
 .bene-section-date { display: none; }
 .single-post .inside-article { padding: 24px 18px; }
 .single-post .entry-header .entry-title { font-size: 25px; }
 .single-post :is(.post-image, .featured-image) img { width: min(100%, 320px); }
}


/* Same ranked list in the sidebar and in block widgets. */
.bene-popular-widget { color: var(--bene-text); width: 100%; }
.bene-popular-widget .bene-popular-widget-title { font-size: 23px; font-weight: 700; line-height: 1.4; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 3px solid var(--bene-navy); }
.bene-popular-widget .bene-trend-list { list-style: none; margin: 0; padding: 0; }
.bene-popular-widget .bene-trend-list li { margin: 0; padding: 0; }
.bene-popular-widget .bene-trend-list a { color: var(--bene-text); text-decoration: none; }
.bene-popular-widget .bene-trend-title { overflow-wrap: anywhere; min-width: 0; }
.bene-popular-widget .bene-trend-list a:focus-visible { outline: 2px solid var(--bene-blue); outline-offset: 2px; }

/* Category and search pages. Separate classes avoid changing article content. */
.bene-listing { padding: 24px; background: #fff; }
.bene-listing .bene-listing-header { margin-bottom: 24px; padding: 24px; border-left: 5px solid var(--bene-red); border-radius: 0 8px 8px 0; background: var(--bene-bg); }
.bene-listing-label { margin: 0 0 8px; color: var(--bene-red); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.bene-listing-header h1 { margin: 0 0 12px; font-size: 28px; font-weight: 800; color: var(--bene-navy); overflow-wrap: anywhere; }
.bene-listing-count, .bene-listing-description { font-size: 14px; color: #626b78; }
.bene-listing-count { margin-bottom: 0; }
.bene-listing .bene-listing-card { display: flex; gap: 22px; align-items: flex-start; padding: 24px 0; margin: 0; border-bottom: 1px solid var(--bene-border); }
.bene-listing .bene-listing-image { display: block; flex: 0 0 180px; }
.bene-listing .bene-listing-image img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.bene-listing-body { flex: 1; min-width: 0; }
.bene-listing .bene-listing-title { margin: 0 0 10px; font-size: 23px; font-weight: 800; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.bene-listing-title a { color: var(--bene-navy); text-decoration: none; }
.bene-listing-title a:hover { color: var(--bene-red); }
.bene-listing-excerpt { margin: 0 0 10px; color: #626b78; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.bene-listing-date { color: var(--bene-muted); font-size: 13px; }
.bene-listing .search-form { display: flex; gap: 8px; margin-top: 18px; }
.bene-listing .search-form label { flex: 1; min-width: 0; }
.bene-listing .search-field { box-sizing: border-box; width: 100%; height: 46px; border: 1px solid #dce0e6; border-radius: 6px; }
.bene-listing .search-submit { flex-shrink: 0; height: 46px; padding: 0 16px; white-space: nowrap; border-radius: 6px; background: var(--bene-navy); color: #fff; }
.bene-listing .pagination { margin-top: 28px; }
.bene-listing .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.bene-listing .page-numbers { display: inline-block; padding: 8px 13px; border: 1px solid var(--bene-border); border-radius: 6px; text-decoration: none; color: var(--bene-navy); }
.bene-listing .page-numbers.current, .bene-listing a.page-numbers:hover { background: var(--bene-navy); color: #fff; }
.bene-listing a:focus-visible, .bene-listing input:focus-visible, .bene-listing button:focus-visible { outline: 2px solid var(--bene-blue); outline-offset: 3px; }
.bene-listing-empty { padding: 32px 0; }
.bene-listing-empty h2 { font-size: 22px; font-weight: 700; }
@media (max-width: 600px) {
 .bene-listing { padding: 18px; }
 .bene-listing .bene-listing-header { padding: 18px; }
 .bene-listing-header h1 { font-size: 24px; }
 .bene-listing .bene-listing-card { flex-direction: column; gap: 16px; }
 .bene-listing .bene-listing-image { flex: none; width: 100%; }
 .bene-listing .bene-listing-title { font-size: 21px; }
}

/* Category layout matches the homepage latest-post list. */
.category .bene-listing .bene-category-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 3px solid var(--bene-navy); padding-bottom: 10px; margin-bottom: 18px; }
.category .bene-category-heading h1 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.4; color: var(--bene-text); }
.category .bene-category-heading > span { flex-shrink: 0; font-size: 13px; color: var(--bene-muted); }
.category .bene-listing-items { display: flex; flex-direction: column; gap: 22px; }
.category .bene-listing .bene-listing-card { flex-direction: row; gap: 16px; padding: 0; border: 0; background: transparent; }
.category .bene-listing .bene-listing-image { flex: 0 0 180px; width: 180px; }
.category .bene-listing .bene-listing-image img { border-radius: 6px; }
.category .bene-listing .bene-listing-title { font-size: 17px; font-weight: 700; line-height: 1.4; margin: 0 0 4px; }
.category .bene-listing-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0 0 6px; font-size: 13.5px; line-height: 1.6; color: var(--bene-muted); }
.category .bene-listing-date, .category .bene-listing-author { color: #a4abb5; font-size: 12px; }
@media (max-width: 782px) {
 .category .bene-listing .bene-listing-image { flex-basis: 120px; width: 120px; }
}
@media (max-width: 540px) {
 .category .bene-listing .bene-listing-image { flex-basis: 100px; width: 100px; }
 .category .bene-category-heading > span { display: none; }
 .category .bene-listing .bene-listing-title { font-size: 16px; }
 .category .bene-listing-excerpt { display: none; }
}

/* Center pagination and align the desktop columns at their lower edge. */
:is(.category, .search) .bene-listing .pagination {
 width: 100%;
 box-sizing: border-box;
 padding-top: 28px;
 margin-top: 0;
 margin-bottom: 0;
}
:is(.category, .search) .bene-listing .pagination .nav-links {
 display: flex;
 justify-content: center;
 align-items: center;
 flex-wrap: wrap;
 gap: 8px;
}
@media (min-width: 769px) {
 :is(.category, .search) .site-content { display: flex; align-items: stretch; }
 :is(.category, .search) .content-area { display: flex; flex-direction: column; }
 :is(.category, .search) .content-area > .site-main { display: flex; flex-direction: column; flex: 1; }
 :is(.category, .search) .bene-listing { display: flex; flex-direction: column; flex: 1; }
 :is(.category, .search) .bene-listing .pagination { margin-top: auto; }
}
