/*
Theme Name: RutoDelivers
Theme URI: https://rutodelivers.com
Description: Kenya development tracker – fast, SEO-optimised, mobile-first
Version: 2.0
Author: editor@rutodelivers.com
Text Domain: rutodelivers
*/

/* ================================================================
   CUSTOM PROPERTIES
   ================================================================ */
:root {
    --primary:      #006600;
    --primary-dark: #004d00;
    --primary-light:#e6f2e6;
    --secondary:    #ffcc00;
    --secondary-dk: #e6b800;
    --dark:         #1a1a1a;
    --mid:          #444;
    --gray:         #666;
    --light-gray:   #f5f5f5;
    --border:       #e0e0e0;
    --light:        #ffffff;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
    --shadow-md:    0 4px 12px rgba(0,0,0,.10);
    --shadow-lg:    0 8px 24px rgba(0,0,0,.12);
    --radius-sm:    4px;
    --radius-md:    8px;
    --radius-lg:    14px;
    --transition:   .25s ease;
    --font-body:    'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --max-w:        1200px;
}

/* ================================================================
   RESET / BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    line-height: 1.65;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--primary); }

ul { list-style: none; }

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

/* ================================================================
   LAYOUT UTILITIES
   ================================================================ */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
    color: var(--dark);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--primary);
    color: var(--light);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    will-change: transform;
}
.btn:hover, .btn:focus-visible {
    background: var(--primary-dark);
    color: var(--light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn:active { transform: translateY(0); }

.btn-secondary {
    background: var(--secondary);
    color: var(--dark);
}
.btn-secondary:hover { background: var(--secondary-dk); color: var(--dark); }

/* ================================================================
   SKIP LINK (accessibility)
   ================================================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary);
    color: var(--light);
    padding: 8px 16px;
    z-index: 9999;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
    background: var(--light);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    /* GPU compositing for smooth scroll */
    will-change: transform;
    transform: translateZ(0);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.site-branding img { height: 48px; width: auto; }

.site-branding h1 {
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}
.site-branding h1 a:hover { color: var(--primary-dark); }

.site-branding p { font-size: .8rem; color: var(--gray); margin-top: 2px; }

/* Desktop Nav */
.main-navigation { display: flex; align-items: center; gap: 16px; }

.desktop-menu {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

.desktop-menu li a {
    font-weight: 500;
    font-size: .95rem;
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition);
}

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

.desktop-menu li a:hover { color: var(--primary); }
.desktop-menu li a:hover::after,
.desktop-menu li.current-menu-item > a::after { width: 100%; }
.desktop-menu li.current-menu-item > a { color: var(--primary); font-weight: 700; }

/* Mobile toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--dark);
    transition: background var(--transition);
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu-toggle:hover { background: var(--light-gray); }

/* ================================================================
   BREAKING NEWS TICKER
   ================================================================ */
.breaking-news {
    background: var(--primary);
    color: var(--light);
    padding: 9px 0;
    overflow: hidden;
}

.breaking-news-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.breaking-label {
    background: var(--secondary);
    color: var(--dark);
    padding: 4px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: .8rem;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.ticker { overflow: hidden; flex: 1; position: relative; }

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    /* Use CSS animation – GPU composited, no JS repaint */
    animation: ticker 35s linear infinite;
    padding-left: 100%;
}

.ticker-content a { color: var(--secondary); }
.ticker-content a:hover { text-decoration: underline; }

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

.ticker:hover .ticker-content { animation-play-state: paused; }

/* ================================================================
   METRICS BAR
   ================================================================ */
.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 30px 0 10px;
}

.metric-card {
    background: var(--light);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-top: 3px solid var(--primary);
    transition: box-shadow var(--transition), transform var(--transition);
}
.metric-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.metric-label {
    font-size: .85rem;
    color: var(--gray);
    font-weight: 500;
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
    padding: 36px 0;
    margin-bottom: 40px;
    background:
        linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.65)),
        url('https://images.unsplash.com/photo-1547471080-7cc2caa01a7e?w=1200&q=70&auto=format') center/cover no-repeat;
    border-radius: var(--radius-lg);
    color: var(--light);
    contain: layout style; /* paint containment */
}

.hero-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.featured-content { padding: 28px; }
.featured-content .project-badge { margin-bottom: 12px; }

.featured-content h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.25;
}

.featured-content p {
    opacity: .9;
    margin-bottom: 16px;
    font-size: .95rem;
}

.featured-meta {
    display: flex;
    gap: 14px;
    font-size: .85rem;
    opacity: .8;
    margin-bottom: 18px;
}

/* Top stories sidebar */
.top-stories { display: flex; flex-direction: column; gap: 16px; }

.story-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: rgba(255,255,255,.12);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background var(--transition), transform var(--transition);
    cursor: pointer;
}
.story-card:hover {
    background: rgba(255,255,255,.2);
    transform: translateY(-3px);
}

.story-image {
    width: 90px;
    height: 70px;
    border-radius: var(--radius-sm);
    background: var(--secondary);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 1.4rem;
}
.story-image img { width: 100%; height: 100%; object-fit: cover; }

.story-content h3 { font-size: .95rem; margin-bottom: 4px; line-height: 1.3; }
.story-meta { font-size: .78rem; color: #ccc; }

/* ================================================================
   CONTENT AREA (main + sidebar)
   ================================================================ */
.content-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

/* ================================================================
   PROJECTS GRID
   ================================================================ */
.projects-showcase { margin-bottom: 44px; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ---- Project card ---- */
.project-card {
    background: var(--light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    contain: layout style;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 170px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 2.6rem;
    overflow: hidden;
}
.project-image img { width: 100%; height: 100%; object-fit: cover; }

.project-content { padding: 18px; }

.project-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary);
    color: var(--light);
    border-radius: var(--radius-sm);
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.project-content h3 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.35; }
.project-content h3 a:hover { color: var(--primary); }

.project-meta {
    display: flex;
    gap: 10px;
    font-size: .78rem;
    color: var(--gray);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.project-status { display: flex; align-items: center; gap: 5px; }

.status-indicator { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.status-completed { background: #28a745; }
.status-ongoing   { background: #ffc107; }
.status-planned   { background: #17a2b8; }

.project-excerpt { color: var(--gray); font-size: .88rem; margin-bottom: 14px; }

.project-progress { margin-top: 12px; }

.progress-bar {
    height: 7px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #009900);
    border-radius: 4px;
    transition: width 1s ease;
}

.progress-text { font-size: .78rem; color: var(--gray); margin-top: 4px; text-align: right; }

/* ================================================================
   COUNTY TAG SCROLL
   ================================================================ */
.projects-by-county { margin-bottom: 44px; }

.tag-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    padding: 10px 0 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}
.tag-scroll-container::-webkit-scrollbar { display: none; }

.tag-card {
    flex: 0 0 auto;
    min-width: 160px;
    padding: 16px 20px;
    background: var(--light);
    border-radius: var(--radius-lg);
    text-decoration: none !important;
    color: var(--dark);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    text-align: center;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
}
.tag-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #ccc;
    color: var(--primary);
}

.tag-name { font-size: 1rem; font-weight: 700; display: block; margin-bottom: 4px; }
.tag-count { font-size: .82rem; color: var(--gray); }

/* ================================================================
   POST CARDS
   ================================================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    contain: layout style;
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-image {
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
}
.post-image img,
.post-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.post-card:hover .post-thumb-img { transform: scale(1.04); }

.post-content { padding: 18px; }

.post-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary);
    color: var(--light);
    border-radius: var(--radius-sm);
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.post-content h3 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.35; }
.post-content h3 a:hover { color: var(--primary); }

.post-meta { display: flex; gap: 10px; font-size: .78rem; color: var(--gray); margin-bottom: 8px; }
.post-excerpt { color: var(--gray); font-size: .88rem; line-height: 1.5; }

/* ================================================================
   SOCIAL SHARING
   ================================================================ */
.social-sharing {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--light);
    font-size: .88rem;
    font-weight: 600;
    transition: opacity var(--transition), transform var(--transition);
    -webkit-tap-highlight-color: transparent;
}
.social-btn:hover { opacity: .88; transform: translateY(-2px); color: var(--light); }

.facebook  { background: #3b5998; }
.twitter   { background: #1da1f2; }
.linkedin  { background: #0077b5; }
.whatsapp  { background: #25d366; }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    background: var(--light-gray);
    padding: 24px;
    border-radius: var(--radius-md);
    height: fit-content;
    position: sticky;
    top: 90px; /* below sticky header */
}

.widget { margin-bottom: 28px; }
.widget:last-child { margin-bottom: 0; }

.widget h3,
.widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    color: var(--dark);
}

.trending-posts { display: flex; flex-direction: column; gap: 14px; }

.trending-post {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.trending-post:last-child { border-bottom: none; padding-bottom: 0; }

.trending-number {
    background: var(--primary);
    color: var(--light);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.trending-content h4 { font-size: .9rem; margin-bottom: 4px; line-height: 1.3; }
.trending-content h4 a:hover { color: var(--primary); }
.trending-content .post-date { font-size: .78rem; color: var(--gray); }

/* Newsletter */
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }

.newsletter-form input[type="email"] {
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,102,0,.12);
}

/* Categories */
.categories-list { display: flex; flex-direction: column; gap: 0; }

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
}
.category-item:last-child { border-bottom: none; }
.category-item a:hover { color: var(--primary); }

.count {
    background: var(--light);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: .78rem;
    color: var(--gray);
    border: 1px solid var(--border);
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 50px 0 24px;
    margin-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    margin-bottom: 32px;
}

.footer-widget h4 {
    color: var(--secondary);
    margin-bottom: 16px;
    font-size: 1.05rem;
    letter-spacing: .03em;
}

.footer-widget p { font-size: .9rem; line-height: 1.7; margin-bottom: 10px; }
.footer-widget a { color: #bbb; transition: color var(--transition); }
.footer-widget a:hover { color: var(--light); }

/* Footer social icons */
.footer-social { display: flex; gap: 14px; margin-top: 14px; }
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    font-size: 1rem;
    color: #ccc;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.footer-social a:hover {
    background: var(--primary);
    color: var(--light);
    transform: translateY(-3px);
}

.footer-menu { display: flex; flex-direction: column; gap: 8px; }
.footer-menu a { font-size: .9rem; }
.footer-menu li::before { content: '›'; margin-right: 6px; color: var(--secondary); }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #888;
    font-size: .85rem;
}
.footer-bottom a { color: var(--secondary); }
.footer-bottom a:hover { text-decoration: underline; }

/* ================================================================
   MOBILE MENU
   ================================================================ */
.mobile-menu {
    position: fixed;
    inset: 0;
    width: min(340px, 90vw);
    height: 100dvh;
    background: var(--light);
    z-index: 1002;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    transform: translateX(-100%);
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.mobile-menu:not([hidden]) { transform: translateX(0); }
/* Remove hidden attribute handling via CSS too */
.mobile-menu[hidden] { display: block; transform: translateX(-100%); visibility: hidden; }
.mobile-menu.active  { transform: translateX(0); visibility: visible; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--light-gray);
    position: sticky;
    top: 0;
}

.mobile-menu-close {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--dark);
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-list {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mobile-menu-list li { border-bottom: 1px solid var(--border); }
.mobile-menu-list li:last-child { border-bottom: none; }
.mobile-menu-list a {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 4px;
    transition: color var(--transition);
}
.mobile-menu-list a:hover { color: var(--primary); }

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1001;
    backdrop-filter: blur(2px);
}
.mobile-menu-overlay.active { display: block; }

/* ================================================================
   BACK TO TOP BUTTON
   ================================================================ */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--light);
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    z-index: 900;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ================================================================
   SINGLE POST
   ================================================================ */
.single-post .site-main { padding: 40px 0; }

.article-header { margin-bottom: 44px; text-align: center; }

.featured-image {
    margin-bottom: 36px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.featured-image img {
    width: 100%;
    height: clamp(240px, 45vw, 500px);
    object-fit: cover;
}

.article-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .88rem;
    color: var(--gray);
    font-weight: 500;
}

.article-meta .fas,
.article-meta .far { color: var(--primary); }

.post-category a { color: var(--primary); font-weight: 600; }
.post-category a:hover { color: var(--primary-dark); }

/* ── Article Content ── */
.article-content {
    max-width: 780px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content > * { margin-bottom: 1.5em; }

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin: 2.2em 0 .8em;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--secondary);
}
.article-content h3 { font-size: 1.35rem; font-weight: 700; color: var(--primary-dark); margin: 1.8em 0 .7em; }
.article-content h4 { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin: 1.4em 0 .6em; }

.article-content p { text-align: justify; }

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 22px 28px;
    margin: 36px 0;
    background: var(--primary-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.6;
}

.article-content ul, .article-content ol { padding-left: 28px; margin: 22px 0; }
.article-content li { margin-bottom: 8px; }

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.article-content table th {
    background: var(--primary);
    color: var(--light);
    padding: 13px 16px;
    text-align: left;
}
.article-content table td { padding: 11px 16px; border-bottom: 1px solid var(--border); }
.article-content table tr:nth-child(even) { background: var(--light-gray); }
.article-content table tr:hover { background: rgba(0,102,0,.04); }

.article-content img {
    border-radius: var(--radius-md);
    margin: 28px 0;
    box-shadow: var(--shadow-md);
}

/* ── Article Footer ── */
.article-footer {
    margin-top: 56px;
    padding-top: 36px;
    border-top: 2px solid var(--border);
}
.article-footer .social-sharing { justify-content: center; margin-bottom: 36px; }
.article-footer .social-btn { padding: 11px 22px; border-radius: 24px; font-size: .95rem; }
.article-footer .social-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Tags */
.tags-links { text-align: center; margin-top: 20px; }
.tags-links a {
    display: inline-block;
    background: var(--light-gray);
    color: var(--dark);
    padding: 7px 14px;
    margin: 4px;
    border-radius: 20px;
    font-size: .88rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.tags-links a:hover {
    background: var(--primary);
    color: var(--light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,102,0,.25);
}

/* Related Posts */
.related-posts { margin-top: 70px; padding-top: 50px; border-top: 2px solid var(--border); }
.related-posts .section-title { text-align: center; font-size: 1.6rem; margin-bottom: 36px; }

/* Comments */
.comments-area { margin-top: 70px; padding-top: 50px; border-top: 2px solid var(--border); }
.comments-title { font-size: 1.6rem; color: var(--dark); margin-bottom: 36px; text-align: center; }

.comment {
    background: var(--light);
    padding: 28px;
    margin-bottom: 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}
.comment-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.comment-author .avatar { border-radius: 50%; border: 3px solid var(--primary); }
.comment-metadata { font-size: .88rem; color: var(--gray); }
.comment-reply-link { color: var(--primary); font-weight: 600; }

.comment-respond { background: var(--light-gray); padding: 36px; border-radius: var(--radius-md); margin-top: 36px; }
.comment-reply-title { font-size: 1.4rem; margin-bottom: 22px; }

.comment-form label { display: block; margin-bottom: 7px; font-weight: 600; font-size: .9rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: .95rem;
    font-family: var(--font-body);
    margin-bottom: 18px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,102,0,.1);
}
.comment-form .submit {
    background: var(--primary);
    color: var(--light);
    padding: 13px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.comment-form .submit:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Pagination */
.page-links, .nav-links { margin: 30px 0; text-align: center; }
.page-links a, .page-links span,
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    margin: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--dark);
    transition: all var(--transition);
    font-size: .9rem;
}
.page-links a:hover,
.nav-links .page-numbers:hover { background: var(--primary); color: var(--light); border-color: var(--primary); }
.page-links span.current,
.nav-links .page-numbers.current { background: var(--primary); color: var(--light); border-color: var(--primary); }

/* ================================================================
   WORDPRESS ALIGNMENT CLASSES
   ================================================================ */
.alignleft   { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright  { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignfull   { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.wp-caption  { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--gray); text-align: center; font-style: italic; margin-top: 6px; }

/* ================================================================
   404 / SEARCH / ARCHIVE
   ================================================================ */
.error-404,
.no-results { padding: 60px 0; text-align: center; }
.error-404 h1 { font-size: 6rem; color: var(--primary); line-height: 1; margin-bottom: 16px; }
.error-404 h2 { font-size: 1.8rem; margin-bottom: 12px; }
.error-404 p  { color: var(--gray); margin-bottom: 28px; }

/* ================================================================
   CONTENT REVEAL ANIMATION (respects prefers-reduced-motion)
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {
    .article-content > * {
        opacity: 0;
        transform: translateY(16px);
        animation: fadeUp .55s ease forwards;
    }
    .article-content > *:nth-child(1) { animation-delay: .05s; }
    .article-content > *:nth-child(2) { animation-delay: .10s; }
    .article-content > *:nth-child(3) { animation-delay: .15s; }
    .article-content > *:nth-child(4) { animation-delay: .20s; }
    .article-content > *:nth-child(5) { animation-delay: .25s; }

    @keyframes fadeUp {
        to { opacity: 1; transform: translateY(0); }
    }
}

/* ================================================================
   RESPONSIVE – TABLET (≤992px)
   ================================================================ */
@media (max-width: 992px) {
    .hero-container   { grid-template-columns: 1fr; }
    .content-area     { grid-template-columns: 1fr; }
    .metrics          { grid-template-columns: repeat(2, 1fr); }
    .sidebar          { position: static; }

    .projects-grid,
    .posts-grid       { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ================================================================
   RESPONSIVE – MOBILE (≤768px)
   ================================================================ */
@media (max-width: 768px) {
    .desktop-menu     { display: none; }
    .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }

    .header-container { height: 64px; padding: 0 16px; }

    .breaking-label   { font-size: .72rem; padding: 3px 10px; }

    .projects-grid,
    .posts-grid       { grid-template-columns: 1fr; }

    .social-sharing   { flex-wrap: wrap; gap: 8px; }

    .featured-image img { height: 280px; }

    .article-content { font-size: 1rem; }
    .article-content h2 { font-size: 1.4rem; }
    .article-content h3 { font-size: 1.2rem; }
    .article-content p  { text-align: left; }

    .article-footer .social-btn { padding: 9px 18px; font-size: .88rem; }

    .comment-respond { padding: 24px 20px; }

    .metrics { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .metric-value { font-size: 1.6rem; }
}

/* ================================================================
   RESPONSIVE – SMALL MOBILE (≤576px)
   ================================================================ */
@media (max-width: 576px) {
    .container { padding: 0 16px; }

    .site-branding h1 { font-size: 1.15rem; }

    .metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .story-card { flex-direction: column; }
    .story-image { width: 100%; height: 110px; }

    .featured-image img { height: 220px; }

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

    .article-footer .social-sharing { flex-direction: column; align-items: center; }
    .article-footer .social-btn { width: 220px; justify-content: center; }

    .related-posts .posts-grid { grid-template-columns: 1fr; }

    .comment { padding: 18px; }
    .comment-meta { flex-direction: column; text-align: center; gap: 8px; }

    .footer-container { grid-template-columns: 1fr; }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
    .site-header,
    .breaking-news,
    .metrics,
    .sidebar,
    .social-sharing,
    .related-posts,
    .comments-area,
    .site-footer,
    .mobile-menu,
    .back-to-top { display: none !important; }

    .content-area { grid-template-columns: 1fr; }

    .article-title {
        color: #000 !important;
        background: none !important;
        -webkit-text-fill-color: #000 !important;
    }

    a::after { content: ' (' attr(href) ')'; font-size: .8em; color: #555; }

    @page { margin: 1.5cm; }
}
