/* ==========================================================================
	1. 独自スコープ設定（既存サイトとの干渉回避）
========================================================================== */
.eishiro-gallery-project {
	/* Layout */
	--gallery-gap: 30px;

	/* Base Colors */
	--accent-color: #000;
	--text-color-main: #333;
	--text-color-sub: #444;
	--text-color-light: #888;

	/* Award Colors */
	--text-color-grandprix: #CCA43B;
	--text-color-gold: #FFD700;
	--text-color-silver: #dcdcdc;
	--text-color-bronze: #A26748;
	--text-color-special: #047857;

	/* Award Colors-bg */
	--bg-color-grandprix: rgb(204, 164, 59, 0.08);
	--bg-color-gold: rgb(255, 215, 0, 0.08);
	--bg-color-silver: rgb(220, 220, 220, 0.3);
	--bg-color-bronze: rgb(162, 103, 72, 0.08);
	--bg-color-special: rgb(4, 120, 87, 0.1);

	/* Other */
	--bg-card: #ffffff;
	--transition-speed: 0.3s;
	--lightbox-bg: rgba(0, 0, 0, 0.9);

	color: var(--text-color-main);
}

/* 背景スクロールロック */
body.gallery-scroll-lock {
	overflow: hidden;
}

.eishiro-gallery-project h2 {
	text-align: center;
	color: var(--accent-color);
	margin: 70px 0 20px 0;
	font-size: 22px;
	border-top: 1px dotted #ccc;
	padding: 3em 0 2em 0;
	font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif, "Helvetica Neue", Arial;
	letter-spacing: 0.2em;
}

.eishiro-gallery-project h2.award-grandprix {
	border-top: none;
	padding: 1em 0 2em 0;
}

.eishiro-gallery-project h2:first-of-type {
	margin-top: 0;
}

.eishiro-gallery-project h2.award-gold {
	margin-bottom: -20px;
}

/* ==========================================================================
	2. レイアウト設定
========================================================================== */
.eishiro-gallery-project .gallery-container {
	max-width: 94%;
	margin: 0 auto 20px auto;
	display: grid;
	gap: var(--gallery-gap);
}

.eishiro-gallery-project .gallery-explanation {
	max-width: 94%;
	margin: 2em auto 1em auto;
	padding: 0 20px;
	font-size: 15px;
	color: var(--text-color-sub);
	line-height: 1.7;
	text-align: justify;
}

/* カラムバリエーションの初期設定 */
.eishiro-gallery-project .col-1 {
	grid-template-columns: minmax(0, 1fr);
	max-width: 800px;
	width: 94%;
}

.eishiro-gallery-project .col-1-full {
	grid-template-columns: minmax(0, 1fr);
	max-width: 94%;
}

.eishiro-gallery-project .col-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eishiro-gallery-project .col-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.eishiro-gallery-project .col-4,
.eishiro-gallery-project .col-4-x3 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.eishiro-gallery-project .col-3-x2 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--gallery-gap);
}

.eishiro-gallery-project .col-1-and-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--gallery-gap);
}

.eishiro-gallery-project .col-1-and-2 .gallery-item:nth-child(1) {
	grid-column: 1 / -1;
}

/* 6枚連動エリア */
#unique-custom-gallery-6 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--gallery-gap);
}

.eishiro-gallery-project .gallery-group {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.eishiro-gallery-project .sub-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.eishiro-gallery-project .group-explanation {
	font-size: 15px;
	color: var(--text-color-sub);
	line-height: 1.7;
	margin: 6px 0 0 0;
	padding: 0 20px;
}

/* ==========================================================================
	3. カードデザイン（作品保護・トリミングなし）
========================================================================== */
.eishiro-gallery-project .gallery-item {
	display: flex;
	flex-direction: column;
	background-color: var(--bg-card);
	border-radius: 5px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	transition: transform var(--transition-speed) ease;
}

.eishiro-gallery-project .gallery-item img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: contain;
	/* 画像全体を表示 */
	display: block;
	cursor: pointer;
	/* background-color: #eee; */
}

.eishiro-gallery-project .award-silver-container .gallery-item img,
.eishiro-gallery-project .award-special-container .gallery-item img {
	aspect-ratio: 4 / 3;
}

/* 各受賞写真の背景色 */
.eishiro-gallery-project .award-grandprix-container img {
	background-color: var(--bg-color-grandprix);
}

.eishiro-gallery-project .award-gold-container img {
	background-color: var(--bg-color-gold);
}

.eishiro-gallery-project .award-silver-container img {
	background-color: var(--bg-color-silver);
}

.eishiro-gallery-project .award-bronze-container img {
	background-color: var(--bg-color-bronze);
}

.eishiro-gallery-project .award-special-container img {
	background-color: var(--bg-color-special);
}

/* .eishiro-gallery-project .col-1 .gallery-item img, */
.eishiro-gallery-project .col-1-full .gallery-item img,
.eishiro-gallery-project .col-1-and-2 .gallery-item:nth-child(1) img {
	aspect-ratio: auto;
}

.eishiro-gallery-project .gallery-item figcaption {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex-grow: 1;
}

.eishiro-gallery-project .item-title {
	font-family: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif;
	font-size: 18px;
	font-weight: bold;
	margin: 0;
}

.eishiro-gallery-project .item-title small {
	color: rgba(0, 0, 0, 0.9);
}

.eishiro-gallery-project .item-product {
	font-size: 13px;
	font-weight: 500;
	display: block;
	margin-top: -4px;
	margin-bottom: 1em;
}

.eishiro-gallery-project .item-author {
	font-size: 15px;
	font-weight: 500;
	color: var(--text-color-main);
	letter-spacing: 0.1em;
	display: block;
	line-height: 1.4;
}

.eishiro-gallery-project .gallery-group .item-author {
	min-height: calc(1.4em * 2);
}

.eishiro-gallery-project .item-description {
	font-family: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif;
	font-size: 15px;
	color: var(--text-color-main);
	line-height: 1.5;
	margin: 0;
}

.eishiro-gallery-project .item-meta {
	text-align: right;
	font-size: 12px;
	color: #333;
	margin-top: auto;
	padding-top: 2em;
	letter-spacing: 0.1em;
	font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif, "Helvetica Neue", Arial;
}

/* ==========================================================================
	4. 受賞カラー設定
========================================================================== */

.award-grandprix::first-letter {
	color: var(--text-color-grandprix);
	font-weight: bold;
}

.award-gold::first-letter {
	color: var(--text-color-gold);
	font-weight: bold;
}

.award-silver::first-letter {
	color: var(--text-color-silver);
	font-weight: bold;
}

.award-bronze::first-letter {
	color: var(--text-color-bronze);
	font-weight: bold;
}

.award-special::first-letter {
	color: var(--text-color-special);
	font-weight: bold;
}

/* ==========================================================================
	5. レスポンシブ制御
========================================================================== */

@media (max-width: 1024px) {

	.eishiro-gallery-project .col-4,
	.eishiro-gallery-project .col-4-x3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {

	.eishiro-gallery-project .col-3,
	.eishiro-gallery-project .col-3-x2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	#unique-custom-gallery-6 {
		grid-template-columns: minmax(0, 1fr);
		gap: 50px;
	}

	.eishiro-gallery-project h2 {
		font-size: 18px;
	}

	.eishiro-gallery-project .item-title,
	#unique-custom-gallery-6 .sub-grid .item-title {
		font-size: 16px;
	}
}

/* すべてのカラムを縦一列にする指定 */
@media (max-width: 600px) {

	.eishiro-gallery-project .col-2,
	.eishiro-gallery-project .col-3,
	.eishiro-gallery-project .col-4,
	.eishiro-gallery-project .col-4-x3,
	.eishiro-gallery-project .col-3-x2,
	.eishiro-gallery-project .col-1-and-2 {
		grid-template-columns: minmax(0, 1fr);
	}

	/* 詳細画像（サブグリッド）はスマホでも2列を維持 */
	.eishiro-gallery-project .sub-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 450px) {
	.eishiro-gallery-project .sub-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ==========================================================================
	6. ライトボックス表示
========================================================================== */
#gallery-unique-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--lightbox-bg);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--transition-speed) ease;
}

#gallery-unique-lightbox.active {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-content {
	background-color: #fff;
	max-width: 800px;
	width: 90%;
	max-height: 90vh;
	border-radius: 5px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
}

.lightbox-image {
	width: 100%;
	max-height: 60vh;
	object-fit: contain;
	background-color: #111;
	touch-action: pan-y;
}

.lightbox-caption {
	padding: 25px;
	border-top: 1px solid #eee;
	background-color: #fff;
}

.lightbox-title {
	font-family: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif;
	font-size: 20px;
	font-weight: bold;
	margin: 0 0 10px 0;
}

.lightbox-product {
	font-size: 12px;
	font-weight: 500;
	margin: -6px 0 1.6em 0;
}

.lightbox-author {
	font-size: 15px;
	font-weight: 500;
	color: var(--text-color-main);
	letter-spacing: 0.1em;
}

.lightbox-meta {
	font-size: 12px;
	text-align: right;
	margin-top: 10px;
	letter-spacing: 0.1em;
	font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif, "Helvetica Neue", Arial;
}

.lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	color: #fff;
	font-size: 40px;
	border: none;
	background: none;
	cursor: pointer;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border: none;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1010;
	transition: background 0.2s ease;
	font-size: 24px;
}

.lightbox-prev {
	left: 20px;
}

.lightbox-next {
	right: 20px;
}

@media (max-width: 600px) {
	.lightbox-nav {
		width: 60px;
		height: 60px;
		border-radius: 30px;
		font-size: 20px;
		background: rgba(0, 0, 0, 0.1);
		/* 背景を薄くして画像を見やすく */
	}

	.lightbox-prev {
		left: -10px;
		/* 画面の左端に密着させて反応エリアを最大化 */
	}

	.lightbox-next {
		right: -10px;
		/* 画面の右端に密着させて反応エリアを最大化 */
	}

	.lightbox-close {
		top: 10px;
		right: 10px;
		font-size: 50px;
		padding: 10px;
	}

	.lightbox-title {
		font-size: 16px;
	}
}

/* ==========================================================================
	7. message 
========================================================================== */
/* message コンテナ */
.eishiro-gallery-project .competition-message-container {
	max-width: 800px;
	margin: 2em auto 0 auto;
	padding: 30px 30px;
	/* background-color: #fcfcfc; */
	line-height: 2.0;
	letter-spacing: 0.05em;
}

/* message 装飾 */
.competition-message-title {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: #8c8c8c;
	margin-bottom: 1em;
}

.competition-message-divider {
	width: 40px;
	height: 1px;
	background-color: #1a1a1a;
	margin: 0 auto 40px;
}

.competition-message-content {
	text-align: justify;
	font-size: 1em;
	margin-bottom: 40px;
}

.competition-message-content p {
	font-family: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif;
	color: #2b2b2b;
	margin-bottom: 24px;
}

.competition-message-author {
	text-align: right;
	margin-top: 3em;
	font-size: 1em;
	color: #555;
	font-style: italic;
}