/*
Theme Name: CMAZAG Jobs
Theme URI: https://cmazag.com
Author: CMAZAG Team
Author URI: https://cmazag.com
Description: Government-style job listing portal theme for Pakistan's premier job board. Clean, trustworthy, mobile-first design with deep green and navy palette.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cmazag-jobs
Tags: jobs, government, blog, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, responsive-layout
*/

/* ======================================================
   CMAZAG Jobs — Core Styles
   Color palette:
     Primary:    #0B5D3A  (deep green)
     Secondary:  #0F4C81  (navy blue)
     Accent:     #F2A93B  (amber / CTA)
     Background: #F8FAFC
     Text:       #1A1A1A
     Border:     #E2E8F0
   ====================================================== */

:root {
  --color-primary:    #0B5D3A;
  --color-secondary:  #0F4C81;
  --color-accent:     #F2A93B;
  --color-bg:         #F8FAFC;
  --color-text:       #1A1A1A;
  --color-text-light: #64748B;
  --color-border:     #E2E8F0;
  --color-white:      #FFFFFF;
  --color-urgent:     #DC2626;
  --color-open:       #16A34A;
  --radius:           8px;
  --shadow-sm:        0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:        0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px rgba(0,0,0,.06);
  --font-heading:     'Poppins', sans-serif;
  --font-body:        'Inter', sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-text);
}

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

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

/* ── Container ── */
.cmazag-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
  border: 2px solid transparent;
  text-decoration: none;
}
.btn:hover { opacity: .9; text-decoration: none; }
.btn:active { transform: scale(.98); }

.btn-primary   { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-secondary { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.btn-accent    { background: var(--color-accent); color: #1a1a1a; border-color: var(--color-accent); }
.btn-outline   { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-lg        { padding: .8rem 2rem; font-size: 1rem; }
.btn-sm        { padding: .35rem .9rem; font-size: .8rem; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid transparent;
}
.badge-primary   { background: #d1fae5; color: var(--color-primary); border-color: #a7f3d0; }
.badge-secondary { background: #dbeafe; color: var(--color-secondary); border-color: #bfdbfe; }
.badge-accent    { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.badge-open      { background: #dcfce7; color: var(--color-open); border-color: #bbf7d0; }
.badge-urgent    { background: #fee2e2; color: var(--color-urgent); border-color: #fecaca; }
.badge-closed    { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.badge-category  { background: #e0f2fe; color: var(--color-secondary); border-color: #bae6fd; }

/* ── Cards ── */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── Ticker / Marquee ── */
.ticker-bar {
  background: var(--color-accent);
  border-top: 1px solid #e59f30;
  border-bottom: 1px solid #e59f30;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.ticker-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  background: rgba(0,0,0,.13);
  font-weight: 700;
  font-size: .8rem;
  white-space: nowrap;
  border-right: 1px solid rgba(0,0,0,.15);
  flex-shrink: 0;
}
.ticker-track {
  overflow: hidden;
  flex: 1;
  padding: .5rem 0;
}
.ticker-inner {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 0 2.5rem;
  font-size: .85rem;
  font-weight: 500;
}
.ticker-dot { color: #7c3d00; font-weight: 900; }

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

/* ── Top Bar ── */
.top-bar {
  background: var(--color-primary);
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  padding: .35rem 0;
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar a { color: rgba(255,255,255,.85); }
.top-bar a:hover { color: #fff; text-decoration: none; }
.top-bar-links { display: flex; gap: 1rem; }

/* ── Header ── */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
}
.site-logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* ── Main Nav ── */
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a {
  padding: .45rem .85rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color .15s;
  white-space: nowrap;
  text-decoration: none;
}
.main-nav a:hover, .main-nav a.current_page_item { color: var(--color-primary); }
.main-nav a.current_page_item { font-weight: 600; }

/* ── Search toggle ── */
.header-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--color-text);
  border-radius: 6px;
  transition: background .15s;
}
.header-search-btn:hover { background: var(--color-bg); }
.header-search-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--color-white);
  z-index: 10;
  align-items: center;
  padding: 0 1rem;
  gap: .5rem;
}
.header-search-overlay.active { display: flex; }
.header-search-input {
  flex: 1;
  padding: .5rem .9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .15s;
}
.header-search-input:focus { border-color: var(--color-primary); }

/* ── Mobile Nav ── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--color-text);
}
.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  padding: .5rem 0;
}
.mobile-nav a {
  display: block;
  padding: .65rem 1rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: 6px;
  text-decoration: none;
}
.mobile-nav a:hover { background: var(--color-bg); color: var(--color-primary); }

/* ── Hero Section ── */
.hero {
  background: var(--color-primary);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: #fff;
  margin-bottom: .75rem;
  line-height: 1.2;
}
.hero p { font-size: 1rem; opacity: .9; margin-bottom: 2rem; }

.hero-search {
  max-width: 580px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  padding: 1.25rem;
}
.hero-search-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .75rem; }
.hero-search input {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font-body);
  outline: none;
  color: var(--color-text);
  transition: border-color .15s;
}
.hero-search input:focus { border-color: var(--color-primary); }
.hero-search .btn { width: 100%; justify-content: center; }

/* ── Category Pills ── */
.category-pills {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: .75rem 0;
}
.category-pills-inner {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.category-pills-inner::-webkit-scrollbar { display: none; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: .4rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-white);
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.pill:hover, .pill.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  text-decoration: none;
}

/* ── Main Layout ── */
.site-main { padding: 2rem 0; }
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }

/* ── Job Cards ── */
.job-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: box-shadow .2s, transform .15s;
}
.job-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.job-card-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.job-card-title { font-size: 1.05rem; font-weight: 700; margin: 0; line-height: 1.35; }
.job-card-title a { color: var(--color-text); text-decoration: none; }
.job-card-title a:hover { color: var(--color-primary); }
.job-card-info { display: flex; gap: 1rem; font-size: .78rem; color: var(--color-text-light); flex-wrap: wrap; }
.job-card-info span { display: flex; align-items: center; gap: .3rem; }
.job-card-excerpt { font-size: .85rem; color: var(--color-text-light); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-card-footer { margin-top: auto; }
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.widget {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  background: var(--color-secondary);
  color: var(--color-white);
  font-size: .9rem;
  font-weight: 700;
  padding: .7rem 1rem;
  font-family: var(--font-heading);
  letter-spacing: .02em;
}
.widget-body { padding: 1rem; }
.widget ul { list-style: none; }
.widget ul li { border-bottom: 1px solid var(--color-border); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 0;
  font-size: .85rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color .15s;
}
.widget ul li a:hover { color: var(--color-primary); }
.widget-tag-cloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.widget-tag-cloud a {
  display: inline-block;
  padding: .25rem .7rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: .75rem;
  color: var(--color-text-light);
  text-decoration: none;
  transition: all .15s;
}
.widget-tag-cloud a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ── Single Post ── */
.single-header-band {
  background: var(--color-primary);
  padding: 1.5rem 0;
}
.single-header-band h1 { color: #fff; font-size: clamp(1.3rem, 3vw, 2rem); }
.single-meta-bar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: .75rem 0;
}
.single-meta-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.single-meta-item { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--color-text-light); }
.single-meta-item strong { color: var(--color-text); }

.post-section {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.post-section-header {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: .8rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.post-section-header.green { background: var(--color-primary); }
.post-section-header.amber { background: #d97706; }
.post-section-body { padding: 1.25rem; }

/* ── Info Table ── */
.info-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.info-table tr:nth-child(even) { background: var(--color-bg); }
.info-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.info-table td:first-child { font-weight: 600; color: var(--color-text-light); width: 45%; white-space: nowrap; }
.info-table td:last-child { color: var(--color-text); font-weight: 500; }

/* ── Eligibility / Steps ── */
.eligibility-list, .steps-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.eligibility-list li { display: flex; gap: .75rem; align-items: flex-start; font-size: .9rem; }
.eligibility-list li .num {
  min-width: 1.5rem;
  height: 1.5rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.steps-list li { display: flex; gap: .9rem; align-items: flex-start; font-size: .9rem; }
.step-num {
  min-width: 2rem;
  height: 2rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.important-notes-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.important-notes-list li { display: flex; gap: .65rem; align-items: flex-start; font-size: .875rem; }
.important-notes-list li::before { content: '▸'; color: #b45309; font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.apply-cta-box {
  background: #fffbeb;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.apply-cta-box h3 { margin-bottom: .25rem; }
.apply-cta-box p { font-size: .875rem; color: var(--color-text-light); margin-bottom: 1rem; }

.disclaimer-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: .78rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ── Breadcrumb ── */
.breadcrumb {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: .5rem 0;
  font-size: .8rem;
  color: var(--color-text-light);
}
.breadcrumb a { color: var(--color-text-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb-sep { margin: 0 .35rem; }

/* ── Pagination ── */
.pagination { display: flex; gap: .4rem; justify-content: center; padding: 1.5rem 0; }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 .5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: .85rem;
  color: var(--color-text);
  text-decoration: none;
  transition: all .15s;
}
.pagination a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); font-weight: 600; }

/* ── Footer ── */
.site-footer { background: var(--color-text); color: rgba(255,255,255,.8); padding: 3rem 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 2.5rem; }
.footer-col h3 { font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: 1rem; font-family: var(--font-heading); }
.footer-col p { font-size: .82rem; line-height: 1.7; color: rgba(255,255,255,.65); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .45rem; }
.footer-col ul li a { color: rgba(255,255,255,.65); font-size: .82rem; text-decoration: none; transition: color .15s; }
.footer-col ul li a:hover { color: #fff; }
.footer-subscribe input {
  width: 100%;
  padding: .55rem .9rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  color: #fff;
  font-size: .85rem;
  font-family: var(--font-body);
  outline: none;
  margin-bottom: .5rem;
}
.footer-subscribe input::placeholder { color: rgba(255,255,255,.4); }
.footer-subscribe .btn { width: 100%; justify-content: center; font-size: .82rem; padding: .5rem 1rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1rem 0;
  text-align: center;
  font-size: .78rem;
  color: rgba(255,255,255,.45);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
}
@media (max-width: 600px) {
  .hero-search-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .info-table td:first-child { white-space: normal; width: auto; }
  .top-bar-links { display: none; }
  .site-logo-text { display: none; }
}
