/* gallery/style.css - AdveCamp WordPress Theme */

main {
	padding-top: clamp(110px, 15vw, 140px);
	min-height: calc(100vh - 80px);
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

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

.content h1,
.title {
	text-align: center;
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	margin-bottom: 1rem;
	color: var(--advecamp-primary, #2c5530);
	font-weight: bold;
}

.subtitle {
	text-align: center;
	color: #5d6c72;
	margin-bottom: 2rem;
	font-size: 1.2rem;
	line-height: 1.6;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	padding: 2rem 0;
	margin: 0 5px;
}

.gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
	aspect-ratio: 4/3;
}

.gallery-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

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

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

.gallery-item .caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
	color: white;
	padding: 1rem;
	transform: translateY(100%);
	transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
	transform: translateY(0);
}

/* モーダル */
.modal {
	display: none;
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 1000000;
	justify-content: center;
	align-items: center;
}

.modal.active {
	display: flex;
}

.modal-content {
	max-width: 90%;
	max-height: 90%;
	position: relative;
}

.modal img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.close {
	position: absolute;
	top: -40px;
	right: 0;
	color: white;
	font-size: 2rem;
	cursor: pointer;
	background: none;
	border: none;
	width: 40px;
	height: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.prev, .next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: white;
	font-size: 2rem;
	cursor: pointer;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: background-color 0.3s ease;
}

.prev:hover, .next:hover {
	background: rgba(0, 0, 0, 0.8);
}

.prev { left: 20px; }
.next { right: 20px; }

.modal-caption {
	color: white;
	text-align: center;
	margin-top: 1rem;
	font-size: 1.2rem;
	padding: 0 20px;
}

/* レスポンシブ */
@media (max-width: 768px) {
	.subtitle { font-size: 1rem; }

	.gallery {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 15px;
	}

	.prev, .next { width: 40px; height: 40px; font-size: 1.5rem; }
	.prev { left: 10px; }
	.next { right: 10px; }
	.close { top: -35px; font-size: 1.5rem; }
}

@media (max-width: 480px) {
	.content { padding: 40px 15px; }
	.gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
	.gallery-item .caption { padding: 0.5rem; font-size: 0.9rem; }
	.modal-content { max-width: 95%; max-height: 95%; }
}

@media (max-width: 1024px) and (min-width: 769px) {
	.gallery { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; }
}

@media (min-width: 1200px) {
	.gallery { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
}
