/*
 * Front Page Styles — ccframe
 * note/zenn風のクリーンなメディアトップページ
 *
 * セクション構成:
 *   0. Common
 *   1. Hero
 *   2. Category Rows (カテゴリ別横スクロール)
 *   3. Topics (カテゴリ + アーカイブ統合)
 *   4. Responsive
 */


/* ============================================================
 * 0. Common — セクション共通
 * ============================================================ */

.front-section {
	padding: 2.75rem 0;
}

.front-section__inner {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

.front-section__title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #1a1a2e;
	margin: 0 0 0.3rem;
}

.front-section__subtitle {
	font-size: 0.84rem;
	color: #718096;
	margin: 0 0 1.5rem;
	line-height: 1.6;
}


/* ============================================================
 * 1. Hero
 * ============================================================ */

.front-hero {
	text-align: center;
	padding: 4.5rem 1.25rem 3.5rem;
}

.front-hero__title {
	font-size: 1.65rem;
	font-weight: 600;
	color: #1a1a2e;
	letter-spacing: 0;
	line-height: 1.4;
	margin: 0 0 0.9rem;
}

.front-hero__desc {
	font-size: 0.92rem;
	color: #718096;
	line-height: 1.85;
	letter-spacing: 0.02em;
	max-width: 500px;
	margin: 0 auto 1.75rem;
}

.front-hero__actions {
	display: flex;
	gap: 0.65rem;
	justify-content: center;
	flex-wrap: wrap;
}

.front-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.6rem 1.3rem;
	border-radius: 6px;
	font-size: 0.88rem;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.front-hero__cta--primary {
	background: #2563eb;
	color: #fff;
}

.front-hero__cta--primary:hover {
	background: #1d4ed8;
	color: #fff;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.front-hero__cta--secondary {
	background: transparent;
	color: #4a5568;
	border: 1px solid #d1d5db;
}

.front-hero__cta--secondary:hover {
	background: #f8f9fa;
	border-color: #9ca3af;
	color: #1a1a2e;
}

.front-hero__cta-arrow {
	font-size: 0.75rem;
	opacity: 0.7;
}



/* ============================================================
 * 2. Category Rows — カテゴリ別横スクロール
 * ============================================================ */

.front-row {
	padding: 1.75rem 0 0;
}

.front-row + .front-row {
	padding-top: 0;
}

/* 行コンテナはフルワイド — ウィンドウが広いほどカードが多く見える */
.front-row .front-section__inner {
	max-width: none;
}

.front-row__header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 1rem;
}

.front-row__header .front-section__title {
	margin: 0;
}

.front-row__more {
	font-size: 0.82rem;
	font-weight: 500;
	color: #2563eb;
	text-decoration: none;
	white-space: nowrap;
}

.front-row__more:hover {
	text-decoration: underline;
}

.front-row__scroll-wrapper {
	position: relative;
}

.front-row__scroll {
	display: flex;
	gap: 0.85rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 0.25rem;
}

.front-row__scroll::-webkit-scrollbar {
	display: none;
}

/* --- カード --- */

.front-row__card {
	flex: 0 0 220px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.front-row__card:hover {
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
	border-color: #c7d2e0;
	transform: translateY(-1px);
}

.front-row__card-thumb {
	width: 100%;
	overflow: hidden;
	background: #f1f5f9;
}

.front-row__card-thumb a {
	display: block;
	width: 100%;
}

.front-row__card-thumb img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.2s ease;
}

.front-row__card:hover .front-row__card-thumb img {
	transform: scale(1.03);
}

.front-row__card-body {
	padding: 0.7rem 0.8rem 0.8rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.15rem;
}

.front-row__card-title {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.01em;
	color: #1a1a2e;
	margin: 0 0 0.3rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.front-row__card-title a {
	text-decoration: none;
	color: inherit;
}

.front-row__card-title a:hover {
	color: #2563eb;
}

.front-row__card-meta {
	font-size: 0.72rem;
	color: #a0aec0;
}

/* --- 矢印ナビ --- */

.front-row__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-80%);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #e2e8f0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #4a5568;
	transition: background 0.15s ease, border-color 0.15s ease;
	padding: 0;
}

.front-row__nav:hover {
	background: #f8f9fa;
	border-color: #c7d2e0;
}

.front-row__nav--prev {
	left: -6px;
}

.front-row__nav--next {
	right: -6px;
}


/* ============================================================
 * 3. Topics — カテゴリ + アーカイブ統合
 * ============================================================ */

.front-section--topics {
	padding-top: 2.25rem;
	padding-bottom: 3rem;
	border-top: 1px solid #f1f5f9;
}

.front-section--topics .front-section__title {
	font-size: 0.95rem;
	font-weight: 600;
	color: #4a5568;
}

.front-topics-active {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-bottom: 0;
}

.front-category-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1.05rem;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	text-decoration: none;
	font-size: 0.86rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.front-category-chip--active {
	color: #1a1a2e;
	background: #fff;
}

.front-category-chip--active:hover {
	border-color: #2563eb;
	color: #2563eb;
	box-shadow: 0 1px 4px rgba(37, 99, 235, 0.08);
}

.front-topics-archive {
	margin-top: 1rem;
	padding-top: 0.85rem;
	border-top: 1px dashed #eef0f3;
}

.front-topics-archive__label {
	font-size: 0.76rem;
	font-weight: 600;
	color: #a0aec0;
	margin: 0 0 0.45rem;
}

.front-topics-archive__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.front-category-chip--archive {
	color: #718096;
	background: #f8f9fa;
	border-color: #eef0f3;
	font-size: 0.82rem;
	padding: 0.4rem 0.85rem;
}

.front-category-chip--archive:hover {
	border-color: #d1d5db;
	color: #4a5568;
	background: #f1f5f9;
}

.front-topics-archive__note {
	font-size: 0.7rem;
	color: #cbd5e1;
	margin: 0.55rem 0 0;
}


/* ============================================================
 * 4. Responsive
 * ============================================================ */

@media (max-width: 768px) {

	/* Hero */
	.front-hero {
		padding: 3.25rem 1rem 2.25rem;
	}

	.front-hero__title {
		font-size: 1.3rem;
	}

	.front-hero__desc {
		font-size: 0.87rem;
		max-width: 100%;
	}

	/* Sections */
	.front-section {
		padding: 2rem 0;
	}

	.front-section__inner {
		padding: 0 1rem;
	}

	/* Row: ~1.8 cards visible, hide nav arrows on mobile */
	.front-row__card {
		flex: 0 0 auto;
		width: calc(55% - 0.4rem);
	}

	.front-row__nav {
		display: none;
	}

	/* Topics: full width chips */
	.front-category-chip {
		padding: 0.55rem 0.9rem;
	}
}
