@charset "utf-8";

/*====================================================================
フォトギャラリーページ専用CSS
====================================================================*/

/*ギャラリーヘッダー（方針スタイル）
---------------------------------------------------------------------------*/
.gallery-header {
	text-align: center;
	margin-bottom: 4rem;
}

.gallery-header h3 {
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: 2rem;
	font-weight: 200;
}

.gallery-header .tate {
	writing-mode: vertical-rl;
	text-orientation: upright;
	font-size: 2.5rem;
	letter-spacing: 0.3em;
	margin-bottom: 1rem;
}

.gallery-header .yoko {
	font-size: 0.9rem;
	opacity: 0.6;
	letter-spacing: 0.2em;
}


/*ギャラリーセクション
---------------------------------------------------------------------------*/
.gallery-section {
	padding: var(--space-large);
	background: #F5F4EC;
}


/*カテゴリータブ
---------------------------------------------------------------------------*/
.gallery-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.8rem;
	margin-bottom: 3rem;
}

.tab-btn {
	padding: 0.8rem 1.8rem;
	border: 2px solid var(--primary-color);
	background: transparent;
	color: var(--primary-color);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	border-radius: 50px;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.tab-btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: var(--primary-color);
	transition: left 0.3s ease;
	z-index: -1;
}

.tab-btn:hover::before,
.tab-btn.active::before {
	left: 0;
}

.tab-btn:hover,
.tab-btn.active {
	color: #fff;
}

.tab-btn.active {
	box-shadow: 0 4px 15px rgba(130, 124, 117, 0.4);
}

@media screen and (min-width:600px) {
	.gallery-tabs {
		gap: 1rem;
	}
	
	.tab-btn {
		padding: 1rem 2.5rem;
		font-size: 1rem;
	}
}


/*ギャラリーグリッド
---------------------------------------------------------------------------*/
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

@media screen and (min-width:600px) {
	.gallery-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.5rem;
	}
}

@media screen and (min-width:1000px) {
	.gallery-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 2rem;
	}
}


/*ギャラリーアイテム
---------------------------------------------------------------------------*/
.gallery-item {
	position: relative;
	aspect-ratio: 1/1;
	overflow: hidden;
	border-radius: 12px;
	cursor: pointer;
	box-shadow: 0 5px 20px rgba(0,0,0,0.1);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.gallery-item:hover img {
	transform: scale(1.1);
}

/* オーバーレイ */
.gallery-item .overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
	opacity: 0;
	transition: opacity 0.4s ease;
	display: flex;
	align-items: flex-end;
	padding: 1.2rem;
}

.gallery-item:hover .overlay {
	opacity: 1;
}

.gallery-item .overlay .caption {
	color: #fff;
	font-size: 0.9rem;
	font-weight: 500;
	text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* 拡大アイコン */
.gallery-item .zoom-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0);
	width: 50px;
	height: 50px;
	background: rgba(255,255,255,0.95);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
	box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.gallery-item:hover .zoom-icon {
	transform: translate(-50%, -50%) scale(1);
}

.gallery-item .zoom-icon svg {
	width: 24px;
	height: 24px;
	fill: var(--primary-color);
}

/* 横長の画像用 */
.gallery-item.wide {
	grid-column: span 2;
	aspect-ratio: 2/1;
}

/* 縦長の画像用 */
.gallery-item.tall {
	grid-row: span 2;
	aspect-ratio: 1/2;
}

@media screen and (max-width:599px) {
	.gallery-item.wide,
	.gallery-item.tall {
		grid-column: span 1;
		grid-row: span 1;
		aspect-ratio: 1/1;
	}
}


/*ライトボックス（モーダル）
---------------------------------------------------------------------------*/
.lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.95);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.active {
	opacity: 1;
	visibility: visible;
}

.lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 85vh;
	transform: scale(0.9);
	transition: transform 0.4s ease;
}

.lightbox.active .lightbox-content {
	transform: scale(1);
}

.lightbox-content img {
	max-width: 100%;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* 閉じるボタン */
.lightbox-close {
	position: absolute;
	top: -50px;
	right: 0;
	width: 40px;
	height: 40px;
	background: transparent;
	border: 2px solid rgba(255,255,255,0.5);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.lightbox-close:hover {
	background: rgba(255,255,255,0.1);
	border-color: #fff;
}

.lightbox-close svg {
	width: 20px;
	height: 20px;
	stroke: #fff;
	stroke-width: 2;
}

/* ナビゲーションボタン */
.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	background: rgba(255,255,255,0.1);
	border: 2px solid rgba(255,255,255,0.3);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.lightbox-nav:hover {
	background: rgba(255,255,255,0.2);
	border-color: rgba(255,255,255,0.6);
}

.lightbox-nav svg {
	width: 24px;
	height: 24px;
	stroke: #fff;
	stroke-width: 2;
	fill: none;
}

.lightbox-prev {
	left: -70px;
}

.lightbox-next {
	right: -70px;
}

@media screen and (max-width:900px) {
	.lightbox-prev {
		left: 10px;
	}
	
	.lightbox-next {
		right: 10px;
	}
	
	.lightbox-close {
		top: -45px;
		right: 0;
	}
}

/* キャプション */
.lightbox-caption {
	position: absolute;
	bottom: -50px;
	left: 0;
	right: 0;
	text-align: center;
	color: rgba(255,255,255,0.8);
	font-size: 1rem;
	font-weight: 300;
	letter-spacing: 0.05em;
}

/* カウンター */
.lightbox-counter {
	position: absolute;
	top: -45px;
	left: 0;
	color: rgba(255,255,255,0.6);
	font-size: 0.9rem;
}


/*フィルターアニメーション
---------------------------------------------------------------------------*/
.gallery-item {
	animation: fadeInUp 0.6s ease both;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }
.gallery-item:nth-child(7) { animation-delay: 0.35s; }
.gallery-item:nth-child(8) { animation-delay: 0.4s; }
.gallery-item:nth-child(9) { animation-delay: 0.45s; }
.gallery-item:nth-child(10) { animation-delay: 0.5s; }
.gallery-item:nth-child(11) { animation-delay: 0.55s; }
.gallery-item:nth-child(12) { animation-delay: 0.6s; }

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* フィルター時の非表示 */
.gallery-item.hidden {
	display: none;
}


/*統計情報
---------------------------------------------------------------------------*/
.gallery-stats {
	text-align: center;
	margin-bottom: 2rem;
	color: #666;
	font-size: 0.95rem;
}

.gallery-stats span {
	font-weight: 600;
	color: var(--primary-color);
}


/*CTAセクション
---------------------------------------------------------------------------*/
.gallery-cta {
	background: linear-gradient(135deg, var(--primary-color) 0%, #a89a8d 100%);
	color: var(--primary-inverse-color);
	padding: 5rem var(--space-large);
	text-align: center;
}

.gallery-cta h3 {
	font-size: 2rem;
	margin-bottom: 1.5rem;
	font-weight: 600;
	color: #fff;
}

.gallery-cta p {
	font-size: 1.05rem;
	line-height: 2;
	margin-bottom: 2rem;
}

.gallery-cta .btn1 a {
	background: #fff;
	color: var(--primary-color);
	font-size: 1.1rem;
	padding: 1rem 3rem;
	display: inline-block;
}

.gallery-cta .btn1 a:hover {
	background: #f0f0f0;
}


/*年度セレクター（オプション）
---------------------------------------------------------------------------*/
.year-selector {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 2rem;
}

.year-btn {
	padding: 0.5rem 1.5rem;
	background: transparent;
	border: 1px solid rgba(130, 124, 117, 0.3);
	color: var(--primary-color);
	font-family: inherit;
	font-size: 0.9rem;
	border-radius: 30px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.year-btn:hover,
.year-btn.active {
	background: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
}