/* ── Outer wrapper ─────────────────────────────────────────────────── */
.easpnet-pt-slider {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* ── Header row ────────────────────────────────────────────────────── */
.easpnet-pt-slider-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
}

.easpnet-pt-slider-header-left {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.easpnet-pt-section-label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #666;
}

.easpnet-pt-heading {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	color: #111;
}

/* ── Arrow buttons ─────────────────────────────────────────────────── */
.easpnet-pt-slider-header-right {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
	align-self: flex-end;
}

.easpnet-pt-btn-prev,
.easpnet-pt-btn-next {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	/* Use border-style solid with 0 width so border-color can be overridden by Elementor */
	border-style: solid;
	border-width: 0;
	border-color: transparent;
	border-radius: 10px;
	background-color: #E7EAF0;
	color: #333;
	cursor: pointer;
	/* transition-duration is controlled by Elementor; list all animatable props here */
	transition-property: background-color, color, border-color, box-shadow;
	transition-duration: 250ms;
	transition-timing-function: ease;
	padding: 0;
	flex-shrink: 0;
}

/* Default hover — overridden by Elementor-generated CSS when admin sets a value */
.easpnet-pt-btn-prev:hover,
.easpnet-pt-btn-next:hover {
	background-color: #d8dce7;
}

/* All icon children inherit the button's color value */
.easpnet-pt-btn-prev *,
.easpnet-pt-btn-next * {
	pointer-events: none;
}

.easpnet-pt-btn-prev i,
.easpnet-pt-btn-next i {
	color: inherit;
}

.easpnet-pt-btn-prev svg,
.easpnet-pt-btn-next svg {
	width: 18px;
	height: 18px;
	display: block;
	overflow: visible;
	/* SVG uses currentColor so it follows the button's color property */
	color: inherit;
}

/* Default SVG (polyline-based chevron) */
.easpnet-pt-btn-prev svg polyline,
.easpnet-pt-btn-next svg polyline {
	fill: none;
	stroke: currentColor;
}

/* Elementor Font Awesome SVG (path-based) */
.easpnet-pt-btn-prev svg path,
.easpnet-pt-btn-next svg path {
	fill: currentColor;
}

/* Disabled state (Swiper adds these classes) */
.easpnet-pt-btn-prev.swiper-button-disabled,
.easpnet-pt-btn-next.swiper-button-disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* ── Swiper ────────────────────────────────────────────────────────── */
.easpnet-pt-swiper {
	overflow: hidden;
	width: 100%;
}

/* ── Fallback when Swiper.js fails to load/initialize ────────────────
   Without Swiper JS, .swiper-wrapper never gets its height/flex layout
   set, so the overflow:hidden above would clip every slide after the
   first. Let content stack and flow naturally instead. */
.easpnet-pt-slider--no-swiper .easpnet-pt-swiper {
	overflow: visible;
}

.easpnet-pt-slider--no-swiper .swiper-wrapper {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.easpnet-pt-slider--no-swiper .swiper-slide {
	width: 100% !important;
}

/* ── Slide layout ──────────────────────────────────────────────────── */
.easpnet-pt-slide {
	display: grid;
	grid-template-columns: 55fr 45fr;
	align-items: center; /* card vertically centred against image */
	/* Padding reserves space for the card's box-shadow on all sides.
	   The swiper stays overflow:hidden so adjacent slides stay hidden. */
	padding: 20px 20px 20px 0;
}

/* ── Featured image ────────────────────────────────────────────────── */
.easpnet-pt-slide-image {
	overflow: hidden;
	border-radius: 12px;
	position: relative;
	background: #e8e8e8;
	/* Fix image height; card height = 74% of this value */
	height: 447px;
}

.easpnet-pt-slide-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.easpnet-pt-image-placeholder {
	width: 100%;
	height: 100%;
	background: #ddd;
}

/* ── Content card ──────────────────────────────────────────────────── */
.easpnet-pt-slide-card {
	position: relative;
	z-index: 2;
	margin-left: -40px;
	padding: 40px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
	display: flex;
	flex-direction: column;
	gap: 16px;
	/* 74% of image height (447px) ≈ 332px */
	height: 332px;
	overflow: hidden;
}

/* ── Tags ──────────────────────────────────────────────────────────── */
.easpnet-pt-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.easpnet-pt-tag {
	display: inline-block;
	padding: 4px 12px;
	background: #f0f0f0;
	color: #555;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
}

/* ── Post title ────────────────────────────────────────────────────── */
.easpnet-pt-post-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
	color: #111;
}

/* ── Excerpt ───────────────────────────────────────────────────────── */
.easpnet-pt-excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
	color: #555;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Card footer (read more + logo on same row) ────────────────────── */
.easpnet-pt-card-footer {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-top: auto;
}

/* ── Read more ─────────────────────────────────────────────────────── */
.easpnet-pt-read-more {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 14px;
	color: inherit;
	text-decoration: none;
	flex-shrink: 0;
}

.easpnet-pt-read-more:hover span{
	font-weight: 700 !important;
}

/* Icon inside Read More button — covers both <i> (Font Awesome) and <svg> */
.easpnet-pt-read-more i,
.easpnet-pt-read-more svg {
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: middle;
	flex-shrink: 0;
	stroke: currentColor;
	transition: all 0.3s;
}

.easpnet-pt-read-more:hover svg{
	transform: translateX(5px);
}

/* ── Logo ──────────────────────────────────────────────────────────── */
.easpnet-pt-logo-wrap {
	display: flex;
	justify-content: flex-end;
	flex-shrink: 0;
}

.easpnet-pt-logo {
	max-width: 80px;
	height: auto;
	display: block;
	object-fit: contain;
}

/* ── View All ──────────────────────────────────────────────────────── */
.easpnet-pt-view-all-wrap {
	display: flex;
	justify-content: flex-start;
}

.easpnet-pt-view-all {
	display: inline-block;
	padding: 12px 32px;
	border: 1px solid #333;
	border-radius: 4px;
	background: transparent;
	color: #333;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	transition: background 0.25s, color 0.25s, border-color 0.25s;
	cursor: pointer;
}

.easpnet-pt-view-all:hover {
	background: rgba(0, 0, 0, 0.05);
}

.easpnet-pt-view-all--load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font: inherit;
}

.easpnet-pt-view-all--loading {
	opacity: 0.6;
	cursor: progress;
}

.easpnet-pt-view-all--done {
	opacity: 0.5;
	cursor: default;
	pointer-events: none;
}

.easpnet-pt-view-all-spinner {
	display: none;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	opacity: 0.7;
	animation: easpnet-pt-spin 0.65s linear infinite;
}

.easpnet-pt-view-all--loading .easpnet-pt-view-all-spinner {
	display: inline-block;
}

@keyframes easpnet-pt-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ── Bottom arrows (mobile) — hidden by default ────────────────────── */
.easpnet-pt-slider-arrows-bottom {
	display: none;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
	.easpnet-pt-slide {
		/* Force single column regardless of the Card Width control */
		grid-template-columns: 1fr !important;
		gap: 0;
		padding: 12px; /* preserve shadow space */
		align-items: start; /* card overlaps image from the top */
	}

	.easpnet-pt-slide-image {
		height: 240px;
		border-radius: 12px;
		/* image sits in row 1 */
		grid-row: 1;
	}

	.easpnet-pt-slide-card {
		/* card sits in row 2 but pulls up over the image */
		grid-row: 2;
		width: 90%;
		justify-self: center;
		margin-top: -40px; /* overlap amount */
		border-radius: 12px;
		padding: 28px;
		height: auto;
		overflow: visible;
	}
}

@media (max-width: 767px) {
	.easpnet-pt-slider-header{
		padding-left: 20px;
	}
	/* Header arrow → hidden; bottom arrows take over */
	.easpnet-pt-slider-header-right {
		display: none;
	}

	/* Bottom arrows: visible and centred */
	.easpnet-pt-slider-arrows-bottom {
		display: flex;
		justify-content: center;
		gap: 8px;
	}

	/* View All: full-width */
	.easpnet-pt-view-all {
		display: block;
		width: 100%;
		text-align: center;
	}

	.easpnet-pt-slider-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.easpnet-pt-heading {
		font-size: 22px;
	}

	.easpnet-pt-slide {
		padding: 0;
	}

	.easpnet-pt-slide-image {
		height: 200px; /* overridden when aspect-ratio is set via Elementor */
	}

	.easpnet-pt-slide-card {
		margin-top: -32px;
		padding: 20px;
		gap: 12px;
	}

	.easpnet-pt-post-title {
		font-size: 18px;
	}
}

/* ── 格狀佈局 ───────────────────────────────────────────────────── */
.easpnet-pt-slider--grid .easpnet-pt-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px 36px;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 0;
	background: #fff;
	border: 1px solid #d6e7f5;
	border-radius: 12px;
	overflow: hidden;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item .easpnet-pt-slide-image {
	height: 292px;
	border-radius: 0;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-slide-image {
	border-radius: 12px 12px 0 0 !important;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-slide-card {
	width: auto;
	height: auto;
	min-height: 278px;
	margin: 0 !important;
	padding: 28px 30px 30px !important;
	background: #fff !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	flex: 1 1 auto;
	gap: 12px;
	overflow: visible;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-post-title {
	font-size: 24px;
	line-height: 1.35;
	color: #052247;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-excerpt {
	font-size: 15px;
	line-height: 1.7;
	color: #052247;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-tags {
	gap: 8px;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-tag {
	padding: 2px 10px;
	background: #e9edf3;
	color: #7a8493;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.45;
	font-weight: 500;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-card-footer {
	align-items: center;
	margin-top: auto;
	padding-top: 20px;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-read-more {
	color: #0073bd;
	font-weight: 700;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-logo {
	max-width: 92px;
	max-height: 46px;
	object-fit: contain;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 55fr 45fr;
	align-items: center;
	padding: 20px 20px 20px 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	overflow: visible;
}

@media (min-width: 1024px) {
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured {
		box-shadow: none !important;
	}
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-slide-image {
	height: 447px;
	border-radius: 12px;
}

.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-slide-card {
	height: 332px;
	min-height: 0;
	margin-left: -40px;
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
	overflow: hidden;
}

.easpnet-pt-slider--grid .easpnet-pt-excerpt {
	-webkit-line-clamp: 2;
}

.easpnet-pt-editor-notice {
	padding: 12px 16px;
	border-left: 4px solid #d63638;
	background: #fcf0f1;
	color: #3c434a;
	font-size: 13px;
	line-height: 1.5;
}

@media (max-width: 1023px) {
	.easpnet-pt-slider--grid .easpnet-pt-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured {
		display: flex;
		flex-direction: column;
		padding: 0;
		background: #fff;
		border: 1px solid #d6e7f5;
		border-radius: 12px;
		overflow: hidden;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item .easpnet-pt-slide-image,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-slide-image {
		height: 240px;
		border-radius: 0;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-slide-image,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-slide-image {
		border-radius: 12px 12px 0 0 !important;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-slide-card,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-slide-card {
		width: auto;
		height: auto;
		min-height: 0;
		margin: 0 !important;
		padding: 28px !important;
		border-radius: 0;
		box-shadow: none;
		overflow: visible;
	}
}

@media (max-width: 767px) {
	.easpnet-pt-slider--grid .easpnet-pt-grid {
		gap: 24px;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item .easpnet-pt-slide-image,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-slide-image {
		height: 200px;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-slide-image,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-slide-image {
		border-radius: 12px 12px 0 0 !important;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-slide-card,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-slide-card {
		padding: 20px !important;
		border-radius: 0 0 12px 12px !important;
		gap: 12px;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-post-title,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-post-title {
		font-size: 20px;
		line-height: 1.35;
		color: #052247;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-excerpt,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-excerpt {
		font-size: 14px;
		line-height: 1.7;
		color: #052247;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-tags,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-tags {
		gap: 8px;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-tag,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-tag {
		padding: 2px 10px;
		background: #e9edf3;
		color: #7a8493;
		border-radius: 4px;
		font-size: 14px;
		line-height: 1.45;
		font-weight: 500;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-card-footer,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-card-footer {
		align-items: center;
		margin-top: auto;
		padding-top: 20px;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-read-more,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-read-more {
		color: #0073bd;
		font-weight: 700;
	}

	.easpnet-pt-slider--grid .easpnet-pt-grid-item:not(.easpnet-pt-grid-item--featured) .easpnet-pt-logo,
	.easpnet-pt-slider--grid .easpnet-pt-grid-item--featured .easpnet-pt-logo {
		max-width: 92px;
		max-height: 46px;
		object-fit: contain;
	}
}
