/**
 * RailExpress Theme Main Stylesheet
 * Contains design system, typography, layout definitions, light/dark modes, and responsiveness.
 */

/* -------------------------------------------------------------
   1. Design System & CSS Variables (Theme Palettes)
   ------------------------------------------------------------- */
:root {
	/* Color Identity (Light Mode Defaults) */
	--primary: #0F5132;        /* Railway Deep Green */
	--primary-rgb: 15, 81, 50;
	--secondary: #0B2B40;      /* Dark Blue */
	--secondary-rgb: 11, 43, 64;
	--accent: #FD7E14;         /* Action Orange */
	--accent-rgb: 253, 126, 20;
	
	--background: #F4F6F8;     /* Light Gray background */
	--surface: #FFFFFF;        /* Pure White card surfaces */
	--border-color: #E2E8F0;   /* Light Soft Gray */
	--text-primary: #1E293B;   /* Slate Dark Text */
	--text-secondary: #64748B; /* Slate Muted Text */
	--white: #FFFFFF;
	
	/* Layout Sizing & Shadows */
	--container-width: 1200px;
	--border-radius-sm: 6px;
	--border-radius-md: 10px;
	--border-radius-lg: 16px;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	--transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	
	/* Fonts */
	--font-family-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	--font-family-display: 'Outfit', var(--font-family-body);
}

/* Dark Mode Variables Override */
[data-theme="dark"] {
	--background: #0F172A;     /* Deep dark slate */
	--surface: #1E293B;        /* Dark slate card surfaces */
	--border-color: #334155;   /* Dark border lines */
	--text-primary: #F8FAFC;   /* Near white text */
	--text-secondary: #94A3B8; /* Muted silver text */
	
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* -------------------------------------------------------------
   2. Reset & Base HTML Elements
   ------------------------------------------------------------- */
*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	background-color: var(--background);
	color: var(--text-primary);
	font-family: var(--font-family-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: background-color 0.3s ease, color 0.3s ease;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--primary);
	text-decoration: none;
	transition: var(--transition-smooth);
}

a:hover {
	color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-family-display);
	color: var(--text-primary);
	margin-top: 0;
	margin-bottom: 0.5em;
	font-weight: 700;
	line-height: 1.2;
}

p {
	margin-top: 0;
	margin-bottom: 1.2rem;
}

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}

/* Accessibility Focus States */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
	outline: 2px dashed var(--accent);
	outline-offset: 4px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--surface);
	clip: auto !important;
	clip-path: none;
	color: var(--text-primary);
	display: block;
	font-size: 14px;
	font-weight: 600;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px;
	position: absolute;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
	border-radius: var(--border-radius-sm);
	box-shadow: var(--shadow-lg);
}

/* -------------------------------------------------------------
   3. Header Navigation & Sticky Top Bar
   ------------------------------------------------------------- */
.top-bar {
	background-color: var(--secondary);
	color: var(--white);
	font-size: 14px;
	padding: 8px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	z-index: 999;
}

.top-bar-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

/* Breaking News Ticker */
.breaking-news-ticker {
	display: flex;
	align-items: center;
	overflow: hidden;
	flex: 1;
	max-width: 70%;
}

.news-ticker-label {
	background-color: var(--accent);
	color: var(--white);
	font-weight: 700;
	font-family: var(--font-family-display);
	padding: 4px 10px;
	border-radius: var(--border-radius-sm);
	margin-right: 12px;
	white-space: nowrap;
	font-size: 11px;
	letter-spacing: 0.5px;
	animation: pulse 2s infinite;
}

.news-ticker-items {
	flex: 1;
	overflow: hidden;
	position: relative;
	height: 20px;
}

.ticker-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 40px;
	animation: tickerScroll 25s linear infinite;
	white-space: nowrap;
}

.ticker-list li a {
	color: rgba(255, 255, 255, 0.9);
	font-weight: 500;
}

.ticker-list li a:hover {
	color: var(--accent);
}

.header-utilities {
	display: flex;
	align-items: center;
	gap: 20px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
	background: none;
	border: none;
	color: var(--white);
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
	background-color: rgba(255, 255, 255, 0.1);
	color: var(--accent);
}

/* Hide theme icons based on active mode */
.sun-icon { display: block; }
.moon-icon { display: none; }

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* Main Header Layout */
.site-header {
	background-color: var(--surface);
	box-shadow: var(--shadow-sm);
	position: sticky;
	top: 0;
	z-index: 1000;
	transition: var(--transition-smooth);
	border-bottom: 1px solid var(--border-color);
}

.header-main-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
}

.site-branding .site-title {
	font-size: 28px;
	margin: 0;
	font-weight: 800;
	letter-spacing: -0.5px;
}

.site-branding .site-title a {
	color: var(--primary);
}

.site-branding .site-description {
	font-size: 12px;
	margin: 2px 0 0 0;
	color: var(--text-secondary);
	font-weight: 500;
}

.header-right-group {
	display: flex;
	align-items: center;
	gap: 16px;
}

.header-nav-actions {
	display: flex;
	gap: 12px;
}

.nav-action-btn {
	background: none;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-sm);
	color: var(--text-primary);
	width: 42px;
	height: 42px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--transition-smooth);
}

.nav-action-btn:hover {
	background-color: var(--background);
	color: var(--primary);
	border-color: var(--primary);
}

/* Default Mobile States */
.site-header .main-navigation {
	display: none !important; /* Hide desktop list on mobile/tablet */
}

.site-header .mobile-menu-btn {
	display: flex !important; /* Show hamburger on mobile/tablet */
}

/* Desktop Navigation (992px and up) */
@media (min-width: 992px) {
	.header-right-group {
		gap: 30px;
	}

	.site-header .main-navigation {
		display: block !important; /* Show desktop list on desktop */
	}

	.site-header .mobile-menu-btn {
		display: none !important; /* Hide hamburger on desktop */
	}
}

.desktop-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 24px;
}

.desktop-menu-list a {
	color: var(--text-primary);
	font-weight: 600;
	font-size: 15px;
	font-family: var(--font-family-display);
	padding: 8px 0;
	position: relative;
}

.desktop-menu-list a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--primary);
	transition: var(--transition-smooth);
}

.desktop-menu-list a:hover::after,
.desktop-menu-list .current-menu-item > a::after {
	width: 100%;
}

/* -------------------------------------------------------------
   4. Page Layout Grid (Content & Sidebar)
   ------------------------------------------------------------- */
.site-content {
	padding-top: 30px;
	padding-bottom: 60px;
}

.site-main-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
}

@media (min-width: 992px) {
	.site-main-layout {
		grid-template-columns: 8fr 4fr;
	}
}

.main-content-col {
	min-width: 0; /* Prevents overflow issues in nested grids */
}

/* Sidebar Styling */
.sidebar-col {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.widget {
	background-color: var(--surface);
	border-radius: var(--border-radius-md);
	padding: 24px;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-color);
}

.widget-title {
	font-size: 18px;
	font-weight: 700;
	border-bottom: 2px solid var(--primary);
	padding-bottom: 10px;
	margin-bottom: 20px;
	position: relative;
}

/* Sidebar Post List Items */
.sidebar-posts-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sidebar-post-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px dashed var(--border-color);
}

.sidebar-post-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.sidebar-post-thumb {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: var(--border-radius-sm);
	overflow: hidden;
}

.sidebar-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sidebar-post-details {
	display: flex;
	flex-direction: column;
	min-width: 0; /* Prevents text overflow */
}

.sidebar-post-title {
	font-size: 14px;
	line-height: 1.3;
	margin-bottom: 4px;
	font-weight: 600;
}

.sidebar-post-title a {
	color: var(--text-primary);
}

.sidebar-post-title a:hover {
	color: var(--primary);
}

.sidebar-post-date {
	font-size: 11px;
	color: var(--text-secondary);
}

/* -------------------------------------------------------------
   5. Hero News Banner
   ------------------------------------------------------------- */
.hero-slider-section {
	margin-bottom: 40px;
}

.hero-main-card {
	position: relative;
	border-radius: var(--border-radius-lg);
	overflow: hidden;
	height: 420px;
	box-shadow: var(--shadow-lg);
}

.hero-main-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--transition-smooth);
}

.hero-main-card:hover .hero-main-image {
	transform: scale(1.03);
}

.hero-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 40px 30px 30px 30px;
	background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);
	color: var(--white);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.hero-cat {
	align-self: flex-start;
	background-color: var(--accent);
	color: var(--white);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 4px 8px;
	border-radius: var(--border-radius-sm);
	margin-bottom: 12px;
}

.hero-title {
	color: var(--white);
	font-size: 28px;
	line-height: 1.3;
	margin-bottom: 10px;
}

.hero-title a {
	color: var(--white);
}

.hero-meta {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	display: flex;
	gap: 15px;
}

.hero-sidebar-grid {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.hero-sub-card {
	position: relative;
	border-radius: var(--border-radius-md);
	overflow: hidden;
	flex: 1;
	height: 200px;
}

.hero-sub-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 20px;
	background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);
	color: var(--white);
}

.hero-sub-title {
	font-size: 18px;
	color: var(--white);
	margin-bottom: 4px;
}

.hero-sub-title a {
	color: var(--white);
}

/* -------------------------------------------------------------
   6. Interactive Modules (Schedules & Booking Guides)
   ------------------------------------------------------------- */
.section-home-block {
	margin-bottom: 45px;
}

.section-header-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 2px solid var(--border-color);
	padding-bottom: 12px;
	margin-bottom: 24px;
}

.section-title {
	font-size: 22px;
	margin-bottom: 0;
	position: relative;
}

.section-title::after {
	content: '';
	position: absolute;
	bottom: -14px;
	left: 0;
	width: 60px;
	height: 2px;
	background-color: var(--primary);
}

.section-badge {
	background-color: rgba(15, 81, 50, 0.1);
	color: var(--primary);
	font-size: 11px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: var(--border-radius-sm);
	text-transform: uppercase;
}

/* Interactive Schedule Filter Table */
.schedule-filter-wrapper {
	background-color: var(--surface);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-md);
	padding: 20px;
	box-shadow: var(--shadow-sm);
}

.filter-inputs-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 15px;
	margin-bottom: 20px;
}

@media (min-width: 768px) {
	.filter-inputs-row {
		grid-template-columns: 2fr 2fr 1fr;
	}
}

.filter-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.filter-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-secondary);
}

.filter-field input, .filter-field select {
	padding: 10px 12px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-sm);
	background-color: var(--background);
	color: var(--text-primary);
	font-family: inherit;
	font-size: 14px;
	transition: var(--transition-smooth);
}

.filter-field input:focus, .filter-field select:focus {
	border-color: var(--primary);
}

.btn-filter-reset {
	background-color: var(--secondary);
	color: var(--white);
	border: none;
	border-radius: var(--border-radius-sm);
	font-weight: 600;
	padding: 10px;
	cursor: pointer;
	align-self: flex-end;
	transition: var(--transition-smooth);
}

.btn-filter-reset:hover {
	background-color: var(--accent);
}

/* Schedule Table Output */
.schedule-table-container {
	overflow-x: auto;
}

.schedule-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	text-align: left;
}

.schedule-table th, .schedule-table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-color);
}

.schedule-table th {
	background-color: rgba(var(--secondary-rgb), 0.05);
	font-weight: 700;
	color: var(--text-primary);
}

.schedule-table tr:hover {
	background-color: rgba(var(--primary-rgb), 0.02);
}

.status-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 700;
	border-radius: var(--border-radius-sm);
	text-transform: uppercase;
}

.status-ontime { background-color: #D1E7DD; color: #0F5132; }
.status-delayed { background-color: #FFF3CD; color: #664D03; }
.status-canceled { background-color: #F8D534; color: #842029; }

/* -------------------------------------------------------------
   7. Card Lists & Loop Layouts
   ------------------------------------------------------------- */
.posts-grid-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 25px;
}

@media (min-width: 600px) {
	.posts-grid-layout {
		grid-template-columns: repeat(2, 1fr);
	}
}

.post-card-item {
	background-color: var(--surface);
	border-radius: var(--border-radius-md);
	border: 1px solid var(--border-color);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	transition: var(--transition-smooth);
}

.post-card-item:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
}

.post-card-image {
	position: relative;
	height: 180px;
	overflow: hidden;
}

.post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.category-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: var(--border-radius-sm);
	text-transform: uppercase;
	margin-right: 4px;
	margin-bottom: 4px;
}

.post-card-categories {
	position: absolute;
	bottom: 12px;
	left: 12px;
	display: flex;
	flex-wrap: wrap;
}

.post-card-inner {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.post-card-title {
	font-size: 18px;
	line-height: 1.3;
	margin-bottom: 10px;
}

.post-card-title a {
	color: var(--text-primary);
}

.post-card-meta {
	font-size: 12px;
	color: var(--text-secondary);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
}

.meta-separator {
	color: var(--border-color);
}

.post-card-excerpt {
	font-size: 14px;
	color: var(--text-secondary);
	margin-bottom: 20px;
	flex: 1;
}

.post-card-readmore-btn {
	font-size: 13px;
	font-weight: 700;
	color: var(--primary);
}

.post-card-readmore-btn:hover {
	color: var(--accent);
}

/* Pagination markup */
.navigation-pagination-wrap {
	margin-top: 40px;
}

.navigation-pagination-wrap .pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
}

.navigation-pagination-wrap .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-sm);
	background-color: var(--surface);
	color: var(--text-primary);
	font-weight: 600;
}

.navigation-pagination-wrap .page-numbers.current,
.navigation-pagination-wrap .page-numbers:hover {
	background-color: var(--primary);
	color: var(--white);
	border-color: var(--primary);
}

/* -------------------------------------------------------------
   8. Article Detailed Page (single.php specific)
   ------------------------------------------------------------- */
.single-article-entry {
	background-color: var(--surface);
	border-radius: var(--border-radius-lg);
	border: 1px solid var(--border-color);
	padding: 24px;
	box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
	.single-article-entry {
		padding: 40px;
	}
}

/* Breadcrumbs styling */
.breadcrumbs {
	margin-bottom: 20px;
	font-size: 13px;
	color: var(--text-secondary);
}

.breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.breadcrumbs li::after {
	content: '/';
	margin-left: 6px;
	color: var(--border-color);
}

.breadcrumbs li:last-child::after {
	content: '';
}

.breadcrumbs a {
	color: var(--text-secondary);
}

.breadcrumbs a:hover {
	color: var(--primary);
}

.breadcrumbs li.active {
	color: var(--text-primary);
	font-weight: 500;
}

.entry-title {
	font-size: 30px;
	line-height: 1.25;
	margin-bottom: 15px;
}

@media (min-width: 768px) {
	.entry-title {
		font-size: 40px;
	}
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	color: var(--text-secondary);
	font-size: 14px;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 20px;
	margin-bottom: 25px;
}

.entry-featured-image {
	border-radius: var(--border-radius-md);
	overflow: hidden;
	margin-bottom: 30px;
}

.entry-featured-image img {
	width: 100%;
	max-height: 500px;
	object-fit: cover;
}

/* Reading Progress Scroll Indicators */
.reading-progress-bar-container {
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 100%;
	height: 4px;
	background-color: var(--border-color);
}

.reading-progress-fill {
	height: 100%;
	width: 0;
	background-color: var(--accent);
	transition: width 0.1s ease-out;
}

/* Table of Contents Container */
.table-of-contents-box {
	background-color: var(--background);
	border-left: 4px solid var(--primary);
	border-radius: var(--border-radius-sm);
	padding: 20px;
	margin-bottom: 30px;
}

.toc-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.toc-title {
	font-weight: 700;
	font-size: 16px;
	color: var(--text-primary);
}

.toc-toggle-btn {
	background: none;
	border: none;
	font-size: 12px;
	color: var(--primary);
	cursor: pointer;
	padding: 0;
}

.toc-list {
	margin: 0;
	padding-left: 20px;
	font-size: 14px;
}

.toc-list li {
	margin-bottom: 8px;
}

.toc-list li a {
	color: var(--text-primary);
}

.toc-list li a:hover {
	color: var(--primary);
	text-decoration: underline;
}

/* Entry Content Typography details */
.entry-content h2 { font-size: 24px; margin-top: 1.5em; margin-bottom: 0.5em; }
.entry-content h3 { font-size: 20px; margin-top: 1.5em; margin-bottom: 0.5em; }
.entry-content blockquote {
	margin: 30px 0;
	padding: 20px;
	background-color: rgba(var(--primary-rgb), 0.05);
	border-left: 4px solid var(--primary);
	font-style: italic;
	border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

/* Sharing Buttons Box */
.post-share-box {
	margin-top: 40px;
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	padding: 20px 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

@media (min-width: 600px) {
	.post-share-box {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.share-label {
	font-weight: 700;
	font-size: 14px;
	color: var(--text-primary);
}

.share-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.share-btn {
	padding: 8px 16px;
	border-radius: var(--border-radius-sm);
	font-size: 12px;
	font-weight: 700;
	color: var(--white) !important;
}

.share-facebook { background-color: #1877F2; }
.share-twitter { background-color: #1DA1F2; }
.share-linkedin { background-color: #0A66C2; }
.share-whatsapp { background-color: #25D366; }

.share-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

/* Author Box */
.author-bio-box {
	margin-top: 30px;
	background-color: var(--background);
	border-radius: var(--border-radius-md);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

@media (min-width: 600px) {
	.author-bio-box {
		flex-direction: row;
	}
}

.author-avatar img {
	border-radius: 50%;
	box-shadow: var(--shadow-sm);
}

.author-details {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.author-name {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 6px;
}

.author-description {
	font-size: 14px;
	color: var(--text-secondary);
	margin-bottom: 10px;
}

.author-socials a {
	font-size: 12px;
	font-weight: 600;
	margin-right: 12px;
}

/* Next / Previous articles */
.post-navigation {
	display: grid;
	grid-template-columns: 1fr;
	gap: 15px;
	margin-top: 30px;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 30px;
}

@media (min-width: 600px) {
	.post-navigation {
		grid-template-columns: 1fr 1fr;
	}
}

.nav-links .nav-previous, .nav-links .nav-next {
	background-color: var(--surface);
	border: 1px solid var(--border-color);
	padding: 16px;
	border-radius: var(--border-radius-sm);
	display: flex;
	flex-direction: column;
	transition: var(--transition-smooth);
}

.nav-links .nav-previous:hover, .nav-links .nav-next:hover {
	background-color: rgba(var(--primary-rgb), 0.03);
	border-color: var(--primary);
}

.nav-subtitle {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--text-secondary);
	margin-bottom: 4px;
}

.nav-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--text-primary);
}

/* Related Posts under article */
.related-posts-section {
	margin-top: 40px;
}

.related-title {
	font-size: 20px;
	margin-bottom: 20px;
}

.related-posts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

@media (min-width: 768px) {
	.related-posts-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.related-card {
	background-color: var(--surface);
	border-radius: var(--border-radius-sm);
	border: 1px solid var(--border-color);
	overflow: hidden;
}

.related-thumb img {
	width: 100%;
	height: 120px;
	object-fit: cover;
}

.related-content {
	padding: 15px;
}

.related-post-title {
	font-size: 14px;
	line-height: 1.3;
	margin-bottom: 5px;
}

.related-post-title a {
	color: var(--text-primary);
}

.related-date {
	font-size: 11px;
	color: var(--text-secondary);
}

/* -------------------------------------------------------------
   9. Comments & Reply Form
   ------------------------------------------------------------- */
.comments-area {
	margin-top: 50px;
	border-top: 2px solid var(--border-color);
	padding-top: 40px;
}

.comments-title {
	font-size: 20px;
	margin-bottom: 30px;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.comment-body {
	display: flex;
	gap: 20px;
	background-color: rgba(var(--primary-rgb), 0.01);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-md);
	padding: 20px;
}

.comment-meta {
	font-size: 13px;
	color: var(--text-secondary);
}

.comment-author .fn {
	font-weight: 700;
	font-style: normal;
	color: var(--text-primary);
}

.comment-metadata a {
	color: var(--text-secondary);
}

.comment-content {
	font-size: 15px;
	margin-top: 10px;
}

.reply {
	margin-top: 10px;
	font-size: 13px;
	font-weight: 700;
}

/* Children depth comments indentation */
.comment-list .children {
	list-style: none;
	padding-left: 20px;
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	border-left: 2px solid var(--border-color);
}

@media (min-width: 768px) {
	.comment-list .children {
		padding-left: 40px;
	}
}

/* Comment reply submission form layout */
.comment-respond {
	margin-top: 45px;
	background-color: var(--surface);
	border: 1px solid var(--border-color);
	padding: 30px;
	border-radius: var(--border-radius-md);
}

.comment-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.comment-form label {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-sm);
	background-color: var(--background);
	color: var(--text-primary);
	font-family: inherit;
	font-size: 14px;
	transition: var(--transition-smooth);
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--primary);
	outline: none;
}

.comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.comment-form-cookies-consent input {
	margin-top: 4px;
}

.submit-btn {
	align-self: flex-start;
	background-color: var(--primary);
	color: var(--white);
	font-weight: 700;
	border: none;
	padding: 12px 28px;
	border-radius: var(--border-radius-sm);
	cursor: pointer;
	transition: var(--transition-smooth);
}

.submit-btn:hover {
	background-color: var(--accent);
}

/* -------------------------------------------------------------
   10. Search Overlay Popup (Modal)
   ------------------------------------------------------------- */
.search-overlay-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(15, 23, 42, 0.95);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay-modal.is-active {
	opacity: 1;
	visibility: visible;
}

.search-overlay-content {
	width: 100%;
	max-width: 600px;
	transform: translateY(-20px);
	transition: transform 0.3s ease;
}

.search-overlay-modal.is-active .search-overlay-content {
	transform: translateY(0);
}

.search-modal-close {
	position: absolute;
	top: 30px;
	right: 30px;
	background: none;
	border: none;
	color: var(--white);
	font-size: 40px;
	cursor: pointer;
	line-height: 1;
}

.search-form-wrap {
	position: relative;
	border-bottom: 2px solid var(--white);
}

.search-field-ajax {
	width: 100%;
	background: none;
	border: none;
	color: var(--white);
	font-size: 20px;
	padding: 12px 40px 12px 0;
	font-family: var(--font-family-display);
}

.search-field-ajax::placeholder {
	color: rgba(255,255,255,0.5);
}

.search-field-ajax:focus {
	outline: none;
}

.search-submit-ajax {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--white);
	cursor: pointer;
}

/* AJAX Search Live Results Styling */
.search-ajax-results-box {
	max-height: 320px;
	overflow-y: auto;
	margin-top: 20px;
	background-color: var(--surface);
	border-radius: var(--border-radius-md);
	box-shadow: var(--shadow-lg);
	display: none;
}

.search-ajax-results-box.has-results {
	display: block;
}

.ajax-search-item {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 12px 20px;
	border-bottom: 1px solid var(--border-color);
}

.ajax-search-item:last-child {
	border-bottom: none;
}

.ajax-search-item:hover {
	background-color: rgba(var(--primary-rgb), 0.04);
}

.ajax-search-thumb img {
	width: 50px;
	height: 50px;
	object-fit: cover;
	border-radius: var(--border-radius-sm);
}

.ajax-search-details {
	display: flex;
	flex-direction: column;
}

.ajax-search-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--text-primary);
	margin-bottom: 2px;
}

.ajax-search-meta {
	font-size: 11px;
	color: var(--text-secondary);
}

.ajax-search-item.ajax-status-item {
	color: var(--text-secondary);
	font-size: 14px;
	padding: 20px;
	justify-content: center;
}

/* -------------------------------------------------------------
   11. Footer Layout
   ------------------------------------------------------------- */
.site-footer {
	background-color: var(--secondary);
	color: rgba(255, 255, 255, 0.8);
	border-top: 4px solid var(--primary);
	padding-top: 50px;
}

.footer-widgets-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
	padding-bottom: 40px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
	.footer-widgets-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 992px) {
	.footer-widgets-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.footer-title {
	color: var(--white);
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 10px;
}

.footer-widget p {
	font-size: 14px;
	line-height: 1.5;
}

.footer-quick-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-quick-links li {
	margin-bottom: 8px;
}

.footer-quick-links a {
	color: rgba(255, 255, 255, 0.8);
	font-size: 14px;
}

.footer-quick-links a:hover {
	color: var(--accent);
}

.footer-bottom {
	padding: 24px 0;
	background-color: rgba(0, 0, 0, 0.2);
}

.footer-bottom-flex {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

@media (min-width: 768px) {
	.footer-bottom-flex {
		flex-direction: row;
	}
}

.copyright-text {
	font-size: 13px;
}

.footer-menu-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 20px;
}

.footer-menu-list a {
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
	font-weight: 600;
}

/* Scroll To Top Button */
.back-to-top-btn {
	position: fixed;
	bottom: 30px;
	right: -60px;
	width: 48px;
	height: 48px;
	background-color: var(--primary);
	color: var(--white);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-md);
	z-index: 99;
	transition: var(--transition-smooth);
}

.back-to-top-btn.is-visible {
	right: 30px;
}

.back-to-top-btn:hover {
	background-color: var(--accent);
	transform: translateY(-2px);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
	position: fixed;
	top: 0;
	left: -320px;
	width: 280px;
	height: 100%;
	background-color: var(--surface);
	z-index: 10000;
	box-shadow: var(--shadow-lg);
	transition: left 0.3s ease;
	border-right: 1px solid var(--border-color);
}

.mobile-nav-drawer.is-active {
	left: 0;
}

.mobile-nav-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.mobile-nav-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid var(--border-color);
}

.drawer-title {
	font-family: var(--font-family-display);
	font-weight: 700;
	color: var(--text-primary);
}

.mobile-nav-header .close-btn {
	background: none;
	border: none;
	font-size: 28px;
	color: var(--text-primary);
	cursor: pointer;
}

.mobile-menu-list {
	list-style: none;
	padding: 20px;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.mobile-menu-list a {
	color: var(--text-primary);
	font-weight: 600;
	font-size: 16px;
}

/* -------------------------------------------------------------
   12. Animations & Helpers
   ------------------------------------------------------------- */
@keyframes tickerScroll {
	0% { transform: translate3d(0, 0, 0); }
	100% { transform: translate3d(-100%, 0, 0); }
}

@keyframes pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.03); }
	100% { transform: scale(1); }
}

/* -------------------------------------------------------------
   14. Default WordPress Search Form
   ------------------------------------------------------------- */
.search-form {
	display: flex;
	gap: 8px;
	width: 100%;
}

.search-form label {
	flex: 1;
	display: block;
}

.search-form .search-field {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-sm);
	background-color: var(--background);
	color: var(--text-primary);
	font-size: 14px;
	font-family: inherit;
	transition: var(--transition-smooth);
}

.search-form .search-field:focus {
	border-color: var(--primary);
	outline: none;
}

.search-form .search-submit {
	background-color: var(--primary);
	color: var(--white);
	border: none;
	border-radius: var(--border-radius-sm);
	padding: 10px 20px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: var(--transition-smooth);
}

.search-form .search-submit:hover {
	background-color: var(--accent);
}

/* -------------------------------------------------------------
   15. 404 Page Layout Styling
   ------------------------------------------------------------- */
.error-404-container {
	padding: 80px 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 55vh;
}

.error-404-inner {
	max-width: 600px;
	margin: 0 auto;
	text-align: center;
}

.error-visual {
	position: relative;
	margin-bottom: 30px;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
}

.error-code {
	font-size: 90px;
	font-weight: 800;
	line-height: 1;
	color: var(--secondary);
	font-family: var(--font-family-display);
	letter-spacing: -2px;
}

.train-illustration-icon {
	color: var(--primary);
	animation: bounce 2s infinite ease-in-out;
}

.red-signal-light {
	animation: blink 1s infinite alternate;
	stroke: #DC3545;
	fill: rgba(220, 53, 69, 0.2);
}

.error-title {
	font-size: 32px;
	font-weight: 800;
	color: var(--text-primary);
	margin-bottom: 20px;
}

.error-search-box {
	margin: 30px auto;
	max-width: 450px;
	background-color: var(--surface);
	border: 1px solid var(--border-color);
	padding: 24px;
	border-radius: var(--border-radius-md);
	box-shadow: var(--shadow-sm);
}

.search-title-label {
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 15px;
	color: var(--text-primary);
}

.error-navigation-back {
	margin-top: 30px;
}

.btn-go-home {
	display: inline-block;
	background-color: var(--primary);
	color: var(--white) !important;
	font-weight: 700;
	padding: 12px 30px;
	border-radius: var(--border-radius-sm);
	box-shadow: var(--shadow-sm);
	transition: var(--transition-smooth);
}

.btn-go-home:hover {
	background-color: var(--accent);
	color: var(--white) !important;
	transform: translateY(-2px);
}

@keyframes blink {
	0% { opacity: 0.3; }
	100% { opacity: 1; }
}

@keyframes bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

/* -------------------------------------------------------------
   13. Print Layout Overrides
   ------------------------------------------------------------- */
@media print {
	body {
		background: none;
		color: #000;
	}
	.site-header, .top-bar, .site-footer, .sidebar-col, .back-to-top-btn, .post-share-box, .comments-area {
		display: none !important;
	}
	.main-content-col {
		width: 100% !important;
	}
	.single-article-entry {
		border: none;
		box-shadow: none;
		padding: 0;
	}
}
