/*
Theme Name: Fair5ive Blog
Theme URI: https://fair5ive.com/blog/
Author: Fair5ive
Author URI: https://fair5ive.com/
Description: Blog theme for fair5ive.com/blog — same truck-art look as the main Fair5ive website. Sets itself up on activation (permalinks, categories, starter posts), has SEO tags built in and needs no plugins.
Version: 1.1.2
Requires at least: 6.0
Requires PHP: 7.4
License: All rights reserved
Text Domain: fair5ive-blog
*/

/* Layout: same desi truck-art world as fair5ive.com — navy header with chevron border, white post cards with hard ink shadows, a calm reading column for posts */
:root{
  --navy:#0c1a47;
  --blue:#1d5fb8;
  --pink:#ff2e88;
  --gold:#ffb703;
  --green:#18b866;
  --teal:#10bfd0;
  --orange:#ff5c1f;
  --paper:#f4f7ff;
  --ink:#111a33;
  --muted:#4d5878;
  --line:#d9e1f5;
  --white:#ffffff;
  --display:"Bungee","Impact","Arial Black",sans-serif;
  --body:"Fredoka","Segoe UI","Trebuchet MS",sans-serif;
  --urdu:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq","Urdu Typesetting","Noto Naskh Arabic",serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body);font-size:18px;line-height:1.7;overflow-x:hidden}
a{color:var(--blue)}
img{max-width:100%;height:auto;display:block}
.wrap{max-width:1160px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.narrow{max-width:760px}
h1,h2,h3,h4{font-family:var(--display);font-weight:400;line-height:1.15;text-wrap:balance;margin:0 0 .5em}
:focus-visible{outline:3px solid var(--gold);outline-offset:3px;border-radius:6px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.urdu,:lang(ur){font-family:var(--urdu);line-height:2.2}
.urdu{direction:rtl}

/* ---------- header ---------- */
.site-head{position:sticky;top:0;z-index:50;background:var(--navy);color:var(--white);border-bottom:4px solid transparent;border-image:repeating-linear-gradient(90deg,var(--pink) 0 24px,var(--gold) 24px 48px,var(--green) 48px 72px,var(--teal) 72px 96px,var(--orange) 96px 120px) 4}
.admin-bar .site-head{top:32px}
@media (max-width:782px){.admin-bar .site-head{top:46px}}
.site-head .wrap{display:flex;align-items:center;gap:18px;padding-block:12px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--white)}
.brand .mk{background:var(--white);border-radius:50%;padding:4px;display:grid;place-items:center}
.brand .mk img{width:38px}
.brand .tx{font-family:var(--display);font-size:1.3rem;letter-spacing:.02em}
.brand .tx b{color:var(--gold);font-weight:400}
.brand .tag{font-family:var(--display);font-size:.8rem;background:var(--pink);border-radius:999px;padding:2px 10px;margin-left:2px}
.menu{list-style:none;display:flex;flex-wrap:wrap;gap:4px;margin:0 0 0 auto;padding:0}
.menu a{display:block;text-decoration:none;color:var(--white);padding:6px 12px;border-radius:999px;font-weight:500;font-size:.95rem}
.menu a:hover,.menu .current a{background:rgba(255,255,255,.14)}
.menu .cta a{background:var(--gold);color:var(--navy)}
.lang-sw{display:flex;border:2px solid rgba(255,255,255,.45);border-radius:999px;overflow:hidden;margin-left:auto;flex:0 0 auto}
.lang-sw a{color:var(--white);text-decoration:none;font-weight:600;font-size:.85rem;padding:4px 11px;line-height:1.6}
.lang-sw a[lang=ur]{font-family:var(--urdu);font-size:.95rem;line-height:1.5}
.lang-sw a.on{background:var(--gold);color:var(--navy)}
.menu{margin-left:10px!important}
.menu-btn{display:none;margin-left:auto;background:none;border:2px solid rgba(255,255,255,.4);color:var(--white);border-radius:10px;padding:6px 12px;font:600 .95rem var(--body);cursor:pointer}
@media (max-width:900px){
  .menu-btn{display:block;margin-left:10px}
  .menu{display:none;position:absolute;left:0;right:0;top:100%;background:var(--navy);flex-direction:column;padding:12px max(16px,env(safe-area-inset-right,0px)) 18px max(16px,env(safe-area-inset-left,0px))}
  .site-head.open .menu{display:flex}
}

/* ---------- blog hero ---------- */
.blog-hero{background:var(--navy);color:var(--white);position:relative;overflow:hidden}
.blog-hero .wrap{padding-block:46px 54px;position:relative;z-index:2}
.blog-hero h1{font-size:clamp(2.1rem,5.4vw,3.6rem);margin:8px 0 6px}
.blog-hero h1 span{color:var(--gold)}
.blog-hero p{color:#d7def5;max-width:60ch;margin:0}
.blog-hero .urdu{color:var(--teal);font-size:clamp(1.4rem,3vw,1.9rem);display:inline-block;margin-top:4px}
.eyebrow{font-weight:600;text-transform:uppercase;letter-spacing:.14em;font-size:.8rem;color:var(--gold)}
.chevrons{height:24px;background:
  linear-gradient(135deg,var(--pink) 25%,transparent 25%) -12px 0/24px 24px,
  linear-gradient(225deg,var(--pink) 25%,transparent 25%) -12px 0/24px 24px,
  linear-gradient(315deg,var(--pink) 25%,transparent 25%) 0 0/24px 24px,
  linear-gradient(45deg,var(--pink) 25%,var(--gold) 25%) 0 0/24px 24px}

/* category pills */
.cats{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.cats a{text-decoration:none;color:var(--ink);background:var(--white);border:2px solid var(--ink);border-radius:999px;padding:4px 14px;font-weight:600;font-size:.9rem;box-shadow:3px 3px 0 var(--ink)}
.cats a:hover,.cats a.on{background:var(--gold)}

/* ---------- post grid ---------- */
main{display:block}
.list{padding-block:48px 70px}
.posts{display:grid;grid-template-columns:repeat(3,1fr);gap:26px}
.posts > :last-child:nth-child(3n+1):not(:first-child){grid-column:1/-1}
.posts > :last-child:nth-child(3n+1):not(:first-child){flex-direction:row}
.posts > :last-child:nth-child(3n+1):not(:first-child) .thumb{flex:0 0 48%;border-bottom:0;border-right:3px solid var(--ink)}
.posts > :last-child:nth-child(3n+1):not(:first-child) .body{justify-content:center;padding:26px 30px}
.posts > :last-child:nth-child(3n+1):not(:first-child) h2{font-size:1.5rem}
.card{background:var(--white);border:3px solid var(--ink);border-radius:22px;overflow:hidden;display:flex;flex-direction:column;box-shadow:6px 6px 0 var(--ink);transition:transform .15s;min-width:0}
.card:hover{transform:translate(-3px,-3px)}
.card:nth-child(4n+1){box-shadow:6px 6px 0 var(--pink)}.card:nth-child(4n+2){box-shadow:6px 6px 0 var(--gold)}.card:nth-child(4n+3){box-shadow:6px 6px 0 var(--teal)}.card:nth-child(4n+4){box-shadow:6px 6px 0 var(--green)}
.card .thumb{display:block;aspect-ratio:1200/630;background:var(--navy);border-bottom:3px solid var(--ink);overflow:hidden}
.card .thumb img{width:100%;height:100%;object-fit:cover}
.card .body{padding:18px 20px 22px;display:flex;flex-direction:column;gap:8px;flex:1}
.card h2{font-size:1.2rem;margin:0}
.card h2 a{color:var(--ink);text-decoration:none}
.card h2 a:hover{text-decoration:underline}
.card p{margin:0;color:var(--muted);font-size:.98rem;line-height:1.6}
.card .more{margin-top:auto;padding-top:6px;font-weight:600;text-decoration:none}
.meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:.85rem;color:var(--muted)}
.chip{font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;padding:3px 10px;border-radius:999px;border:2px solid var(--ink);background:var(--paper);color:var(--ink);text-decoration:none}
a.chip:hover{background:var(--gold)}
.empty{background:var(--white);border:3px dashed var(--line);border-radius:22px;padding:40px;text-align:center;color:var(--muted)}

/* pagination */
.pager{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:40px}
.pager .page-numbers{min-width:44px;text-align:center;padding:8px 14px;border:2px solid var(--ink);border-radius:12px;background:var(--white);color:var(--ink);text-decoration:none;font-weight:600}
.pager .current{background:var(--gold)}

/* ---------- single post ---------- */
.post-head{background:var(--navy);color:var(--white)}
.post-head .wrap{padding-block:40px 46px}
.post-head h1{font-size:clamp(1.9rem,4.6vw,3rem);margin:12px 0 14px}
.post-head .meta{color:#c6cff0}
.post-head .chip{background:var(--gold);border-color:#000}
.feature{margin-top:-6px}
.feature img{width:100%;border:3px solid var(--ink);border-radius:22px;box-shadow:8px 8px 0 var(--pink);margin-top:34px}
.entry{padding-block:28px 50px}
.entry > *{margin-top:0;margin-bottom:1.1em}
.entry h2{font-size:1.6rem;margin-top:1.6em}
.entry h3{font-size:1.25rem;margin-top:1.4em}
.entry p,.entry li{color:#1d2747}
.entry ul,.entry ol{padding-left:1.3em}
.entry li{margin:.3em 0}
.entry blockquote{margin:1.6em 0;padding:18px 22px;border-left:6px solid var(--gold);background:var(--white);border-radius:0 18px 18px 0}
.entry blockquote p{margin:0}
.entry figure{margin:1.6em 0}
.entry figure img{border-radius:18px;border:3px solid var(--ink)}
.entry figcaption{font-size:.9rem;color:var(--muted);margin-top:8px}
.entry .urdu-verse{font-family:var(--urdu);direction:rtl;text-align:center;font-size:1.6rem;line-height:2.4;color:var(--navy);background:var(--white);border:3px solid var(--ink);border-radius:22px;padding:18px;box-shadow:6px 6px 0 var(--teal)}
.entry a{font-weight:500}
.entry .wp-block-button__link,.btn{display:inline-flex;align-items:center;gap:10px;text-decoration:none;font-weight:600;padding:12px 22px;border-radius:14px;border:3px solid var(--ink);box-shadow:5px 5px 0 var(--ink);background:var(--gold);color:var(--ink);font-family:var(--body)}
.btn:hover,.entry .wp-block-button__link:hover{transform:translate(-2px,-2px)}
.aligncenter{margin-left:auto;margin-right:auto}
.has-text-align-center{text-align:center}

/* app card shortcode [fair5ive_app] */
.f5-app{display:flex;gap:18px;align-items:center;background:var(--white);border:3px solid var(--ink);border-radius:22px;padding:16px;box-shadow:6px 6px 0 var(--green);margin:1.6em 0;text-decoration:none;color:var(--ink)}
.f5-app:hover{transform:translate(-2px,-2px)}
.f5-app img{width:92px;height:92px;border-radius:22px;flex:0 0 auto;object-fit:cover}
.f5-app b{display:block;font-family:var(--display);font-weight:400;font-size:1.1rem;line-height:1.2}
.f5-app span{display:block;color:var(--muted);font-size:.95rem;line-height:1.5}
.f5-app em{display:inline-block;margin-top:6px;font-style:normal;font-weight:600;color:var(--blue)}

/* end-of-post box */
.after{background:var(--navy);color:var(--white);border-radius:22px;padding:26px;border:3px solid var(--ink);box-shadow:8px 8px 0 var(--gold);display:flex;flex-wrap:wrap;gap:18px;align-items:center;justify-content:space-between}
.after p{margin:0;color:#d7def5}
.after h2{font-size:1.3rem;margin:0 0 4px}
.tags{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 26px}
.related{padding-block:10px 60px}
.related h2{font-size:1.5rem}
.postnav{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;margin:30px 0 0}
.postnav a{text-decoration:none;font-weight:600}

/* search */
.search-form{display:flex;gap:8px;margin-top:20px;max-width:520px}
.search-form input[type=search]{flex:1;min-width:0;font:500 1rem var(--body);padding:10px 14px;border:3px solid var(--ink);border-radius:14px}
.search-form button{font:600 1rem var(--body);padding:10px 16px;border:3px solid var(--ink);border-radius:14px;background:var(--gold);cursor:pointer;box-shadow:3px 3px 0 var(--ink)}

/* ---------- footer ---------- */
.site-foot{background:var(--navy);color:#c6cff0;padding-block:40px 90px;margin-top:0}
.site-foot .wrap{display:flex;flex-wrap:wrap;gap:24px;align-items:center;justify-content:space-between}
.site-foot .flogo{background:var(--white);border-radius:16px;padding:10px 14px}
.site-foot .flogo img{height:80px;width:auto}
.site-foot nav{display:flex;flex-wrap:wrap;gap:16px}
.site-foot nav a{color:var(--white);text-decoration:none;font-weight:500}
.site-foot nav a:hover{color:var(--gold)}
.site-foot .urdu{color:var(--gold);font-size:1.25rem}
.site-foot small{display:block;margin-top:4px}

/* back to top */
.totop{position:fixed;right:calc(18px + env(safe-area-inset-right,0px));bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:70;width:54px;height:54px;border-radius:16px;border:3px solid var(--ink);background:var(--gold);color:var(--ink);box-shadow:4px 4px 0 var(--ink);display:grid;place-items:center;cursor:pointer;opacity:0;transform:translateY(20px);pointer-events:none;transition:opacity .25s,transform .25s}
.totop.show{opacity:1;transform:none;pointer-events:auto}
.totop:hover{background:var(--pink);color:var(--white)}

@media (max-width:980px){.posts{grid-template-columns:repeat(2,1fr)}.posts > :last-child:nth-child(3n+1):not(:first-child){grid-column:auto;flex-direction:column}.posts > :last-child:nth-child(3n+1):not(:first-child) .thumb{flex:none;border-right:0;border-bottom:3px solid var(--ink)}.posts > :last-child:nth-child(odd):not(:first-child){grid-column:1/-1}}
@media (max-width:520px){.brand .tx{display:none}.site-head .wrap{gap:10px}}
@media (max-width:620px){.posts{grid-template-columns:1fr}.posts > :last-child:nth-child(odd):not(:first-child){grid-column:auto}body{font-size:17px}.f5-app{flex-direction:column;align-items:flex-start}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}html{scroll-behavior:auto}}

/* ---------- Urdu (right to left) ---------- */
html[lang=ur] body{font-family:var(--urdu);line-height:2.2}
html[lang=ur] h1,html[lang=ur] h2,html[lang=ur] h3,html[lang=ur] h4{font-family:var(--urdu);font-weight:700;line-height:1.9}
html[lang=ur] .blog-hero h1{font-size:clamp(1.9rem,4.6vw,3rem)}
html[lang=ur] .post-head h1{font-size:clamp(1.6rem,3.8vw,2.4rem)}
html[lang=ur] .card h2{font-size:1.2rem;line-height:1.9}
html[lang=ur] .card p{line-height:2.1}
html[lang=ur] .eyebrow,html[lang=ur] .chip{letter-spacing:0;text-transform:none;font-family:var(--urdu);line-height:1.9}
html[lang=ur] .chip{padding:0 12px;font-size:.82rem}
html[lang=ur] .meta{font-family:var(--urdu)}
html[lang=ur] .menu a,html[lang=ur] .cats a,html[lang=ur] .btn,html[lang=ur] .menu-btn,html[lang=ur] .search-form button,html[lang=ur] .pager .page-numbers{font-family:var(--urdu);line-height:1.9}
html[lang=ur] .brand,html[lang=ur] .lang-sw{direction:ltr}
html[lang=ur] .lang-sw{margin-left:0;margin-right:auto}
html[lang=ur] .menu{margin:0 10px 0 0!important}
html[lang=ur] .entry{font-size:1.12rem}
html[lang=ur] .entry p,html[lang=ur] .entry li{line-height:2.3}
html[lang=ur] .entry ul,html[lang=ur] .entry ol{padding-left:0;padding-right:1.3em}
html[lang=ur] .entry blockquote{border-left:0;border-right:6px solid var(--gold);border-radius:18px 0 0 18px}
html[lang=ur] .f5-app b{font-family:var(--urdu);font-weight:700;line-height:1.8}
html[lang=ur] .f5-app span{line-height:1.9}
html[lang=ur] .posts > :last-child:nth-child(3n+1):not(:first-child) .thumb{border-right:0;border-left:3px solid var(--ink)}
html[lang=ur] .site-foot small .ver{display:inline-block}
html[lang=ur] .totop{right:auto;left:calc(18px + env(safe-area-inset-left,0px))}
.ur-note{background:#fff4ec;border:2px dashed var(--orange);border-radius:14px;padding:10px 16px;font-family:var(--urdu);line-height:2}
.en-fallback{font-family:var(--body);line-height:1.7}
.site-foot .ver{opacity:.55}
@media (max-width:900px){html[lang=ur] .menu{margin:0!important}html[lang=ur] .menu-btn{margin-left:0;margin-right:10px}}

/* "Our Apps" dropdown */
.site-head .dd{position:relative}
.dd-btn{background:none;border:0;color:var(--white);font:500 .95rem var(--body);padding:6px 12px;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;line-height:1.6}
.dd-btn:hover,.dd.open .dd-btn{background:rgba(255,255,255,.14)}
.dd.open .dd-btn svg{transform:rotate(180deg)}
.menu .dd-menu{display:none;position:absolute;top:calc(100% + 10px);left:0;min-width:220px;margin:0;padding:8px;flex-direction:column;gap:2px;list-style:none;background:#fff;border:3px solid var(--ink);border-radius:16px;box-shadow:6px 6px 0 var(--gold);z-index:80}
.menu .dd-menu::before{content:"";position:absolute;left:0;right:0;top:-14px;height:14px}
.dd.open .dd-menu{display:flex}
@media (hover:hover) and (min-width:901px){.dd:hover .dd-menu,.dd:focus-within .dd-menu{display:flex}}
.menu .dd-menu a{display:flex;align-items:center;gap:10px;color:var(--ink);padding:8px 12px;border-radius:10px;font-weight:600;white-space:nowrap}
.menu .dd-menu a:hover{background:var(--paper)}
.menu .dd-menu a i{width:10px;height:10px;border-radius:3px;flex:0 0 10px;transform:rotate(45deg)}
html[lang=ur] .dd-btn,html[lang=ur] .menu .dd-menu a{font-family:var(--urdu);font-weight:700;line-height:2}
html[lang=ur] .menu .dd-menu{left:auto;right:0}
@media (max-width:900px){
  .dd-btn{width:100%;justify-content:space-between;opacity:.75;cursor:default}
  .dd-btn svg{display:none}
  .menu .dd-menu{display:flex;position:static;box-shadow:none;border:0;background:none;padding:0 14px 6px;min-width:0}
  .menu .dd-menu::before{display:none}
  .menu .dd-menu a{color:var(--white);font-weight:500}
  .menu .dd-menu a:hover{background:rgba(255,255,255,.12)}
}
