/*
Theme Name: India Public Job
Description: Government Job Aggregator Theme with Cards
Version: 2.0
*/

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

body {
  font-family: Segoe UI, sans-serif;
  background: #f3f4f6;
  color: #1a1a1a;
}

a { text-decoration: none; color: inherit; }

/* =====================
   TOP BAR
   ===================== */
.topbar {
  background: #c1121f;
  color: white;
  text-align: center;
  padding: 8px;
  font-weight: 600;
  font-size: 13px;
}

/* =====================
   HEADER & NAV
   ===================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0a1f44;
  padding: 12px 25px;
  color: white;
}

.logo a {
  color: white;
  font-size: 22px;
  font-weight: bold;
}

.nav a {
  color: white;
  margin: 0 10px;
  font-size: 14px;
}

.nav a:hover { color: #fcd34d; }

/* =====================
   SEARCH HERO (HOME)
   ===================== */
.search-hero {
  text-align: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, #0d6efd, #1e3a8a);
  color: white;
  width: 100%;
}

.search-hero h1 {
  font-size: clamp(20px, 5vw, 32px);
  margin-bottom: 20px;
}

.search-hero form {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}

.search-hero input {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
}

.search-hero button {
  background: #16a34a;
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
}

/* =====================
   SEARCH BAR (OTHER PAGES)
   ===================== */
.search-bar {
  background: #f3f4f6;
  padding: 12px 16px;
  display: flex;
  justify-content: center;
}

.search-bar form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 680px;
  background: white;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.search-bar input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

.search-bar button {
  background: #2f4ea2;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

/* =====================
   ADS
   ===================== */
.ad { width: 100%; text-align: center; margin: 15px 0; }

/* Ad spaces — shown (replace placeholder text with AdSense code when approved) */
.ad { width: 100%; text-align: center; margin: 10px 0; }
.ad-box { display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 13px; color: #888; overflow: hidden; }
.ad-large { width: 100%; min-height: 90px; background: #f8fafc; }
.ad-side { width: 100%; min-height: 250px; background: #f8fafc; margin-top: 10px; }
.ad-card { width: 100%; min-height: 90px; background: #f8fafc; }

/* =====================
   COOKIE BANNER
   ===================== */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #0a1f44;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 99999;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform .4s ease;
}
#cookie-banner.show { transform: translateY(0); }
#cookie-banner p { font-size: 13px; color: #d1d5db; flex: 1; min-width: 240px; line-height: 1.6; margin: 0; }
#cookie-banner a { color: #60a5fa; text-decoration: underline; }
.cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-accept { background: #16a34a; color: #fff; border: none; padding: 9px 20px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.cookie-deny { background: transparent; color: #9ca3af; border: 1px solid #374151; padding: 9px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.cookie-deny:hover { color: #fff; border-color: #6b7280; }

/* =====================
   EXIT INTENT POPUP
   ===================== */
#exit-popup { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.65); z-index: 999999; align-items: center; justify-content: center; }
#exit-popup.show { display: flex; }
.exit-box { background: #fff; border-radius: 16px; padding: 32px 28px; max-width: 480px; width: 90%; text-align: center; position: relative; animation: popIn .3s ease; }
@keyframes popIn { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.exit-close { position: absolute; top: 12px; right: 16px; font-size: 22px; cursor: pointer; color: #9ca3af; background: none; border: none; line-height: 1; }
.exit-icon { font-size: 52px; margin-bottom: 12px; }
.exit-title { font-size: 22px; font-weight: 800; color: #0a1f44; margin-bottom: 8px; line-height: 1.3; }
.exit-sub { font-size: 14px; color: #6b7280; margin-bottom: 6px; line-height: 1.6; }
.exit-features { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 20px; }
.exit-feat { background: #dcfce7; color: #166534; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; }
.exit-btn { display: block; background: linear-gradient(135deg, #25d366, #16a34a); color: #fff; padding: 14px 24px; border-radius: 10px; font-size: 16px; font-weight: 700; text-decoration: none; margin: 0 auto 10px; box-shadow: 0 4px 14px rgba(37,211,102,.35); }
.exit-skip { font-size: 12px; color: #9ca3af; cursor: pointer; background: none; border: none; text-decoration: underline; }

/* =====================
   PUSH NOTIFICATION PROMPT
   ===================== */
#push-prompt { display: none; position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: #fff; border-radius: 14px; padding: 18px 20px; max-width: 420px; width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,.18); z-index: 999998; border-top: 4px solid #1e40af; }
#push-prompt.show { display: block; animation: slideDown .4s ease; }
@keyframes slideDown { from { transform: translateX(-50%) translateY(-20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.push-close { position: absolute; top: 10px; right: 14px; font-size: 18px; cursor: pointer; color: #9ca3af; background: none; border: none; }
.push-inner { display: flex; gap: 14px; align-items: flex-start; }
.push-icon { font-size: 36px; flex-shrink: 0; }
.push-title { font-size: 15px; font-weight: 700; color: #0a1f44; margin-bottom: 4px; }
.push-sub { font-size: 12px; color: #6b7280; line-height: 1.5; margin-bottom: 12px; }
.push-btns { display: flex; gap: 8px; }
.push-allow { background: #1e40af; color: #fff; border: none; padding: 8px 18px; border-radius: 7px; font-size: 13px; font-weight: 700; cursor: pointer; }
.push-later { background: #f3f4f6; color: #6b7280; border: none; padding: 8px 14px; border-radius: 7px; font-size: 13px; cursor: pointer; }

@media(max-width: 768px) {
  #cookie-banner { flex-direction: column; align-items: flex-start; }
  .cookie-btns { width: 100%; }
  .cookie-accept, .cookie-deny { flex: 1; text-align: center; }
  .exit-title { font-size: 18px; }
  .exit-box { padding: 24px 20px; }
}

/* =====================
   MAIN LAYOUT
   ===================== */
.container {
  display: flex;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.main-content { flex: 3; min-width: 0; }

/* =====================
   SECTION TITLE
   ===================== */
.section-title {
  background: #2f4ea2;
  color: white;
  padding: 12px 16px;
  font-weight: bold;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.job-count {
  background: rgba(255,255,255,0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: normal;
}

/* =====================
   FILTER TABS
   ===================== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: white;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.tab {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  color: #374151;
  background: #f9fafb;
  transition: all 0.2s;
}

.tab:hover, .tab.active {
  background: #2f4ea2;
  color: white;
  border-color: #2f4ea2;
}

/* =====================
   JOB CARDS GRID
   ===================== */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: white;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.job-card {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.15s;
}

.job-card:hover { background: #f8faff; }
.job-card:last-child { border-bottom: none; }

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e3a8a;
  line-height: 1.3;
  margin-bottom: 3px;
}

.card-title:hover { color: #2f4ea2; }

.card-dept {
  font-size: 12px;
  color: #6b7280;
}

/* Status Badges */
.status-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 600;
}

.badge-open    { background: #dcfce7; color: #15803d; }
.badge-closing { background: #fef3c7; color: #b45309; }
.badge-coming  { background: #e0e7ff; color: #3730a3; }
.badge-closed  { background: #fee2e2; color: #b91c1c; }

/* NEW blinking badge */
.new-badge {
  background: red;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  margin-left: 8px;
  border-radius: 4px;
  font-weight: bold;
  animation: blink 1s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Card Meta */
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.meta-item {
  font-size: 13px;
  color: #4b5563;
}

/* Excerpt */
.card-excerpt {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Card Action Buttons */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  display: inline-block;
}

.btn-primary {
  background: #2f4ea2;
  color: white;
}

.btn-primary:hover { background: #1e3a8a; color: white; }

.btn-apply {
  background: #16a34a;
  color: white;
}

.btn-apply:hover { background: #15803d; color: white; }

.share-label { font-size: 12px; color: #9ca3af; margin-left: 4px; }

.btn-share {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  font-size: 12px;
  padding: 5px 10px;
}

.btn-share:hover { background: #e5e7eb; }

/* Ad in between cards */
.card-ad {
  padding: 10px 20px;
  background: #fafafa;
  border-bottom: 1px solid #e5e7eb;
}

/* No jobs */
.no-jobs {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
  font-size: 16px;
}

/* =====================
   PAGINATION
   ===================== */
.pagination {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  color: #2f4ea2;
}

.pagination .current {
  background: #2f4ea2;
  color: white;
  border-color: #2f4ea2;
}

/* =====================
   SIDEBAR
   ===================== */
.sidebar {
  flex: 1;
  min-width: 0;
}

.sidebar-widget {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.side-title {
  background: #1e5aa6;
  color: white;
  padding: 12px;
  font-weight: bold;
  font-size: 14px;
}

.sidebar a {
  display: block;
  padding: 11px 14px;
  border-bottom: 1px solid #eee;
  color: #1a1a1a;
  font-size: 13px;
  line-height: 1.4;
}

.sidebar a:hover { background: #f0f4ff; color: #2f4ea2; }
.sidebar a:last-child { border-bottom: none; }

/* Deadline sidebar widget */
.deadline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.deadline-date {
  background: #fee2e2;
  color: #b91c1c;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* =====================
   SINGLE POST PAGE
   ===================== */
.single-post-box { padding: 24px; background: white; border-radius: 8px; }

.post-title { font-size: 24px; margin-bottom: 15px; color: #0a1f44; }

.post-content { font-size: 15px; line-height: 1.8; color: #333; }

.breadcrumb { font-size: 13px; margin-bottom: 12px; color: #666; }

.breadcrumb a { color: #2f4ea2; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
  .container { flex-direction: column; padding: 12px; gap: 12px; }
  .sidebar { flex: unset; width: 100%; }
  .main-content { flex: unset; width: 100%; }
  .header { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 16px; }
  .nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .nav a { margin: 0; font-size: 13px; }
  .card-title { font-size: 14px; }
  .card-meta { gap: 8px; }
  .filter-tabs { gap: 4px; }
  .tab { font-size: 12px; padding: 4px 10px; }
  .card-actions { gap: 6px; }
  .share-label { display: none; }
  .ad-large { height: 60px; }
}

@media (max-width: 480px) {
  .logo a { font-size: 18px; }
  .topbar { font-size: 12px; padding: 6px; }
  .section-title { font-size: 13px; }
  .job-count { display: none; }
}

/* =====================
   CATEGORY FILTER TABS — App.py matched
   ===================== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: white;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
}

.tab {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  color: #374151;
  background: #f9fafb;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab:hover, .tab.active {
  background: #1e40af;
  color: white;
  border-color: #1e40af;
}

/* =====================
   CATEGORY ICON ON CARDS
   ===================== */
.cat-icon {
  margin-right: 4px;
  font-size: 15px;
}

/* =====================
   WHATSAPP BANNER (homepage top)
   ===================== */
.whatsapp-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
  padding: 14px 18px;
  border-radius: 0;
  flex-wrap: wrap;
}

.wa-icon {
  background: rgba(255,255,255,0.15);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-text {
  flex: 1;
  min-width: 180px;
}

.wa-text strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
}

.wa-text span {
  color: #d1fae5;
  font-size: 12px;
}

.wa-btn {
  background: #25d366;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid rgba(255,255,255,0.3);
  transition: background 0.2s;
  flex-shrink: 0;
}

.wa-btn:hover { background: #1da851; color: white; }

/* =====================
   SHARE BUTTONS — colored
   ===================== */
.btn-wa { background: #25d366 !important; color: white !important; border: none !important; }

.btn-wa:hover { background: #1da851 !important; }


/* =====================
   BOTTOM SOCIAL CTA BAR
   ===================== */
.social-cta-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.cta-wa, 

.cta-wa { background: #25d366; }

.cta-wa:hover { background: #1da851; color: white; }


/* =====================
   SIDEBAR CATEGORIES — styled
   ===================== */
.cat-link {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 14px !important;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}

.cat-link:hover { background: #eff6ff !important; }

.cat-link-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
}

.cat-link-name {
  flex: 1;
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
}

.cat-link-count {
  background: #e0e7ff;
  color: #3730a3;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* =====================
   SINGLE POST — WhatsApp Section
   ===================== */
.post-wa-section {
  margin: 28px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #25d366;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.post-wa-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  flex-wrap: wrap;
}

.post-wa-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 240px;
}

.post-wa-emoji {
  font-size: 44px;
  line-height: 1;
  flex-shrink: 0;
}

.post-wa-title {
  font-size: 16px;
  font-weight: 800;
  color: #14532d;
  margin-bottom: 5px;
}

.post-wa-sub {
  font-size: 13px;
  color: #15803d;
  line-height: 1.6;
  margin-bottom: 8px;
}

.post-wa-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.post-wa-features span {
  font-size: 12px;
  color: #166534;
  font-weight: 600;
  background: #bbf7d0;
  padding: 3px 10px;
  border-radius: 20px;
}

.post-wa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: white !important;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,211,102,0.3);
  transition: background 0.2s, transform 0.1s;
}

.post-wa-btn:hover {
  background: #1da851;
  transform: translateY(-1px);
}

/* =====================
   SIDEBAR WhatsApp Widget
   ===================== */
.wa-widget .side-title { background: #128c7e !important; }

/* =====================
   RESPONSIVE UPDATES
   ===================== */
@media (max-width: 768px) {
  .whatsapp-banner { padding: 12px 14px; gap: 10px; }
  .wa-btn { width: 100%; text-align: center; }
  .social-cta-bar { flex-direction: column; }
  .post-wa-inner { padding: 16px; gap: 14px; }
  .post-wa-btn { width: 100%; justify-content: center; }
  .filter-tabs { gap: 4px; padding: 8px 10px; }
  .tab { font-size: 11px; padding: 4px 8px; }
}

/* =====================
   STATIC PAGES (About, Contact, Privacy etc)
   ===================== */
.page-content {
  font-size: 15px;
  line-height: 1.9;
  color: #1e293b;
}

.page-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0a1f44;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.page-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1e40af;
  margin: 22px 0 10px;
}

.page-content p {
  margin-bottom: 14px;
  color: #374151;
}

.page-content ul {
  margin: 10px 0 16px 20px;
}

.page-content ul li {
  margin-bottom: 8px;
  color: #374151;
  line-height: 1.7;
}

.page-content a {
  color: #1d4ed8;
  text-decoration: underline;
}

.page-content a:hover {
  color: #1e40af;
}

.page-content strong {
  color: #0f172a;
  font-weight: 600;
}

.page-content em {
  color: #6b7280;
}

/* Contact form style box */
.page-content .contact-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
