/*
Theme Name: My News Theme
Description: Complete responsive styles for the entire theme.
Version: 1.1
*/

/* ---
    GLOBAL STYLES & CSS VARIABLES
--- */
:root {
	--primary-color: #dc2626;
	--secondary-color: #1d4ed8;
	--text-dark: #111827;
	--text-medium: #4b5563;
	--text-light: #6b7280;
	--bg-light: #f9fafb;
	--border-color: #e5e7eb;
	--border-radius: 8px;
	--shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
	--container-padding: 1rem;
}

/* --- Base & Mobile-First Setup --- */
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--text-medium);
	background-color: #ffffff;
	line-height: 1.6;
	font-size: 16px;
	margin: 0;
}
.container { max-width: 1240px; margin: 0 auto; padding: 0 var(--container-padding); }
a { color: var(--secondary-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--text-dark); }
img { max-width: 100%; height: auto; display: block; }
.page-content { padding-top: 2rem; padding-bottom: 2rem; }
.button { display: inline-block; padding: 0.75rem 1.5rem; border-radius: 6px; text-decoration: none; font-weight: 600; transition: all 0.2s ease; text-align: center; border: none; cursor: pointer; }
.button-primary { background: var(--primary-color); color: white; }
.button-primary:hover { background: #b91c1c; color: white; }
.news-category { display: inline-block; background: var(--primary-color); color: white !important; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }

/* ---
    FRONT PAGE STYLES
--- */
.section-title { font-size: 1.75rem; font-weight: 800; margin: 0 0 1.5rem; color: var(--text-dark); border-bottom: 3px solid var(--primary-color); padding-bottom: 0.5rem; display: inline-block; }
.news-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.875rem; color: var(--text-light); }

/* Breaking News Ticker */
.breaking-news-ticker { background: var(--text-dark); color: white; padding: 0.6rem 0; font-size: 0.9rem; overflow: hidden; }
.ticker-content { display: flex; align-items: center; gap: 1rem; }
.ticker-label { background: var(--primary-color); padding: 0.25rem 0.75rem; border-radius: 4px; font-weight: bold; flex-shrink: 0; }
.ticker-text-wrapper { overflow: hidden; flex-grow: 1; }
.ticker-text { white-space: nowrap; animation: ticker-scroll 25s linear infinite; }
@keyframes ticker-scroll { 0% { transform: translateX(100%); } 100% { transform: translateX(-150%); } }

/* Hero Section */
.hero-section { margin-bottom: 3rem; }
.hero-featured { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.hero-image img { width: 100%; height: auto; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.hero-content .news-category { margin-top: 1rem; }
.hero-title { font-size: 1.8rem; line-height: 1.2; font-weight: 800; margin: 1rem 0; }
.hero-title a { color: var(--text-dark); }
.hero-summary { color: var(--text-medium); line-height: 1.7; margin-bottom: 1.5rem; }
.hero-content .news-meta { margin-bottom: 1.5rem; }

/* Hero Slider */
.hero-slider { position: relative; border-radius: var(--border-radius); overflow: hidden; background: #eee; aspect-ratio: 16 / 10; }
.slider-item { display: none; width: 100%; height: 100%; }
.slider-item.active { display: block; }
.slider-image { width: 100%; height: 100%; object-fit: cover; }
.slider-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 20%, transparent); padding: 2rem 1.5rem 1.5rem; color: white; }
.slider-caption h2 { font-size: 1.5rem; margin: 0 0 0.5rem; line-height: 1.2; }
.slider-caption h2 a { color: inherit; }
.slider-caption p { margin: 0; opacity: 0.9; font-size: 0.9rem; display: none; }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.4); color: white; border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; transition: background-color 0.2s; font-size: 1.5rem; z-index: 10; }
.slider-nav:hover { background: rgba(0, 0, 0, 0.7); }
.slider-nav.prev { left: 1rem; }
.slider-nav.next { right: 1rem; }

/* Post Grids */
.post-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.news-card { background: #fff; border-radius: var(--border-radius); box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; transition: all 0.3s ease; display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-image-link img { width: 100%; height: 200px; object-fit: cover; }
.card-content { padding: 1rem; display: flex; flex-direction: column; flex-grow: 1; }
.card-content h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.4; margin: 0; flex-grow: 1; }
.card-content h3 a { color: var(--text-dark); }
.card-content .news-category { margin-bottom: 0.75rem; }
.card-content .card-summary { font-size: 0.9rem; color: var(--text-medium); margin: 0.75rem 0; }
.card-content .news-meta { margin-top: auto; margin-bottom: 0; }

/* Category Grid */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.category-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem 1rem; background: var(--bg-light); border-radius: var(--border-radius); transition: all 0.3s ease; }
.category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); background: #fff; }
.category-icon { font-size: 2.5rem; margin-bottom: 0.75rem; line-height: 1; }
.category-card h3 { font-size: 1rem; font-weight: 700; color: var(--text-dark); margin: 0 0 0.25rem; }
.category-card p { font-size: 0.875rem; color: var(--text-light); margin: 0; }

.load-more-container { text-align: center; margin-top: 3rem; }

/* ---
    SINGLE POST STYLES
--- */
.single-post-layout { display: flex; flex-direction: column; gap: 2rem; }
.main-content { flex: 1; min-width: 0; }
.post-article { background: #fff; border-radius: var(--border-radius); box-shadow: var(--shadow); padding: 1.5rem; }
.breadcrumbs { margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--text-light); }
.breadcrumbs a { color: var(--text-medium); }
.breadcrumbs .separator { margin: 0 0.5rem; }

.entry-header { margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 2rem; }
.entry-title { font-size: 2rem; font-weight: 800; line-height: 1.2; margin: 1rem 0 0; color: var(--text-dark); }
.entry-meta-enhanced { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.meta-author-date, .meta-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.meta-author-date { gap: 0.75rem; }
.meta-author-date img.avatar { border-radius: 50%; width: 40px; height: 40px; }
.author-info .author-name { font-weight: 600; color: var(--text-dark); }
.author-info .post-date-time { font-size: 0.875rem; color: var(--text-light); }
.meta-stats { font-size: 0.875rem; color: var(--text-light); }
.meta-stats span { display: flex; align-items: center; gap: 0.25rem; }
.custom-fields-box { background: var(--bg-light); padding: 1rem; border-radius: var(--border-radius); margin: 1.5rem 0; font-size: 0.9rem; border: 1px solid var(--border-color); }
.featured-image { margin-bottom: 2rem; }
.featured-image img { width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: var(--border-radius); }
.featured-image-caption { font-size: 0.875rem; color: var(--text-light); text-align: center; margin-top: 0.75rem; font-style: italic; }

.entry-content { line-height: 1.7; font-size: 1.1rem; color: var(--text-dark); }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 1.5em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-weight: 700; margin: 2rem 0 1rem; line-height: 1.3; }
.entry-content blockquote { border-left: 4px solid var(--primary-color); padding: 1rem 1.5rem; margin: 2rem 0; background: var(--bg-light); border-radius: 0 var(--border-radius) var(--border-radius) 0; }
.entry-content img { border-radius: var(--border-radius); margin: 2rem 0; }

.entry-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-color); }
.tags-section { margin-bottom: 2rem; }
.tags-title { display: block; margin-bottom: 0.75rem; font-weight: 600; }
.tags-links a { background: var(--bg-light); color: var(--text-medium); padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.875rem; transition: all 0.2s; }
.tags-links a:hover { background: var(--primary-color); color: white; }

.social-share-section { background: var(--bg-light); padding: 1.5rem; border-radius: var(--border-radius); margin-bottom: 2rem; }
.section-subtitle { font-size: 1.2rem; font-weight: 700; margin: 0 0 1rem; color: var(--text-dark); }
.social-share-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.social-share-buttons .button { color: white; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; padding: 0.5rem 1rem; }
.share-twitter { background-color: #1da1f2; }
.share-facebook { background-color: #4267b2; }
.share-whatsapp { background-color: #25d366; }
.share-linkedin { background-color: #0077b5; }
.share-native { background-color: #6b7280; }
.social-share-buttons .button:hover { opacity: 0.85; color: white; }

.author-box { background: linear-gradient(135deg, var(--bg-light) 0%, #eef2f5 100%); padding: 1.5rem; border-radius: var(--border-radius); margin-bottom: 2rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.author-box .avatar { border-radius: 50%; border: 4px solid white; box-shadow: var(--shadow); width: 80px; height: 80px; }
.author-box .author-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.5rem; color: var(--text-dark); }
.author-box .author-description { color: var(--text-medium); line-height: 1.6; margin-bottom: 1rem; }
.author-box .author-link { font-weight: 600; color: var(--primary-color); }

.post-grid-section { padding: 2rem; margin-bottom: 2rem; border-radius: var(--border-radius); background: #fff; box-shadow: var(--shadow); }
.post-grid-section .section-subtitle { font-size: 1.5rem; }

/* Sidebar */
.sidebar .widget { background: #fff; padding: 1.5rem; border-radius: var(--border-radius); box-shadow: var(--shadow); margin-bottom: 2rem; }
.sidebar .widget-title { font-size: 1.2rem; margin: 0 0 1rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { margin-bottom: 0.75rem; }
.sidebar li a { color: var(--text-medium); }

/* Comments */
.comments-area { background: #fff; padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.comment-form input, .comment-form textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 6px; margin-bottom: 1rem; }

/* --- RESPONSIVE --- */
@media (min-width: 768px) {
	:root { --container-padding: 1.5rem; }
	.section-title { font-size: 2rem; }
	.hero-featured { grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
	.hero-title { font-size: 2.5rem; }
	.slider-caption p { display: block; }
	.post-grid.grid-cols-desktop-2 { grid-template-columns: repeat(2, 1fr); }
	.post-grid.grid-cols-desktop-3, .post-grid-section .post-grid { grid-template-columns: repeat(3, 1fr); }
	.post-grid.grid-cols-desktop-4 { grid-template-columns: repeat(2, 1fr); }
	.category-grid { grid-template-columns: repeat(3, 1fr); }

	.single-post-layout.layout-sidebar { display: grid; grid-template-columns: 2fr 1fr; }
	.entry-meta-enhanced { flex-direction: row; justify-content: space-between; }
	.author-box { flex-direction: row; text-align: left; align-items: flex-start; }
}

@media (min-width: 1024px) {
	.post-grid.grid-cols-desktop-4 { grid-template-columns: repeat(4, 1fr); }
	.category-grid { grid-template-columns: repeat(6, 1fr); }
	.entry-title { font-size: 3rem; }
}

/* --- 
    GLOBAL STYLES & CSS VARIABLES 
--- */
:root {
	--primary-color: #dc2626; /* A vibrant red, good for news */
	--secondary-color: #1d4ed8; /* A strong blue for links/accents */
	--text-dark: #111827;
	--text-medium: #4b5563;
	--text-light: #6b7280;
	--bg-light: #f9fafb;
	--border-color: #e5e7eb;
	--border-radius: 8px;
	--shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
	--container-padding: 1rem;
}

/* --- Base & Mobile-First Setup --- */
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--text-medium);
	background-color: #ffffff;
	line-height: 1.6;
	font-size: 16px;
	margin: 0;
}

.container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 var(--container-padding);
}

a {
	color: var(--secondary-color);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--text-dark);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.page-content {
	padding-top: 2rem;
	padding-bottom: 2rem;
}

.content-section {
	margin-bottom: 3rem;
}

.section-title {
	font-size: 1.75rem;
	font-weight: 800;
	margin: 0 0 1.5rem;
	color: var(--text-dark);
	border-bottom: 3px solid var(--primary-color);
	padding-bottom: 0.5rem;
	display: inline-block;
}

.button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s ease;
	text-align: center;
	border: none;
	cursor: pointer;
}

.button-primary {
	background: var(--primary-color);
	color: white;
}
.button-primary:hover {
	background: #b91c1c; /* Darker red */
	color: white;
}

.button-secondary {
	background: var(--bg-light);
	color: var(--text-dark);
	border: 1px solid var(--border-color);
}
.button-secondary:hover {
	background: #e5e7eb;
}

.news-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	font-size: 0.875rem;
	color: var(--text-light);
	margin-bottom: 1.5rem;
}

.news-category {
	display: inline-block;
	background: var(--primary-color);
	color: white !important;
	padding: 0.2rem 0.6rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: bold;
	text-transform: uppercase;
	margin-bottom: 0.75rem;
}

/* ---
    HEADER & NAVIGATION
--- */
.site-header {
    padding: 1rem 0;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-branding .site-title a {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-dark);
}
.menu-toggle {
    display: block; /* Hidden on desktop */
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 4px;
}
.main-navigation ul {
    display: none; /* Mobile menu hidden by default */
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--border-color);
}
.main-navigation.toggled ul {
    display: block;
}
.main-navigation li a {
    display: block;
    padding: 1rem var(--container-padding);
    border-top: 1px solid var(--border-color);
    color: var(--text-dark);
}

/* --- Breaking News Ticker --- */
.breaking-news-ticker {
	background: var(--text-dark);
	color: white;
	padding: 0.6rem 0;
	font-size: 0.9rem;
	overflow: hidden;
}
.ticker-content {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.ticker-label {
	background: var(--primary-color);
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	font-weight: bold;
	flex-shrink: 0;
}
.ticker-text-wrapper {
	overflow: hidden;
	flex-grow: 1;
}
.ticker-text {
	white-space: nowrap;
	animation: ticker-scroll 25s linear infinite;
}
@keyframes ticker-scroll {
	0% { transform: translateX(100%); }
	100% { transform: translateX(-150%); }
}

/* --- Hero Section (Mobile First: Stacked) --- */
.hero-section {
	margin-bottom: 3rem;
}
.hero-featured {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}
.hero-image img {
	width: 100%;
	height: auto;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
}
.hero-content .news-category {
	margin-bottom: 1rem;
}
.hero-title {
	font-size: 1.8rem;
	line-height: 1.2;
	font-weight: 800;
	margin: 0 0 1rem;
}
.hero-title a {
	color: var(--text-dark);
}
.hero-summary {
	color: var(--text-medium);
	line-height: 1.7;
	margin-bottom: 1.5rem;
}

/* Hero Slider */
.hero-slider {
	position: relative;
	border-radius: var(--border-radius);
	overflow: hidden;
	background: #eee;
	aspect-ratio: 16 / 10;
}
.slider-item {
	display: none;
	width: 100%; height: 100%;
}
.slider-item.active {
	display: block;
}
.slider-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.slider-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 20%, transparent);
	padding: 2rem 1.5rem 1.5rem;
	color: white;
}
.slider-caption h2 {
	font-size: 1.5rem;
	margin: 0 0 0.5rem;
	line-height: 1.2;
}
.slider-caption h2 a {
	color: inherit;
	text-decoration: none;
}
.slider-caption p {
	margin: 0;
	opacity: 0.9;
	font-size: 0.9rem;
	display: none; /* Hide summary on mobile for cleaner look */
}
.slider-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.4);
	color: white;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	cursor: pointer;
	transition: background-color 0.2s;
	font-size: 1.5rem;
	z-index: 10;
}
.slider-nav:hover {
	background: rgba(0, 0, 0, 0.7);
}
.slider-nav.prev {
	left: 1rem;
}
.slider-nav.next {
	right: 1rem;
}

/* --- Post Grids (Mobile First: 1 Column) --- */
.post-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}
.news-card {
	background: #fff;
	border-radius: var(--border-radius);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	overflow: hidden;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}
.news-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow);
}
.card-image-link img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}
.card-content {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}
.card-content h3 {
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 0.75rem;
	flex-grow: 1; /* Pushes meta to bottom */
}
.card-content h3 a {
	color: var(--text-dark);
}
.card-content .card-summary {
	font-size: 0.9rem;
	color: var(--text-medium);
	line-height: 1.6;
	margin: 0.75rem 0;
}
.card-content .news-meta {
	margin-top: auto; /* Aligns meta to the bottom */
	margin-bottom: 0;
}

/* --- Category Grid --- */
.category-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}
.category-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1.5rem 1rem;
	background: var(--bg-light);
	border-radius: var(--border-radius);
	transition: all 0.3s ease;
}
.category-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow);
	background: #fff;
}
.category-icon {
	font-size: 2.5rem;
	margin-bottom: 0.75rem;
	line-height: 1;
}
.category-card h3 {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-dark);
	margin: 0 0 0.25rem;
}
.category-card p {
	font-size: 0.875rem;
	color: var(--text-light);
	margin: 0;
}

/* --- Load More Button --- */
.load-more-container {
	text-align: center;
	margin-top: 3rem;
}

/* ---
    SINGLE POST STYLES
--- */
.single-post-container {
    max-width: 800px; /* Optimal reading width */
}
.single .post-header {
    margin-bottom: 2rem;
    text-align: center;
}
.single .entry-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin: 1rem 0;
}
.single .news-meta {
    justify-content: center;
}
.single .post-thumbnail img {
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}
.entry-content {
    font-size: 1.1rem;
    line-height: 1.7;
}
.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
    margin-bottom: 1.5em;
}
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--text-dark);
    margin: 2em 0 1em;
    line-height: 1.3;
}
.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5em;
    font-style: italic;
    color: var(--text-dark);
}
.entry-content a {
    text-decoration: underline;
}

/* Comments Area */
.comments-area {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.comments-title {
    font-size: 1.5rem;
}
.comment-list {
    list-style: none;
    padding: 0;
}
.comment-body {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}
.comment-meta {
    margin-bottom: 1rem;
}
.comment-author .fn {
    font-weight: bold;
    color: var(--text-dark);
}
.comment-metadata a {
    font-size: 0.875rem;
    color: var(--text-light);
}
.reply a {
    font-size: 0.875rem;
    font-weight: bold;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 1rem;
}
.comment-form .submit {
    /* Uses .button styles */
}


/* ---
    RESPONSIVE - TABLET & UP
--- */
@media (min-width: 768px) {
	:root {
		--container-padding: 1.5rem;
	}
	.section-title {
		font-size: 2rem;
	}
    /* Header */
    .menu-toggle { display: none; }
    .main-navigation ul {
        display: flex;
        position: static;
        border: none;
        background: none;
        gap: 1.5rem;
    }
    .main-navigation li a {
        padding: 0;
        border: none;
    }
	/* Hero */
	.hero-featured {
		grid-template-columns: 1.2fr 1fr; /* Image slightly larger */
		gap: 2.5rem;
		align-items: center;
	}
	.hero-title {
		font-size: 2.5rem;
	}
	.hero-slider {
		aspect-ratio: 21 / 9;
	}
	.slider-caption {
		padding: 3rem 2.5rem 2.5rem;
	}
	.slider-caption h2 {
		font-size: 2.25rem;
	}
	.slider-caption p {
		display: block; /* Show summary on desktop */
	}
	/* Grids */
	.post-grid-2 { grid-template-columns: repeat(2, 1fr); }
	.post-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .post-grid-4 { grid-template-columns: repeat(2, 1fr); } /* 2 columns on tablet */
	.category-grid { grid-template-columns: repeat(3, 1fr); }
    /* Single Post */
    .single .entry-title { font-size: 2.8rem; }
}

/* ---
    RESPONSIVE - DESKTOP & UP
--- */
@media (min-width: 1024px) {
    .page-content {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .hero-title {
		font-size: 3rem;
	}
	.post-grid-4 { grid-template-columns: repeat(4, 1fr); } /* 4 columns on desktop */
	.category-grid { grid-template-columns: repeat(6, 1fr); }
    /* Single Post */
    .single .entry-title { font-size: 3.2rem; }
}
/* ---
==========================================================================
    SINGLE POST STYLES (Mobile First)
==========================================================================
--- */

/* --- Main Layout & Structure --- */
.single-post-layout {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.main-content {
	flex: 1;
	min-width: 0; /* Prevents flex items from overflowing */
}

.post-article {
	background: #fff;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
	padding: 1.5rem;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
	margin-bottom: 1.5rem;
	font-size: 0.875rem;
	color: var(--text-light);
}
.breadcrumbs a {
	color: var(--text-medium);
	text-decoration: none;
}
.breadcrumbs a:hover {
	text-decoration: underline;
}
.breadcrumbs .separator {
	margin: 0 0.5rem;
}

/* --- Post Header --- */
.entry-header {
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 2rem;
}
.entry-header .news-category {
	margin-bottom: 1rem;
}
.entry-title {
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0;
	color: var(--text-dark);
}

/* --- Enhanced Meta Data --- */
.entry-meta-enhanced {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1.5rem;
}
.meta-author-date, .meta-stats {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}
.meta-author-date {
	gap: 0.75rem;
}
.meta-author-date img.avatar {
	border-radius: 50%;
	width: 40px;
	height: 40px;
}
.author-info .author-name {
	font-weight: 600;
	color: var(--text-dark);
}
.author-info .post-date-time {
	font-size: 0.875rem;
	color: var(--text-light);
}
.meta-stats {
	font-size: 0.875rem;
	color: var(--text-light);
}
.meta-stats span {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

/* --- Custom Fields Box --- */
.custom-fields-box {
	background: var(--bg-light);
	padding: 1rem;
	border-radius: var(--border-radius);
	margin: 1.5rem 0;
	font-size: 0.9rem;
	border: 1px solid var(--border-color);
}
.custom-fields-box div {
	margin-bottom: 0.5rem;
}
.custom-fields-box div:last-child {
	margin-bottom: 0;
}
.custom-fields-box strong {
	color: var(--text-dark);
}

/* --- Featured Image --- */
.featured-image {
	margin-bottom: 2rem;
}
.featured-image img {
	width: 100%;
	height: auto;
	max-height: 500px;
	object-fit: cover;
	border-radius: var(--border-radius);
}
.featured-image-caption {
	font-size: 0.875rem;
	color: var(--text-light);
	text-align: center;
	margin-top: 0.75rem;
	font-style: italic;
}

/* --- Article Content --- */
.entry-content {
	line-height: 1.7;
	font-size: 1.1rem;
	color: var(--text-dark);
}
.entry-content p,
.entry-content ul,
.entry-content ol {
	margin-bottom: 1.5em;
}
.entry-content h2, .entry-content h3, .entry-content h4 {
	font-weight: 700;
	margin: 2rem 0 1rem;
	line-height: 1.3;
}
.entry-content blockquote {
	border-left: 4px solid var(--primary-color);
	padding: 1rem 1.5rem;
	margin: 2rem 0;
	background: var(--bg-light);
	border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.entry-content img {
	border-radius: var(--border-radius);
	margin: 2rem 0;
}

/* --- Article Footer --- */
.entry-footer {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border-color);
}
.tags-section {
	margin-bottom: 2rem;
}
.tags-section .tags-title {
	display: block;
	margin-bottom: 0.75rem;
	font-weight: 600;
}
.tags-links {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.tags-links a {
	background: var(--bg-light);
	color: var(--text-medium);
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.875rem;
	transition: all 0.2s;
}
.tags-links a:hover {
	background: var(--primary-color);
	color: white;
}

/* --- Social Sharing --- */
.social-share-section {
	background: var(--bg-light);
	padding: 1.5rem;
	border-radius: var(--border-radius);
	margin-bottom: 2rem;
}
.social-share-section .section-subtitle {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 1rem;
	color: var(--text-dark);
}
.social-share-buttons {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.social-share-buttons .button {
	color: white;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
}
.share-twitter { background-color: #1da1f2; }
.share-facebook { background-color: #4267b2; }
.share-whatsapp { background-color: #25d366; }
.share-linkedin { background-color: #0077b5; }
.share-native { background-color: #6b7280; }
.social-share-buttons .button:hover {
	opacity: 0.85;
	color: white;
}

/* --- Author Bio Box --- */
.author-box {
	background: linear-gradient(135deg, var(--bg-light) 0%, #eef2f5 100%);
	padding: 1.5rem;
	border-radius: var(--border-radius);
	margin-bottom: 2rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1rem;
}
.author-box .avatar {
	border-radius: 50%;
	border: 4px solid white;
	box-shadow: var(--shadow);
	width: 80px;
	height: 80px;
}
.author-box .author-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
	color: var(--text-dark);
}
.author-box .author-description {
	color: var(--text-medium);
	line-height: 1.6;
	margin-bottom: 1rem;
}
.author-box .author-link {
	font-weight: 600;
	color: var(--primary-color);
}

/* --- Related/Popular/Recent Post Sections --- */
.post-grid-section {
	padding: 2rem;
	margin-bottom: 2rem;
	border-radius: var(--border-radius);
	background: #fff;
	box-shadow: var(--shadow);
}
.post-grid-section .section-subtitle {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 1.5rem;
	color: var(--text-dark);
}
/* Use the existing .post-grid and .news-card styles from the front page */

/* --- Fallback Share Message Box --- */
.share-fallback-box {
	display: none;
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--text-dark);
	color: white;
	padding: 1rem 1.5rem;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
	z-index: 9999;
	text-align: center;
}

/* ---
    RESPONSIVE - Tablet & Up
--- */
@media (min-width: 768px) {
	.post-article {
		padding: 2rem;
	}
	.entry-title {
		font-size: 2.5rem;
	}
	/* Change layout to grid for sidebar */
	.single-post-layout.layout-sidebar {
		display: grid;
		grid-template-columns: 2fr 1fr;
	}
	.entry-meta-enhanced {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.author-box {
		flex-direction: row;
		text-align: left;
		align-items: flex-start;
	}
}

/* ---
    RESPONSIVE - Desktop & Up
--- */
@media (min-width: 1024px) {
	.post-article {
		padding: 2.5rem;
	}
	.entry-title {
		font-size: 3rem;
	}
}

/* ---
==========================================================================
    SIDEBAR & WIDGETS
==========================================================================
--- */

/* This is the main container for the sidebar, defined in single.php */
.sidebar {
    /* On mobile, this will be a single column.
       On desktop, the grid in .single-post-layout handles positioning. */
}

/* A wrapper for all widgets inside the sidebar */
.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* General widget styling */
.widget {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-dark);
}

/* --- Specific Widget Styles --- */

/* Author Widget */
.widget_author .author-box-widget {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.widget_author .author-box-widget img.avatar {
    border-radius: 50%;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}
.widget_author .author-info h4 {
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text-dark);
}
.widget_author .author-info p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-medium);
    margin: 0 0 1rem;
}
.widget_author .author-links {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}
.widget_author .author-links a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Recent & Popular Posts List Widget */
.post-list-widget .post-list-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.post-list-widget .post-list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.post-list-widget a.post-list-image img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.post-list-widget .post-list-content h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 600;
    margin: 0 0 0.25rem;
}
.post-list-widget .post-list-content h4 a {
    color: var(--text-dark);
}
.post-list-widget .post-list-content h4 a:hover {
    color: var(--primary-color);
}
.post-list-widget .post-list-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Popular Posts Number */
.post-list-widget.popular .popular-post-number {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-medium);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Categories Widget */
.category-list-widget {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.category-list-widget .category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 6px;
    color: var(--text-dark);
    font-weight: 500;
    transition: background-color 0.2s;
}
.category-list-widget .category-item:hover {
    background-color: #e5e7eb;
}
.category-list-widget .category-count {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Newsletter Widget */
.widget_newsletter .newsletter-signup p {
    margin: 0 0 1rem;
    color: var(--text-medium);
}
.widget_newsletter .newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.widget_newsletter .newsletter-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}
.widget_newsletter .newsletter-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.widget_newsletter .newsletter-form button:hover {
    background: #b91c1c; /* Darker primary color */
}

/* Hides text for screen readers */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	-webkit-clip-path: inset(50%);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
/* ---
==========================================================================
    SEARCH FORM & OVERLAY
==========================================================================
--- */

/* --- Default Inline Search Form (e.g., for widgets) --- */
.search-form {
    position: relative;
    display: flex;
}
.search-field {
    width: 100%;
    height: 50px;
    padding: 0 50px 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: #fff;
    -webkit-appearance: none; /* Removes default iOS styling */
}
.search-submit {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    transition: color 0.2s;
}
.search-submit:hover {
    color: var(--primary-color);
}


/* --- Full-Screen Search Overlay --- */

/* Body class to prevent scrolling when overlay is open */
body.no-scroll {
    overflow: hidden;
}

/* The trigger button in the header */
.search-overlay-trigger {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-dark);
}
.search-overlay-trigger:hover {
    color: var(--primary-color);
}

/* The main overlay container */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(17, 24, 39, 0.95); /* Semi-transparent dark bg */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* The content wrapper inside the overlay */
.search-overlay-content {
    width: 90%;
    max-width: 600px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.search-overlay.is-open .search-overlay-content {
    transform: scale(1);
}

/* Styling for the form *inside* the overlay */
.search-overlay .search-form .search-field {
    height: 60px;
    font-size: 1.5rem;
    background-color: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    padding: 0 60px 0 1.5rem;
}
.search-overlay .search-form .search-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.search-overlay .search-form .search-submit {
    width: 60px;
    color: rgba(255, 255, 255, 0.7);
}
.search-overlay .search-form .search-submit:hover {
    color: #fff;
}

/* The close button in the overlay */
.close-search {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 3rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s, transform 0.2s;
}
.close-search:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Responsive for the close button */
@media (max-width: 768px) {
    .close-search {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
    }
}