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

@charset "UTF-8";

main {
	padding-top: clamp(110px, 15vw, 140px);
	padding-bottom: 40px;
	padding-left: 20px;
	padding-right: 20px;
	box-sizing: border-box;
}

.content {
	max-width: 1100px;
	margin: 0 auto;
}

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

.content > p {
	text-align: center;
	color: #888;
	margin-bottom: 40px;
	font-size: 1rem;
}

/* グリッドレイアウト */
.news-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(16px, 3vw, 40px);
	max-width: 1100px;
	margin: 40px auto;
	width: 100%;
	box-sizing: border-box;
}

.page-news-grid {
	grid-template-columns: repeat(5, 1fr);
}

/* ニュースセクション（ホームページ内） */
.news-section {
	margin: 0 auto;
	max-width: 1200px;
	padding: 0 20px;
	padding-top: 20px;
	box-sizing: border-box;
}

/* カードデザイン */
.news-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
	text-decoration: none;
	color: #333;
	display: flex;
	flex-direction: column;
	text-align: left;
}

.news-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.news-thumb {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background-color: #f0f0f0;
	display: block;
}

.news-info {
	padding: clamp(15px, 2.5vw, 25px);
}

.news-date {
	font-size: 0.95rem;
	color: #888;
	display: block;
	margin-bottom: 10px;
}

.news-title {
	font-size: clamp(1rem, 2vw, 1.25rem);
	font-weight: bold;
	line-height: 1.5;
	margin: 0;
}

/* もっと見るボタン */
.view-more-container {
	width: 100%;
	text-align: center;
	margin-top: 50px;
	margin-bottom: 20px;
}

.view-more-btn {
	display: inline-block;
	padding: clamp(12px, 2vw, 15px) clamp(30px, 6vw, 60px);
	background-color: var(--advecamp-primary, #333);
	color: #fff;
	text-decoration: none;
	border-radius: 50px;
	font-size: 1.1rem;
	letter-spacing: 0.05em;
	transition: background 0.3s, transform 0.2s;
}

.view-more-btn:hover {
	filter: brightness(1.2);
	transform: scale(1.05);
}

/* カルーセルラッパー */
.news-carousel-wrapper {
	position: relative;
}

.carousel-indicators {
	display: none;
}

/* ポップアップ */
.modal-overlay {
	display: none;
	position: fixed;
	top: 0; left: 0; width: 100%; height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 9999;
	justify-content: center;
	align-items: center;
	padding: 20px;
}

.modal-content {
	background: #fff;
	width: 100%;
	max-width: 700px;
	border-radius: 10px;
	position: relative;
	padding: clamp(20px, 4vw, 40px);
	max-height: 90vh;
	overflow-y: auto;
	animation: fadeIn 0.3s ease;
}

.modal-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	font-size: 28px;
	cursor: pointer;
	color: #888;
}

.modal-header h2 {
	font-size: clamp(1.3rem, 3vw, 1.8rem);
	margin-bottom: 15px;
	border-bottom: 2px solid #eee;
	padding-bottom: 15px;
}

.modal-date {
	color: #888;
	font-size: 1rem;
	margin-bottom: 20px;
	display: block;
}

.modal-img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	margin-bottom: 25px;
}

.modal-body p {
	margin-bottom: 15px;
	line-height: 1.8;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(-20px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* タブレット */
@media screen and (max-width: 1024px) {
	.news-grid { grid-template-columns: repeat(2, 1fr); }
	.page-news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* モバイル: カルーセル */
@media screen and (max-width: 768px) {
	.news-carousel-wrapper .news-grid {
		display: flex;
		flex-direction: row;
		overflow-x: scroll;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		max-width: 100%;
		width: 100%;
		margin: 20px 0;
		gap: 0;
		padding: 10px 0 20px;
		box-sizing: border-box;
	}

	.news-carousel-wrapper .news-grid::-webkit-scrollbar {
		display: none;
	}

	.news-carousel-wrapper .news-card {
		flex: 0 0 calc(100% - 48px);
		width: calc(100% - 48px);
		scroll-snap-align: center;
		margin: 0 12px;
	}

	.news-carousel-wrapper .news-grid .news-card:first-child { margin-left: 24px; }
	.news-carousel-wrapper .news-grid .news-card:last-child  { margin-right: 24px; }

	.carousel-indicators {
		display: flex;
		justify-content: center;
		gap: 8px;
		margin-top: 4px;
		margin-bottom: 8px;
	}

	.carousel-dot {
		width: 8px;
		height: 8px;
		border-radius: 50%;
		background-color: #ccc;
		cursor: pointer;
		transition: background-color 0.3s ease, transform 0.3s ease;
	}

	.carousel-dot.active {
		background-color: var(--advecamp-primary, #2c5530);
		transform: scale(1.3);
	}

	.news-grid {
		grid-template-columns: 1fr;
		max-width: 500px;
		margin: 20px auto;
		padding: 0 15px;
	}

	.page-news-grid {
		grid-template-columns: 1fr;
		max-width: 100%;
	}
}
