/* ══════════════════════════════════════
   Series Banner (injected into posts)
   ══════════════════════════════════════ */

.aitp-series-banner {
	border-left: 3px solid #6BB8AC;
	padding: 12px 20px 12px;
	margin-bottom: 28px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.aitp-series-banner > :last-child {
	margin-bottom: 0;
}

/* Top line: SERIES · Part X of Y */

.aitp-series-banner__top {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
}

.aitp-series-banner__label {
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #2E6B5E;
}

.aitp-series-banner__dot {
	color: #c3c4c7;
	font-size: 0.75rem;
}

.aitp-series-banner__position {
	font-size: 0.75rem;
	color: #646970;
}

/* Main line: Title + nav inline */

.aitp-series-banner__main {
	display: flex;
	align-items: baseline;
	gap: 16px;
	flex-wrap: wrap;
}

.aitp-series-banner__title,
a.aitp-series-banner__title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1rem;
	font-weight: 700;
	color: #1E3A5C;
	text-decoration: none !important;
	line-height: 1.3;
}

a.aitp-series-banner__title:hover {
	color: #3D6F8F;
}

.aitp-series-banner__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-top: 8px;
	font-size: 0.8125rem;
}

.aitp-series-banner__prev,
.aitp-series-banner__next {
	color: #3D6F8F;
	text-decoration: none;
	white-space: nowrap;
	min-width: 60px;
}

.aitp-series-banner__prev:hover,
.aitp-series-banner__next:hover {
	color: #1E3A5C;
}

.aitp-series-banner__prev {
	text-align: left;
}

.aitp-series-banner__next {
	text-align: right;
}

/* Invisible spacer when prev or next is missing */
.aitp-series-banner__nav-spacer {
	min-width: 60px;
}

.aitp-series-banner__toc-toggle {
	background: none;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	color: #3D6F8F;
	padding: 3px 14px;
	font-size: 0.8125rem;
	cursor: pointer;
	white-space: nowrap;
	font-family: inherit;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.aitp-series-banner__toc-toggle:hover {
	background: #3D6F8F;
	border-color: #3D6F8F;
	color: #fff;
}

/* Expandable TOC */

.aitp-series-banner__toc {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease, margin-top 0.3s ease;
}

.aitp-series-banner__toc--open {
	max-height: 600px;
	margin-top: 10px;
	border-top: 1px solid rgba(107, 184, 172, 0.25);
	padding-top: 8px;
}

.aitp-series-banner__toc-item {
	padding: 5px 8px 5px 8px;
	font-size: 0.8125rem;
	border-radius: 4px;
}

.aitp-series-banner__toc-item a {
	color: #3D6F8F;
	text-decoration: none;
}

.aitp-series-banner__toc-item a:hover {
	color: #1E3A5C;
	text-decoration: underline;
}

.aitp-series-banner__toc-item--current {
	font-weight: 600;
	color: #2C2C2C;
	background: rgba(107, 184, 172, 0.12);
}

/* ══════════════════════════════════════
   Bottom Series Nav (after post content)
   ══════════════════════════════════════ */

.aitp-series-bottom-nav {
	border-top: 2px solid #6BB8AC;
	margin-top: 40px;
	padding-top: 20px;
}

.aitp-series-bottom-nav__header {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 16px;
}

.aitp-series-bottom-nav__label {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 0.9375rem;
	font-weight: 700;
	color: #1E3A5C;
}

.aitp-series-bottom-nav__position {
	font-size: 0.75rem;
	color: #646970;
}

.aitp-series-bottom-nav__links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.aitp-series-bottom-nav__link {
	display: block;
	padding: 14px 18px;
	background: #fff;
	border: 1px solid #d5d0cb;
	border-radius: 6px;
	text-decoration: none !important;
	transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.aitp-series-bottom-nav__link:hover {
	background: #F5F0EB;
	border-color: #6BB8AC;
	box-shadow: 0 2px 8px rgba(30, 58, 92, 0.08);
}

.aitp-series-bottom-nav__link--next {
	text-align: right;
}

.aitp-series-bottom-nav__direction {
	display: block;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #646970;
	margin-bottom: 6px;
}

.aitp-series-bottom-nav__link-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #1E3A5C;
	line-height: 1.3;
	text-decoration: none !important;
}

.aitp-series-bottom-nav__link:hover .aitp-series-bottom-nav__link-title {
	color: #3D6F8F;
}

@media (max-width: 768px) {
	.aitp-series-bottom-nav__links {
		grid-template-columns: 1fr;
	}

	.aitp-series-bottom-nav__link--next {
		text-align: left;
	}
}

/* ══════════════════════════════════════
   Series Archive / Landing Page
   ══════════════════════════════════════ */

/* Hero */

.aitp-series-archive__hero {
	position: relative;
	width: 100%;
	height: 400px;
	overflow: hidden;
}

.aitp-series-archive__hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aitp-series-archive__hero-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 60px 40px 40px;
	background: linear-gradient(transparent 0%, rgba(30, 58, 92, 0.5) 40%, rgba(30, 58, 92, 0.92) 100%);
	color: #fff;
}

.aitp-series-archive__hero-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 8px;
	color: #fff;
}

.aitp-series-archive__hero-count {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.92);
	margin: 0;
}

/* Description */

.aitp-series-archive__description {
	max-width: 800px;
	margin: 0 auto 40px;
	font-size: 1.0625rem;
	line-height: 1.7;
	color: #2C2C2C;
}

/* Posts list */

.aitp-series-archive__posts {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 900px;
}

.aitp-series-archive__post {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 24px;
}

.aitp-series-archive__post-number {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.5rem;
	font-weight: 700;
	color: #3D8B7A;
	flex-shrink: 0;
	width: 36px;
	text-align: center;
	padding-top: 12px;
}

.aitp-series-archive__post-link {
	display: flex;
	gap: 20px;
	flex: 1;
	text-decoration: none;
	color: inherit;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.2s, transform 0.2s;
}

.aitp-series-archive__post-link:hover {
	box-shadow: 0 4px 16px rgba(30, 58, 92, 0.1);
	transform: translateY(-2px);
}

.aitp-series-archive__post-thumb {
	width: 240px;
	flex-shrink: 0;
	overflow: hidden;
}

.aitp-series-archive__post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.aitp-series-archive__post-content {
	padding: 16px 20px 16px 0;
	flex: 1;
	min-width: 0;
}

.aitp-series-archive__post-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1E3A5C;
	margin: 0 0 8px;
	line-height: 1.3;
}

.aitp-series-archive__post-link:hover .aitp-series-archive__post-title {
	color: #3D6F8F;
}

.aitp-series-archive__post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 12px;
	font-size: 0.8125rem;
	color: #646970;
	margin-bottom: 8px;
}

.aitp-series-archive__post-dest {
	color: #2E6B5E;
	font-weight: 600;
}

.aitp-series-archive__post-meta > span + span::before {
	content: "\00b7";
	margin-right: 12px;
	color: #c3c4c7;
}

.aitp-series-archive__post-excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #50575e;
	margin: 0;
}

.aitp-series-archive__empty {
	text-align: center;
	color: #646970;
	padding: 40px 0;
	font-size: 1rem;
}

/* ══════════════════════════════════════
   Series Status Badge
   ══════════════════════════════════════ */

.aitp-series-status {
	display: inline-block;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 2px 10px;
	border-radius: 10px;
	margin-left: 8px;
	vertical-align: middle;
}

.aitp-series-status--in-progress {
	background: #1E3A5C;
	color: #fff;
}

.aitp-series-status--complete {
	background: #2E6B5E;
	color: #fff;
}

/* ══════════════════════════════════════
   Series Archive Share Section
   ══════════════════════════════════════ */

.aitp-series-archive__share-section {
	max-width: 900px;
	margin: 0 auto 32px;
}

/* ── Responsive ── */

@media (max-width: 768px) {
	.aitp-series-banner__main {
		flex-direction: column;
		gap: 8px;
	}

	.aitp-series-banner__nav {
		margin-left: 0;
	}

	.aitp-series-archive__hero {
		height: 280px;
	}

	.aitp-series-archive__hero-overlay {
		padding: 24px;
	}

	.aitp-series-archive__hero-title {
		font-size: 1.75rem;
	}

	.aitp-series-archive__post-link {
		flex-direction: column;
	}

	.aitp-series-archive__post-thumb {
		width: 100%;
		height: 180px;
	}

	.aitp-series-archive__post-content {
		padding: 16px;
	}

	.aitp-series-archive__post-number {
		display: none;
	}
}
