@charset "UTF-8";

/* ====================================
   共通コンポーネントスタイル
   ダークモード対応・全ページ共通装飾
   ==================================== */

/* ====================================
   管理者向け案内バー（ログイン中のみ表示）
   ==================================== */

#admin-notice-bar {
	background: light-dark(#e3f2fd, #1a237e);
	border-bottom: 2px solid light-dark(#2196f3, #3f51b5);
	font-family: sans-serif;
	position: relative;
	z-index: 10;
}

.admin-notice-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.5em 1em;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	flex-wrap: wrap;
}

.admin-notice-status {
	font-weight: bold;
	font-size: 0.9em;
	color: light-dark(#1565c0, #fff);
}

.admin-notice-links {
	display: flex;
	gap: 1em;
	flex-wrap: wrap;
}

.admin-notice-link {
	font-size: 0.85em;
	color: light-dark(#1565c0, #fff);
	text-decoration: none;
	padding: 0.25em 0.75em;
	border-radius: 3px;
	background: light-dark(#fff, rgba(255,255,255,0.1));
	border: 1px solid light-dark(#2196f3, rgba(255,255,255,0.3));
	transition: all 0.2s;
}

.admin-notice-link:hover {
	background: light-dark(#2196f3, rgba(255,255,255,0.2));
	color: light-dark(#fff, #fff);
	border-color: light-dark(#1976d2, rgba(255,255,255,0.5));
}

.admin-notice-logout {
	background: light-dark(#ffebee, rgba(244,67,54,0.2));
	border-color: light-dark(#ef5350, rgba(244,67,54,0.5));
	color: light-dark(#c62828, #ff8a80);
}

.admin-notice-logout:hover {
	background: light-dark(#ef5350, rgba(244,67,54,0.4));
	color: #fff;
	border-color: light-dark(#d32f2f, #f44336);
}

@media (max-width: 767px) {
	.admin-notice-content {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5em;
	}

	.admin-notice-links {
		width: 100%;
		gap: 0.5em;
	}

	.admin-notice-link {
		flex: 1;
		text-align: center;
		font-size: 0.8em;
	}
}

/* ====================================
   見出しスタイル
   ==================================== */

/* 共通スタイル */
#content h1,
#content h2,
#content h3,
#content h4 {
	font-weight: bold;
	line-height: 1.3;
	margin-bottom: 1em;
	color: light-dark(#333, #fff);
	position: relative;
}

/* h1 または home.phpのh2: ページタイトル */
#content h1,
body.template-home #content h2 {
	font-size: 1.5em;
    padding: .5em .75em .6em 1.5em;
    color: light-dark(#333, #fff);
	background-color: light-dark(#f2f2f2, #333);
	border-bottom: solid 2px light-dark(#ddd, #1a1a1a);
}
#content h1::before,
body.template-home #content h2::before {
    content: '';
    display: block;
    width: .25em;
    height: 90%;
    height: calc(100% - 1em);
    margin-right: .5em;
	position: absolute;
	left: 0.6em;
	top: 0.5em;
	background-color: light-dark(#666, #fff);
}
#content h1::after,
body.template-home #content h2::after {
}

/* h2 または home.phpのh3: セクション見出し */
#content h2:not(body.template-home #content h2),
body.template-home #content h3 {
	font-size: 1.4em;
    padding-left: 1em;
	position: relative;
}
#content h2:not(body.template-home #content h2)::before,
body.template-home #content h3::before {
    display: block;
    width: .25em;
    height: 100%;
	background-color: light-dark(#666, #fff);
    content: '';
	position: absolute;
	left: 0;
}

/* h3 または home.phpのh4: サブセクション見出し */
#content h3:not(body.template-home #content h3),
body.template-home #content h4 {
	font-size: 1.2em;
}
#content h3:not(body.template-home #content h3)::before,
body.template-home #content h4::before {
}

/* h4: 詳細項目見出し */
#content h4:not(body.template-home #content h4) {
	font-size: 1.1em;
}

/* 汎用間隔スタイル */
#content section + section{
	margin-top: 2em;
}
#content .contact-form-container iframe {
    width: 100%;
    min-height: 800px;
    border: none;
}

/* components.css または contact 専用 CSS */
#content .contact-form-container {
    width: 100%;
    max-width: 640px; /* Google Forms のデフォルト幅 */
    margin: 0 auto;
}

/* Material Symbols 汎用スタイル */
.material-symbols-outlined{
	font-size: 1.2em;
	width: 1em;
	overflow: hidden;
	vertical-align: -0.15em;
}

/* フィルタ・ソートコンポーネント → stocks-filter.css に分離 */

/* ====================================
   2カラムレイアウトコンポーネント
   ==================================== */

/* intro-section: 画像+テキストの紹介セクション */
.intro-section {
	margin-bottom: 2em;
}

/* PC幅: 2カラムレイアウト */
@media (min-width: 768px) {
	.intro-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2em;
	}

	/* 3セクション存在時、2つ目を自動反転 */
	.home-container:has(.intro-section:nth-of-type(3)) .intro-section:nth-of-type(2) .intro-image-col {
		order: 2;
	}

	.home-container:has(.intro-section:nth-of-type(3)) .intro-section:nth-of-type(2) .intro-text-col {
		order: 1;
	}
}

/* SP幅: 1カラム（画像→テキスト） */
@media (max-width: 767px) {
	.intro-layout {
		display: flex;
		flex-direction: column;
		gap: 1em;
	}

	.intro-image-col {
		order: 1;
	}

	.intro-text-col {
		order: 2;
	}
}

.intro-image {
	width: 100%;
	height: auto;
}

/* main-layout: 汎用2カラムレイアウト */
.main-layout {
	display: grid;
	gap: 2em;
}

@media (min-width: 768px) {
	.main-layout {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 767px) {
	.main-layout {
		grid-template-columns: 1fr;
	}
}

/* ====================================
   写真モーダル
   ==================================== */

.photo-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.9);
	align-items: center;
	justify-content: center;
}

.photo-modal-content {
	margin: auto;
	display: block;
	max-width: 90%;
	max-height: 85vh;
	object-fit: contain;
	animation: zoomIn 0.3s;
}

@keyframes zoomIn {
	from {
		transform: scale(0.8);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

.photo-modal-close {
	position: fixed;
	top: 15px;
	right: 35px;
	color: #fff;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
	transition: 0.3s;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.5);
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: none;
}

.photo-modal-close:hover,
.photo-modal-close:focus {
	color: #bbb;
	background: rgba(0, 0, 0, 0.8);
}

.photo-modal-prev,
.photo-modal-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	cursor: pointer;
	transition: 0.3s;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.5);
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 4px;
}

.photo-modal-prev::before,
.photo-modal-next::before {
	content: '';
	width: 0;
	height: 0;
	border-style: solid;
}

.photo-modal-prev::before {
	border-width: 12px 20px 12px 0;
	border-color: transparent #fff transparent transparent;
}

.photo-modal-next::before {
	border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent #fff;
}

.photo-modal-prev {
	left: 20px;
}

.photo-modal-next {
	right: 20px;
}

.photo-modal-prev:hover,
.photo-modal-prev:focus,
.photo-modal-next:hover,
.photo-modal-next:focus {
	background: rgba(0, 0, 0, 0.8);
}

.photo-modal-prev:hover::before,
.photo-modal-prev:focus::before {
	border-color: transparent #bbb transparent transparent;
}

.photo-modal-next:hover::before,
.photo-modal-next:focus::before {
	border-color: transparent transparent transparent #bbb;
}

@media (max-width: 767px) {
	.photo-modal-content {
		max-width: 95%;
		max-height: 80vh;
	}

	.photo-modal-close {
		top: 10px;
		right: 10px;
		font-size: 32px;
		width: 40px;
		height: 40px;
	}

	.photo-modal-prev,
	.photo-modal-next {
		width: 40px;
		height: 40px;
	}

	.photo-modal-prev::before {
		border-width: 10px 16px 10px 0;
	}

	.photo-modal-next::before {
		border-width: 10px 0 10px 16px;
	}

	.photo-modal-prev {
		left: 10px;
	}

	.photo-modal-next {
		right: 10px;
	}
}

/* ====================================
   個体基本情報コンポーネント
   産地・CB/WC・性別の統一表示
   ==================================== */

/* 親要素: 産地CB / オス をまとめて囲む */
.stock-basic-info {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15em;
	font-weight: bold;
	color: light-dark(#444, #ddd);
}

/* 区切りスラッシュ */
.stock-basic-info .separator {
	color: light-dark(#999, #666);
	margin: 0 0.1em;
}

/* 性別表示 */
.gender-male {
	background-color: #1565c0;
}
.gender-female {
	background-color: #c62828;
}
.gender-unknown {
	background-color: #666;
}
.gender-male,
.gender-female,
.gender-unknown{
	font-size: 0.9em;
	display: inline-block;
	padding: 0 .4em;
	margin: 0 .4em;
	color: #fff;
	border-radius: 2px;
}

/* 性別の前に♂♀記号を疑似要素で追加 */
.gender-male::before {
	content: '♂';
	margin-right: 0.1em;
}

.gender-female::before {
	content: '♀';
	margin-right: 0.1em;
}


/* 一覧・詳細ともに使う補足 */
.stocks-note{
	font-size: 0.75rem;
	margin-top: 1em;
}