/*
Theme Name: Worker Insights
Theme URI: https://worker.ng/blog
Author: Worker.ng Tech Team
Description: A sophisticated, high-performance theme matching the Artisans Plus design system.
Version: 2.0.2
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700;800&display=swap');

:root {
    /* --- Brand Colors --- */
    --primary-color: #007021;
    --primary-dark: #005619;
    --primary-light: #e6f0e9;
    --accent-color: #f1c30c;
    --accent-hover: #dcb30a;
    --dark-bg: #0a2912;
    
    /* --- Typography & UI --- */
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    
    /* --- Dimensions --- */
    --header-height: 80px;
    --container-width: 1280px;
    
    /* --- Shadows --- */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    
    /* --- Radius --- */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* =========================================
   1. Reset & Base Styles
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    padding-top: env(safe-area-inset-top);
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
a:hover { color: var(--primary-color); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5, h6 { 
    font-family: 'Poppins', sans-serif; 
    font-weight: 700; 
    color: var(--dark-bg); 
    line-height: 1.25; 
    margin-bottom: 1rem;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.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;
}

/* =========================================
   2. Header & Navigation (Fixed)
   ========================================= */
.site-header {
    background: var(--white);
    height: var(--header-height);
    display: flex; align-items: center;
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.site-header.is-sticky {
    box-shadow: var(--shadow-md);
    height: 70px; /* Slight shrink on scroll */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    flex-wrap: nowrap; /* Prevent items falling to next line */
}

/* Logo */
.site-branding { flex-shrink: 0; margin-right: 20px; }
.site-branding a {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    display: flex; align-items: center;
    white-space: nowrap;
}
.site-branding sup {
    color: var(--accent-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-left: 4px;
    font-weight: 700;
    top: -0.5em;
}

/* Desktop Menu - STRICT Styling */
.main-navigation.desktop-only { 
    margin-left: auto; 
    margin-right: 30px; 
    display: block;
    flex-grow: 1; /* Allow it to take space if needed */
    display: flex;
    justify-content: flex-end;
}

/* Target both ul directly and ul inside div (WP Fallback) */
.main-navigation.desktop-only ul,
.main-navigation.desktop-only div > ul { 
    display: flex; 
    align-items: center; 
    gap: 24px; 
    list-style: none !important; /* Force remove bullets */
    margin: 0 !important; 
    padding: 0 !important; 
}

.main-navigation.desktop-only li { 
    margin: 0; 
    padding: 0; 
    position: relative;
    list-style: none !important; /* Force remove bullets */
}

.main-navigation.desktop-only a {
    font-weight: 500; 
    font-size: 0.95rem; 
    color: var(--text-color);
    padding: 10px 0;
    display: block;
    white-space: nowrap;
}
.main-navigation.desktop-only a:hover { color: var(--primary-color); }

/* Header Actions (Search & Desktop CTA) */
.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.search-toggle {
    background: transparent; border: none; 
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-color); transition: 0.2s;
    cursor: pointer;
}
.search-toggle:hover { background: var(--bg-light); color: var(--primary-color); }

.btn-cta {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 112, 33, 0.2);
    display: inline-block;
    border: none;
    white-space: nowrap;
}
.btn-cta:hover {
    background: var(--primary-dark);
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .main-navigation.desktop-only { display: none !important; }
    .header-actions { display: none !important; }
}

/* =========================================
   3. Mobile Drawer & Toggle
   ========================================= */
.mobile-controls { display: none; align-items: center; gap: 10px; flex-shrink: 0; }

.mobile-toggle {
    display: none; cursor: pointer; 
    width: 44px; height: 44px; 
    align-items: center; justify-content: center;
    background: var(--primary-color); 
    color: var(--white);
    border-radius: 10px; border: none;
}
.mobile-toggle svg { width: 24px; height: 24px; fill: currentColor; }

@media (max-width: 991px) { .mobile-controls, .mobile-toggle { display: flex; } }

/* Drawer Container */
.full-screen-menu {
    position: fixed; top: 0; right: -100%; width: 300px; height: 100vh;
    background: var(--white); z-index: 2000;
    display: flex; flex-direction: column;
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    visibility: hidden;
}
.full-screen-menu.open { right: 0; visibility: visible; }

.mobile-overlay-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 1999; opacity: 0; visibility: hidden; 
    transition: opacity 0.3s ease;
}
.mobile-overlay-bg.active { opacity: 1; visibility: visible; }

/* Drawer Content */
.mobile-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border-color);
}
.mobile-menu-close {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-light); border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--text-color);
}

.mobile-menu-inner { padding: 24px; flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; }

/* Mobile Search */
.mobile-drawer-search { margin-bottom: 24px; }
.mobile-drawer-search .search-field { background: var(--bg-light); height: 46px; }

/* Mobile Links - Strict Reset */
.mobile-nav ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.mobile-nav li { border-bottom: 1px solid var(--border-color); list-style: none !important; margin: 0; }
.mobile-nav a {
    display: block; padding: 14px 0;
    font-weight: 500; font-size: 1rem; color: var(--text-color);
}
.mobile-nav a:hover { color: var(--primary-color); padding-left: 5px; }

/* Mobile Footer (CTA) */
.mobile-drawer-footer { margin-top: auto; padding-top: 20px; }
.mobile-drawer-footer .btn-cta { width: 100%; text-align: center; justify-content: center; }


/* =========================================
   4. Blog Layout (Horizontal Cards)
   ========================================= */
.blog-grid {
    display: flex; flex-direction: column; gap: 30px;
    margin: 40px 0;
}
.post-card {
    display: flex; background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden; transition: var(--transition);
}
.post-card:hover {
    box-shadow: var(--shadow-card);
    border-color: rgba(0,112,33,0.3); /* Green hint */
    transform: translateY(-2px);
}
.post-card__image { flex: 0 0 35%; position: relative; min-height: 240px; }
.post-card__image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.post-card:hover .post-card__image img { transform: scale(1.05); }

.post-card__content {
    flex: 0 0 65%; padding: 32px;
    display: flex; flex-direction: column; justify-content: center;
}
.post-meta {
    font-size: 0.85rem; color: var(--text-light);
    margin-bottom: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
}
.post-meta a { color: var(--text-light); font-weight: 600; }
.post-title { font-size: 1.5rem; margin-bottom: 12px; color: var(--dark-bg); }
.post-title a:hover { color: var(--primary-color); }
.post-excerpt {
    color: var(--text-light); margin-bottom: 20px; font-size: 1rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.read-more {
    font-weight: 600; color: var(--primary-color);
    font-size: 0.9rem; display: flex; align-items: center; gap: 4px;
}

@media (max-width: 768px) {
    .post-card { flex-direction: column; }
    .post-card__image { height: 220px; flex: auto; }
    .post-card__content { padding: 24px; }
    .post-title { font-size: 1.25rem; }
}

/* =========================================
   5. Single Post & Sidebar
   ========================================= */
.site-content {
    display: grid; grid-template-columns: 1fr 340px;
    gap: 48px; margin: 40px auto;
}

.entry-header { margin-bottom: 30px; }
.entry-title { font-size: 2.5rem; line-height: 1.2; margin-bottom: 16px; }

.entry-content { font-size: 1.125rem; line-height: 1.8; color: #374151; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content h2 { font-size: 1.75rem; margin-top: 2em; color: var(--primary-color); }
.entry-content h3 { font-size: 1.4rem; margin-top: 1.5em; }
.entry-content ul { list-style: disc; margin-bottom: 1.5em; padding-left: 20px; }

/* Breadcrumbs (Reset List Style) */
.breadcrumbs { font-size: 0.9rem; color: var(--text-light); margin-bottom: 24px; }
.breadcrumbs ol { 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 0 !important; 
    display: flex; 
    flex-wrap: wrap; 
    align-items: center;
}
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs a { color: var(--text-light); transition: 0.2s; }
.breadcrumbs a:hover { color: var(--primary-color); }
.breadcrumbs .sep { margin: 0 10px; color: #d1d5db; font-size: 0.8em; }

/* Sidebar (Sticky Fix) */
.sidebar-area { 
    position: sticky; 
    top: 110px; 
    align-self: start; /* Critical: prevents sticky item from stretching to parent height */
    height: fit-content;
}

.widget { 
    background: var(--white); padding: 24px; 
    border-radius: var(--radius-md); border: 1px solid var(--border-color);
    margin-bottom: 30px; 
}
.widget-title {
    font-size: 1.1rem; border-bottom: 2px solid var(--bg-light);
    padding-bottom: 12px; margin-bottom: 20px; position: relative;
}
.widget-title::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 40px; height: 2px; background: var(--accent-color);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 10px 0; border-bottom: 1px dashed var(--border-color); }
.widget a { font-weight: 500; color: var(--text-color); font-size: 0.95rem; }

@media (max-width: 991px) {
    .site-content { grid-template-columns: 1fr; gap: 40px; }
    .sidebar-area { display: none; }
    .entry-title { font-size: 2rem; }
}

/* =========================================
   6. Search Overlay (Full Screen)
   ========================================= */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(255,255,255,0.98); z-index: 2100;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-close { 
    position: absolute; top: 30px; right: 30px; 
    font-size: 2rem; background: none; border: none; cursor: pointer;
}

.search-form { width: 100%; max-width: 600px; position: relative; }
.search-field {
    width: 100%; height: 60px; padding: 0 120px 0 24px;
    border: 2px solid var(--border-color); border-radius: var(--radius-pill);
    font-size: 1.1rem; outline: none; background: var(--white);
    transition: 0.3s;
}
.search-field:focus { border-color: var(--primary-color); }
.search-submit {
    position: absolute; right: 6px; top: 6px; bottom: 6px;
    background: var(--primary-color); color: var(--white);
    border: none; border-radius: var(--radius-pill); padding: 0 32px;
    font-weight: 600; cursor: pointer;
}

/* =========================================
   7. Footer
   ========================================= */
.site-footer {
    background: var(--dark-bg); color: #9ca3af;
    padding: 80px 0 30px; margin-top: 80px;
}
.site-footer h3 { color: var(--white); }
.footer-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-socket {
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.footer-menu { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }

@media (max-width: 768px) {
    .footer-widgets { grid-template-columns: 1fr; }
    .footer-socket { flex-direction: column; gap: 20px; text-align: center; }
    .footer-menu { flex-wrap: wrap; justify-content: center; }
}

/* Social Share Icons - Fix Size */
.social-share { display: flex; gap: 10px; margin: 20px 0; }
.share-btn {
    width: 40px; height: 40px; border-radius: 50%; background: #f3f4f6;
    display: flex; align-items: center; justify-content: center;
}
.share-btn:hover { background: var(--primary-color); color: white; }
.share-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Table of Contents */
.worker-toc {
    background: var(--bg-light); padding: 20px; border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color); margin: 30px 0;
}
.toc-header { display: flex; justify-content: space-between; align-items: center; }
.toc-toggle { background: none; border: none; color: var(--primary-color); font-weight: 600; font-size: 0.9rem; }
.worker-toc ul { margin-top: 10px; list-style: none; padding: 0; display: block; }
.worker-toc.collapsed ul { display: none; }

/* =========================================
   8. Funnel Box (CTA)
   ========================================= */
.funnel-box {
    background: #f0fdf4; /* Light green tint matching primary-light */
    border: 1px solid #dcfce7;
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin-top: 60px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.funnel-box h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 12px;
}
.funnel-box p {
    color: var(--text-color);
    margin-bottom: 24px;
    font-size: 1.05rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.funnel-box .btn-cta {
    font-size: 1rem;
    padding: 12px 32px;
}

/* =========================================
   9. Comments Area
   ========================================= */
.comments-area { margin-top: 60px; border-top: 1px solid var(--border-color); padding-top: 40px; }
.comments-title { font-size: 1.5rem; margin-bottom: 30px; }

.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li.comment {
    border-bottom: 1px solid var(--bg-light);
    padding-bottom: 30px;
    margin-bottom: 30px;
}
.comment-list li.comment:last-child { border-bottom: none; }

.comment-body { position: relative; padding-left: 0; }
.comment-meta { 
    display: flex; align-items: center; justify-content: space-between; 
    margin-bottom: 15px; 
}
.comment-author { font-weight: 700; color: var(--dark-bg); font-family: 'Poppins', sans-serif; font-size: 1rem; }
.comment-metadata { font-size: 0.85rem; color: var(--text-light); }
.comment-metadata a { color: var(--text-light); }
.comment-content p { font-size: 1rem; line-height: 1.6; margin-bottom: 15px; }

.reply { text-align: right; }
.comment-reply-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Comment Form */
.comment-respond { 
    background: var(--bg-light); 
    padding: 30px; 
    border-radius: var(--radius-md); 
    margin-top: 40px;
}
.comment-reply-title { font-size: 1.25rem; margin-bottom: 20px; display: block; }
.comment-form p { margin-bottom: 20px; }
.comment-form label { display: block; font-weight: 500; margin-bottom: 8px; font-size: 0.9rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--primary-color); }

.comment-form textarea { height: 120px; resize: vertical; }
.form-submit .submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.95rem;
}
.form-submit .submit:hover { background: var(--primary-dark); }