/* Truck Hugo Theme Stylesheet (Minimalism Style, Heavy-Duty Truck & Iron Gray with Deep Navy) */
:root {
    --primary: #2c3e50;
    --primary-hover: #1a252f;
    --primary-light: #eaeded;
    --primary-border: #bdc3c7;
    --accent: #2980b9;
    --accent-hover: #1f618d;
    --accent-light: #ebf5fb;
    --accent-border: #aed6f1;
    --text-primary: #2c3e50;
    --text-secondary: #566573;
    --text-muted: #7f8c8d;
    --bg: #f2f4f4;
    --card-bg: #ffffff;
    --header-bg: #243342;
    --header-text: #ffffff;
    --header-link: #d5dbdb;
    --header-link-hover: #ffffff;
    --border: #d5dbdb;
    --border-hover: #2980b9;
    --shadow-sm: 0 1px 3px rgba(44, 62, 80, 0.08);
    --shadow-md: 0 4px 12px rgba(44, 62, 80, 0.12);
    --shadow-lg: 0 8px 24px rgba(44, 62, 80, 0.16);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --transition: all 0.2s ease-in-out;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

/* Header & Navigation */
.site-header {
    background-color: var(--header-bg);
    border-bottom: 3px solid var(--accent);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--header-text);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand-link:hover {
    color: #3498db;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3498db;
}

.brand-tagline {
    font-size: 0.85rem;
    color: #bdc3c7;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 0.75rem;
    display: none;
}

@media (min-width: 768px) {
    .brand-tagline {
        display: inline-block;
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--header-link);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 0.2rem;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: var(--transition);
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link:hover::after {
    width: 100%;
}

/* Banner Section */
.banner-section {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #1c2833 0%, #2c3e50 100%);
}

.banner-media {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    filter: brightness(0.9) contrast(1.1);
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(28, 40, 51, 0.4) 0%, rgba(28, 40, 51, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
}

.banner-content {
    max-width: 800px;
    color: #ffffff;
}

.banner-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-desc {
    font-size: 1.05rem;
    color: #eaeded;
    line-height: 1.55;
    max-width: 640px;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Main Container */
.site-main-container {
    flex: 1 0 auto;
}

.content-container {
    max-width: 1080px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Cards & Feeds */
.card-feed {
    width: 100%;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-item {
    position: relative;
}

.truck-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.75rem;
    transition: var(--transition);
    position: relative;
}

.truck-card:hover {
    border-left-color: var(--accent);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 0.75rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.6rem;
    font-size: 0.825rem;
    color: var(--text-muted);
}

.meta-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-icon {
    color: var(--text-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: var(--transition);
}

.badge-category {
    background-color: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}

.badge-category:hover {
    background-color: var(--accent);
    color: #ffffff;
}

.badge-tag {
    background-color: #f2f4f4;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.badge-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
}

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

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

.card-excerpt {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
}

.read-more-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.read-more-link:hover {
    color: var(--accent-hover);
    transform: translateX(4px);
}

/* Single Article */
.single-article {
    margin-bottom: 2rem;
}

.article-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
}

.article-title {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* TOC */
.article-toc {
    background-color: #fafbfc;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.toc-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.article-toc nav ul {
    list-style: none;
    padding-left: 0;
}

.article-toc nav ul ul {
    padding-left: 1.25rem;
}

.article-toc li {
    margin: 0.35rem 0;
    font-size: 0.875rem;
}

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

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

/* Markdown Content */
.post-content {
    font-size: 1.025rem;
    line-height: 1.75;
    color: #2c3e50;
    margin-bottom: 2.5rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.85rem;
    line-height: 1.35;
}

.markdown-body h2 {
    font-size: 1.45rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.4rem;
}

.markdown-body h3 {
    font-size: 1.2rem;
}

.markdown-body p {
    margin-bottom: 1.25rem;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.markdown-body li {
    margin-bottom: 0.4rem;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary);
    background-color: #eaeded;
    padding: 0.85rem 1.25rem;
    margin: 1.25rem 0;
    color: var(--text-secondary);
}

.markdown-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875em;
    background-color: #eaeded;
    color: #1a252f;
    padding: 0.2em 0.4em;
    border-radius: 2px;
    border: 1px solid #d5dbdb;
}

.markdown-body pre {
    background-color: #243342;
    color: #f2f4f4;
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.markdown-body pre code {
    background: transparent;
    color: inherit;
    border: none;
    padding: 0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.markdown-body th,
.markdown-body td {
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    text-align: left;
}

.markdown-body th {
    background-color: #eaeded;
    font-weight: 700;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
}

/* Article Footer & Taxonomy */
.article-footer {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.taxonomy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.taxonomy-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Article Navigation */
.article-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
    .article-nav {
        grid-template-columns: 1fr 1fr;
    }
}

.nav-prev,
.nav-next {
    display: flex;
    flex-direction: column;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: #ffffff;
    transition: var(--transition);
}

.nav-prev:hover,
.nav-next:hover {
    border-color: var(--accent);
    background-color: var(--accent-light);
}

.nav-prev span,
.nav-next span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.nav-prev strong,
.nav-next strong {
    font-size: 0.925rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-next {
    text-align: right;
}

/* List & Taxonomy Pages */
.list-section {
    background-color: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.list-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.75rem;
}

.list-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.term-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.term-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: #ffffff;
    transition: var(--transition);
}

.term-chip:hover {
    border-color: var(--accent);
    background-color: var(--accent-light);
    transform: translateY(-1px);
}

.term-title {
    font-weight: 600;
    color: var(--text-primary);
}

.term-count {
    background-color: #eaeded;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

/* Archives Page */
.archives-wrapper {
    background-color: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.archives-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.archives-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.archives-timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.archive-year-group {
    position: relative;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary);
}

.year-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.year-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary);
}

.year-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.archive-items {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.archive-item {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
}

.archive-date {
    font-size: 0.825rem;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    white-space: nowrap;
}

.archive-link {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.archive-link:hover {
    color: var(--accent);
}

/* Pagination */
.pagination-nav {
    margin-top: 2.25rem;
}

.pagination-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pagination-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-light);
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 99;
}

.back-to-top:hover {
    background-color: var(--accent);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.site-footer {
    background-color: #243342;
    color: #bdc3c7;
    padding: 2.25rem 0;
    margin-top: 4rem;
    border-top: 2px solid var(--primary);
}

.footer-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-copyright {
    color: #bdc3c7;
}

.footer-top a {
    color: #bdc3c7;
}

.footer-top a:hover {
    color: #ffffff;
}

.empty-state {
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem 0;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-container {
        height: auto;
        padding: 0.85rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .banner-section {
        height: 220px;
    }

    .banner-title {
        font-size: 1.5rem;
    }

    .card-list {
        gap: 1rem;
    }

    .truck-card {
        padding: 1.25rem 1.25rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}
