/* CTI Blog — homepage (Design 4 "Social Feed") */
:root{
  --bg:#eef2f7; --card:#ffffff; --ink:#1a2d6b; --muted:#44547d; --soft:#55658c;
  --line:#e6ecf4; --accent:#0070e0; --accent-ink:#0062c4; --tint:#dce9fb; --navy:#1a2d6b;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:'Inter','Noto Sans Devanagari',system-ui,-apple-system,'Segoe UI',sans-serif;font-size:16px;line-height:1.5}
[lang="hi"]{font-family:'Noto Sans Devanagari','Inter',system-ui,sans-serif}
a{color:var(--ink);text-decoration:none}
a:hover{color:var(--accent-ink)}
img{max-width:100%;display:block}
button{font:inherit}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:focus-visible{outline:3px solid #7fb6f5;outline-offset:2px}

/* Top bar */
.topbar{background:#fff;border-bottom:1px solid #dfe6f0;position:sticky;top:0;z-index:20}
.topbar-in{max-width:1280px;margin:0 auto;padding:12px 20px;display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:18px}
.brand-mark,.avatar,.reel-av{border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}
.brand-mark{width:40px;height:40px;font-size:13px}
.search{flex:0 1 460px;display:flex;align-items:center;background:var(--bg);border-radius:22px;padding-right:6px}
.search input{flex:1;min-width:0;height:44px;border:0;background:transparent;padding:0 20px;font:inherit;font-size:15px;color:var(--ink)}
.search input:focus{outline:none}
.search:focus-within{box-shadow:0 0 0 3px #b9d6f7}
.search button{width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:var(--muted);cursor:pointer;display:flex;align-items:center;justify-content:center}
.top-actions{display:flex;gap:10px}
.pill{height:44px;display:flex;align-items:center;padding:0 18px;border-radius:22px;background:var(--bg);font-weight:600;font-size:14px}
.pill-primary{background:var(--accent);color:#fff}
.pill-primary:hover{background:#005bb8;color:#fff}

/* Layout */
.layout{max-width:1280px;margin:0 auto;padding:24px 20px 40px;display:flex;gap:24px;align-items:flex-start}
.cats{flex:0 0 240px;display:flex;flex-direction:column;gap:4px;position:sticky;top:92px}
.feed{flex:1 1 auto;min-width:0;max-width:680px;margin:0 auto;display:flex;flex-direction:column;gap:20px}
.side{flex:0 0 300px;display:flex;flex-direction:column;gap:20px;position:sticky;top:92px}

/* Categories */
.cat{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:12px;font-weight:600;font-size:15px;min-height:48px}
.cat:hover{background:#e3ebf6}
.cat.is-active{background:var(--tint)}
.cat-ic{width:34px;height:34px;flex-shrink:0;border-radius:10px;background:#fff;color:var(--accent-ink);display:flex;align-items:center;justify-content:center}

/* Reels strip */
.reels{display:flex;gap:12px;overflow-x:auto;padding-bottom:4px;scroll-snap-type:x mandatory;scrollbar-width:thin}
.reel{flex:0 0 120px;height:200px;border-radius:14px;background:var(--navy) center/cover no-repeat;color:#fff;padding:12px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden;scroll-snap-align:start}
.reel::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(10,20,50,.15),rgba(10,20,50,.75))}
.reel>*{position:relative;z-index:1}
.reel:hover{color:#fff;transform:translateY(-2px)}
.reel-av{width:36px;height:36px;font-size:10px;border:3px solid var(--accent);background:#fff;color:var(--ink)}
.reels-wrap{background:#fff;border-radius:18px;padding:14px 14px 10px;box-shadow:0 1px 2px rgba(26,45,107,.08);display:flex;flex-direction:column;gap:10px}
.reels-head{display:flex;justify-content:space-between;align-items:baseline;padding:0 4px}
.reels-head h2{margin:0;font-size:16px;font-weight:800}
.reels-head a{font-size:13px;font-weight:700;color:var(--accent-ink)}
.reel-top{display:flex;justify-content:space-between;align-items:flex-start}
.reel-src{width:22px;height:22px;border-radius:6px;display:flex;align-items:center;justify-content:center}
.reel-src.yt{background:#ff0000}
.reel-src.ig{background:linear-gradient(45deg,#f09433,#dc2743 50%,#bc1888)}
.reel-all{background:var(--accent);justify-content:center;align-items:center;text-align:center;gap:12px}
.reel-all::after{display:none}
.reel-all-ic{width:52px;height:52px;border-radius:50%;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center}
.reel-cap{font-size:13px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* Post card */
.post{background:var(--card);border-radius:18px;padding:20px;display:flex;flex-direction:column;gap:12px;box-shadow:0 1px 2px rgba(26,45,107,.08)}
.post-head{display:flex;align-items:center;gap:12px}
.avatar{width:44px;height:44px;font-size:12px;flex-shrink:0}
.post-meta{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.post-author{font-weight:700;font-size:15px}
.post-sub{font-size:13px;color:var(--soft)}
.post-sub a{color:var(--accent-ink);font-weight:600}
.follow{height:36px;display:flex;align-items:center;padding:0 14px;border:1px solid #cdd9ea;border-radius:18px;color:var(--accent-ink);font-weight:700;font-size:13px;white-space:nowrap}
.post-title{margin:0;font-size:22px;line-height:1.3;font-weight:800}
.post-ex{margin:0;font-size:16px;line-height:1.6;color:var(--muted)}
.more{font-weight:700;color:var(--accent-ink)}
.post-img{display:block;border-radius:14px;overflow:hidden;background:var(--tint);aspect-ratio:16/9}
.post-img img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.post-img:hover img{transform:scale(1.03)}
.post-counts{display:flex;justify-content:space-between;font-size:13px;color:var(--soft)}
.post-counts a{color:var(--soft)}
.post-actions{display:flex;gap:6px;border-top:1px solid var(--line);padding-top:8px}
.act{flex:1;height:44px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-weight:600;font-size:14px;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}
.act:hover{background:var(--bg);color:var(--ink)}
.act.is-liked{color:var(--accent-ink)}
.act.is-liked svg{fill:currentColor;fill-opacity:.15}
.act.is-busy{opacity:.6;pointer-events:none}
.empty{background:#fff;border-radius:18px;padding:40px;text-align:center;color:var(--muted)}

/* Pager */
.pager{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.pager a{height:44px;display:flex;align-items:center;padding:0 20px;border-radius:22px;background:#fff;font-weight:700;color:var(--accent-ink);box-shadow:0 1px 2px rgba(26,45,107,.08)}
.pager-info{font-size:14px;color:var(--soft)}

/* Sidebar cards */
.card{background:#fff;border-radius:18px;padding:20px;display:flex;flex-direction:column;gap:6px}
.card-title{margin:0 0 6px;font-size:17px;font-weight:800;line-height:1.35}
.trend{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--bg)}
.trend:last-child{border-bottom:0}
.trend-img{width:72px;height:72px;flex-shrink:0;border-radius:12px;overflow:hidden;background:var(--tint)}
.trend-img img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.trend:hover .trend-img img{transform:scale(1.06)}
.trend-txt{display:flex;flex-direction:column;gap:3px;min-width:0}
.trend-cat{font-size:11px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:var(--accent-ink)}
.trend-title{font-size:14px;font-weight:700;line-height:1.35;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* Inline comments */
.link-btn{border:0;background:none;padding:0;color:var(--soft);font-size:13px;cursor:pointer;min-height:24px}
.link-btn:hover{color:var(--accent-ink);text-decoration:underline}
.cbox{border-top:1px solid var(--line);padding-top:14px;display:flex;flex-direction:column;gap:12px}
.cbox[hidden],.cbox-login[hidden],.cbox-form[hidden]{display:none}
.cbox-login{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.fb-btn{height:44px;display:inline-flex;align-items:center;gap:10px;padding:0 18px;border:0;border-radius:10px;background:#1877f2;color:#fff;font-weight:700;font-size:14px;cursor:pointer}
.fb-btn:hover{background:#0f63d0}
.fb-btn:disabled{background:#9db8dd;cursor:not-allowed}
.cbox-form{display:flex;flex-direction:column;gap:8px}
.cbox-me{display:flex;align-items:center;gap:8px;font-size:14px}
.cbox-me .link-btn{margin-left:auto}
.cbox-row{display:flex;gap:8px;align-items:flex-end}
.cbox-row textarea{flex:1;min-width:0;min-height:48px;max-height:180px;resize:vertical;border:1px solid #cdd9ea;border-radius:12px;padding:12px 14px;font:inherit;font-size:15px;color:var(--ink);background:#f8fafd}
.cbox-row textarea:focus{outline:none;border-color:var(--accent);background:#fff;box-shadow:0 0 0 3px #d4e6fb}
.cbox-send{height:48px;padding:0 20px;border:0;border-radius:12px;background:var(--accent);color:#fff;font-weight:700;cursor:pointer}
.cbox-send:disabled{opacity:.6}
.cbox-msg{font-size:13px;color:#b42318;min-height:0}
.cbox-msg:empty{display:none}
.cbox-msg.ok{color:#067647}
.clist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;max-height:420px;overflow-y:auto}
.citem{display:flex;gap:10px;align-items:flex-start}
.cav{width:34px;height:34px;flex-shrink:0;border-radius:50%;object-fit:cover;background:var(--tint);color:var(--accent-ink);font-weight:800;font-size:14px;display:flex;align-items:center;justify-content:center}
.cbubble{background:var(--bg);border-radius:4px 14px 14px 14px;padding:8px 12px;min-width:0}
.cbubble strong{font-size:14px}
.cbubble time{font-size:12px;color:var(--soft);margin-left:8px}
.cbubble p{margin:2px 0 0;font-size:14px;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
.cloading,.cbox-empty{font-size:14px;color:var(--soft);margin:0}
.cbox-all{font-size:13px;font-weight:600;color:var(--accent-ink);align-self:flex-start}
.card-dark{background:var(--navy);color:#fff;gap:10px}
.card-dark label{font-size:14px;color:#c9d6f2}
.nl-form{display:flex;flex-direction:column;gap:10px}
.nl-form input[type=email]{height:46px;border:0;border-radius:12px;padding:0 14px;font:inherit;font-size:15px}
.nl-form button{height:46px;border:0;border-radius:12px;background:#fff;color:var(--navy);font-weight:800;cursor:pointer}
.nl-form button:hover{background:#e3ebf6}
.nl-msg{margin:0;font-size:14px;color:#ffd7d7}
.nl-ok{color:#bff0d2;font-weight:600}
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.eyebrow{font-size:12px;font-weight:800;letter-spacing:1.5px;color:var(--accent-ink)}
.card-text{margin:0 0 8px;font-size:14px;line-height:1.55;color:var(--muted)}
.btn-outline{height:44px;display:flex;align-items:center;justify-content:center;border-radius:12px;border:2px solid var(--navy);font-weight:700;font-size:14px}
.btn-outline:hover{background:var(--navy);color:#fff}
.mini-foot{font-size:13px;color:var(--soft);display:flex;flex-wrap:wrap;gap:8px 14px;padding:0 6px}
.mini-foot a{color:var(--soft)}

/* Toast */
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:var(--navy);color:#fff;padding:12px 20px;border-radius:24px;font-size:14px;font-weight:600;opacity:0;pointer-events:none;transition:.25s;z-index:50}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* Tablet: sidebar moves below the feed */
@media (max-width:1180px){
  .layout{flex-wrap:wrap}
  .side{flex:1 1 100%;position:static;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));align-items:start}
  .mini-foot{grid-column:1/-1}
  .feed{flex:1 1 400px}
}
/* Phone: categories become a scrolling chip row */
@media (max-width:860px){
  .layout{padding:14px 12px 32px;gap:16px}
  .cats{flex:1 1 100%;position:static;flex-direction:row;overflow-x:auto;gap:8px;padding-bottom:4px;scrollbar-width:none}
  .cats::-webkit-scrollbar{display:none}
  .cat{flex:0 0 auto;background:#fff;min-height:44px;padding:6px 14px 6px 6px;border-radius:22px;font-size:14px}
  .cat-ic{width:32px;height:32px;border-radius:50%;background:var(--bg)}
  .feed{flex:1 1 100%;max-width:none}
  .topbar-in{padding:10px 12px;gap:10px}
  .search{order:3;flex:1 1 100%}
  .post{padding:16px;border-radius:16px}
  .post-title{font-size:19px}
  .post-ex{font-size:15px}
  .act{font-size:13px;gap:6px}
  .follow{display:none}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
