/**
 * Biman Theme Custom Styles
 *
 * @package BimanTheme
 * @since 1.0.0
 */

/* ==========================================================================
   ヒーローセクション - レイヤー画像システム
   ========================================================================== */

.hero-section {
	position: relative;
	width: 100%;
	min-height: 740px;
	overflow: hidden;
	margin: 0;
	padding: 0;
}

/* 背景レイヤー */
.layer-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.layer-background .layer-image {
	width: 100%;
	height: auto;
	object-fit: cover;
}

/* TOPイメージ（カスタマイザーでサイズ・トリミング制御） */
.top-image-wrapper {
	overflow: hidden;
	position: relative;
	/* width / height はカスタマイザー設定によりインラインスタイルで上書き */
}

.top-image-wrapper img {
	display: block;
	/* margin-top / margin-left / width / height はカスタマイザー設定によりインラインスタイルで上書き */
}

/* 右揃えレイヤーコンテナ */
.layer:not(.layer-background) {
	position: absolute;
	right: 20px;
	width: 350px;
	z-index: 10;
}

.layer-image {
	width: 100%;
	height: auto;
	display: block;
	margin-bottom: 10px;
}

/* 各レイヤー個別設定 - 上から順番に配置 */

/* 1. タイトル（第1回 日本びまん性肺疾患学会学術集会）*/
.layer-title {
	top: 20px;
	width: 600px;
}

.layer-title .layer-image {
	width: 100%;
}

/* 2. 情報エリア1（開催情報ボックス）*/
.layer-info1 {
	top: 120px;
	width: 300px;
}

.layer-info1 .layer-image {
	width: 80%;
}

/* 3. 情報エリア2（キャッチコピー）*/
.layer-info2 {
	top: 350px;
	width: 280px;
}

.layer-info2 .layer-image {
	width: 80%;
}

/* 4. サブテーマ（ロゴ）*/
.layer-subtheme {
	top: 480px;
	width: 80px;
}

.layer-subtheme .layer-image {
	width: 80%;
}

/* ==========================================================================
   新着情報セクション
   ========================================================================== */

.news-section {
	background-color: #fff;
	position: relative;
	z-index: 50;
	margin-top: 0;
	border-radius: 0;
	box-shadow: none;
}

.news-section .list-group-item {
	border-left: none;
	border-right: none;
	transition: background-color 0.2s ease;
}

.news-section .list-group-item:hover {
	background-color: #f8f9fa;
}

.news-section .list-group-item a {
	color: #212529;
	font-weight: 500;
	transition: color 0.2s ease;
}

.news-section .list-group-item a:hover {
	color: #007bff;
}

.news-section .badge {
	font-weight: normal;
	padding: 0.5em 0.75em;
}

/* ==========================================================================
   ウィジェットエリア
   ========================================================================== */

.widget-area {
	color: #fff !important;
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
}

.widget-area.p-3 {
	padding: 0.75rem !important;
	border-radius: 10px;
}

.widget-area .widget {
	padding-bottom: 1rem;
	border-bottom: 1px solid #333;
	color: #fff !important;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

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

.widget-area .widget-title,
.widget-area h2,
.widget-area h3,
.widget-area h4,
.widget-area h5 {
	color: #fff !important;
	font-size: 1.1rem;
	font-weight: 600;
}

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

.widget-area ul li {
	padding: 0.4rem 0;
	color: #e0e0e0 !important;
}

.widget-area a,
.widget-area a:link,
.widget-area a:visited {
	color: #e0e0e0 !important;
	text-decoration: none;
	transition: color 0.2s ease;
}

.widget-area a:hover,
.widget-area a:focus,
.widget-area a:active {
	color: #fff !important;
	text-decoration: underline;
}

/* 検索フォーム */
.widget_search .search-form,
.wp-block-search {
	margin-bottom: 0;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	width: 100%;
	max-width: 100%;
}

/* 検索ラベルを視覚的に非表示 */
.wp-block-search__label {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

.widget_search .search-form input[type="search"],
.wp-block-search__input {
	background-color: #fff;
	border-color: #ddd;
	color: #333;
	height: 3em;
	padding: 0.375rem 0.75rem;
	border-radius: 5px;
	flex: 1;
	min-width: 0;
}

.widget_search .search-form input[type="search"]::placeholder,
.wp-block-search__input::placeholder {
	color: #999;
}

.widget_search .search-form input[type="search"]:focus {
	background-color: #333;
	border-color: #007bff;
	color: #fff;
}

.widget_search .search-form .btn,
.wp-block-search__button {
	height: 3em;
	padding: 0.375rem 1rem;
	border-radius: 5px;
	min-width: 5em;
	flex-shrink: 0;
	white-space: nowrap;
}

/* ==========================================================================
   記事・ページコンテンツ
   ========================================================================== */

.site-main:not(.front-page),
.site-main.front-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

article,
.post,
.page-content,
.entry-content {
	background-color: #fff;
	padding: 2em;
	margin: 0;
	margin-top: 0;
}

.entry-header {
	margin-bottom: 1em;
	background-color: #fff;
	padding: 2em;
	padding-bottom: 0;
}

.entry-title {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

.entry-meta {
	color: #666;
	font-size: 0.9rem;
	display: flex;
	gap: 1rem;
}

.entry-content {
	line-height: 1.8;
	margin-bottom: 2em;
}

.entry-content p {
	font-size: 1.1rem;
}

.entry-content h2 {
	font-size: 1.4rem;
	margin-top: 2rem;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e0e0e0;
}

.entry-content h3 {
	font-size: 1.3rem;
	margin-top: 1.5rem;
	margin-bottom: 1rem;
}

.entry-content h4 {
	font-size: 1.2rem;
	margin-top: 1.5rem;
	margin-bottom: 1rem;
}

.entry-content h5,
.entry-content h6 {
	font-size: 1.1rem;
	margin-top: 1.5rem;
	margin-bottom: 1rem;
}

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

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
}

.entry-content table th,
.entry-content table td {
	padding: 0.75rem;
	border: 1px solid #e0e0e0;
	text-align: left;
}

.entry-content table th {
	background-color: #f5f5f5;
	font-weight: bold;
}

.entry-content table th:first-child,
.entry-content table td:first-child {
	width: 25%;
}

/* ==========================================================================
   ボタン
   ========================================================================== */

.btn {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background-color: #007bff;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.3s ease;
}

.btn:hover {
	background-color: #0056b3;
	color: #fff;
}

/* ==========================================================================
   パンくずリスト
   ========================================================================== */

.breadcrumb {
	padding: 1rem 2rem;
	margin-bottom: 0;
	font-size: 0.9rem;
	color: #fff;
	background-color: #1a1a1a;
}

.breadcrumb a {
	color: #e0e0e0;
	text-decoration: none;
}

.breadcrumb a:hover {
	color: #fff;
	text-decoration: underline;
}

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

.pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 2rem;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 0.5rem 1rem;
	background-color: #f5f5f5;
	color: #333;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	background-color: #007bff;
	color: #fff;
}

/* ==========================================================================
   404エラーページ
   ========================================================================== */

.error-404-content {
	text-align: center;
	padding: 3rem 0;
}

.error-404-content h1 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
	color: #d9534f;
}

.error-404-search,
.error-404-recent-posts {
	margin-top: 2rem;
	text-align: left;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

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

/* タブレット表示 (Bootstrap lg breakpoint) */
@media (max-width: 991.98px) {
	.hero-section {
		min-height: 500px;
	}

	.layer-background .layer-image {
		height: auto;
	}

	.layer:not(.layer-background) {
		right: 15px;
		width: 280px;
	}

	.layer-title {
		top: 15px;
		width: 450px;
	}

	.layer-info1 {
		top: 100px;
		width: 250px;
	}

	.layer-info2 {
		top: 300px;
		width: 230px;
	}

	.layer-subtheme {
		top: 400px;
		width: 70px;
	}
}

/* モバイル表示 (Bootstrap md breakpoint) */
@media (max-width: 767.98px) {
	.hero-section {
		min-height: 400px;
	}

	.layer-background .layer-image {
		height: auto;
	}

	.layer:not(.layer-background) {
		right: 10px;
		width: 200px;
	}

	.layer-title {
		top: 10px;
		width: 300px;
	}

	.layer-info1 {
		top: 80px;
		width: 180px;
	}

	.layer-info2 {
		top: 220px;
		width: 160px;
	}

	.layer-subtheme {
		top: 320px;
		width: 60px;
	}

	.entry-title {
		font-size: 1.5rem;
	}

	.entry-content table {
		font-size: 0.9rem;
	}
}

/* 小型モバイル表示 (Bootstrap sm breakpoint) */
@media (max-width: 575.98px) {
	.hero-section {
		min-height: 350px;
	}

	.layer-background .layer-image {
		height: auto;
	}

	.layer:not(.layer-background) {
		right: 5px;
		width: 160px;
	}

	.layer-title {
		top: 8px;
		width: 240px;
	}

	.layer-info1 {
		top: 70px;
		width: 140px;
	}

	.layer-info2 {
		top: 180px;
		width: 120px;
	}

	.layer-subtheme {
		top: 270px;
		width: 50px;
	}

	.entry-title {
		font-size: 1.3rem;
	}

	.btn {
		width: 100%;
		text-align: center;
	}
}

/* 極小モバイル表示 (450px以下) */
@media (max-width: 450px) {
	article,
	.post,
	.page-content,
	.entry-content {
		padding: 1em;
	}

	.entry-header {
		padding: 1em;
		padding-bottom: 0;
	}
}
