/**
 * Series Archive Page Styles
 *
 * Series hero matches product catalog: rectangle overlay + text styling.
 *
 * @package Plastpro
 * @since 1.0.0
 */

/* ============================================
   Series Hero Section (matches catalog hero)
   ============================================ */

.series-hero {
	position: relative;
	width: 100%;
	min-height: var(--plastpro-hero-min-height);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.series-hero .hero-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.series-hero .hero-overlay {
	position: relative;
	width: 100%;
	height: 100%;
	background: rgba(29, 37, 45, 0.3); /* #1D252D at 30% opacity */
	z-index: 1;
}

.series-hero .hero-text-wrapper {
	position: absolute;
	left: calc(20% - 50px);
	right: auto;
	width: 900px;
	max-width: 900px;
	height: 183px;
	display: flex;
	align-items: center;
	top: 50%;
	transform: translateY(-50%);
}

.series-hero .hero-text-content {
	position: relative;
	z-index: 1;
	padding: 20px 32px;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	text-align: left;
}

.series-hero .hero-text-content .hero-description,
.series-hero .hero-text-content .hero-title {
	text-align: left;
}

.series-hero .hero-text-content .hero-description {
	font-family: 'Montserrat', sans-serif !important;
	font-size: var(--font-size-small) !important;
	font-weight: 700 !important;
	line-height: 22px !important;
	text-transform: uppercase !important;
	margin: 0 0 10px 0 !important;
	color: #FFFFFF !important;
	white-space: pre-wrap;
	letter-spacing: 0.5px;
}

.series-hero .hero-text-content .hero-title {
	font-family: 'Gilda Display', serif !important;
	font-size: var(--font-size-display) !important;
	font-weight: 400 !important;
	line-height: 1.1 !important;
	margin: 0 !important;
	color: #FFFFFF !important;
	white-space: pre-line;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

/* Series Archive Intro Text */
.series-archive-intro {
	padding: 3rem 0;
	text-align: center;
}

/* Match global h2 / block section title (style.css .page-content-wrapper-custom h2) */
.series-archive-intro-title {
	color: #1D252D;
	text-align: center;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	font-size: var(--font-size-section-title);
	font-weight: 300;
	line-height: 1.3;
	margin: 0 0 1.5rem 0;
}

.series-archive-intro-content {
	color: #000;
	text-align: center;
	font-family: 'Montserrat', sans-serif;
	font-size: var(--font-size-large);
	font-style: normal;
	font-weight: 400;
	line-height: 22px; /* 122.222% */
	max-width: 900px;
	margin: 0 auto;
}

.series-archive-intro-content p {
	margin-bottom: 1.5rem;
}

.series-archive-intro-content p:last-child {
	margin-bottom: 0;
}

/* Intro and cards section: use site-container-max-wide (90rem) */
.series-archive-intro .site-container,
.series-archive-content .site-container {
	max-width: var(--site-container-max-wide);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
	box-sizing: border-box;
}

/* Series Archive Content */
.series-archive-content {
	padding: 4rem 0;
}

.series-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	margin-bottom: 3rem;
}

/* Series Card */
.series-card {
	background: #FFFFFF;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
	height: 340px;
	text-decoration: none;
	color: inherit;
}

.series-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.series-card-image {
	width: 33.68%; /* ~38% of 380px = ~144px, but using percentage for flexibility */
	flex-shrink: 0;
	overflow: hidden;
	height: 100%;
}

.series-card-image img {
	padding-top: 25px;
	padding-left: 16px;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.3s ease;
}

.series-card:hover .series-card-image img {
	transform: scale(1.02);
}

.series-card-content {
	flex: 1;
	padding: 60px 20px 50px 16px;
	display: flex;
	flex-direction: column;
	justify-content: space-between; /* Space between title/excerpt and button */
	height: 100%; /* Fill full card height */
}

/* .series-card-title moved to style.css */

.series-card-excerpt {
	font-family: 'Montserrat', sans-serif;
	font-size: var(--font-size-small);
	font-weight: 400;
	line-height: 18px;
	color: #1D252D;
	margin: 0 0 20px 0; /* Reduced spacing between description and link */
	flex: 1; /* Take available space */
	min-height: 0; /* Allow shrinking */
	overflow: hidden; /* Clip text that exceeds available space */
	display: -webkit-box;
	-webkit-line-clamp: 4; /* Limit to 4 lines */
	-webkit-box-orient: vertical;
}

.series-card-excerpt p {
	margin: 0;
}

/* Series card link uses the reusable learn-more-link class from style.css */
.series-card-link {
	position: relative;
	flex-shrink: 0; /* Don't shrink, always stay at bottom */
	pointer-events: none; /* Prevent link within link */
}

/* Series-specific hover behavior */
.series-card:hover .series-card-link {
	color: #C65A0F;
}

/* No Series Found */
.no-series-found {
	padding: 4rem 0;
	text-align: center;
}

/* Responsive – series hero (matches catalog breakpoints) */
@media (max-width: 1200px) {
	.series-hero .hero-text-wrapper {
		width: 800px;
		max-width: 800px;
	}

	.series-hero .hero-text-content {
		padding: 20px 28px;
	}

	.series-hero .hero-text-content .hero-title {
		font-size: var(--font-size-display) !important;
		line-height: 1.1 !important;
	}

	.series-hero .hero-text-content .hero-description {
		font-size: var(--font-size-xs) !important;
		line-height: 20px !important;
	}
}

@media (max-width: 1024px) {
	.series-hero .hero-text-wrapper {
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100% - 40px);
		max-width: 860px;
	}

	.series-hero .hero-text-content {
		padding: 18px 28px;
	}

	.series-hero .hero-text-content .hero-title {
		font-size: var(--font-size-display) !important;
		line-height: 1.1 !important;
	}

	.series-hero .hero-text-content .hero-description {
		font-size: var(--font-size-xs) !important;
		line-height: 20px !important;
	}

	.series-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}
}

@media (max-width: 820px) {
	.series-hero .hero-text-wrapper {
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100% - 40px);
		max-width: calc(100% - 40px);
	}
}

@media (max-width: 768px) {
	.series-hero .hero-text-wrapper {
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100% - 40px);
		max-width: calc(100% - 40px);
		height: auto;
		min-height: 150px;
	}

	.series-hero .hero-text-content {
		padding: 16px 20px;
	}

	.series-hero .hero-text-content .hero-title {
		font-size: var(--font-size-h1) !important;
		line-height: 1.15 !important;
	}

	.series-hero .hero-text-content .hero-description {
		font-size: var(--font-size-xs) !important;
		line-height: 18px !important;
	}

	.series-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}

	.series-card {
		/* Keep horizontal layout (image left, text right) */
		flex-direction: row;
		height: auto;
		min-height: 200px;
	}

	.series-card-image {
		width: 30%; /* Smaller image on mobile */
		min-width: 100px;
		height: auto;
		min-height: 180px;
	}

	.series-card-image img {
		padding-top: 15px;
		padding-left: 10px;
	}

	.series-card-content {
		flex: 1;
		height: 100%; /* Fill full card height on mobile */
		justify-content: space-between; /* Match desktop layout */
	}

	/* .series-card-title responsive moved to style.css */

	.series-card-excerpt {
		font-size: var(--font-size-xs);
		line-height: 17px;
		margin-bottom: 10px;
		flex: 1; /* Maintain flex on mobile */
		min-height: 0; /* Allow shrinking */
		overflow: hidden; /* Clip text */
		-webkit-line-clamp: 4; /* Limit to 4 lines on mobile too */
	}

	.series-card-link {
		margin-top: 20px;
	}

	.series-archive-intro {
		padding: 2rem 0;
	}

	.series-archive-intro-title {
		font-size: var(--font-size-section-title);
		line-height: 1.3;
		margin-bottom: 1rem;
	}

	.series-archive-intro-content {
		font-size: var(--font-size-h6);
		line-height: 20px; /* 125% - maintaining similar ratio */
	}

	.series-archive-content {
		padding: 2rem 0;
	}
}

@media (max-width: 430px) {
	.series-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

@media (max-width: 480px) {
	.series-hero .hero-text-wrapper {
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100% - 20px);
		max-width: calc(100% - 20px);
		min-height: 120px;
	}

	.series-hero .hero-text-content {
		padding: 12px 16px;
	}

	.series-hero .hero-text-content .hero-title {
		font-size: var(--font-size-h2) !important;
		line-height: 1.15 !important;
	}

	.series-hero .hero-text-content .hero-description {
		font-size: var(--font-size-xs) !important;
		line-height: 16px !important;
	}
}

