/* ==========================================================
   KhabriChachi.com — Frontend Stylesheet
   ========================================================== */
:root {
    --brand: #d21f3c;
    --brand-dark: #a3172e;
    --ink: #1a1a1a;
    --gray-700: #444;
    --gray-500: #777;
    --gray-200: #e5e7eb;
    --gray-100: #f4f5f7;
    --bg: #ffffff;
    --font: 'Georgia', 'Noto Sans Devanagari', serif;
    --font-sans: 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Top utility bar ---------- */
.utility-bar {
    background: var(--ink); color: #ddd; font-size: 12px;
}
.utility-bar .container { display:flex; justify-content:space-between; align-items:center; height:32px; }
.utility-bar a { color:#ddd; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--gray-200); background:#fff; position:sticky; top:0; z-index:100; }
.header-inner { display:flex; align-items:center; justify-content:space-between; padding:14px 0; }
.logo { font-size: 26px; font-weight: 800; letter-spacing:-0.5px; }
.logo span { color: var(--brand); }
.header-actions { display:flex; align-items:center; gap:14px; }
.subscribe-btn {
    background: var(--brand); color:#fff; padding:8px 16px; border-radius:20px; font-size:13px; font-weight:600; border:none; cursor:pointer;
}
.menu-toggle { display:none; background:none; border:none; font-size:24px; cursor:pointer; }

/* ---------- Nav ---------- */
.main-nav { background: var(--ink); }
.main-nav ul { list-style:none; display:flex; }
.main-nav > .container > ul { display:flex; }
.main-nav li { position:relative; }
.main-nav > .container > ul > li > a {
    display:block; color:#fff; padding:13px 18px; font-size:14px; font-weight:600; text-transform:uppercase; letter-spacing:.03em;
}
.main-nav > .container > ul > li:hover > a,
.main-nav > .container > ul > li.active > a { background: var(--brand); }
.main-nav .dropdown {
    display:none; position:absolute; top:100%; left:0; background:#fff; min-width:220px;
    box-shadow:0 8px 20px rgba(0,0,0,.15); border-radius:0 0 8px 8px; z-index:50;
}
.main-nav li:hover .dropdown { display:block; }
.main-nav .dropdown a { display:block; padding:11px 18px; color:#333; font-size:13px; font-weight:500; text-transform:none; border-bottom:1px solid #f0f0f0; }
.main-nav .dropdown a:hover { background:var(--gray-100); color:var(--brand); }

/* ---------- Trending Ticker ---------- */
.trending-ticker {
    background: #fff3f0; border-bottom: 1px solid var(--gray-200);
    display:flex; align-items:center; overflow:hidden; height:42px;
}
.trending-label {
    background: var(--brand); color:#fff; font-size:12px; font-weight:700; text-transform:uppercase;
    padding: 0 16px; height:100%; display:flex; align-items:center; flex-shrink:0; white-space:nowrap;
}
.ticker-track-wrap { overflow:hidden; flex:1; height:100%; display:flex; align-items:center; }
.ticker-track { display:flex; white-space:nowrap; animation: scrollTicker 40s linear infinite; }
.ticker-track a { padding:0 32px; font-size:13.5px; color:#333; font-weight:500; }
.ticker-track a:hover { color:var(--brand); }
@keyframes scrollTicker { 0% { transform:translateX(0); } 100% { transform:translateX(-50%); } }

/* ---------- Hero / Featured section ---------- */
.hero-section { padding: 24px 0; }
.hero-grid { display:grid; grid-template-columns: 2fr 1fr; gap:20px; }
.hero-main { position:relative; border-radius:10px; overflow:hidden; height:420px; }
.hero-main img { width:100%; height:100%; object-fit:cover; }
.hero-main .overlay {
    position:absolute; bottom:0; left:0; right:0; padding:24px;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.hero-main .cat-tag { background:var(--brand); color:#fff; font-size:11px; font-weight:700; text-transform:uppercase; padding:3px 10px; border-radius:3px; }
.hero-main h1 { color:#fff; font-size:26px; margin-top:10px; line-height:1.3; font-family:var(--font); }
.hero-main .meta { color:#ddd; font-size:12px; margin-top:8px; }

.hero-side { display:flex; flex-direction:column; gap:16px; }
.hero-side-item { display:flex; gap:12px; }
.hero-side-item img { width:100px; height:70px; object-fit:cover; border-radius:6px; flex-shrink:0; }
.hero-side-item .cat-tag-sm { color:var(--brand); font-size:11px; font-weight:700; text-transform:uppercase; }
.hero-side-item h3 { font-size:14px; line-height:1.35; margin-top:3px; }
.hero-side-item h3:hover { color:var(--brand); }

/* ---------- Section headers ---------- */
.section { padding: 28px 0; border-top:1px solid var(--gray-200); }
.section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.section-head h2 { font-size:20px; font-weight:800; border-left:5px solid var(--brand); padding-left:10px; }
.section-head a.view-all { font-size:13px; font-weight:600; color:var(--brand); }

/* ---------- Article grid / cards ---------- */
.article-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.article-card img { width:100%; height:150px; object-fit:cover; border-radius:8px; margin-bottom:10px; }
.article-card .cat-tag-sm { color:var(--brand); font-size:11px; font-weight:700; text-transform:uppercase; }
.article-card h3 { font-size:14.5px; line-height:1.35; margin-top:5px; }
.article-card h3:hover { color:var(--brand); }
.article-card .meta { font-size:11.5px; color:var(--gray-500); margin-top:6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color:#ccc; padding:40px 0 20px; margin-top:30px; }
.footer-grid { display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; gap:30px; }
.footer-grid h4 { color:#fff; font-size:14px; margin-bottom:14px; text-transform:uppercase; letter-spacing:.04em; }
.footer-grid ul { list-style:none; }
.footer-grid li { margin-bottom:9px; font-size:13.5px; }
.footer-grid a:hover { color:var(--brand); }
.footer-about p { font-size:13px; line-height:1.7; color:#aaa; margin-bottom:14px; }
.footer-subscribe input { width:100%; padding:9px 10px; border-radius:5px; border:none; margin-bottom:8px; font-size:13px; }
.footer-subscribe button { width:100%; padding:9px; background:var(--brand); color:#fff; border:none; border-radius:5px; font-weight:600; cursor:pointer; font-size:13px; }
.footer-bottom { text-align:center; font-size:12.5px; color:#888; margin-top:30px; padding-top:20px; border-top:1px solid #2a2a2a; }

/* ---------- Article page ---------- */
.article-page { padding: 26px 0; }
.article-header .cat-tag { background:var(--brand); color:#fff; font-size:11px; font-weight:700; text-transform:uppercase; padding:4px 10px; border-radius:3px; display:inline-block; }
.article-header h1 { font-family: var(--font); font-size:32px; line-height:1.3; margin:14px 0 10px; }
.article-header .excerpt { font-size:16px; color:var(--gray-700); margin-bottom:14px; }
.article-header .byline { display:flex; align-items:center; gap:14px; font-size:13px; color:var(--gray-500); padding-bottom:16px; border-bottom:1px solid var(--gray-200); margin-bottom:20px; }
.article-featured-img { width:100%; max-height:480px; object-fit:cover; border-radius:8px; margin-bottom:24px; }
.article-body { font-family: var(--font); font-size:17.5px; line-height:1.85; max-width: 760px; color:#222; }
.article-body h2 { font-size:24px; margin:28px 0 12px; font-family: var(--font-sans); }
.article-body h3 { font-size:20px; margin:22px 0 10px; font-family: var(--font-sans); }
.article-body p { margin-bottom:18px; }
.article-body img { border-radius:8px; margin:20px 0; }
.article-body blockquote { border-left:4px solid var(--brand); padding-left:16px; color:#555; font-style:italic; margin:20px 0; }
.article-body a { color: var(--brand); text-decoration:underline; }

.share-bar { display:flex; gap:10px; margin:26px 0; }
.share-bar a { background:var(--gray-100); padding:8px 16px; border-radius:20px; font-size:13px; font-weight:600; }
.share-bar a:hover { background:var(--brand); color:#fff; }

.related-articles { margin-top: 40px; }

/* ---------- Comments ---------- */
.comments-section { margin-top:40px; max-width:760px; }
.comment-form textarea, .comment-form input {
    width:100%; padding:11px; border:1px solid var(--gray-200); border-radius:6px; margin-bottom:12px; font-size:14px; font-family:inherit;
}
.comment-form button { background:var(--brand); color:#fff; border:none; padding:11px 22px; border-radius:6px; font-weight:600; cursor:pointer; }
.comment-item { padding:16px 0; border-bottom:1px solid var(--gray-200); }
.comment-item .c-name { font-weight:700; font-size:14px; }
.comment-item .c-date { font-size:12px; color:var(--gray-500); margin-left:8px; }
.comment-item .c-text { font-size:14.5px; margin-top:6px; color:#333; }

/* ---------- Category page ---------- */
.category-header { padding: 24px 0 10px; }
.category-header h1 { font-size:26px; }
.category-header .breadcrumb { font-size:13px; color:var(--gray-500); margin-bottom:10px; }
.category-header .breadcrumb a:hover { color:var(--brand); }

/* ---------- Subscribe modal ---------- */
.modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:200; align-items:center; justify-content:center; }
.modal-overlay.open { display:flex; }
.modal-box { background:#fff; border-radius:10px; padding:30px; width:100%; max-width:380px; text-align:center; position:relative; }
.modal-box h3 { font-size:19px; margin-bottom:8px; }
.modal-box p { font-size:13.5px; color:var(--gray-500); margin-bottom:18px; }
.modal-box input { width:100%; padding:11px; border:1px solid var(--gray-200); border-radius:6px; margin-bottom:12px; }
.modal-box button { width:100%; padding:11px; background:var(--brand); color:#fff; border:none; border-radius:6px; font-weight:600; cursor:pointer; }
.modal-close { position:absolute; top:10px; right:14px; font-size:20px; cursor:pointer; color:#999; }

/* ---------- Push notification prompt ---------- */
.push-prompt {
    position:fixed; bottom:20px; right:20px; background:#fff; border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.18);
    padding:16px 18px; max-width:280px; z-index:150; display:none;
}
.push-prompt.show { display:block; }
.push-prompt h4 { font-size:14px; margin-bottom:6px; }
.push-prompt p { font-size:12.5px; color:var(--gray-500); margin-bottom:12px; }
.push-prompt .actions { display:flex; gap:8px; }
.push-prompt button { flex:1; padding:8px; border-radius:6px; font-size:12.5px; font-weight:600; cursor:pointer; border:none; }
.push-prompt .allow { background:var(--brand); color:#fff; }
.push-prompt .deny { background:var(--gray-100); color:#333; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns:1fr; }
    .article-grid { grid-template-columns:repeat(2,1fr); }
    .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 640px) {
    .menu-toggle { display:block; }
    .main-nav { display:none; }
    .main-nav.open { display:block; }
    .main-nav > .container > ul { flex-direction:column; }
    .main-nav .dropdown { position:static; box-shadow:none; display:none !important; }
    .main-nav li.open .dropdown { display:block !important; }
    .article-grid { grid-template-columns:1fr 1fr; }
    .hero-main { height:300px; }
    .hero-main h1 { font-size:20px; }
    .footer-grid { grid-template-columns:1fr; }
    .article-header h1 { font-size:24px; }
    .article-body { font-size:16px; }
}
