:root {
    --primary: #00843D; /* Pakistan Green */
    --primary-dark: #00602c;
    --secondary: #2c3e50;
    --accent: #f1c40f;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --text-main: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Top Bar */
.top-bar {
    background: var(--secondary);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.separator {
    color: rgba(255,255,255,0.3);
}

.social-links a {
    color: rgba(255,255,255,0.8);
    margin-left: 16px;
}

.social-links a:hover {
    color: var(--white);
}

/* Header */
.main-header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.logo h1 span {
    color: var(--primary);
}

.logo p {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.ad-banner-header {
    background: #eee;
    width: 728px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    max-width: 100%;
}

/* Navigation */
.main-nav {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-list {
    display: flex;
    gap: 24px;
}

.nav-list a {
    color: var(--white);
    font-weight: 500;
    padding: 16px 0;
    display: block;
    border-bottom: 3px solid transparent;
}

.nav-list a:hover,
.nav-list a.active {
    border-bottom-color: var(--accent);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto 20px;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 14px;
    border-radius: 4px;
    border: none;
    font-size: 16px;
}

.search-box button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.quick-tags span {
    color: #ccc;
    margin-right: 8px;
}

.quick-tags a {
    color: var(--white);
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    margin: 0 4px;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 40px 16px;
    flex: 1;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h3 {
    color: var(--secondary);
    border-bottom: 3px solid var(--primary);
    margin-bottom: -12px;
    padding-bottom: 10px;
}

/* Updated Filter Tabs Styles */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tabs button {
    background: none;
    border: 1px solid var(--border);
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-tabs button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tabs button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Job Cards */
.jobs-grid {
    display: grid;
    gap: 20px;
}

.job-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.job-icon {
    width: 60px;
    height: 60px;
    background: #f0fdf4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 24px;
    flex-shrink: 0;
}

.job-info h4 {
    color: var(--secondary);
    font-size: 18px;
    margin-bottom: 8px;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-tags span {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 6px;
}

.tag-govt {
    background: #dbeafe !important;
    color: #1e40af !important;
}
.tag-private {
    background: #f3e8ff !important;
    color: #6b21a8 !important;
}

.job-action {
    margin-left: auto;
    align-self: flex-start;
    flex-shrink: 0;
}

.btn-details {
    background: var(--white);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.btn-details:hover {
    background: var(--primary);
    color: white;
}

/* Job Details Page Specifics */
.job-header {
    margin-bottom: 30px;
}

.job-header h2 {
    font-size: 28px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.text-green {
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
}

.job-detail-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.job-detail-card h3 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 25px;
    color: var(--secondary);
}

.job-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.meta-box h5 {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 5px;
}

.meta-box p {
    font-weight: 600;
    color: var(--secondary);
}

#job-desc-content {
    margin-bottom: 30px;
    font-size: 16px;
}

#job-desc-content h4 {
    margin: 20px 0 10px;
    color: var(--secondary);
}

#job-desc-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

/* NEW STYLES FOR TAGS IN JOB DETAILS */
.job-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
}

.job-tag-pill {
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.job-tag-pill:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.newspaper-image-placeholder {
    margin: 30px 0;
    background: #f8f9fa;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.newspaper-image-placeholder img {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: var(--shadow);
}

.apply-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 14px 40px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 18px;
    transition: background 0.2s;
}

.apply-btn:hover {
    background: var(--primary-dark);
}

/* Share Section Styles */
.share-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.share-section h4 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

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

.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

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

.share-btn svg {
    fill: currentColor;
    width: 20px;
    height: 20px;
}

.share-fb {
    background-color: #1877f2;
}

.share-wa {
    background-color: #25d366;
}

.share-email {
    background-color: #ea4335;
}

.share-tw {
    background-color: #1da1f2;
}

.share-li {
    background-color: #0077b5;
}

/* Sidebar */
.sidebar-widget {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.sidebar-widget h4 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--secondary);
}

.btn-follow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: var(--secondary);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 10px;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-follow:hover {
    background: #34495e;
}

.follower-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.highlight-widget {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 132, 61, 0.1);
}

.ad-placeholder,
.ad-placeholder-sidebar {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    text-align: center;
}

.ad-placeholder-sidebar {
    height: 250px;
    width: 100%;
}

.categories ul li {
    border-bottom: 1px solid #f0f0f0;
}

.categories ul li a {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--text-main);
    font-size: 14px;
}

.categories ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.count {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-light);
}

/* Footer */
.main-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h5 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal h3 {
    margin-bottom: 10px;
    color: var(--secondary);
}

.modal p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.modal input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 15px;
}

.modal button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- NEW SITEMAP STYLES --- */
.sitemap-hero {
    background: var(--secondary);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 40px;
}

.sitemap-hero h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.sitemap-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.sitemap-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sitemap-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.sitemap-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.icon-box {
    width: 45px;
    height: 45px;
    background: #f0fdf4;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
}

.sitemap-header h3 {
    font-size: 20px;
    color: var(--secondary);
    font-weight: 700;
}

.sitemap-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sitemap-links li a {
    display: block;
    color: var(--text-main);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    background: #fcfcfc;
    border: 1px solid transparent;
}

.sitemap-links li a:hover {
    background: #f0fdf4;
    color: var(--primary);
    padding-left: 18px;
    border-color: #d1fae5;
}

.sitemap-links li a.current {
    color: var(--text-light);
    cursor: default;
    background: #f5f5f5;
}

/* ===== FIX: JOBS BY DEPARTMENT COUNT ALIGNMENT ===== */

#jobs-by-department li,
#jobs-by-newspaper li,
#related-jobs-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

#jobs-by-department li a,
#jobs-by-newspaper li a,
#related-jobs-list li a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

#jobs-by-department li a:hover,
#jobs-by-newspaper li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

#jobs-by-department .count,
#jobs-by-newspaper .count,
#related-jobs-list .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    background: #f1f5f9;
    color: var(--text-light);
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary);
        flex-direction: column;
        padding: 0 16px 20px;
        gap: 0;
    }
    
    .nav-list.show {
        display: flex;
    }
    
    .nav-list a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .ad-banner-header {
        width: 100%;
        max-width: 320px;
        height: 50px;
    }
    
    .job-card {
        flex-direction: column;
        text-align: center;
    }
    
    .job-icon {
        margin: 0 auto;
    }
    
    .job-meta {
        justify-content: center;
    }
    
    .job-action {
        width: 100%;
        margin-left: 0;
    }
    
    .btn-details {
        display: block;
        width: 100%;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .share-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-btn {
        justify-content: center;
        width: 100%;
    }
    
    .sitemap-wrapper {
        grid-template-columns: 1fr;
    }
}