/*
 * ニュースサイト型デザイン（Yahoo!ニュースの一覧構造 × FLASH の赤黒・太字）
 * 色・ヘッダー構成などの基本は SWELL 設定（05_WordPress/setup/swell-settings.json）側で指定し、
 * ここではニュース用の部品と SWELL 標準部品の微調整だけを書く。
 */

:root {
	--news-red: #d7000f;
	--news-red-dark: #a8000c;
	--news-black: #111111;
	--news-text: #111111;
	--news-muted: #666666;
	--news-time: #8a8a8a;
	--news-border: #e3e3e3;
	--news-bg: #f2f2f2;
	--news-surface: #ffffff;
	--news-yellow: #ffe100;
	--news-gap: 16px;
}

/* ------------------------------------------------------------ 共通部品 */

.news-cat {
	display: inline-block;
	padding: 2px 6px;
	background: var(--news-red);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .02em;
}

.news-time {
	color: var(--news-time);
	font-size: 12px;
	font-weight: 400;
	white-space: nowrap;
}

.news-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 0 4px;
	background: var(--news-yellow);
	color: var(--news-black);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.6;
	vertical-align: 2px;
}

.news-thumb {
	position: relative;
	display: block;
	overflow: hidden;
	background: #ddd;
}

.news-thumb--wide {
	aspect-ratio: 16 / 9;
}

.news-thumb--square {
	aspect-ratio: 1 / 1;
}

.news-thumb__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s;
}

a:hover .news-thumb__img {
	transform: scale(1.03);
}

.news-thumb__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #999;
	font-size: 12px;
	font-weight: 700;
}

.news-section {
	margin-top: 20px;
	padding: 0 16px 16px;
	background: var(--news-surface);
}

.news-section__title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 0 -16px 12px;
	padding: 10px 16px 8px;
	border-top: 4px solid var(--news-red);
	border-bottom: 1px solid var(--news-border);
	font-size: 18px;
	font-weight: 900;
	line-height: 1.4;
}

.news-section__more {
	color: var(--news-muted);
	font-size: 12px;
	font-weight: 400;
	text-decoration: none;
}

.news-section__more::after {
	content: " ›";
}

.news-front a,
.news-ranking a {
	color: var(--news-text);
	text-decoration: none;
}

.news-front a:hover .news-lead__title,
.news-front a:hover .news-headlines__text,
.news-front a:hover .news-card__title,
.news-front a:hover .news-catblock__title,
.news-ranking a:hover .news-ranking__title {
	color: var(--news-red);
	text-decoration: underline;
}

/* ------------------------------------------------------------ 速報ティッカー（SWELL お知らせバーを上書き） */

.c-infoBar.news-ticker {
	background: var(--news-black);
	color: #fff;
	font-size: 13px;
}

.news-ticker__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 36px;
}

.news-ticker__label {
	flex-shrink: 0;
	padding: 1px 8px;
	background: var(--news-yellow);
	color: var(--news-black);
	font-size: 12px;
	font-weight: 900;
}

.news-ticker__viewport {
	flex: 1;
	overflow: hidden;
	min-width: 0;
}

.news-ticker__track {
	display: flex;
	gap: 40px;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
	animation: news-ticker 30s linear infinite;
}

.news-ticker__track:hover {
	animation-play-state: paused;
}

.news-ticker__track li {
	white-space: nowrap;
}

.news-ticker__track a {
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.news-ticker__track a:hover {
	text-decoration: underline;
}

.news-ticker__track .news-time {
	margin-left: 8px;
	color: #bbb;
}

@keyframes news-ticker {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.news-ticker__track {
		animation: none;
	}
}

/* ------------------------------------------------------------ トップページ */

.news-front .l-mainContent__inner {
	padding-top: 16px;
}

.news-top {
	background: var(--news-surface);
}

.news-lead__link {
	display: block;
}

.news-lead__body {
	padding: 12px 16px 14px;
}

.news-lead__title {
	margin: 8px 0 6px;
	font-size: 22px;
	font-weight: 900;
	line-height: 1.45;
}

.news-headlines {
	padding: 0 16px 8px;
}

.news-headlines__title {
	margin: 0 -16px;
	padding: 10px 16px 8px;
	border-top: 4px solid var(--news-red);
	border-bottom: 1px solid var(--news-border);
	font-size: 18px;
	font-weight: 900;
}

.news-headlines__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-headlines__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--news-border);
}

.news-headlines__item:last-child {
	border-bottom: 0;
}

.news-headlines__item a {
	flex: 1;
	min-width: 0;
}

.news-headlines__text {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

.news-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-card__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 8px 0 4px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.news-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.news-catblock__first {
	display: block;
}

.news-catblock__title {
	margin: 8px 0 0;
	font-size: 16px;
	font-weight: 900;
	line-height: 1.5;
}

.news-catblock .news-headlines {
	padding: 0;
}

.news-empty {
	padding: 40px 16px;
	background: var(--news-surface);
	text-align: center;
}

/* ------------------------------------------------------------ ランキング */

.news-ranking {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.news-ranking__item {
	border-bottom: 1px solid var(--news-border);
}

.news-ranking__item:last-child {
	border-bottom: 0;
}

.news-ranking__item a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
}

.news-ranking__rank {
	flex-shrink: 0;
	width: 26px;
	color: var(--news-muted);
	font-size: 20px;
	font-weight: 900;
	font-style: italic;
	text-align: center;
}

.news-ranking__item:nth-child(-n+3) .news-ranking__rank {
	color: var(--news-red);
}

.news-ranking__title {
	flex: 1;
	min-width: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
}

.news-ranking__item--thumb .news-thumb {
	flex-shrink: 0;
	width: 64px;
}

/* SP はトップの本文内にランキングを出し、サイドバーは出さない */
.news-section--sp-ranking .news-section__title {
	margin-bottom: 0;
}

.home .l-sidebar {
	display: none;
}

/* ------------------------------------------------------------ サイドバー（SWELL ウィジェット） */

.l-sidebar .c-widget {
	padding: 0 16px 8px;
	background: var(--news-surface);
}

.l-sidebar .c-widget__title.-side {
	margin: 0 -16px 4px;
	padding: 10px 16px 8px;
	border-top: 4px solid var(--news-red);
	border-bottom: 1px solid var(--news-border);
	background: none;
	color: var(--news-text);
	font-size: 17px;
	font-weight: 900;
	text-align: left;
}

.l-sidebar .c-widget__title.-side::before,
.l-sidebar .c-widget__title.-side::after {
	display: none;
}

.news-adslot {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 250px;
	margin-top: 8px;
	border: 1px dashed #c8c8c8;
	color: #aaa;
	font-size: 12px;
}

/* ------------------------------------------------------------ ヘッダー・フッター（SWELL 標準の微調整） */

#content.l-content {
	padding-top: 16px;
}


.c-headLogo.-txt .c-headLogo__link {
	color: var(--news-red);
	font-weight: 900;
	letter-spacing: -.01em;
}

.l-header__gnav .c-gnav > .menu-item > a {
	color: #fff;
	font-weight: 700;
}

.p-spHeadMenu {
	background: var(--news-red);
}

.p-spHeadMenu .menu-item a {
	color: #fff;
	font-weight: 700;
}

.l-footer__nav a {
	color: #fff;
}

/* ------------------------------------------------------------ 記事ページ（Yahoo!ニュース／FLASH の記事構成） */

.single .l-mainContent__inner,
.page .l-mainContent__inner {
	padding: 0 16px 16px;
	background: var(--news-surface);
}

/* FLASH 型のカテゴリ帯 */
.news-catband {
	display: block;
	margin: 0 -16px;
	padding: 8px 16px;
	background: var(--news-red);
	color: #fff !important;
	font-size: 16px;
	font-weight: 900;
	letter-spacing: .04em;
	text-decoration: none !important;
}

.news-articleHead {
	display: block;
	margin: 0;
	padding-top: 16px;
}

.news-articleHead .c-postTitle__ttl {
	margin: 0 0 10px;
	font-size: 22px;
	font-weight: 900;
	line-height: 1.5;
}

.news-articleHead__meta,
.news-articleFoot__updated {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 12px;
	margin: 0;
}

.news-articleHead__meta {
	padding-bottom: 14px;
}

.news-credit {
	color: var(--news-muted);
	font-size: 12px;
	font-weight: 700;
}

/* アイキャッチ＋キャプション */
.single .p-articleThumb {
	margin: 0 -16px 20px;
}

.single .p-articleThumb__img {
	width: 100%;
}

.p-articleThumb__caption,
.post_content figcaption {
	margin-top: 6px;
	padding: 0 16px;
	color: var(--news-muted);
	font-size: 12px;
	line-height: 1.6;
	text-align: left;
}

/* 本文：ニュース記事らしい段落（字下げ・広めの段落間） */
.single .post_content {
	margin-top: 0;
	font-size: 16px;
	line-height: 1.9;
	letter-spacing: .02em;
}

.single .post_content > p {
	margin-bottom: 1.4em;
	text-indent: 1em;
}

.single .post_content > h2 {
	margin: 2.4em 0 1em;
	padding: 2px 0 2px 10px;
	border-left: 5px solid var(--news-red);
	background: none;
	font-size: 19px;
	font-weight: 900;
	line-height: 1.5;
}

.single .post_content > h2::before,
.single .post_content > h2::after {
	display: none;
}

.single .post_content > h3 {
	margin: 2em 0 .8em;
	padding: 0;
	border: 0;
	font-size: 17px;
	font-weight: 900;
}

.single .post_content > h3::before {
	content: "■ ";
	position: static;
	display: inline;
	width: auto;
	height: auto;
	border: 0;
	background: none;
	color: var(--news-red);
}

.single .post_content > h3::after {
	display: none;
}

.single .post_content blockquote {
	margin: 1.6em 0;
	padding: 12px 16px;
	border: 0;
	border-left: 4px solid #cfcfcf;
	background: #f7f7f7;
	font-size: 15px;
}

.single .post_content blockquote::before,
.single .post_content blockquote::after {
	display: none;
}

.single .post_content .wp-block-image {
	margin: 1.8em 0;
}

.post_content .wp-block-table th {
	background: var(--news-black);
	color: #fff;
}

/* 記事下：最終更新・関連記事・読まれている記事 */
.news-articleFoot {
	margin-top: 28px;
}

.news-articleFoot__updated {
	justify-content: flex-end;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--news-border);
}

.news-related {
	padding: 16px 0 4px;
}

.news-related__title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 900;
}

.news-related__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-related__list li {
	padding: 5px 0 5px 1em;
	text-indent: -1em;
	font-size: 15px;
	line-height: 1.6;
}

.news-related__list li::before {
	content: "・";
}

.news-related__list a {
	color: var(--swl-color_link, #1a4fa0);
	text-decoration: none;
}

.news-related__list a:hover {
	text-decoration: underline;
}

.news-popular {
	margin: 20px 0 0;
	padding: 0;
}

.news-popular .news-section__title {
	margin: 0 0 12px;
	padding: 10px 0 8px;
}

.news-popular a {
	color: var(--news-text);
	text-decoration: none;
}

.news-popular a:hover .news-card__title {
	color: var(--news-red);
	text-decoration: underline;
}

/* こんな記事も読まれています：1枚ずつ自動で流れる無限スライダー（JS: site.js） */
.news-slider {
	--slider-visible: 2;
	--slider-gap: 12px;
	overflow: hidden;
}

.news-slider .news-cards {
	display: flex;
	gap: var(--slider-gap);
	will-change: transform;
}

.news-slider .news-card {
	flex: 0 0 calc((100% - var(--slider-gap) * (var(--slider-visible) - 1)) / var(--slider-visible));
}

.news-slider.is-animating .news-cards {
	transition: transform .6s ease;
}

.single .c-shareBtns {
	margin-top: 24px;
}

/* ------------------------------------------------------------ 一覧（カテゴリ・検索結果） */

.archive .l-mainContent__inner,
.search .l-mainContent__inner {
	padding: 0 16px 16px;
	background: var(--news-surface);
}

.archive .c-pageTitle,
.search .c-pageTitle {
	margin: 0 -16px 8px;
	padding: 12px 16px 10px;
	border-top: 4px solid var(--news-red);
	border-bottom: 1px solid var(--news-border);
}

.p-postList.-type-list .p-postList__item {
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid var(--news-border);
}

.p-postList.-type-list .p-postList__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

/* ------------------------------------------------------------ PR表記・クリエイター・CTA（media-affiliate-core） */

.mac-pr-notice {
	margin: 0 0 16px;
	padding: 8px 12px;
	border-left: 4px solid var(--news-red);
	background: #f7f7f7;
	color: var(--news-muted);
	font-size: 12px;
}

.mac-creator-card {
	margin: 24px 0;
	padding: 16px;
	border: 1px solid var(--news-border);
	background: #fff;
}

.mac-creator-card__name {
	margin: 0 0 8px;
	font-weight: 700;
}

.mac-affiliate-cta {
	margin: 28px 0;
	padding: 18px;
	border: 2px solid var(--news-black);
	background: #fff;
}

.mac-affiliate-cta__label {
	display: inline-block;
	margin-bottom: 8px;
	padding: 1px 6px;
	background: var(--news-black);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
}

.mac-affiliate-cta__title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 900;
	line-height: 1.5;
}

.mac-affiliate-cta__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 12px 18px;
	background: var(--news-red);
	color: #fff !important;
	font-weight: 900;
	text-decoration: none !important;
	transition: background .2s;
}

.mac-affiliate-cta__button:hover {
	background: var(--news-red-dark);
}

.mac-affiliate-cta__note {
	margin: 10px 0 0;
	color: var(--news-muted);
	font-size: 11px;
}

/* ------------------------------------------------------------ PC */

@media (min-width: 960px) {
	.news-top {
		display: grid;
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
		gap: 20px;
		padding: 16px;
	}

	.news-lead__body {
		padding: 12px 0 0;
	}

	.news-lead__title {
		font-size: 24px;
	}

	.news-headlines {
		padding: 0;
	}

	.news-headlines__title {
		margin: 0;
		padding: 0 0 8px;
		border-top: 0;
		border-bottom: 3px solid var(--news-red);
	}

	.news-cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.news-catblock__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
		gap: 20px;
	}

	.news-section--sp-ranking {
		display: none;
	}

	.home .l-sidebar {
		display: block;
	}

	.single .l-mainContent__inner,
	.page .l-mainContent__inner {
		padding: 0 32px 24px;
	}

	.news-catband {
		margin: 0 -32px;
		padding: 8px 32px;
		font-size: 18px;
	}

	.news-articleHead {
		padding-top: 22px;
	}

	.news-articleHead .c-postTitle__ttl {
		font-size: 26px;
	}

	.single .p-articleThumb {
		margin: 0 0 24px;
	}

	.p-articleThumb__caption,
	.post_content figcaption {
		padding: 0;
	}

	.single .post_content {
		font-size: 17px;
	}

	.news-slider {
		--slider-visible: 3;
		--slider-gap: 16px;
	}

	.mac-affiliate-cta {
		padding: 24px;
	}

	.mac-affiliate-cta__button {
		width: auto;
		min-width: 300px;
	}
}
