/**
 * Keiba Theme メインスタイルシート
 * シンプルで高速な競馬出馬表専用テーマ
 */

/* ==========================================================================
   リセット & ベーススタイル
   ========================================================================== */

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.8;
	color: #333;
	background-color: #fff;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: #0066cc;
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: #004499;
	text-decoration: underline;
}

/* ==========================================================================
   コンテナ
   ========================================================================== */

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ==========================================================================
   ヘッダー
   ========================================================================== */

.site-header {
	background-color: #1a1a1a;
	color: #fff;
	padding: 20px 0;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
}

.site-branding {
	flex: 0 0 auto;
}

.site-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
}

.site-title a {
	color: #fff;
	text-decoration: none;
}

.site-title a:hover {
	color: #d4af37;
	text-decoration: none;
}

.site-description {
	margin: 5px 0 0;
	font-size: 14px;
	color: #ccc;
}

.custom-logo-link {
	display: block;
	line-height: 0;
}

.custom-logo {
	max-height: 60px;
	width: auto;
}

/* ナビゲーション */
.main-navigation {
	flex: 1 1 auto;
	text-align: right;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
}

.main-navigation li {
	margin-left: 30px;
}

.main-navigation a {
	color: #fff;
	text-decoration: none;
	font-weight: 500;
	display: block;
	padding: 10px 0;
}

.main-navigation a:hover {
	color: #d4af37;
	text-decoration: none;
}

.menu-toggle {
	display: none;
	background: none;
	border: 1px solid #fff;
	color: #fff;
	padding: 10px 15px;
	cursor: pointer;
	font-size: 14px;
}

/* ==========================================================================
   コンテンツエリア
   ========================================================================== */

.site-content {
	padding: 40px 0;
	min-height: 60vh;
}

.content-inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}

/* サイドバーありの場合 */
.has-sidebar .content-inner {
	grid-template-columns: 1fr 320px;
}

.content-area {
	min-width: 0; /* グリッドオーバーフロー対策 */
}

/* ==========================================================================
   記事スタイル
   ========================================================================== */

article {
	margin-bottom: 40px;
	padding-bottom: 40px;
	border-bottom: 1px solid #e0e0e0;
}

article:last-child {
	border-bottom: none;
}

.entry-header {
	margin-bottom: 20px;
}

.entry-title {
	margin: 0 0 15px;
	font-size: 28px;
	line-height: 1.4;
	font-weight: 700;
}

.entry-title a {
	color: #333;
}

.entry-title a:hover {
	color: #d4af37;
}

.entry-meta {
	font-size: 14px;
	color: #666;
	margin-bottom: 15px;
}

.entry-meta > * {
	margin-right: 15px;
}

.posted-on,
.cat-links {
	display: inline-block;
}

.cat-links a {
	background-color: #f5f5f5;
	padding: 3px 8px;
	border-radius: 3px;
	font-size: 13px;
	margin-right: 5px;
}

.post-thumbnail {
	margin-bottom: 20px;
}

.entry-content,
.entry-summary {
	line-height: 1.8;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 30px;
	margin-bottom: 15px;
	line-height: 1.4;
}

.entry-footer {
	margin-top: 20px;
}

.read-more {
	display: inline-block;
	background-color: #0066cc;
	color: #fff;
	padding: 10px 20px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 500;
}

.read-more:hover {
	background-color: #004499;
	text-decoration: none;
	color: #fff;
}

.tags-links {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #e0e0e0;
	font-size: 14px;
}

.tags-label {
	font-weight: 600;
	margin-right: 10px;
}

/* ==========================================================================
   広告エリア
   ========================================================================== */

.ad-area {
	margin: 30px 0;
	padding: 20px;
	background-color: #f9f9f9;
	border: 1px solid #e0e0e0;
	text-align: center;
}

.ad-header {
	margin: 20px 0;
}

.ad-before-content {
	margin-bottom: 30px;
}

.ad-after-content {
	margin-top: 30px;
}

.ad-footer {
	margin: 40px 0 20px;
}

.ad-widget {
	overflow: hidden;
}

/* ==========================================================================
   サイドバー
   ========================================================================== */

.widget-area {
	font-size: 15px;
}

.widget {
	margin-bottom: 40px;
	padding: 20px;
	background-color: #f9f9f9;
	border-radius: 4px;
}

.widget-title {
	margin: 0 0 15px;
	font-size: 18px;
	font-weight: 700;
	padding-bottom: 10px;
	border-bottom: 2px solid #d4af37;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget ul li {
	padding: 8px 0;
	border-bottom: 1px solid #e0e0e0;
}

.widget ul li:last-child {
	border-bottom: none;
}

/* ==========================================================================
   ページネーション
   ========================================================================== */

.pagination {
	margin: 40px 0;
	text-align: center;
}

.nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.page-numbers-wrapper {
	display: flex;
	gap: 5px;
}

.pagination a,
.pagination .current {
	display: inline-block;
	padding: 10px 15px;
	background-color: #f5f5f5;
	color: #333;
	border-radius: 4px;
	text-decoration: none;
}

.pagination a:hover {
	background-color: #0066cc;
	color: #fff;
	text-decoration: none;
}

.pagination .current {
	background-color: #1a1a1a;
	color: #fff;
	font-weight: 700;
}

.dots {
	padding: 10px 5px;
}

/* 投稿ナビゲーション */
.post-navigation {
	margin: 40px 0;
	padding: 20px 0;
	border-top: 2px solid #e0e0e0;
	border-bottom: 2px solid #e0e0e0;
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	flex: 1;
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation .nav-subtitle {
	display: block;
	font-size: 13px;
	color: #666;
	margin-bottom: 5px;
}

.post-navigation .nav-title {
	display: block;
	font-weight: 600;
	color: #0066cc;
}

/* ==========================================================================
   フッター
   ========================================================================== */

.site-footer {
	background-color: #1a1a1a;
	color: #ccc;
	padding: 40px 0 20px;
	margin-top: 60px;
}

.footer-widgets {
	padding-bottom: 40px;
	border-bottom: 1px solid #333;
}

.footer-widgets-inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 30px;
}

.footer-widget {
	background-color: transparent;
	padding: 0;
}

.footer-widget .widget-title {
	color: #fff;
	border-color: #d4af37;
	font-size: 16px;
}

.footer-widget ul li {
	border-color: #333;
}

.footer-widget a {
	color: #ccc;
}

.footer-widget a:hover {
	color: #d4af37;
}

.site-info {
	padding-top: 20px;
}

.site-info-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.footer-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.footer-navigation a {
	color: #ccc;
	text-decoration: none;
	font-size: 14px;
}

.footer-navigation a:hover {
	color: #d4af37;
	text-decoration: none;
}

.copyright {
	font-size: 14px;
	color: #999;
}

/* ==========================================================================
   アーカイブ・検索結果
   ========================================================================== */

.page-header {
	margin-bottom: 40px;
	padding-bottom: 20px;
	border-bottom: 3px solid #d4af37;
}

.page-title {
	margin: 0;
	font-size: 32px;
	font-weight: 700;
}

.archive-description {
	margin-top: 15px;
	color: #666;
}

/* ==========================================================================
   404ページ
   ========================================================================== */

.error-404 .page-content {
	max-width: 600px;
	margin: 0 auto;
	text-align: center;
}

.error-404 h2 {
	margin-top: 40px;
	margin-bottom: 20px;
	font-size: 20px;
}

.button {
	display: inline-block;
	background-color: #0066cc;
	color: #fff;
	padding: 12px 30px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
}

.button:hover {
	background-color: #004499;
	color: #fff;
	text-decoration: none;
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */

@media screen and (max-width: 768px) {
	/* ヘッダー */
	.header-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.menu-toggle {
		display: block;
		margin-top: 15px;
	}

	.main-navigation {
		width: 100%;
		text-align: left;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		width: 100%;
		margin-top: 15px;
	}

	.main-navigation.toggled ul {
		display: flex;
	}

	.main-navigation li {
		margin-left: 0;
		width: 100%;
	}

	.main-navigation a {
		padding: 12px 0;
		border-bottom: 1px solid #333;
	}

	/* コンテンツ */
	.has-sidebar .content-inner {
		grid-template-columns: 1fr;
	}

	.entry-title {
		font-size: 24px;
	}

	.page-title {
		font-size: 26px;
	}

	/* フッター */
	.footer-widgets-inner {
		grid-template-columns: 1fr;
	}

	.site-info-inner {
		flex-direction: column;
		text-align: center;
	}
}

@media screen and (max-width: 480px) {
	body {
		font-size: 15px;
	}

	.container {
		padding: 0 15px;
	}

	.site-content {
		padding: 20px 0;
	}

	.entry-title {
		font-size: 20px;
	}

	.page-title {
		font-size: 22px;
	}
}

/* ==========================================================================
   ユーティリティ
   ========================================================================== */

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	color: #21759b;
	display: block;
	font-size: 14px;
	font-weight: bold;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}
