/*
Theme Name: TraceContainer
Theme URI: https://www.tracecontainer.com/blog
Author: TraceContainer
Author URI: https://www.tracecontainer.com
Description: Custom WordPress theme for TraceContainer blog — matching the main site design with orange accent, Inter/Lexend fonts, and full SEO optimization.
Version: 1.0.0
License: GNU General Public License v2 or later
Tags: container-tracking, shipping, logistics, blog
Text Domain: tracecontainer
*/

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
	font-family: 'Inter', sans-serif;
	background-color: #faf5f5;
	color: #333;
	overflow-x: hidden;
	line-height: 1.6;
}

a { color: #ff6b35; text-decoration: none; }
a:hover { color: #e55a2b; }

img { max-width: 100%; height: auto; display: block; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.content-area {
	max-width: 1200px;
	margin: 0 auto;
	padding: 3rem 1.5rem;
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 2.5rem;
	align-items: start;
}

@media (max-width: 1023px) {
	.content-area { grid-template-columns: 1fr; }
	.sidebar { order: 2; }
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
	background: #1a1a2e;
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.header-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}

.header-logo img { height: 36px; width: auto; }

.header-logo .logo-name {
	font-family: 'Lexend', sans-serif;
	font-weight: 700;
	font-size: 1.1rem;
	color: #fff;
	letter-spacing: -0.3px;
}

.header-logo .logo-tagline {
	font-size: 0.65rem;
	color: #ff6b35;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	display: block;
	line-height: 1;
}

.header-nav { display: flex; align-items: center; gap: 1.5rem; }

.header-nav a {
	color: #ccc;
	font-size: 0.9rem;
	font-weight: 500;
	transition: color 0.2s;
}

.header-nav a:hover, .header-nav a.active { color: #ff6b35; }

.header-cta {
	background: #ff6b35;
	color: #fff !important;
	padding: 8px 16px;
	border-radius: 6px;
	font-weight: 600 !important;
	font-size: 0.85rem !important;
	transition: background 0.2s !important;
}

.header-cta:hover { background: #e55a2b; color: #fff !important; }

.hamburger {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
}

.hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	background: #fff;
	margin: 5px 0;
	transition: 0.3s;
}

.mobile-nav {
	display: none;
	background: #1a1a2e;
	border-top: 1px solid #2d2d4e;
	padding: 1rem 1.5rem;
}

.mobile-nav a {
	display: block;
	color: #ccc;
	padding: 10px 0;
	font-size: 0.95rem;
	font-weight: 500;
	border-bottom: 1px solid #2d2d4e;
}

.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: #ff6b35; }
.mobile-nav.open { display: block; }

@media (max-width: 1023px) {
	.header-nav { display: none; }
	.hamburger { display: block; }
}

/* ── Blog Hero / Page title ───────────────────────────────────────────────── */
.blog-hero {
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	padding: 4rem 1.5rem;
	text-align: center;
}

.blog-hero h1 {
	font-family: 'Lexend', sans-serif;
	font-size: clamp(1.8rem, 4vw, 2.8rem);
	color: #fff;
	margin-bottom: 0.75rem;
}

.blog-hero p {
	color: #aaa;
	font-size: 1.05rem;
	max-width: 600px;
	margin: 0 auto;
}

/* ── Post Cards ───────────────────────────────────────────────────────────── */
.posts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.75rem;
}

.post-card {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0,0,0,0.07);
	transition: box-shadow 0.25s, transform 0.25s;
	border: 1px solid #f0e8e8;
}

.post-card:hover {
	box-shadow: 0 6px 24px rgba(255,107,53,0.12);
	transform: translateY(-2px);
}

.post-card-thumb {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.post-card-body { padding: 1.5rem; }

.post-category {
	display: inline-block;
	background: #fff3ef;
	color: #ff6b35;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 0.75rem;
}

.post-card-title {
	font-family: 'Lexend', sans-serif;
	font-size: 1.15rem;
	font-weight: 700;
	color: #1a1a2e;
	line-height: 1.4;
	margin-bottom: 0.6rem;
}

.post-card-title a { color: #1a1a2e; }
.post-card-title a:hover { color: #ff6b35; }

.post-card-excerpt {
	color: #666;
	font-size: 0.9rem;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #f5f5f5;
	font-size: 0.8rem;
	color: #999;
}

.post-meta-date::before { content: "📅 "; }

.read-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #ff6b35;
	font-weight: 600;
	font-size: 0.85rem;
	margin-top: 1rem;
	transition: gap 0.2s;
}

.read-more:hover { gap: 8px; color: #e55a2b; }
.read-more::after { content: "→"; }

/* ── Single Post ──────────────────────────────────────────────────────────── */
.single-post-header {
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	padding: 4rem 1.5rem 3rem;
}

.single-post-header .post-category { margin-bottom: 1rem; }

.single-post-title {
	font-family: 'Lexend', sans-serif;
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	color: #fff;
	line-height: 1.3;
	max-width: 800px;
	margin-bottom: 1rem;
}

.single-post-meta {
	color: #aaa;
	font-size: 0.85rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.single-post-featured { width: 100%; max-height: 480px; object-fit: cover; border-radius: 10px; margin-bottom: 2rem; }

.post-content {
	font-size: 1rem;
	line-height: 1.8;
	color: #333;
}

.post-content h2 {
	font-family: 'Lexend', sans-serif;
	font-size: 1.5rem;
	color: #1a1a2e;
	margin: 2rem 0 0.75rem;
}

.post-content h3 {
	font-family: 'Lexend', sans-serif;
	font-size: 1.2rem;
	color: #1a1a2e;
	margin: 1.5rem 0 0.5rem;
}

.post-content p { margin-bottom: 1.25rem; }

.post-content ul, .post-content ol {
	margin: 1rem 0 1.25rem 1.5rem;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content a { color: #ff6b35; text-decoration: underline; }
.post-content a:hover { color: #e55a2b; }

.post-content blockquote {
	border-left: 4px solid #ff6b35;
	background: #fff9f7;
	padding: 1rem 1.5rem;
	margin: 1.5rem 0;
	border-radius: 0 6px 6px 0;
	font-style: italic;
	color: #555;
}

.post-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
	font-size: 0.9rem;
}

.post-content th {
	background: #1a1a2e;
	color: #fff;
	padding: 10px 14px;
	text-align: left;
}

.post-content td {
	border: 1px solid #e5e7eb;
	padding: 10px 14px;
}

.post-content tr:nth-child(even) td { background: #faf5f5; }

/* ── Tracking CTA Box ─────────────────────────────────────────────────────── */
.tracking-cta-box {
	background: linear-gradient(135deg, #ff6b35, #e55a2b);
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
	margin: 2.5rem 0;
	color: #fff;
}

.tracking-cta-box h3 {
	font-family: 'Lexend', sans-serif;
	font-size: 1.3rem;
	margin-bottom: 0.75rem;
	color: #fff;
}

.tracking-cta-box p { font-size: 0.9rem; margin-bottom: 1.25rem; opacity: 0.9; }

.tracking-cta-box a {
	display: inline-block;
	background: #fff;
	color: #ff6b35;
	font-weight: 700;
	padding: 10px 24px;
	border-radius: 6px;
	font-size: 0.9rem;
	text-decoration: none;
	transition: transform 0.2s;
}

.tracking-cta-box a:hover { transform: scale(1.03); }

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */
.breadcrumb {
	font-size: 0.8rem;
	color: #999;
	padding: 0.75rem 0;
	margin-bottom: 1.5rem;
}

.breadcrumb a { color: #ff6b35; }
.breadcrumb span { margin: 0 0.4rem; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: 80px; }

.sidebar-widget {
	background: #fff;
	border-radius: 10px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	border: 1px solid #f0e8e8;
	box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.sidebar-widget-title {
	font-family: 'Lexend', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	color: #1a1a2e;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #ff6b35;
}

.sidebar-track-box {
	background: linear-gradient(135deg, #1a1a2e, #16213e);
	border-radius: 10px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	text-align: center;
}

.sidebar-track-box h3 {
	color: #fff;
	font-family: 'Lexend', sans-serif;
	font-size: 0.95rem;
	margin-bottom: 0.5rem;
}

.sidebar-track-box p { color: #aaa; font-size: 0.8rem; margin-bottom: 1rem; }

.sidebar-track-btn {
	display: block;
	background: #ff6b35;
	color: #fff;
	text-align: center;
	padding: 10px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.9rem;
	transition: background 0.2s;
}

.sidebar-track-btn:hover { background: #e55a2b; color: #fff; }

.recent-posts-list { list-style: none; }

.recent-posts-list li {
	padding: 0.6rem 0;
	border-bottom: 1px solid #f5f5f5;
	font-size: 0.85rem;
}

.recent-posts-list li:last-child { border-bottom: none; }
.recent-posts-list a { color: #333; font-weight: 500; }
.recent-posts-list a:hover { color: #ff6b35; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.tag-cloud a {
	background: #fff3ef;
	color: #ff6b35;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
	border: 1px solid #ffd5c5;
	transition: background 0.2s;
}

.tag-cloud a:hover { background: #ff6b35; color: #fff; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin: 2rem 0;
}

.pagination a, .pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	font-size: 0.9rem;
	font-weight: 600;
	border: 1px solid #e5e7eb;
	color: #333;
	transition: all 0.2s;
}

.pagination a:hover, .pagination .current {
	background: #ff6b35;
	color: #fff;
	border-color: #ff6b35;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
	background: #1a1a2e;
	color: #aaa;
	padding: 3rem 1.5rem 1.5rem;
	margin-top: auto;
}

.footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr;
	gap: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #2d2d4e;
}

@media (max-width: 767px) {
	.footer-inner { grid-template-columns: 1fr; }
}

.footer-brand { }

.footer-brand img { height: 40px; width: auto; margin-bottom: 0.75rem; }

.footer-brand p { font-size: 0.85rem; line-height: 1.6; color: #888; }

.footer-col h4 {
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
	margin-bottom: 1rem;
	font-family: 'Lexend', sans-serif;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
	color: #888;
	font-size: 0.85rem;
	transition: color 0.2s;
}

.footer-col a:hover { color: #ff6b35; }

.footer-bottom {
	max-width: 1200px;
	margin: 1.5rem auto 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.8rem;
	color: #666;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: #ff6b35; }

/* ── Back to top ──────────────────────────────────────────────────────────── */
.back-to-top {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	background: #ff6b35;
	color: #fff;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
	z-index: 500;
	text-decoration: none;
}

.back-to-top.visible { opacity: 1; pointer-events: auto; }

/* ── Utilities ────────────────────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
