/*
Theme Name: Vishay Portal
Theme URI: https://example.com/
Author: Custom
Description: Marathi-friendly news and information portal theme with a hero slider, category tiles and card grids. Standalone theme (no parent theme required).
Version: 1.4.2
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vishay-portal
*/
:root{--bg:#f5f6f8;--card:#fff;--text:#1b1f27;--sub:#6b7280;--line:#e7e9ee;--accent:#1769e0;--shadow:0 1px 3px rgba(20,30,50,.08)}
@media(prefers-color-scheme:dark){:root{--bg:#0f1319;--card:#171c25;--text:#eceff4;--sub:#9aa3b2;--line:#262d3a;--accent:#6aa4ff;--shadow:none}}
html{scroll-behavior:smooth}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:"Mukta","Noto Sans Devanagari",system-ui,sans-serif;line-height:1.55;font-size:17px}
a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
img{max-width:100%;height:auto}
.w{max-width:1180px;margin:0 auto;padding:0 20px}
.screen-reader-text{position:absolute;left:-9999px}

.vp-header{position:sticky;top:0;z-index:20;background:var(--card);border-bottom:1px solid var(--line)}
.admin-bar .vp-header{top:32px}
@media(max-width:782px){.admin-bar .vp-header{top:46px}}
.vp-header .w{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:10px;padding-bottom:10px}
.brand b{display:block;font-size:27px;font-weight:800;line-height:1.1}
.brand small{display:block;font-size:12.5px;color:var(--sub);font-weight:600}
.vp-logo{max-height:46px;width:auto;display:block}
.vp-header nav{overflow-x:auto;scrollbar-width:none}
.vp-nav{display:flex;gap:26px;list-style:none;margin:0;padding:0;font-weight:600;font-size:15.5px}
.vp-nav a{white-space:nowrap;display:block}
.vp-nav a:hover,.vp-nav .current-menu-item a{color:var(--accent)}
@media(max-width:900px){.vp-header .w{flex-direction:column;align-items:flex-start;gap:6px}.vp-header nav{max-width:100%}.vp-nav{gap:18px;padding-bottom:4px}}

.hero{position:relative;margin:24px auto 0;border-radius:26px;overflow:hidden;min-height:430px;color:#fff}
.slide{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:44px 48px 64px;opacity:0;transition:opacity .6s;pointer-events:none;background-size:cover;background-position:center}
.slide.on{opacity:1;pointer-events:auto}
.slide::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.65),rgba(0,0,0,.12))}
.slide>*{position:relative}
.pill{display:inline-block;align-self:flex-start;background:#fff;color:#111;border-radius:99px;padding:2px 14px;font-size:14px;font-weight:700;margin-bottom:12px}
.slide h2{margin:0 0 10px;font-size:clamp(26px,4.4vw,46px);line-height:1.2;font-weight:800;max-width:900px}
.slide p{margin:0 0 20px;max-width:640px;opacity:.92}
.btn{align-self:flex-start;background:#fff;color:#111;border-radius:14px;padding:8px 20px;font-weight:700}
.arrows{position:absolute;right:20px;top:18px;display:flex;gap:10px;z-index:3}
.arrows button{width:42px;height:34px;border-radius:99px;border:0;background:rgba(255,255,255,.9);color:#111;font-size:20px;cursor:pointer}
.dots{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);display:flex;gap:7px;z-index:3}
.dots i{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.55)}.dots i.on{width:24px;border-radius:6px;background:#fff}
@media(max-width:700px){.slide{padding:24px 22px 52px}.hero{min-height:380px;border-radius:20px}}

.sec{padding-top:40px}
.head{display:flex;justify-content:space-between;align-items:end;margin-bottom:16px;gap:12px}
.head h1,.head h2{margin:0;font-size:32px;font-weight:800;line-height:1.2}
.head p{margin:2px 0 0;color:var(--sub);font-size:15.5px}
.head a{color:var(--accent);font-weight:700;font-size:15px;white-space:nowrap}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
@media(max-width:1000px){.grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.grid{grid-template-columns:1fr}}
.card{background:var(--card);border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column}
.thumb{aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;padding:14px;text-align:center;color:#fff;font-weight:800;font-size:25px;line-height:1.2;text-shadow:0 2px 6px rgba(0,0,0,.3)}
.thumb.img{padding:0;display:block}
.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.card h3{margin:0;padding:16px 16px 8px;font-size:19px;line-height:1.35;font-weight:700}
.card .m{margin-top:auto;padding:0 16px 16px;font-size:14px;color:var(--sub);font-weight:600}
.card .m span{color:var(--accent)}

.cats{display:grid;grid-template-columns:repeat(8,1fr);gap:14px}
@media(max-width:1000px){.cats{grid-template-columns:repeat(4,1fr)}}
@media(max-width:560px){.cats{grid-template-columns:repeat(2,1fr)}}
.cat{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px 8px 14px;text-align:center;font-weight:700;font-size:15px}
.cat span{display:block;font-size:30px;margin-bottom:6px}
.cat small{display:block;color:var(--sub);font-weight:600;font-size:12.5px}
.cat:hover{border-color:var(--accent)}

.vp-single{max-width:780px;margin:30px auto 0;background:var(--card);border:1px solid var(--line);border-radius:20px;padding:30px}
@media(max-width:600px){.vp-single{padding:18px}}
.vp-single h1{font-size:clamp(26px,4vw,38px);line-height:1.25;margin:12px 0 6px;font-weight:800}
.vp-single .meta{color:var(--sub);font-size:15px;margin:0 0 18px}
.feat img{border-radius:14px;width:100%}
.entry{font-size:19px;line-height:1.75}
.entry h2,.entry h3{line-height:1.3;margin-top:1.6em}
.entry a{color:var(--accent);text-decoration:underline}
.entry blockquote{margin:1.2em 0;padding:4px 18px;border-left:4px solid var(--accent);color:var(--sub)}
.tags a{display:inline-block;margin:0 6px 6px 0;padding:2px 12px;border:1px solid var(--line);border-radius:99px;font-size:14px}
.pn{display:flex;justify-content:space-between;gap:16px;margin-top:24px;font-weight:700;color:var(--accent)}
.vp-comments{margin-top:34px}
.clist{list-style:none;padding:0}.clist .children{list-style:none}
.vp-comments input[type=text],.vp-comments input[type=email],.vp-comments input[type=url],.vp-comments textarea{width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);font:inherit}
.vp-comments input[type=submit]{background:var(--accent);color:#fff;border:0;border-radius:10px;padding:10px 22px;font:inherit;font-weight:700;cursor:pointer}
.navigation.pagination{margin:28px 0 0;text-align:center}
.page-numbers{display:inline-block;padding:6px 14px;margin:2px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.page-numbers.current{background:var(--accent);color:#fff;border-color:var(--accent)}
.empty{padding:40px 0;color:var(--sub);text-align:center}

.vp-footer{margin-top:56px;background:#0b1530;color:#d6deee;font-size:15.5px}
.vp-footer a:hover{color:#fff;text-decoration:underline}
.vp-footer a:focus-visible{outline-color:#f2c14e}
.fgrid{display:grid;grid-template-columns:1.5fr repeat(3,1fr);gap:40px;padding-top:52px;padding-bottom:36px}
.fbrand p{margin:0 0 14px;line-height:1.75}
.fbrand .flogo{font-size:28px;font-weight:800;line-height:1.2;color:#fff}
.fbrand .fnote{color:#9fb2d6}
.fcol h2{position:relative;margin:0 0 22px;padding-bottom:12px;font-size:19px;font-weight:700;line-height:1.3;color:#fff}
.fcol h2::after{content:"";position:absolute;left:0;bottom:0;width:26px;height:3px;border-radius:2px;background:#f2c14e}
.fcol ul{list-style:none;margin:0;padding:0}
.fcol li{margin:0 0 12px}
.fcol a{display:inline-flex;align-items:baseline;gap:8px;line-height:1.5}
.fcol i{flex:none;width:1.3em;text-align:center;font-style:normal;color:#f2c14e}
.fbar{padding:20px 0 calc(20px + env(safe-area-inset-bottom,0px));border-top:1px solid rgba(255,255,255,.12);text-align:center;font-size:14.5px;color:#9fb2d6}
@media(max-width:900px){.fgrid{grid-template-columns:1fr 1fr;gap:32px}.fbrand{grid-column:1/-1}}
@media(max-width:560px){.fgrid{grid-template-columns:1fr;padding-top:40px}}
.wa{position:fixed;right:16px;bottom:88px;z-index:30;display:flex;align-items:center}
.wa b{background:#e60000;color:#fff;border-radius:99px;padding:8px 20px;font-size:16px}
.wa i{width:56px;height:56px;border-radius:50%;background:#25d366;margin-left:-8px;display:grid;place-items:center;font-size:28px;font-style:normal;box-shadow:0 0 0 8px rgba(37,211,102,.25)}
.top{position:fixed;right:16px;bottom:20px;z-index:30;width:44px;height:44px;border:0;border-radius:8px;background:var(--accent);color:#fff;font-size:20px;cursor:pointer}
@media(prefers-reduced-motion:reduce){.slide{transition:none}html{scroll-behavior:auto}}

/* ---------- Two-column layout + sidebar (posts and archives) ---------- */
.vp-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:28px;align-items:start}
.vp-layout .vp-single{max-width:none;margin:30px 0 0}
.vp-layout .sec{padding-top:30px}
.vp-layout .head h1{font-size:clamp(26px,3.4vw,32px)}
.vp-layout .grid{grid-template-columns:repeat(2,1fr)}
.vp-side{margin-top:30px}
.vp-box{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px;margin:0 0 18px;box-shadow:var(--shadow)}
.vp-wt{position:relative;margin:0 0 16px;padding-bottom:10px;font-size:19px;font-weight:800;line-height:1.3}
.vp-wt::after{content:"";position:absolute;left:0;bottom:0;width:30px;height:3px;border-radius:2px;background:var(--accent)}
.vp-box ul{list-style:none;margin:0;padding:0}
.vp-box.widget li{padding:8px 0;border-bottom:1px solid var(--line)}
.vp-box.widget li:last-child{border-bottom:0}

.vp-search{display:flex;gap:8px}
.vp-search input{flex:1;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--text);font:inherit}
.vp-search button{border:0;border-radius:12px;padding:0 16px;background:var(--accent);color:#fff;font:inherit;font-weight:700;cursor:pointer}

.vp-sp{display:flex;flex-direction:column;gap:14px}
.sp{display:flex;gap:12px;align-items:flex-start}
.sp .st{flex:none;width:78px;height:78px;border-radius:12px;overflow:hidden;display:grid;place-items:center;font-size:30px;background:var(--bg)}
.sp .st img{width:100%;height:100%;object-fit:cover;display:block}
.sp .sm{display:flex;flex-direction:column;gap:3px;min-width:0}
.sp b{font-size:15.5px;line-height:1.4;font-weight:700;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.sp small{font-size:13px;color:var(--sub);font-weight:600}
.sp:hover b{color:var(--accent)}

.vp-cl li+li{margin-top:2px}
.vp-cl a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:12px;font-weight:600;font-size:16px}
.vp-cl a:hover{background:var(--bg);color:var(--accent)}
.vp-cl .ci{flex:none;width:1.5em;text-align:center;font-size:20px}
.vp-cl .cn{flex:1;min-width:0}
.vp-cl .cc{flex:none;min-width:28px;padding:0 9px;border-radius:99px;background:var(--bg);color:var(--sub);font-size:13px;text-align:center;line-height:24px}

.vp-wacard{display:flex;flex-direction:column;gap:6px;align-items:flex-start;padding:18px;border-radius:18px;color:#fff;background:linear-gradient(135deg,#128c4a,#25d366)}
.vp-wacard span{font-size:30px;line-height:1}
.vp-wacard b{font-size:18px;line-height:1.35}
.vp-wacard em{font-style:normal;font-weight:700;background:#fff;color:#0b5c32;border-radius:99px;padding:3px 16px;margin-top:4px}

@media(max-width:1000px){.vp-layout{grid-template-columns:1fr}.vp-side{margin-top:10px}}
@media(max-width:560px){.vp-layout .grid{grid-template-columns:1fr}}

/* ---------- Post content: coloured heading underlines ---------- */
html{scroll-behavior:smooth}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.entry h2,.entry h3{--hc:#e53935;width:fit-content;max-width:100%;padding-bottom:6px;border-bottom:3px solid var(--hc);scroll-margin-top:84px}
.entry h3{border-bottom-width:2px}
.entry h2:nth-of-type(6n+1){--hc:#e53935}
.entry h2:nth-of-type(6n+2){--hc:#1e88e5}
.entry h2:nth-of-type(6n+3){--hc:#43a047}
.entry h2:nth-of-type(6n+4){--hc:#fb8c00}
.entry h2:nth-of-type(6n+5){--hc:#8e24aa}
.entry h2:nth-of-type(6n+6){--hc:#00acc1}
.entry h3:nth-of-type(6n+1){--hc:#1e88e5}
.entry h3:nth-of-type(6n+2){--hc:#43a047}
.entry h3:nth-of-type(6n+3){--hc:#fb8c00}
.entry h3:nth-of-type(6n+4){--hc:#8e24aa}
.entry h3:nth-of-type(6n+5){--hc:#00acc1}
.entry h3:nth-of-type(6n+6){--hc:#e53935}

/* ---------- Table of contents (अनुक्रमणिका) ---------- */
.entry .vp-toc{margin:1.4em 0;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--card)}
.vp-toc summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;cursor:pointer;list-style:none;font-weight:800;font-size:1.05em;background:var(--bg);background:color-mix(in srgb,var(--accent) 10%,var(--card))}
.vp-toc summary::-webkit-details-marker{display:none}
.vp-toc .tc{flex:none;width:10px;height:10px;border-right:3px solid var(--sub);border-bottom:3px solid var(--sub);transform:rotate(45deg) translateY(-3px);transition:transform .2s}
.vp-toc details[open] .tc{transform:rotate(-135deg) translateY(-3px)}
.vp-toc ol{list-style:none;margin:0;padding:0;max-height:440px;overflow:auto}
.vp-toc li{margin:0}
.entry .vp-toc a{display:flex;align-items:center;gap:12px;padding:12px 18px;border-top:1px solid var(--line);color:var(--text);text-decoration:none;font-weight:600;font-size:.95em;line-height:1.45}
.entry .vp-toc a::after{content:"›";margin-left:auto;flex:none;padding-left:8px;font-size:1.5em;line-height:1;color:var(--sub)}
.entry .vp-toc a:hover{background:var(--bg);color:var(--accent)}
.vp-toc .n{flex:none;min-width:28px;height:28px;display:grid;place-items:center;border-radius:99px;background:var(--bg);color:var(--accent);font-size:.85em;font-weight:800}
.vp-toc .l3 a{padding-left:46px;font-weight:500}
@media(max-width:600px){.vp-toc summary,.entry .vp-toc a{padding-left:14px;padding-right:14px}.vp-toc .l3 a{padding-left:34px}}

/* ---------- Quick answer ---------- */
.vp-qa,.quick-answer{margin:1.4em 0;padding:18px 22px;border:1px solid var(--line);border-left:5px solid var(--accent);border-radius:16px;background:var(--bg)}
.qa-label{display:inline-block;margin-bottom:10px;padding:2px 14px;border-radius:99px;background:var(--accent);color:var(--card);font-size:.8em;font-weight:800}
.vp-qa .qa-title{margin:0 0 8px;font-size:1.25em;font-weight:800;line-height:1.35}
.vp-qa .qa-body>:first-child{margin-top:0}
.vp-qa .qa-body>:last-child{margin-bottom:0}

/* ---------- WhatsApp / Telegram join cards ---------- */
.vp-join{display:grid;gap:12px;margin:1.6em 0}
.entry a.jc{display:flex;align-items:center;gap:12px;padding:12px 14px;border:2px solid var(--accent);border-radius:12px;background:var(--bg);background:color-mix(in srgb,var(--accent) 8%,var(--card));color:var(--text);text-decoration:none;font-weight:800}
.jc .ji{flex:none;display:grid;place-items:center;width:30px;height:30px}
.jc-wa .ji{color:#128c4a}
.jc-tg .ji{color:#0a5a8c}
.jc .jt{flex:1;min-width:0}
.jc .jb{flex:none;padding:8px 18px;border-radius:8px;color:#fff;font-size:.95em;font-weight:800}
.jc-wa .jb{background:#128c4a}
.jc-tg .jb{background:#0a5a8c}
.entry a.jc:hover{border-color:var(--text)}

/* ---------- Byline (author, date, preferred source) ---------- */
.vp-byline{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 18px;margin:0 0 20px;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.vp-by{display:flex;align-items:center;gap:12px;min-width:0}
.vp-by .av{flex:none;width:46px;height:46px;border-radius:50%;object-fit:cover;background:var(--bg)}
.vp-by b{display:block;font-size:16.5px;font-weight:700;line-height:1.3}
.vp-by small{display:flex;align-items:center;gap:6px;color:var(--sub);font-size:14px;font-weight:600}
.vp-pref{display:inline-flex;align-items:center;gap:8px;max-width:230px;color:var(--accent);font-size:13.5px;font-weight:700;line-height:1.3}
.vp-pref .pi{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--bg);font-size:16px}
.vp-pref:hover{text-decoration:underline}
@media(max-width:480px){.vp-pref{max-width:none}}

/* ---------- Byline refinements: closer to the reference ---------- */
.vp-by b{font-size:16px}
.vp-by small{font-size:13.5px}
.vp-pref{gap:8px;max-width:none;color:var(--text);font-size:12.5px;font-weight:700;line-height:1.25}
.vp-pref:hover{text-decoration:none}
.vp-pref:hover .pt{text-decoration:underline}
.vp-pref .gg{flex:none;font:800 28px/1 Arial,Helvetica,sans-serif;color:#4285f4;background:linear-gradient(135deg,#4285f4 0 38%,#ea4335 38% 62%,#fbbc05 62% 80%,#34a853 80%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.vp-pref .pt{max-width:150px}
.vp-pref--img img{display:block;height:36px;width:auto}
