:root{
  --bg:#0d0d0f; --card:#18181d; --text:#e8e8ea; --muted:#b9b9bd; --line:rgba(255,255,255,0.08);
  --primary:#ff2d55;
  --opinion:#f472b6; --news:#60a5fa; --events:#22c55e; --education:#f59e0b; --culture:#a78bfa; --advocacy:#ef4444; --articles:#14b8a6; --story:#ef4444;
  --radius:18px; --shadow:0 10px 30px rgba(0,0,0,0.35);
}

/* Base */
html, body{
  background: radial-gradient(1200px 800px at 10% 0%, rgba(255,45,85,0.08), transparent), var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
*{ -webkit-tap-highlight-color: transparent; }
body.modal-open{ overflow: hidden; height: 100vh; }

/* Hero */
.blog-hero{ padding: clamp(24px, 6vw, 64px) 20px 10px; text-align: center; }
.hero-kicker{ font-weight:700; font-size:.8rem; text-transform: uppercase; color: var(--muted); }
.hero-title{ margin:14px auto 10px; font-size: clamp(28px, 4.5vw, 48px); font-weight: 800; }
.hero-sub{ color: var(--muted); max-width: 760px; margin:10px auto 18px; font-size:1rem; }

/* Layout */
.blog-layout{
  display:grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap:26px;
  max-width:1100px;
  margin:8px auto 60px;
  padding:0 20px;
}
@media (max-width:900px){
  .blog-layout{ grid-template-columns:1fr; }
  .sidebar .sticky{ position: static; }
}

/* Cards */
.post-card{
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow);
  position: relative; margin-bottom:18px;
}
.card-link{ display:block; text-decoration:none; color:inherit; cursor:pointer; touch-action:manipulation; }
.post-card .cover{ position:relative; display:block; overflow:hidden; }
.post-card .cover img{ width:100%; height:260px; object-fit:cover; transition: transform .4s ease; display:block; }
.post-card:hover .cover img{ transform: scale(1.06); }
.post-card .cover .gradient{ position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.6)); }
.badge{ position:absolute; top:12px; left:12px; padding:6px 10px; border-radius:999px; font-size:.78rem; font-weight:700; color:#fff; }
.badge-cat.opinion{ background:var(--opinion); }
.badge-cat.news{ background:var(--news); }
.badge-cat.events{ background:var(--events); }
.badge-cat.education{ background:var(--education); color:#111; }
.badge-cat.culture{ background:var(--culture); }
.badge-cat.advocacy{ background:var(--advocacy); }
.badge-cat.articles{ background:var(--articles); }
.badge-cat.story{ background:var(--story); color:#111; }

.post-card .content{ padding:16px; }
.post-card .title{ font-size:20px; font-weight:800; margin-bottom:6px; }
.post-card .excerpt{ color:var(--muted); font-size:.95rem; margin-bottom:10px; }
.post-card .meta{ display:flex; gap:14px; flex-wrap:wrap; color:#c7c7cb; font-size:.86rem; }
.post-card .meta i{ margin-right:6px; }

/* Share button on card */
.share-btn{
  background:rgba(0,0,0,0.6);
  border:none;
  color:#fff;
  cursor:pointer;
  padding:8px;
  border-radius:50%;
  position:absolute;
  top:12px;
  right:12px;
  font-size:1rem;
}

/* Sidebar */
.sidebar .card{ background:rgba(24,24,29,0.85); border:1px solid var(--line); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); margin-bottom:16px; }
.card-title{ margin-bottom:8px; font-size:1rem; font-weight:800; }
.cat-list{ list-style:none; padding:0; margin:0; }
.cat-list a{ color:var(--text); text-decoration:none; display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:10px; }
.cat-list a:hover{ background: rgba(255,255,255,0.05); }
.dot{ width:10px; height:10px; border-radius:50%; display:inline-block; }
.dot.opinion{ background:var(--opinion); }
.dot.news{ background:var(--news); }
.dot.events{ background:var(--events); }
.dot.education{ background:var(--education); }
.dot.culture{ background:var(--culture); }
.dot.advocacy{ background:var(--advocacy); }
.dot.articles{ background:var(--articles); }
.dot.story{ background:var(--story); }

/* Animation */
@keyframes rise { from { transform: translateY(12px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.animate-up{ animation: rise .6s ease both; }

/* Modal */
.modal-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 9990;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.modal-backdrop.show{ opacity: 1; pointer-events: auto; }

.article-modal{
  position: fixed;
  top:50%; left:50%;
  transform: translate(-50%, -50%);
  background: var(--card); color: var(--text);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 700px;
  width: min(92vw, 700px);
  max-height: 82vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 10000;
}
.article-modal .close-article{
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
}
.article-modal .share-btn{
  position:static;
  background:var(--primary);
  color:#fff;
  border-radius:8px;
  margin:0 0 12px 8px;
  padding:6px 12px;
}

@media (max-width:900px){
  .article-modal{ padding: 16px; max-height: 88vh; }
}

/* ✅ Navbar Fix - Always On Top */
header, .navbar, .nav-menu, .nav-bg {
  position: relative;
  z-index: 99999 !important;
}

.nav-menu {
  z-index: 10000 !important; /* pehle 1000 tha */
}

@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }

  .logo-section {
    width: 100%;
    justify-content: center;
    text-align: center;
    margin-bottom: 15px;
  }

  .navbar {
    position: fixed;
    top:100%;
    left: 0;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1000px);
    z-index: 9999;
    padding: 0.5rem 4%;
    display: none;
    justify-content: space-between;
  }

  .nav-menu {
    position: fixed;
    top: 120px;
    left: -100%;
    width: 80%;
    max-width: 300px;
    background: #fff;
    flex-direction: column;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
    padding: 20px 0;
    z-index: 10000; /* 👈 updated */
  }
  
  .nav-menu.active {
    left: 0;
  }

  .navbar.active {
    display: block;
  }

  .navbar a {
    display: block;
    margin: 1.5rem 0;
    color: black;
  }

  .nav-bg {
    position: fixed;
    top: 0px;
    left: 0;
    width: 100%;
    height: 435px;
    background: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 9998;
    display: none;
  }

  .nav-bg.active {
    display: block;
  }
}
