/*
Theme Name: MDS Portal
Theme URI: https://mdstrader.com
Author: MDS Trader
Description: Clean modern news-portal theme for MDS Trader, modelled on the ProPakistani front-page pattern: light utility bar, logo-block header with drawer navigation, multi-story hero, timestamped Latest News card grid and category sections. Minimalist, fast, fully responsive.
Version: 1.0.20
Text Domain: mds-portal
*/

:root{
  --green:#0B5D3B;
  --green-dark:#08472d;
  --gold:#C9A227;
  --ink:#14181a;
  --muted:#68756e;
  --line:#e7ebe8;
  --bg:#ffffff;
  --soft:#f4f6f5;
  --radius:8px;
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased}
a{color:var(--green);text-decoration:none}
a:hover{color:var(--green-dark)}
img{max-width:100%;height:auto;display:block}
.wrap{max-width:1200px;margin:0 auto;padding:0 16px}

/* ---------- Top utility bar ---------- */
.topbar{background:var(--soft);border-bottom:1px solid var(--line);font-size:11.5px;padding:7px 0}
.topbar .wrap{display:flex;justify-content:space-between;align-items:center;gap:14px}
.topbar nav{display:flex;gap:18px;flex-wrap:wrap}
.topbar nav a{color:var(--muted);text-transform:uppercase;letter-spacing:.6px;font-weight:600}
.topbar nav a:hover{color:var(--green)}
.topbar .tb-date{color:var(--muted);white-space:nowrap}
@media(max-width:760px){.topbar .tb-date{display:none}.topbar .wrap{justify-content:center}}
@media(max-width:640px){
  .topbar{padding:6px 0}
  .topbar nav{gap:8px 13px;justify-content:center}
  .topbar nav a{font-size:10.5px;letter-spacing:.4px}
  .single-wrap h1{font-size:25px}
  .section-head h2{font-size:19px}
}

/* ---------- Header ---------- */
.site-header{background:#fbfcfb;padding:16px 0;border-bottom:1px solid var(--line)}
.site-header .wrap{display:flex;align-items:center;gap:16px}
.drawer-btn{background:none;border:0;cursor:pointer;padding:8px 6px;color:var(--ink);display:flex;align-items:center}
.drawer-btn svg{width:26px;height:26px}
.logo-block{background:var(--green);border-radius:5px;padding:9px 16px 10px;line-height:1}
.logo-block a{color:#fff;font-family:'Poppins',sans-serif;font-weight:800;font-size:25px;letter-spacing:.2px;text-transform:lowercase}
.logo-block a span{color:#ffd94d}
.logo-sub{font-size:10.5px;letter-spacing:2.2px;text-transform:uppercase;color:var(--muted);margin-top:6px;font-weight:600}
.header-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.search-btn{background:var(--soft);border:1px solid var(--line);border-radius:6px;width:42px;height:42px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--ink)}
.search-btn svg{width:20px;height:20px}
.search-btn:hover{border-color:var(--green);color:var(--green)}
.search-row{display:none;background:#fff;border-bottom:1px solid var(--line);padding:12px 0}
.search-row.open{display:block}
.search-row form{display:flex;gap:10px}
.search-row input[type=search]{flex:1;border:1.5px solid var(--line);border-radius:7px;padding:11px 14px;font-size:15px;outline:none}
.search-row input[type=search]:focus{border-color:var(--green)}
.search-row button{border:0;background:var(--green);color:#fff;padding:0 24px;border-radius:7px;font-weight:600;cursor:pointer;font-size:14.5px}
@media(max-width:640px){.logo-block a{font-size:20px}.logo-sub{display:none}}

/* ---------- Drawer navigation ---------- */
.drawer-backdrop{position:fixed;inset:0;background:rgba(10,20,15,.45);opacity:0;pointer-events:none;transition:opacity .25s ease;z-index:90}
.drawer-backdrop.open{opacity:1;pointer-events:auto}
.drawer{position:fixed;top:0;left:0;bottom:0;width:302px;max-width:86vw;background:#fff;z-index:95;transform:translateX(-105%);transition:transform .28s ease;overflow-y:auto;box-shadow:2px 0 18px rgba(0,0,0,.18)}
.drawer.open{transform:translateX(0)}
.drawer-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}
.drawer-head strong{font-family:'Poppins',sans-serif;font-size:16px;text-transform:uppercase;letter-spacing:.6px}
.drawer-close{background:none;border:0;color:var(--green);font-size:24px;cursor:pointer;line-height:1;padding:2px 6px}
.drawer-menu{list-style:none;padding:8px 0}
.drawer-menu li a{display:block;padding:11px 16px 11px 15px;color:var(--ink);font-weight:600;font-size:15px;border-left:4px solid #c8d2cc}
.drawer-menu li:nth-child(7n+1) a{border-left-color:#1D6FB8}
.drawer-menu li:nth-child(7n+2) a{border-left-color:var(--gold)}
.drawer-menu li:nth-child(7n+3) a{border-left-color:#C0392B}
.drawer-menu li:nth-child(7n+4) a{border-left-color:#7D3C98}
.drawer-menu li:nth-child(7n+5) a{border-left-color:#0E7A5F}
.drawer-menu li:nth-child(7n+6) a{border-left-color:#2E86AB}
.drawer-menu li:nth-child(7n+0) a{border-left-color:#1E8449}
.drawer-menu li a:hover{background:var(--soft);color:var(--green)}
.drawer-cta{margin:12px 16px 20px}
.drawer-cta a{display:block;background:var(--green);color:#fff;text-align:center;padding:12px;border-radius:7px;font-weight:700;font-size:14.5px}
.drawer-cta a:hover{background:var(--green-dark);color:#fff}

/* ---------- Section headers (ProPakistani style) ---------- */
.section-head{margin:36px 0 16px}
.section-head .sh-row{display:flex;align-items:baseline;justify-content:space-between;gap:14px}
.section-head h2{font-family:'Poppins',sans-serif;font-size:24px;font-weight:800;text-transform:uppercase;letter-spacing:.3px;color:var(--ink)}
.section-head .sh-more{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--green);white-space:nowrap}
.section-head .sh-more:hover{color:var(--green-dark)}
.section-head p{color:var(--muted);font-size:14px;margin-top:3px}
.cat-chip{display:inline-block;background:var(--green);color:#fff;font-size:10.5px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;padding:3px 8px;border-radius:4px;margin-bottom:6px}
.cat-chip:hover{color:#fff;background:var(--green-dark)}
.meta-line{font-size:12px;color:var(--muted);margin-top:5px}
.stamp{font-size:12px;color:var(--green);font-weight:600}

/* ---------- Hero grid ---------- */
.hero{display:grid;grid-template-columns:1.5fr 1fr 1fr;grid-auto-rows:1fr;gap:16px;margin-top:20px}
.hero-card{background:#fff}
.hero-card img{width:100%;height:150px;object-fit:cover;border-radius:var(--radius)}
.hero-card.big{grid-row:span 2}
.hero-card.big img{height:316px}
.hero-card a.h-title{display:block;font-family:'Poppins',sans-serif;font-weight:700;color:var(--ink);font-size:15.5px;line-height:1.4;margin-top:9px}
.hero-card.big a.h-title{font-size:22px;line-height:1.35}
.hero-card a.h-title:hover{color:var(--green)}
@media(max-width:900px){.hero{grid-template-columns:1fr 1fr}.hero-card.big{grid-column:span 2}.hero-card.big img{height:240px}}
@media(max-width:560px){.hero{grid-template-columns:1fr 1fr;gap:12px}.hero-card img{height:104px}.hero-card.big img{height:200px}.hero-card a.h-title{font-size:13.5px}.hero-card.big a.h-title{font-size:18px}}

/* ---------- Latest News card grid ---------- */
.latest-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px 18px}
@media(max-width:992px){.latest-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.latest-grid{grid-template-columns:repeat(2,1fr)}}
.news-card img{width:100%;height:132px;object-fit:cover;border-radius:var(--radius)}
.news-card .stamp{display:block;margin-top:8px}
.news-card a{display:block;font-family:'Poppins',sans-serif;font-weight:600;font-size:15px;color:var(--ink);line-height:1.42;margin-top:3px}
.news-card a:hover{color:var(--green)}
@media(max-width:700px){.news-card img{height:100px}.news-card a{font-size:13.5px}}
.show-more{text-align:center;margin:24px 0 4px}
.show-more a{display:inline-block;border:1.5px solid var(--green);color:var(--green);font-weight:700;font-size:14px;padding:10px 30px;border-radius:999px}
.show-more a:hover{background:var(--green);color:#fff}
.empty-note{color:var(--muted);padding:10px 0;font-size:14.5px}

/* ---------- Category sections ---------- */
.cat-cols{display:grid;grid-template-columns:1fr 1fr;gap:22px 30px}
@media(max-width:820px){.cat-cols{grid-template-columns:1fr}}
.cat-lead img{width:100%;height:230px;object-fit:cover;border-radius:var(--radius)}
.cat-lead a{display:block;font-family:'Poppins',sans-serif;font-weight:700;font-size:19px;color:var(--ink);line-height:1.4;margin-top:10px}
.cat-lead a:hover{color:var(--green)}
.cat-lead p{color:var(--muted);font-size:14px;margin-top:5px}
.mini-list{list-style:none}
.mini-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);align-items:flex-start}
.mini-item img{width:96px;height:64px;object-fit:cover;border-radius:6px;flex:0 0 auto}
.mini-item a{font-family:'Poppins',sans-serif;font-weight:600;font-size:14.5px;color:var(--ink);line-height:1.4}
.mini-item a:hover{color:var(--green)}

/* ---------- Archive stream ---------- */
.stream-item{display:flex;gap:16px;padding:15px 2px;border-bottom:1px solid var(--line);align-items:flex-start}
.stream-item .st-time{flex:0 0 118px;font-size:12.5px;color:var(--muted);line-height:1.45;padding-top:3px}
.stream-item .st-time strong{display:block;color:var(--green);font-size:13px}
.stream-item .st-body{flex:1}
.stream-item .st-body a{font-family:'Poppins',sans-serif;font-size:17px;font-weight:600;color:var(--ink);line-height:1.4}
.stream-item .st-body a:hover{color:var(--green)}
.stream-item img{width:150px;height:100px;object-fit:cover;border-radius:8px;flex:0 0 auto}
@media(max-width:640px){.stream-item img{width:104px;height:74px}.stream-item .st-time{flex-basis:86px;font-size:11.5px}.stream-item .st-body a{font-size:15.5px}}
.archive-head{margin:28px 0 4px}
.archive-head h1{font-family:'Poppins',sans-serif;font-size:27px;font-weight:800;text-transform:uppercase}
.archive-head p{color:var(--muted);font-size:14.5px;margin-top:4px}
.pagination{display:flex;gap:8px;margin:26px 0 8px;flex-wrap:wrap}
.pagination a,.pagination span{padding:8px 14px;border:1px solid var(--line);border-radius:7px;font-size:14px;font-weight:600;color:var(--ink)}
.pagination .current{background:var(--green);color:#fff;border-color:var(--green)}
.pagination a:hover{border-color:var(--green);color:var(--green)}

/* ---------- Single / page ---------- */
.single-wrap{max-width:820px;margin:26px auto 0}
.single-wrap h1{font-family:'Poppins',sans-serif;font-size:31px;font-weight:700;line-height:1.3;margin:10px 0 8px}
.single-meta{font-size:13px;color:var(--muted);padding-bottom:14px;border-bottom:1px solid var(--line);margin-bottom:18px}
.single-feat{border-radius:var(--radius);margin-bottom:20px;width:100%}
.entry-content{font-size:17px;line-height:1.75;color:#22302a}
.entry-content p{margin-bottom:16px}
.entry-content h2{font-family:'Poppins',sans-serif;font-size:23px;margin:26px 0 10px;color:var(--ink)}
.entry-content h3{font-family:'Poppins',sans-serif;font-size:19px;margin:22px 0 8px}
.entry-content table{width:100%;border-collapse:collapse;margin:18px 0;font-size:15.5px}
.entry-content th{background:var(--green);color:#fff;text-align:left;padding:10px 12px;font-weight:600}
.entry-content td{padding:9px 12px;border-bottom:1px solid var(--line)}
.entry-content tr:nth-child(even) td{background:var(--soft)}
.entry-content ul,.entry-content ol{margin:0 0 16px 22px}
.entry-content li{margin-bottom:7px}
.post-nav{display:flex;justify-content:space-between;gap:14px;margin:30px 0 6px;font-size:14px;font-weight:600}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:760px){.related-grid{grid-template-columns:1fr}}
.rel-card{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:#fff}
.rel-card img{width:100%;height:130px;object-fit:cover}
.rel-card div{padding:11px 13px}
.rel-card a{font-family:'Poppins',sans-serif;font-weight:600;font-size:14.5px;color:var(--ink);line-height:1.4}
.rel-card a:hover{color:var(--green)}

/* ---------- Footer ---------- */
.site-footer{background:var(--green-dark);color:#cfe2d6;margin-top:48px}
.footer-cols{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:32px;padding:38px 0 26px}
@media(max-width:820px){.footer-cols{grid-template-columns:1fr}}
.site-footer h4{font-family:'Poppins',sans-serif;color:#fff;font-size:16px;margin-bottom:13px;text-transform:uppercase;letter-spacing:.5px}
.site-footer a{color:#cfe2d6;font-size:14.5px}
.site-footer a:hover{color:var(--gold)}
.site-footer ul{list-style:none}
.site-footer ul li{margin-bottom:8px}
.footer-logo{display:inline-block;background:#fff;border-radius:5px;padding:7px 13px 8px;line-height:1}
.footer-logo span{font-family:'Poppins',sans-serif;font-weight:800;font-size:21px;color:var(--green);text-transform:lowercase}
.site-footer p{font-size:14px;line-height:1.65;color:#aec9b8}
.subscribe-form{display:flex;margin-top:6px;max-width:340px}
.subscribe-form input[type=email]{flex:1;border:0;border-radius:6px 0 0 6px;padding:11px 13px;font-size:14px;outline:none;min-width:0}
.subscribe-form button{border:0;background:#10231a;color:#fff;padding:0 18px;border-radius:0 6px 6px 0;font-weight:700;cursor:pointer;font-size:14px}
.subscribe-form button:hover{background:#000}
.sub-note{font-size:13px;margin-top:8px;color:#ffd94d}
.footer-links{border-top:1px solid rgba(255,255,255,.14);padding:16px 0 4px;font-size:13.5px;line-height:2;color:#9dbfab}
.footer-links a{color:#cfe2d6;font-size:13.5px}
.footer-bar{padding:14px 0 18px;font-size:13px;color:#9dbfab}
.footer-bar .wrap{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}

/* v1.0.4 — desktop nav bar + READ MORE next to section title */
.desktop-nav{display:none}
@media(min-width:1024px){
  .desktop-nav{display:block;background:#fff;border-bottom:1px solid var(--line)}
  .desktop-menu{display:flex;flex-wrap:wrap;gap:4px 26px;list-style:none;margin:0;padding:0}
  .desktop-menu li{margin:0;padding:0}
  .desktop-menu li a{display:block;padding:11px 0;font-family:'Poppins',sans-serif;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--ink)}
  .desktop-menu li a:hover{color:var(--green)}
  .desktop-menu li.current-menu-item a,.desktop-menu li.current_page_item a{color:var(--green)}
}
.section-head .sh-row{justify-content:flex-start}
.section-head .sh-more{margin-left:20px}

/* v1.0.5 — Table of Contents + share row */
.mds-toc{background:#f4f8f5;border:1px solid var(--line);border-left:4px solid var(--green);border-radius:8px;padding:16px 20px;margin:22px 0}
.mds-toc-title{font-family:'Poppins',sans-serif;font-weight:700;font-size:16px;margin-bottom:8px;color:var(--ink)}
.mds-toc ul{margin:0;padding-left:20px}
.mds-toc li{margin:5px 0}
.mds-toc a{color:var(--green);font-weight:500}
.mds-toc a:hover{text-decoration:underline}
.entry-content h2{scroll-margin-top:20px}
.share-row{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin:26px 0 6px;padding-top:18px;border-top:1px solid var(--line)}
.share-row span{font-family:'Poppins',sans-serif;font-weight:700;font-size:14px;margin-right:2px}
.share-row a{font-size:13px;font-weight:600;color:#fff;padding:7px 14px;border-radius:20px}
.share-row a.sh-fb{background:#1877f2}.share-row a.sh-wa{background:#25d366}.share-row a.sh-x{background:#111}.share-row a.sh-tg{background:#229ed9}

/* v1.0.6 — tighter desktop menu so it fits one row */
@media(min-width:1024px){
  .desktop-menu{gap:4px 19px}
  .desktop-menu li a{font-size:12.5px;letter-spacing:.4px}
}

/* v1.0.9 — mobile hero: no forced equal rows, big card takes one row (removes the empty gap) */
@media(max-width:900px){
  .hero{grid-auto-rows:auto}
  .hero-card.big{grid-row:auto}
}

/* v1.0.10 — footer content centred on mobile */
@media(max-width:820px){
  .site-footer{text-align:center}
  .footer-cols{justify-items:center}
  .subscribe-form{margin-left:auto;margin-right:auto}
  .footer-bar .wrap{justify-content:center}
}

/* v1.0.11 — footer bottom link row as a tidy flex list (no dangling dashes) */
.footer-links{display:flex;flex-wrap:wrap;gap:8px 22px;line-height:1.5}
@media(max-width:820px){.footer-links{justify-content:center}}

/* v1.0.12 — user's rule: these fixes are MOBILE ONLY; desktop stays as approved */
/* READ MORE stays beside section titles on desktop, hidden on mobile */
@media(max-width:900px){ .sh-more{display:none} }
/* Footer bottom links: desktop keeps the original dash-separated line */
.footer-links{display:block;line-height:2}
.fl-item:not(:last-child)::after{content:"\00a0-\00a0"}
@media(max-width:820px){
  .footer-links{display:flex;flex-wrap:wrap;gap:8px 22px;justify-content:center;line-height:1.5}
  .fl-item:not(:last-child)::after{content:""}
}

/* v1.0.15 — logo centred in the mobile header (menu left, search right) */
@media(max-width:820px){
  .site-header .wrap{display:grid;grid-template-columns:48px 1fr 48px;align-items:center}
  .site-header .wrap > div:not(.header-right){justify-self:center;text-align:center}
  .header-right{margin-left:0;justify-self:end}
}

/* v1.0.16 — mobile footer: hide the Categories column (same links already sit in the bottom row) */
@media(max-width:820px){
  .footer-cols > div:last-child{display:none}
}

/* v1.0.17 — mobile: main section headings green with a soft shadow so they stand out */
@media(max-width:820px){
  .section-head h2{color:var(--green);text-shadow:0 2px 3px rgba(11,93,59,.30),0 6px 14px rgba(11,93,59,.16)}
}

/* v1.0.18 — mobile topbar: page links out; day, English + Islamic date and live time in */
.tb-mobile-info{display:none}
@media(max-width:820px){
  .topbar nav{display:none}
  .topbar .tb-date{display:none}
  .topbar .wrap{justify-content:center}
  .tb-mobile-info{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:3px 8px;font-size:12.5px;color:var(--muted)}
  .tbmi-day{font-weight:700;color:var(--ink);text-transform:uppercase;letter-spacing:.6px}
  .tbmi-hijri{color:var(--green);font-weight:600}
  .tbmi-clock{font-weight:800;color:var(--green);white-space:nowrap}
  .tbmi-sep{color:#b9c6bd}
}

/* v1.0.19 — mobile: list rows rebuilt (thumbnail left, title right, time under title, excerpt off) */
@media(max-width:820px){
  .stream-item{display:grid;grid-template-columns:118px 1fr;grid-template-areas:"thumb body" "thumb time";column-gap:12px;row-gap:3px;padding:13px 0}
  .stream-item img{grid-area:thumb;width:118px;height:88px}
  .stream-item .st-body{grid-area:body;min-width:0}
  .stream-item .st-body p{display:none}
  .stream-item .st-time{grid-area:time;padding-top:0;font-size:11.5px}
  .stream-item .st-time strong{display:inline;font-size:11.5px;margin-right:5px}
}

/* v1.0.20 — category chip text back to white on green (a stronger title rule was forcing it black) */
.stream-item .st-body a.cat-chip{color:#fff;font-size:10.5px;line-height:1.2}
