/* AI News Widget — Public Styles */

:root {
	--ai-news-primary: #1a73e8;
	--ai-news-secondary: #0b3d91;
	--ai-news-radius: 14px;
	--ai-news-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	--ai-news-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.ai-news-widget-wrap * {
	box-sizing: border-box;
}

/* Grid layout */
.ai-news-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
	margin: 20px 0;
}

@media (max-width: 1024px) {
	.ai-news-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.ai-news-grid {
		grid-template-columns: 1fr;
	}
}

/* Card */
.ai-news-card {
	background: #fff;
	border-radius: var(--ai-news-radius);
	overflow: hidden;
	box-shadow: var(--ai-news-shadow);
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ai-news-animate .ai-news-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--ai-news-shadow-hover);
}

.ai-news-card-thumb-link {
	display: block;
	text-decoration: none;
}

.ai-news-card-thumb {
	position: relative;
	width: 100%;
	padding-top: 60%;
	overflow: hidden;
	background: #eee;
}

.ai-news-card-thumb img,
.ai-news-card-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.ai-news-animate .ai-news-card:hover .ai-news-card-thumb img {
	transform: scale(1.06);
}

.ai-news-card-placeholder {
	background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.ai-news-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--ai-news-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 20px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ai-news-card-body {
	padding: 18px 20px 22px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.ai-news-card-title {
	font-size: 18px;
	line-height: 1.35;
	margin: 0 0 10px;
}

.ai-news-card-title a {
	color: #1a1a1a;
	text-decoration: none;
}

.ai-news-card-title a:hover {
	color: var(--ai-news-primary);
}

.ai-news-card-desc {
	color: #555;
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 14px;
	flex-grow: 1;
}

.ai-news-card-meta {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #888;
	margin-bottom: 14px;
}

.ai-news-readmore-btn {
	display: inline-block;
	align-self: flex-start;
	background: var(--ai-news-primary);
	color: #fff !important;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	padding: 9px 18px;
	border-radius: 30px;
	transition: background 0.25s ease;
}

.ai-news-readmore-btn:hover {
	background: var(--ai-news-secondary);
}

.ai-news-empty {
	text-align: center;
	color: #888;
	padding: 40px 0;
	grid-column: 1 / -1;
}

/* Load more */
.ai-news-load-more-wrap {
	text-align: center;
	margin: 30px 0;
}

.ai-news-load-more-btn {
	background: var(--ai-news-secondary);
	color: #fff;
	border: none;
	padding: 12px 30px;
	border-radius: 30px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.ai-news-load-more-btn:hover {
	opacity: 0.85;
}

.ai-news-loading-spinner {
	display: inline-block;
	margin-left: 10px;
	color: #888;
}

/* Fade-in animation for newly loaded cards */
.ai-news-animate .ai-news-card.ai-news-fade-in {
	animation: aiNewsFadeIn 0.5s ease forwards;
}

@keyframes aiNewsFadeIn {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* -------------------------------------------------- */
/* Single News Detail Page                            */
/* -------------------------------------------------- */
.ai-news-single-wrap {
	max-width: 900px;
	margin: 0 auto;
	padding: 30px 20px 60px;
}

.ai-news-single-title {
	font-size: 24px;
	line-height: 1.35;
	margin: 0 0 20px;
	color: #1a1a1a;
	font-weight: 700;
}

.ai-news-single-body {
	display: flex;
	align-items: stretch;
	gap: 24px;
}

.ai-news-single-image {
	flex: 0 0 42%;
	max-width: 42%;
	border-radius: var(--ai-news-radius);
	overflow: hidden;
	box-shadow: var(--ai-news-shadow);
}

.ai-news-single-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ai-news-single-description {
	flex: 1;
	font-size: 15px;
	line-height: 1.7;
	color: #333;
	overflow-y: auto;
}

.ai-news-single-description p {
	margin: 0 0 12px;
}

@media (max-width: 700px) {
	.ai-news-single-body {
		flex-direction: column;
	}

	.ai-news-single-image {
		flex: 0 0 auto;
		max-width: 100%;
		max-height: 240px;
	}

	.ai-news-single-image img {
		height: 240px;
	}

	.ai-news-single-title {
		font-size: 20px;
	}
}

/* ------------------------------------------------------ */
/* Custom sections - naye sections is class se auto-style  */
/* ho jayenge (e.g. <div class="ai-news-extra-section">)   */
/* Aap chahein to yahan se rang/spacing khud badal sakte    */
/* hain, ya naye custom classes bhi yahan add kar sakte hain */
/* ------------------------------------------------------ */
.ai-news-extra-section {
	margin-top: 30px;
	padding-top: 24px;
	border-top: 1px solid #eee;
	font-size: 15px;
	line-height: 1.7;
	color: #333;
}

.ai-news-extra-section h2 {
	font-size: 19px;
	margin: 0 0 12px;
	color: #1a1a1a;
}

.ai-news-related {
	margin-top: 50px;
}

.ai-news-related h2 {
	font-size: 22px;
	margin-bottom: 16px;
}

@media (max-width: 640px) {
	.ai-news-single-title {
		font-size: 24px;
	}
}
