/*
Theme Name: UKJobs Fast
Theme URI: https://ukjobs.zahidenotes.com
Author: UK Jobs
Description: A fast, lightweight magazine/blog theme built for job articles. Jyree-style article layout with its own clean header, built-in ad boxes (header, in-article after any paragraph, sidebar, footer), auto featured image from post content, share buttons and related posts. No frameworks, no jQuery — pure speed.
Version: 1.0.2
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: ukjobs-fast
*/

/* ============ Reset & base ============ */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:#1f2430;background:#f4f6fb;font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto}
a{color:#5b21b6;text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:1180px;margin:0 auto;padding:0 16px}
h1,h2,h3,h4{line-height:1.25;color:#14161c;margin:0 0 .5em}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ============ Header (own design) ============ */
.site-header{background:#131a2a;color:#fff;position:sticky;top:0;z-index:60;box-shadow:0 2px 14px rgba(10,15,30,.25)}
.header-in{display:flex;align-items:center;gap:18px;padding:13px 0}
.site-logo{font-size:1.45rem;font-weight:800;color:#fff;letter-spacing:.2px;white-space:nowrap}
.site-logo span{color:#fbbf24}
.site-logo:hover{text-decoration:none}
.main-nav{margin-left:auto}
.main-nav ul{display:flex;gap:4px;list-style:none;margin:0;padding:0;flex-wrap:wrap}
.main-nav a{color:#dbe2f1;padding:8px 12px;border-radius:8px;font-weight:600;font-size:.95rem;display:block}
.main-nav a:hover{background:rgba(255,255,255,.12);color:#fff;text-decoration:none}
.header-search{margin-left:8px}
.header-search input{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.25);color:#fff;border-radius:999px;padding:8px 14px;width:170px;font-size:.9rem}
.header-search input::placeholder{color:#aeb9d0}
.nav-toggle{display:none;margin-left:auto;background:none;border:0;color:#fff;font-size:1.5rem;cursor:pointer}
@media(max-width:860px){
  .nav-toggle{display:block}
  .main-nav{display:none;position:absolute;top:100%;left:0;right:0;background:#131a2a;padding:10px 16px 16px}
  .main-nav.open{display:block}
  .main-nav ul{flex-direction:column}
  .header-search{display:none}
}

/* ============ Ad boxes ============ */
.ad-box{margin:18px auto;text-align:center;clear:both;overflow:hidden}
.ad-box .ad-label{display:block;font-size:.62rem;letter-spacing:.18em;text-transform:uppercase;color:#9aa3b2;margin-bottom:4px}
.ad-header{background:#fff;border-bottom:1px solid #e6e9f2;padding:6px 0}
.ad-header .ad-box{margin:6px auto}
.ad-footer{background:#fff;border-top:1px solid #e6e9f2}
.in-article-ad{background:#fbfbfe;border:1px dashed #d8dce8;border-radius:10px;padding:10px;margin:22px 0}

/* ============ Home / archive grid ============ */
.page-head{padding:26px 0 6px}
.page-head h1{font-size:1.7rem}
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;padding:18px 0 30px}
@media(max-width:960px){.post-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.post-grid{grid-template-columns:1fr}}
.post-card{background:#fff;border:1px solid #e6e9f2;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;transition:transform .15s ease,box-shadow .15s ease}
.post-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(20,25,45,.10)}
.post-card .thumb{display:block;aspect-ratio:16/9;background:#e8ebf4;overflow:hidden}
.post-card .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.post-card .thumb .no-thumb{display:flex;align-items:center;justify-content:center;height:100%;font-size:2.2rem}
.card-body{padding:15px 17px 17px;display:flex;flex-direction:column;gap:8px;flex:1}
.cat-chip{align-self:flex-start;background:#ede9fe;color:#5b21b6;font-size:.72rem;font-weight:700;padding:3px 10px;border-radius:999px;text-transform:uppercase;letter-spacing:.04em}
.cat-chip:hover{text-decoration:none;background:#ddd6fe}
.card-body h2{font-size:1.08rem;margin:0}
.card-body h2 a{color:#14161c}
.card-body h2 a:hover{color:#5b21b6;text-decoration:none}
.card-meta{margin-top:auto;color:#7a8194;font-size:.8rem}
.card-excerpt{color:#525a6e;font-size:.92rem;margin:0}
.pagination{display:flex;gap:8px;justify-content:center;padding:6px 0 34px}
.pagination a,.pagination span{background:#fff;border:1px solid #e0e4ef;padding:8px 14px;border-radius:9px;font-weight:600;color:#333a4d}
.pagination .current{background:#5b21b6;color:#fff;border-color:#5b21b6}

/* ============ Article (single) layout ============ */
.single-wrap{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:30px;padding:24px 0 36px;align-items:start}
@media(max-width:960px){.single-wrap{grid-template-columns:1fr}}
.article-card{background:#fff;border:1px solid #e6e9f2;border-radius:16px;padding:30px 34px}
@media(max-width:600px){.article-card{padding:20px 17px}}
.entry-cats{margin-bottom:10px}
.entry-cats .cat-chip{font-size:.75rem}
.entry-title{font-size:2.05rem;font-weight:800;letter-spacing:-.01em;margin-bottom:12px}
@media(max-width:600px){.entry-title{font-size:1.5rem}}
.entry-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:#68707f;font-size:.86rem;padding-bottom:16px;border-bottom:1px solid #eef0f6;margin-bottom:18px}
.entry-meta img{border-radius:50%}
.entry-meta .author-name{font-weight:700;color:#2a3040}
.share-row{display:flex;gap:8px;align-items:center;margin:0 0 18px;flex-wrap:wrap}
.share-row .share-label{font-size:.8rem;font-weight:700;color:#68707f;text-transform:uppercase;letter-spacing:.06em}
.share-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 13px;border-radius:999px;color:#fff;font-size:.83rem;font-weight:700}
.share-btn:hover{text-decoration:none;opacity:.9}
.share-fb{background:#1877f2}.share-tw{background:#0f1419}.share-wa{background:#25d366}.share-tg{background:#229ed9}
.entry-thumb{margin:0 0 20px}
.entry-thumb img{border-radius:12px;width:100%;display:block}
.entry-content{font-size:1.06rem;line-height:1.85;color:#242936}
.entry-content p{margin:0 0 1.15em}
.entry-content h2{font-size:1.45rem;margin:1.5em 0 .6em;padding-top:.2em}
.entry-content h3{font-size:1.2rem;margin:1.3em 0 .5em}
.entry-content ul,.entry-content ol{margin:0 0 1.15em;padding-left:1.4em}
.entry-content li{margin-bottom:.4em}
.entry-content img{border-radius:10px}
.entry-content table{width:100%;border-collapse:collapse;margin:0 0 1.3em;font-size:.97rem;display:block;overflow-x:auto}
.entry-content th,.entry-content td{border:1px solid #e2e6f0;padding:9px 12px;text-align:left;white-space:nowrap}
.entry-content th{background:#f2f4fa}
.entry-content blockquote{border-left:4px solid #5b21b6;background:#f7f5ff;margin:0 0 1.3em;padding:14px 18px;border-radius:0 10px 10px 0;color:#3c4356}
.entry-content a{font-weight:600;text-decoration:underline}
.entry-tags{margin:22px 0 4px;display:flex;gap:8px;flex-wrap:wrap}
.entry-tags a{background:#eef0f6;color:#424a5e;padding:5px 12px;border-radius:999px;font-size:.8rem;font-weight:600}
.author-box{display:flex;gap:15px;background:#f7f8fc;border:1px solid #e9ecf4;border-radius:12px;padding:18px;margin-top:24px}
.author-box img{border-radius:50%;flex:none}
.author-box h4{margin:0 0 4px;font-size:1rem}
.author-box p{margin:0;color:#525a6e;font-size:.92rem}
.related{margin-top:28px}
.related h3{font-size:1.25rem;margin-bottom:14px}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media(max-width:600px){.related-grid{grid-template-columns:1fr}}
.related-card{background:#fff;border:1px solid #e6e9f2;border-radius:12px;overflow:hidden}
.related-card img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}
.related-card h4{font-size:.94rem;padding:10px 13px 13px;margin:0}
.related-card h4 a{color:#14161c}
.post-nav{display:flex;justify-content:space-between;gap:12px;margin-top:24px}
.post-nav a{font-weight:700;font-size:.92rem}

/* ============ Sidebar ============ */
.sidebar{position:sticky;top:86px;display:flex;flex-direction:column;gap:20px}
@media(max-width:960px){.sidebar{position:static}}
.widget{background:#fff;border:1px solid #e6e9f2;border-radius:14px;padding:19px}
.widget h3{font-size:1.02rem;margin-bottom:12px;padding-bottom:9px;border-bottom:2px solid #ede9fe}
.widget ul{list-style:none;margin:0;padding:0}
.widget li{padding:7px 0;border-bottom:1px solid #f0f2f8;font-size:.94rem}
.widget li:last-child{border-bottom:0}
.widget .ad-box{margin:0 auto}

/* ============ Comments ============ */
.comments-area{background:#fff;border:1px solid #e6e9f2;border-radius:16px;padding:26px 30px;margin-top:26px}
.comment-list{list-style:none;padding:0}
.comment{border-bottom:1px solid #eef0f6;padding:14px 0}
.comment-meta{font-size:.83rem;color:#68707f}
.comment-form input[type=text],.comment-form input[type=email],.comment-form input[type=url],.comment-form textarea{width:100%;border:1px solid #d9dee9;border-radius:9px;padding:10px 12px;font:inherit;margin-bottom:10px}
.submit,.comment-form input[type=submit]{background:#5b21b6;color:#fff;border:0;padding:11px 22px;border-radius:9px;font-weight:700;cursor:pointer}

/* ============ Footer ============ */
.site-footer{background:#131a2a;color:#c6cede;margin-top:10px}
.footer-in{display:grid;grid-template-columns:2fr 1fr 1fr;gap:26px;padding:34px 0 24px}
@media(max-width:700px){.footer-in{grid-template-columns:1fr}}
.site-footer h4{color:#fff;font-size:1rem;margin-bottom:11px}
.site-footer ul{list-style:none;margin:0;padding:0}
.site-footer li{padding:4px 0;font-size:.93rem}
.site-footer a{color:#c6cede}
.footer-bottom{border-top:1px solid rgba(255,255,255,.12);padding:14px 0;font-size:.85rem;text-align:center;color:#8f9ab2}

/* ============ Responsive hardening (v1.0.2) ============ */
/* Nothing inside the page may ever force horizontal scrolling on mobile —
   not wide tables, long links, embeds, or fixed-size ad codes (e.g. 970px). */
body{overflow-x:clip}
.single-wrap>*{min-width:0}
.article-card{min-width:0;overflow:hidden}
.entry-content{overflow-wrap:break-word}
.entry-content figure{max-width:100%;margin-left:0;margin-right:0}
.entry-content pre{max-width:100%;overflow-x:auto}
.entry-content iframe,.entry-content embed,.entry-content video,.entry-content object{max-width:100%}
.entry-content .wp-block-table{overflow-x:auto}
.ad-box{max-width:100%}
.ad-box iframe,.ad-box ins,.ad-box img{max-width:100%!important}
.ad-box>div{max-width:100%!important;margin-left:auto!important;margin-right:auto!important}
img,video{max-width:100%}
