/**
 * Lite News Radio - Frontend Styles
 * Fully responsive CSS for mobile-first design
 *
 * @package Lite_News_Radio
 */

/* Ensure styles apply with proper specificity */
/* Use !important sparingly but necessary for theme compatibility */
body .lnr-news-card,
body .lnr-slide,
body .lnr-breaking-news,
.lnr-news-card,
.lnr-slide,
.lnr-breaking-news {
	box-sizing: border-box !important;
}

:root {
	--lnr-primary-color: #FF0000;
	--lnr-secondary-color: #D71920;
	--lnr-text-color: #333333;
	--lnr-border-radius: 8px;
	--lnr-spacing: 1rem;
	--lnr-transition: all 0.3s ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
/* lnr-slider-dots */
.lnr-news-item,
.lnr-news-card,
.lnr-slide,
.lnr-breaking-news {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: var(--lnr-text-color);
	box-sizing: border-box;
}

/* ==========================================================================
   News Grid Layout - Using Bootstrap Grid
   ========================================================================== */

/* Bootstrap grid is handled by Bootstrap classes - no custom grid needed */

/* ==========================================================================
   News Cards
   ========================================================================== */

.lnr-news-card {
	background: transparent !important;
	border-radius: var(--lnr-border-radius) !important;
	overflow: hidden !important;
	box-shadow: none !important;
	transition: var(--lnr-transition) !important;
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	margin-bottom: 1.5rem !important;
}

.lnr-news-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

.lnr-card-image {
	position: relative !important;
	width: 100% !important;
	overflow: hidden !important;
	aspect-ratio: 16 / 9 !important;
	background: transparent !important;
}

.lnr-card-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	transition: var(--lnr-transition) !important;
	display: block !important;
}

.lnr-news-card:hover .lnr-card-image img {
	transform: scale(1.05);
}

.lnr-card-content {
	padding: var(--lnr-spacing) !important;
	display: flex !important;
	flex-direction: column !important;
	flex-grow: 1 !important;
}

.lnr-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	font-size: 0.875rem;
}

.lnr-category-tag {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background-color: var(--lnr-primary-color);
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	transition: var(--lnr-transition);
}

.lnr-category-tag:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.lnr-card-date {
	color: #666;
	font-size: 0.875rem;
}

.lnr-card-title {
	margin: 0 0 0.75rem 0 !important;
	font-size: 1.25rem !important;
	line-height: 1.4 !important;
	font-weight: 600 !important;
}

.lnr-card-title a {
	color: var(--lnr-text-color) !important;
	text-decoration: none !important;
	transition: var(--lnr-transition) !important;
}

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

/* Bootstrap card title hover - red color */
.card-title a:hover {
	color: #dc3545 !important;
	text-decoration: none;
}

.lnr-card-excerpt {
	margin-bottom: 1rem;
	color: #666;
	line-height: 1.6;
	flex-grow: 1;
}

.lnr-read-more {
	display: inline-block;
	padding: 0.5rem 1rem;
	background-color: var(--lnr-primary-color);
	color: #fff !important;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.875rem;
	font-weight: 600;
	transition: var(--lnr-transition);
	align-self: flex-start;
}

.lnr-read-more:hover {
	background-color: var(--lnr-secondary-color);
	color: #fff !important;
	transform: translateY(-1px);
}

/* Bootstrap button override for read more */
.lnr-news-card .btn-primary {
	background-color: var(--lnr-primary-color);
	border-color: var(--lnr-primary-color);
}

.lnr-news-card .btn-primary:hover {
	background-color: var(--lnr-secondary-color);
	border-color: var(--lnr-secondary-color);
}

/* ==========================================================================
   Breaking News Badge
   ========================================================================== */

.lnr-breaking-badge {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	background-color: #d32f2f;
	color: #fff;
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	z-index: 10;
}

/* ==========================================================================
   News Slider
   ========================================================================== */

.lnr-slider-container {
	position: relative;
	width: 100%;
	margin: var(--lnr-spacing) 0;
	overflow: hidden;
	border-radius: var(--lnr-border-radius);
	background: transparent;
	box-shadow: none;
}

.lnr-slider-wrapper {
	display: flex;
	transition: transform 0.5s ease;
	gap: 1rem;
	padding: 0 0.5rem;
	will-change: transform;
}

.lnr-slide {
	position: relative;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	width: 100%;
}

/* Desktop: 3 items per view */
@media (min-width: 992px) {
	.lnr-slider-wrapper {
		padding: 0 1rem;
	}
	.lnr-slide {
		width: calc((100% - 2rem) / 3);
		min-width: calc((100% - 2rem) / 3);
		max-width: calc((100% - 2rem) / 3);
	}
}

/* Tablet: 2 items per view */
@media (min-width: 768px) and (max-width: 991px) {
	.lnr-slide {
		width: calc((100% - 1rem) / 2);
		min-width: calc((100% - 1rem) / 2);
		max-width: calc((100% - 1rem) / 2);
	}
}

/* Mobile: 1 item per view */
@media (max-width: 767px) {
	.lnr-slider-wrapper {
		padding: 0;
		gap: 0;
	}
	.lnr-slide {
		width: 100%;
		min-width: 100%;
		max-width: 100%;
	}
}

.lnr-slide-image {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: transparent;
}

.lnr-slide-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	min-height: 400px;
}

.lnr-slide-content {
	padding: var(--lnr-spacing);
	background: transparent;
}

.lnr-slide-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	font-size: 0.875rem;
}

.lnr-slide-date {
	color: #666;
}

.lnr-slide-title {
	margin: 0 0 0.75rem 0;
	font-size: 1.5rem;
	line-height: 1.3;
	font-weight: 600;
}

.lnr-slide-title a {
	color: var(--lnr-text-color);
	text-decoration: none;
	transition: var(--lnr-transition);
}

.lnr-slide-title a:hover {
	color: var(--lnr-primary-color);
}

.lnr-slide-excerpt {
	margin-bottom: 1rem;
	color: #666;
	line-height: 1.6;
}

.lnr-slider-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 100%;
	display: flex;
	justify-content: space-between;
	padding: 0 1rem;
	pointer-events: none;
	z-index: 10;
}

.lnr-slider-prev,
.lnr-slider-next {
	width: 48px;
	height: 48px;
	font-size: 24px;
	line-height: 1;
	z-index: 10;
}

.lnr-slider-prev:hover,
.lnr-slider-next:hover {
	transform: scale(1.1);
	background-color: #fff !important;
}

.lnr-slider-dots {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	padding: 1rem;
}

.lnr-slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.3);
	border: none;
	cursor: pointer;
	transition: var(--lnr-transition);
}

.lnr-slider-dot.active {
	background-color: var(--lnr-primary-color);
}

/* ==========================================================================
   Breaking News Ticker
   ========================================================================== */

.lnr-breaking-news {
	display: flex;
	align-items: center;
	background-color: #d32f2f;
	color: #fff;
	overflow: hidden;
	position: relative;
	margin: var(--lnr-spacing) 0;
}

.lnr-breaking-label {
	background-color: rgba(0, 0, 0, 0.2);
	padding: 0 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.875rem;
	white-space: nowrap;
	z-index: 10;
	display: flex;
	align-items: center;
}

.lnr-breaking-content {
	flex: 1;
	overflow: hidden;
	position: relative;
}

.lnr-breaking-items {
	display: flex;
	animation: scroll-horizontal linear infinite;
	white-space: nowrap;
}

.lnr-breaking-item {
	padding: 0 2rem;
	display: inline-block;
}

.lnr-breaking-item a {
	color: #fff;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.lnr-breaking-time {
	font-weight: 600;
	opacity: 0.9;
}

.lnr-breaking-title {
	font-weight: 500;
}

.lnr-breaking-item:hover .lnr-breaking-title {
	text-decoration: underline;
}

@keyframes scroll-horizontal {
	0% {
		transform: translateX(100%);
	}
	100% {
		transform: translateX(-100%);
	}
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.lnr-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	margin: 2rem 0;
	flex-wrap: wrap;
}

.lnr-pagination a,
.lnr-pagination span {
	padding: 0.5rem 1rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	color: var(--lnr-text-color);
	transition: var(--lnr-transition);
}

.lnr-pagination a:hover,
.lnr-pagination .current {
	background-color: var(--lnr-primary-color);
	color: #fff;
	border-color: var(--lnr-primary-color);
}

/* ==========================================================================
   Widget Styles
   ========================================================================== */

.lnr-widget-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.lnr-widget-item {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #eee;
}

.lnr-widget-item:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.lnr-widget-thumb {
	display: block;
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	overflow: hidden;
	border-radius: 4px;
}

.lnr-widget-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--lnr-transition);
}

.lnr-widget-thumb:hover img {
	transform: scale(1.1);
}

.lnr-widget-content {
	flex: 1;
}

.lnr-widget-title {
	margin: 0 0 0.25rem 0;
	font-size: 0.9375rem;
	line-height: 1.4;
	font-weight: 600;
}

.lnr-widget-title a {
	color: var(--lnr-text-color);
	text-decoration: none;
	transition: var(--lnr-transition);
}

.lnr-widget-title a:hover {
	color: var(--lnr-primary-color);
}

.lnr-widget-date {
	font-size: 0.75rem;
	color: #666;
}

.lnr-widget-views {
	font-size: 0.75rem;
	color: #666;
	margin-left: 0.5rem;
}

/* ==========================================================================
   Single News Article
   ========================================================================== */

.lnr-single-news {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

.lnr-news-article {
	background: transparent;
	padding: 2rem;
	border-radius: var(--lnr-border-radius);
	box-shadow: none;
}

.lnr-article-header {
	margin-bottom: 2rem;
}

.lnr-article-featured-image {
	width: 100%;
	margin-bottom: 1.5rem;
	border-radius: var(--lnr-border-radius);
	overflow: hidden;
}

.lnr-article-featured-image img {
	width: 100%;
	height: auto;
	display: block;
}

.lnr-article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	font-size: 0.875rem;
}

.lnr-article-date,
.lnr-article-author {
	color: #666;
}

.lnr-article-title {
	margin: 0;
	font-size: 2rem;
	line-height: 1.2;
	font-weight: 700;
}

.lnr-article-content {
	line-height: 1.8;
	margin-bottom: 2rem;
}

.lnr-article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 767px) {
	.lnr-slide-title {
		font-size: 1.25rem;
	}
	
	.lnr-article-title {
		font-size: 1.5rem;
	}
	
	.lnr-breaking-label {
		padding: 0 1rem;
		font-size: 0.75rem;
	}
	
	.lnr-breaking-item {
		padding: 0 1rem;
	}
	
	.lnr-slider-prev,
	.lnr-slider-next {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
	
	.lnr-news-article {
		padding: 1rem;
	}
	
	.lnr-single-news {
		padding: 1rem;
	}
}

/* ==========================================================================
   Lazy Loading
   ========================================================================== */

.lnr-lazy-load {
	opacity: 0;
	transition: opacity 0.3s;
}

.lnr-lazy-load.loaded {
	opacity: 1;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.lnr-news-card {
	animation: fadeIn 0.5s ease-out;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.lnr-slider-prev:focus,
.lnr-slider-next:focus,
.lnr-slider-dot:focus {
	outline: 2px solid var(--lnr-primary-color);
	outline-offset: 2px;
}

.lnr-read-more:focus,
.lnr-category-tag:focus {
	outline: 2px solid var(--lnr-primary-color);
	outline-offset: 2px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.lnr-slider-nav,
	.lnr-slider-dots,
	.lnr-breaking-news {
		display: none;
	}
	
	.lnr-news-card {
		break-inside: avoid;
		page-break-inside: avoid;
	}
}

/* ==========================================================================
   Like Button
   ========================================================================== */

.lnr-like-button {
	background: transparent;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 0.4rem 0.8rem;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.875rem;
	color: #666;
	text-decoration: none;
}

.lnr-like-button:hover {
	border-color: #e74c3c;
	color: #e74c3c;
	transform: scale(1.05);
}

.lnr-like-button.lnr-liked {
	background: #e74c3c;
	border-color: #e74c3c;
	color: #fff;
}

.lnr-like-button.lnr-liked:hover {
	background: #c0392b;
	border-color: #c0392b;
}

.lnr-like-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.lnr-like-icon {
	font-size: 1rem;
	line-height: 1;
}

.lnr-like-count {
	font-weight: 600;
	font-size: 0.875rem;
}

.lnr-card-footer {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

/* ==========================================================================
   BBC News Style Layout
   ========================================================================== */

.lnr-bbc-news-layout {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

.lnr-bbc-news-item {
	border-bottom: 1px solid #e5e5e5;
	padding: 1.5rem 0;
	transition: background-color 0.2s ease;
}

.lnr-bbc-news-item:first-child {
	padding-top: 0;
}

.lnr-bbc-news-item:last-child {
	border-bottom: none;
}

.lnr-bbc-news-item:hover {
	background-color: #f8f8f8;
}

.lnr-bbc-news-wrapper {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
}

.lnr-bbc-news-image {
	flex-shrink: 0;
	width: 200px;
	height: 120px;
	overflow: hidden;
	position: relative;
}

.lnr-bbc-news-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.lnr-bbc-news-item:hover .lnr-bbc-news-image img {
	transform: scale(1.05);
}

.lnr-bbc-news-content {
	flex: 1;
	min-width: 0;
}

.lnr-bbc-news-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	font-size: 0.8125rem;
	color: #666;
	font-weight: 500;
}

.lnr-bbc-category {
	color: #bb1919;
	text-decoration: none;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: color 0.2s ease;
}

.lnr-bbc-category:hover {
	color: #8b1414;
	text-decoration: underline;
}

.lnr-bbc-separator {
	color: #999;
	margin: 0 0.25rem;
}

.lnr-bbc-date {
	color: #666;
}

.lnr-bbc-title {
	margin: 0 0 0.75rem 0;
	font-size: 1.5rem;
	line-height: 1.3;
	font-weight: 700;
}

.lnr-bbc-title a {
	color: #000;
	text-decoration: none;
	transition: color 0.2s ease;
}

.lnr-bbc-title a:hover {
	color: #bb1919;
	text-decoration: underline;
}

.lnr-bbc-excerpt {
	color: #333;
	line-height: 1.6;
	font-size: 0.9375rem;
	margin-bottom: 0.75rem;
}

.lnr-bbc-footer {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-top: 0.5rem;
}

/* Trending badge for BBC layout */
.lnr-bbc-news-image .lnr-trending-badge {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	background-color: #ff6b35;
	color: #fff;
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	z-index: 10;
}

/* View count styling */
.lnr-view-count {
	color: #666;
	font-size: 0.8125rem;
}

/* Category header styling */
.lnr-category-header {
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid #e5e5e5;
}

.lnr-category-title {
	font-size: 2rem;
	font-weight: 700;
	margin: 0;
}

.lnr-category-title a {
	color: #000;
	text-decoration: none;
}

.lnr-category-title a:hover {
	color: #bb1919;
}

.lnr-category-description {
	margin-top: 0.5rem;
	color: #666;
}

.lnr-trending-title {
	font-size: 2rem;
	font-weight: 700;
	margin: 0 0 1.5rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e5e5e5;
}

/* Mobile responsive */
@media (max-width: 767px) {
	.lnr-bbc-news-wrapper {
		flex-direction: column;
		gap: 1rem;
	}
	
	.lnr-bbc-news-image {
		width: 100%;
		height: 200px;
	}
	
	.lnr-bbc-title {
		font-size: 1.25rem;
	}
	
	.lnr-bbc-news-meta {
		font-size: 0.75rem;
	}
	
	.lnr-category-title,
	.lnr-trending-title {
		font-size: 1.5rem;
	}
}

