/*
Theme Name: SureJobs
Theme URI: https://surejobs.org
Author: SureJobs.org
Description: Magazine-style opportunity portal theme for SureJobs.org — jobs, scholarships, finance, tech AI, loans and cards, with a first-visit pricing gate, email signup and WhatsApp group invite.
Version: 2.0
License: GPLv2 or later
Text Domain: surejobs
Tags: blog, news, magazine, jobs
*/

:root {
  --brand: #2b52c9;
  --brand-deep: #14246b;
  --brand-soft: #eef2fd;
  --orange: #f97316;
  --bg: #f5f7fb;
  --card: #ffffff;
  --fg: #101a37;
  --muted: #64708c;
  --border: #e3e8f2;
  --radius: 16px;
}

html.dark {
  --bg: #0b1020;
  --card: #141c33;
  --fg: #f2f5ff;
  --muted: #9aa6c2;
  --border: rgba(255, 255, 255, 0.1);
  --brand-soft: #1b2444;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: "Outfit", system-ui, sans-serif; letter-spacing: -0.02em; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 80px; }
.site-logo img { height: 48px; width: auto; }
.main-nav ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.main-nav a { padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--muted); border-radius: 8px; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--fg); font-weight: 600; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.search-box { position: relative; }
.search-box input { width: 210px; padding: 10px 12px 10px 34px; border-radius: 10px; border: none; background: var(--brand-soft); color: var(--fg); font-size: 14px; outline: none; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: .6; }
.icon-btn { background: var(--brand-soft); border: none; border-radius: 10px; padding: 10px; cursor: pointer; color: var(--fg); }
.btn-subscribe { display: inline-flex; align-items: center; gap: 8px; background: var(--orange); color: #fff; font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 10px; }
.menu-toggle { display: none; }

/* Ticker */
.ticker { display: flex; align-items: center; gap: 16px; padding: 20px 0; }
.ticker .pill { background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 6px 12px; border-radius: 8px; }
.ticker .headline { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker .date { font-size: 14px; color: var(--muted); }

/* Layout */
.grid-hero { display: grid; gap: 24px; grid-template-columns: 1fr 360px; padding-bottom: 48px; }
.grid-main { display: grid; gap: 24px; grid-template-columns: 1fr 320px; }
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.section { padding-bottom: 56px; }
.section h2 { font-size: 30px; margin-bottom: 24px; }

/* Post cards */
.card-media { position: relative; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; border-radius: var(--radius); overflow: hidden; padding: 24px; background-size: cover; background-position: center; }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.25)); }
.card-media > * { position: relative; z-index: 1; }
.card-hero { min-height: 420px; padding: 36px; }
.card-hero h1, .card-hero h2 { font-size: 44px; line-height: 1.08; margin-top: 16px; }
.card-tile { min-height: 230px; transition: transform .2s ease; }
.card-tile:hover { transform: translateY(-3px); }
.card-tile h3 { font-size: 20px; margin-top: 12px; line-height: 1.25; }
.cat-badge { align-self: flex-start; background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px; border-radius: 6px; }
.card-meta { margin-top: 14px; font-size: 12px; color: rgba(255,255,255,.75); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-excerpt { margin-top: 14px; font-size: 14px; color: rgba(255,255,255,.78); max-width: 640px; }

/* Sidebars */
.panel-dark { background: var(--brand-deep); color: #fff; border-radius: var(--radius); padding: 20px; }
.panel-dark h2 { font-size: 20px; margin-bottom: 18px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.panel h2 { font-size: 18px; margin-bottom: 16px; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.rank-list li { display: flex; gap: 12px; align-items: flex-start; }
.rank-num { font-size: 22px; font-weight: 700; opacity: .8; }
.rank-badge { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; background: var(--brand-deep); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rank-thumb { flex: 0 0 auto; width: 62px; height: 62px; border-radius: 8px; background-size: cover; background-position: center; }
.rank-cat { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--orange); }
.rank-title { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; margin-top: 3px; }
.rank-date { display: block; font-size: 12px; opacity: .65; margin-top: 4px; }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform .2s ease; }
.cat-card:hover { transform: translateY(-3px); }
.cat-card .thumb { display: block; height: 96px; background-size: cover; background-position: center; }
.cat-card span:last-child { display: block; padding: 14px 10px; text-align: center; font-size: 14px; font-weight: 700; }

/* Tabs / topics */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tabs a { padding-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--orange); border-color: var(--orange); }
.topics { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.topics a { white-space: nowrap; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 20px; font-size: 14px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { background: var(--brand-soft); color: var(--brand-deep); border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; }

/* Single / page */
.entry { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.entry h1 { font-size: 38px; margin-bottom: 12px; }
.entry-content { margin-top: 18px; font-size: 16px; }
.pagination { display: flex; gap: 8px; padding: 24px 0; }
.pagination .page-numbers { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-size: 14px; }
.pagination .current { background: var(--orange); color: #fff; border-color: var(--orange); }

/* Footer */
.site-footer { padding: 0 16px 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; background: var(--brand-deep); color: #fff; border-radius: var(--radius); padding: 48px 40px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer-cols h4 { font-size: 16px; margin-bottom: 12px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-cols a, .footer-cols li { font-size: 14px; color: rgba(255,255,255,.72); }
.footer-cols a:hover { color: var(--orange); }
.footer-logo { background: #fff; display: inline-block; padding: 8px; border-radius: 10px; }
.footer-logo img { height: 40px; }
.footer-bottom { margin-top: 40px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 24px; text-align: center; font-size: 12px; color: rgba(255,255,255,.6); }

/* Visitor gate */
.sj-gate { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 36, 107, .72); overflow-y: auto; }
.sj-gate[hidden] { display: none; }
.sj-modal { background: var(--card); color: var(--fg); border-radius: 24px; padding: 32px; width: 100%; max-width: 640px; margin: auto; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.sj-modal[hidden] { display: none; }
.sj-modal.small { max-width: 420px; }
.sj-modal img.sj-logo { height: 64px; margin: 0 auto; }
.sj-modal h2 { text-align: center; font-size: 26px; margin-top: 18px; }
.sj-modal p.sub { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.sj-plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.sj-plan { border: 1px solid var(--border); background: var(--card); border-radius: 16px; padding: 18px; text-align: center; cursor: pointer; font: inherit; color: inherit; }
.sj-plan.active, .sj-plan:hover { border-color: var(--orange); }
.sj-plan b { display: block; font-size: 18px; }
.sj-plan .rec { display: inline-block; margin-top: 8px; background: #fdecd8; color: #a1490b; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; padding: 4px 10px; border-radius: 999px; }
.sj-plan .price { display: block; margin-top: 14px; font-size: 14px; font-weight: 700; }
.sj-btn { display: block; width: 100%; text-align: center; border-radius: 14px; padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; border: 1px solid var(--border); background: var(--card); color: inherit; margin-top: 16px; font-family: inherit; }
.sj-btn.primary { background: linear-gradient(135deg, var(--brand-deep), var(--brand) 55%, var(--orange)); color: #fff; border: none; }
.sj-btn.whatsapp { background: #25d366; color: #fff; border: none; }
.sj-input { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; font-size: 14px; background: var(--bg); color: var(--fg); }
.sj-skip { display: block; width: 100%; margin-top: 16px; background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; font-family: inherit; }
.sj-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 12px; }
.sj-whats-box { margin-top: 24px; border: 1px solid var(--border); background: var(--brand-soft); border-radius: 16px; padding: 16px; text-align: center; }

@media (max-width: 1024px) {
  .grid-hero, .grid-main { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .tiles, .sj-plans, .cat-grid { grid-template-columns: 1fr 1fr; }
  .card-hero h1, .card-hero h2 { font-size: 30px; }
  .search-box, .btn-subscribe { display: none; }
  .footer-cols { grid-template-columns: 1fr; }
}
.mobile-nav { display: none; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg); }
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mobile-nav a { display: block; padding: 8px; font-size: 14px; font-weight: 600; }
