/**
 * npocto Pro - Latest Magazine Articles Widget Styles
 * Matches Reference Design pixel-perfect
 */

.npocto-magazine-wrapper {
	width: 100%;
	position: relative;
	padding: 1rem 0;
}

/* Header */
.npocto-mag-header {
	margin-bottom: 1rem;
	position: relative;
}

.npocto-mag-heading-group {
	position: relative;
	padding-right: 16px;
	border-right: 4px solid #70cbb4;
}

.npocto-mag-title {
	font-size: 1.55rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 4px 0;
	line-height: 1.3;
}

.npocto-mag-subtitle {
	font-size: 0.95rem;
	color: #64748b;
	margin: 0;
}

/* Accent Divider Line */
.npocto-mag-divider {
	height: 2px;
	background: #f1f5f9;
	margin: 1.2rem 0 2rem 0;
	position: relative;
}

.npocto-mag-divider::before {
	content: '';
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 120px;
	background: #70cbb4;
}

/* Dual Column Layout */
.npocto-mag-grid {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
}

/* Right Column (Featured Expanded Cards) in RTL */
.npocto-mag-main-col {
	flex: 1 1 65%;
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
}

.npocto-mag-featured-card {
	background: #ffffff;
	border-radius: 16px;
	border: 1px solid #f1f5f9;
	padding: 16px;
	display: flex;
	align-items: stretch;
	gap: 18px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: transform;
}

.npocto-mag-featured-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
	border-color: #e2e8f0;
}

.npocto-mag-featured-thumb-wrap {
	flex: 0 0 160px;
	width: 160px;
	height: 135px;
	min-height: 135px;
	align-self: center;
	border-radius: 14px;
	overflow: hidden;
	position: relative;
	background: #f1f5f9;
	flex-shrink: 0;
}

.npocto-mag-featured-thumb-wrap a {
	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

.npocto-mag-featured-thumb-wrap img,
.npocto-mag-featured-thumb {
	width: 100%;
	height: 100%;
	min-height: 100%;
	max-height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	border-radius: 14px;
	transition: transform 0.4s ease;
}

.npocto-mag-featured-card:hover .npocto-mag-featured-thumb {
	transform: scale(1.06);
}

.npocto-mag-featured-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}

.npocto-mag-featured-title {
	font-size: 1.05rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 6px 0;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
	max-height: 3.1em;
}

.npocto-mag-featured-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.npocto-mag-featured-title a:hover {
	color: #0f766e;
}

.npocto-mag-featured-excerpt {
	font-size: 0.84rem;
	line-height: 1.7;
	color: #334155;
	margin: 0 0 12px 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
	max-height: 3.4em;
}

/* Featured Footer Meta */
.npocto-mag-featured-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	width: 100%;
}

.npocto-mag-meta-group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.npocto-mag-btn-readmore {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: #0f766e;
	color: #ffffff;
	padding: 7px 18px;
	min-height: 36px;
	box-sizing: border-box;
	border-radius: 8px;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 2px 6px rgba(15, 118, 110, 0.3);
	transition: transform 0.2s ease, background-color 0.2s ease;
	will-change: transform;
	flex-shrink: 0;
}

.npocto-mag-btn-readmore:hover {
	background: #115e59;
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(15, 118, 110, 0.4);
}

.npocto-mag-category-tag {
	font-size: 0.75rem;
	color: #1e40af;
	background: #dbeafe;
	padding: 4px 10px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 700;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease;
	line-height: 1.4;
}

.npocto-mag-category-tag:hover {
	background: #1e40af;
	color: #ffffff;
}

.npocto-meta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.npocto-btn-icon {
	display: inline-flex;
	align-items: center;
}

.npocto-mag-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
}

.npocto-mag-meta-item[itemprop="author"] {
	color: #047857;
}

.npocto-mag-meta-item[itemprop="author"] svg,
.npocto-mag-meta-item[itemprop="author"] i {
	color: #047857;
	fill: currentColor;
	font-size: 13px;
}

.npocto-mag-meta-item[itemprop="datePublished"] {
	color: #4338ca;
}

.npocto-mag-meta-item[itemprop="datePublished"] svg,
.npocto-mag-meta-item[itemprop="datePublished"] i {
	color: #4338ca;
	fill: currentColor;
	font-size: 13px;
}

/* Left Column (Compact Stack) */
.npocto-mag-side-col {
	flex: 1 1 35%;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.npocto-mag-compact-card {
	background: #ffffff;
	border-radius: 14px;
	border: 1px solid #f1f5f9;
	padding: 12px;
	display: flex;
	align-items: center;
	gap: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: transform;
}

.npocto-mag-compact-card:hover {
	transform: translateY(-2px);
	border-color: #e2e8f0;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.npocto-mag-compact-thumb-wrap {
	flex: 0 0 78px;
	width: 78px;
	height: 78px;
	min-height: 78px;
	border-radius: 14px;
	overflow: hidden;
	position: relative;
	background: #f1f5f9;
	flex-shrink: 0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.npocto-mag-compact-thumb-wrap a {
	display: block;
	width: 100%;
	height: 100%;
}

.npocto-mag-compact-thumb-wrap img,
.npocto-mag-compact-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	border-radius: 14px;
	transition: transform 0.3s ease;
}

.npocto-mag-compact-card:hover .npocto-mag-compact-thumb {
	transform: scale(1.08);
}

.npocto-mag-compact-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}

.npocto-mag-compact-title {
	font-size: 0.92rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 12px 0;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.npocto-mag-compact-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.npocto-mag-compact-title a:hover {
	color: #0f766e;
}

.npocto-mag-compact-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
}

.npocto-mag-compact-category {
	font-size: 0.75rem;
	color: #1e40af;
	background: #dbeafe;
	padding: 6px 14px;
	min-height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 700;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
	line-height: 1.4;
}

.npocto-mag-compact-category:hover {
	background: #1e40af;
	color: #ffffff;
}

.npocto-mag-btn-compact {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	background: #0f766e;
	color: #ffffff;
	padding: 6px 16px;
	min-height: 38px;
	box-sizing: border-box;
	border-radius: 8px;
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 2px 6px rgba(15, 118, 110, 0.3);
	transition: transform 0.2s ease, background-color 0.2s ease;
	will-change: transform;
}

.npocto-mag-btn-compact:hover {
	background: #115e59;
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(15, 118, 110, 0.4);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
	.npocto-mag-grid {
		flex-direction: column;
	}
	.npocto-mag-main-col,
	.npocto-mag-side-col {
		width: 100%;
		flex: 1 1 100%;
	}
}

@media (max-width: 768px) {
	.npocto-mag-featured-card {
		flex-direction: column !important;
		align-items: stretch !important;
		padding: 14px !important;
	}
	.npocto-mag-featured-thumb-wrap {
		width: 100% !important;
		min-width: 100% !important;
		max-width: 100% !important;
		height: 195px !important;
		min-height: 195px !important;
		max-height: 195px !important;
		flex: 0 0 195px !important;
		border-radius: 14px !important;
		align-self: stretch !important;
	}
	.npocto-mag-featured-thumb-wrap a {
		position: relative !important;
		display: block !important;
		height: 100% !important;
		width: 100% !important;
	}
	.npocto-mag-featured-thumb {
		width: 100% !important;
		height: 100% !important;
		object-fit: cover !important;
	}
	.npocto-mag-featured-body {
		padding-top: 10px;
	}
	.npocto-mag-featured-footer {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		flex-wrap: nowrap !important;
		gap: 6px !important;
		width: 100% !important;
	}
	.npocto-mag-meta-group {
		display: flex !important;
		align-items: center !important;
		flex-wrap: nowrap !important;
		gap: 6px !important;
		font-size: 0.72rem !important;
		overflow-x: auto !important;
		scrollbar-width: none !important;
	}
	.npocto-mag-meta-group::-webkit-scrollbar {
		display: none;
	}
	.npocto-mag-btn-readmore {
		padding: 5px 14px !important;
		font-size: 0.78rem !important;
	}
}
