/* styles-v20.css — Pulse Sidebar Theme v20
   ✅ Based on V19 logic, NEW THEME + LEFT SIDEBAR NAV
   ✅ Desktop: fixed left sidebar
   ✅ Mobile: topbar + hamburger opens sidebar drawer
*/

:root{
  /* THEME */
  --primary:#5b5dff;       /* Indigo */
  --primary2:#8a4dff;      /* Purple */
  --primaryDark:#3b3dd6;

  --bg:#f7f8fc;
  --ink:#111827;
  --muted:#667085;

  --card:#ffffff;
  --border:#e7e7ef;

  --radius:12px;
  --radius2:14px;
  --shadow: 0 14px 34px rgba(17,24,39,.10);

  --shell: 1480px;

  /* SIDEBAR */
  --sideW: 280px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--ink);
  background: 
              linear-gradient(180deg, #f7f8fc, #f4f5fb);
  background-attachment: fixed;
  overflow-x:hidden;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
.lock{ overflow:hidden; }

.container{
  width:min(var(--shell), calc(100% - 32px));
  margin:0 auto;
  padding:24px 0 46px;
}

/* ======================================================
   Desktop Sidebar Layout
====================================================== */
.page{
  display:flex;
  min-height:100vh;
}

/* Fixed sidebar (desktop) */
.sidebar{
  width:var(--sideW);
  flex:0 0 var(--sideW);
  background: linear-gradient(180deg, #0f172a, #101a33);
  color:#fff;
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  z-index:50;
  border-right:1px solid rgba(255,255,255,.06);
}

.sidebar__inner{
  height:100%;
  overflow:auto;
  padding:16px 14px;
}

.sidebar__brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px 12px;
  border-radius:14px;
  background: rgba(255,255,255,.06);
}

.sidebar__brand img{
  width:38px;
  height:38px;
  border-radius:12px;
  object-fit:cover;
  background:#fff;
  padding:2px;
}

.sidebar__name{
  font-weight:900;
  letter-spacing:.2px;
  font-size:16px;
  line-height:1.1;
}

.sidebar__tag{
  font-size:12px;
  color:rgba(255,255,255,.72);
  margin-top:2px;
}

.sidebar__search{
  display:flex;
  gap:8px;
  margin:14px 6px 10px;
}

.sidebarInput{
  flex:1;
  height:40px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  padding:0 12px;
  outline:none;
  background: rgba(255,255,255,.06);
  color:#fff;
}

.sidebarInput::placeholder{ color: rgba(255,255,255,.55); }

.sidebarGo{
  height:40px;
  border:0;
  border-radius:12px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:#fff;
  font-weight:900;
  padding:0 12px;
  cursor:pointer;
}

.sidebarNav{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:6px;
}

.sideLink{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  font-weight:800;
  color:rgba(255,255,255,.92);
  background: transparent;
}

.sideLink:hover{
  background: rgba(255,255,255,.08);
}

.sideLink__pill{
  font-size:11px;
  background: rgba(255,255,255,.10);
  padding:3px 8px;
  border-radius:999px;
  color:rgba(255,255,255,.75);
  font-weight:800;
}

/* Category list */
.sidebarCats{
  margin:12px 6px 0;
  border-top:1px solid rgba(255,255,255,.12);
  padding-top:12px;
}

.sidebarCats__title{
  font-weight:900;
  font-size:13px;
  opacity:.9;
  margin:0 0 10px;
  padding:0 6px;
}

.sidebarCats a{
  display:block;
  padding:8px 10px;
  border-radius:12px;
  font-weight:700;
  color:rgba(255,255,255,.85);
  opacity:.92;
}

.sidebarCats a:hover{
  background: rgba(255,255,255,.08);
}

/* Main content pushed right */
.main{
  flex:1;
  margin-left:var(--sideW);
  min-width:0;
}

/* ======================================================
   Mobile Topbar + Sidebar Drawer
====================================================== */
.mobileTopbar{
  display:none;
  position:sticky;
  top:0;
  z-index:60;
  background: linear-gradient(135deg, #0f172a, #101a33);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.mobileTopbar__inner{
  width:min(var(--shell), calc(100% - 22px));
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  color:#fff;
}

.mobileBrand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
}

.mobileBrand img{
  width:34px;
  height:34px;
  border-radius:12px;
  object-fit:cover;
  background:#fff;
  padding:2px;
}

.burger{
  width:44px;
  height:38px;
  border:0;
  background:transparent;
  cursor:pointer;
}
.burger span{
  display:block;
  height:2px;
  background:#fff;
  margin:6px 0;
  border-radius:999px;
}

/* overlay */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition:.18s ease;
  z-index:80;
}
.overlay.open{
  opacity:1;
  pointer-events:auto;
}

/* drawer (mobile sidebar) */
.drawer{
  position:fixed;
  left:-340px;
  top:0;
  height:100%;
  width:340px;
  background: linear-gradient(180deg, #0f172a, #101a33);
  color:#fff;
  z-index:90;
  box-shadow: 18px 0 40px rgba(0,0,0,.28);
  transition:.22s ease;
  overflow:auto;
  padding:14px;
}
.drawer.open{ left:0; }

.drawer__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.drawer__title{
  font-weight:900;
  font-size:16px;
}
.drawer__close{
  width:38px;
  height:38px;
  border:0;
  border-radius:12px;
  background: rgba(255,255,255,.10);
  color:#fff;
  cursor:pointer;
  font-size:22px;
  line-height:0;
}

/* ======================================================
   Hero (home)
====================================================== */
.hero{
  background:
    radial-gradient(circle at 18% 18%, rgba(59,130,246,.18), transparent 58%),
    radial-gradient(circle at 88% 12%, rgba(14,165,233,.14), transparent 60%),
    linear-gradient(180deg, #ffffff, #35a59b);
  background-size:cover;
  background-position:center;
  min-height:210px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid rgba(17,24,39,.06);
}

.hero__inner{
  width:min(var(--shell), calc(100% - 32px));
  padding:34px 0;
  text-align:center;
}

.hero__logoRow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:10px 18px;
  background: rgba(255,255,255,.92);
  border-radius:999px;
  box-shadow: 0 16px 34px rgba(17,24,39,.14);
}

.hero__logo{
  width:38px;
  height:38px;
  border-radius:12px;
  object-fit:cover;
}

.hero__name{
  font-size:36px;
  font-weight:900;
  letter-spacing:.2px;
}

.hero__search{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:16px;
}

.searchInput{
  width:min(560px, 100%);
  height:46px;
  border-radius:999px;
  border:1px solid rgba(17,24,39,.08);
  padding:0 18px;
  outline:none;
  font-size:15px;
  background:#fff;
  box-shadow: 0 14px 30px rgba(17,24,39,.10);
}
.searchBtn{
  width:46px;
  height:46px;
  border-radius:50%;
  border:0;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  box-shadow: 0 14px 30px rgba(17,24,39,.12);
}
.searchBtn svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:#fff;
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* ======================================================
   Home layout
====================================================== */
.homeLayout{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:26px;
  align-items:start;
}
.homeSide{
    position:sticky;
  top:22px;
}
.homeSide .sideSticky{
  position:sticky;
  top:22px;
}

/* Featured row */
.featuredRow{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:18px;
  margin-top:12px;
}

.fCard{
  background:var(--card);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  border:1px solid rgba(17,24,39,.06);
}
.fCard__media{ position:relative; display:block; }
.fCard__media img{
  width:100%;
  height:190px;
  object-fit:cover;
}
.fCard__cat{
  position:absolute;
  right:12px;
  top:12px;
  background: rgba(255,255,255,.92);
  color:#111827;
  font-weight:900;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  text-transform:lowercase;
}

.fCard__body{ padding:12px 14px 14px; }
.fCard__meta{
  display:flex;
  justify-content:flex-end;
  color:#6b7280;
  font-size:12px;
  margin-bottom:6px;
}
.fCard__title{
  display:block;
  font-weight:900;
  font-size:17px;
  line-height:1.2;
}

/* Sections */
.sectionBlock{ margin-top:20px; }
.sectionHead{
  display:flex;
  align-items:end;
  justify-content:space-between;
  margin-bottom:10px;
}
.sectionHead h2{
  margin:0;
  font-size:22px;
  font-weight:900;
}
.sectionMore{
  font-weight:900;
  color:var(--primaryDark);
}

.gridCards{ display:grid; gap:18px; }
.gridCards--sections{ grid-template-columns: repeat(2, 1fr); }

.sCard{
  position:relative;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  background: var(--card);
  border:1px solid rgba(17,24,39,.06);
}
.sCard__media{ display:block; position:relative; }
.sCard__media img{
  width:100%;
  height:240px;
  object-fit:cover;
}
.sCard__cat{
  position:absolute;
  right:12px;
  top:12px;
  background: rgba(17,24,39,.65);
  color:#fff;
  font-weight:900;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  text-transform:lowercase;
}

/* overlay content box */
.sCard__box{
  position:absolute;
  left:16px;
  right:16px;
  bottom:16px;
  background: rgba(255,255,255,.92);
  border-radius:14px;
  padding:12px;
  box-shadow: 0 18px 42px rgba(17,24,39,.22);
}
.sCard__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.sCard__catInline{
  font-weight:900;
  font-size:12px;
  color:var(--primaryDark);
  text-transform:lowercase;
}
.sCard__title{
  display:block;
  font-weight:900;
  font-size:16px;
  line-height:1.25;
  margin-bottom:6px;
}
.sCard__excerpt{
  font-size:13px;
  line-height:1.35;
  color:#4b5563;
}

/* Sidebar (Trending / Recent) */
.sideTitle, .sideTitleClean{
  font-size:18px;
  font-weight:900;
  margin-bottom:12px;
}

.sidePlainList{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.recentItem{
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.recentItem__img{
  width:56px;
  height:56px;
  flex:0 0 56px;
  border-radius:14px;
  object-fit:cover;
  object-position:center;
  background:#e5e7eb;
}

.recentItem__title{
  font-weight:900;
  font-size:13px;
  line-height:1.15;
  color:#111827;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.recentItem__meta{
  font-size:12px;
  color:#6b7280;
}

/* Breadcrumbs */
.crumbs{
  display:flex;
  align-items:center;
  gap:8px;
  color:#6b7280;
  font-size:13px;
  margin-bottom:12px;
}
.crumbs a{ color:#6b7280; }
.crumbs a:hover{ text-decoration:underline; }

/* Category page layouts */
.twoCol{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:26px;
  align-items:start;
}
.gridMain{ min-width:0; }

.sideBoxClean{
  position:sticky;
  top:22px;
  align-self:start;
}

.catTop__title{
  margin:0;
  font-size:34px;
  font-weight:900;
}

/* Pagination */
.pg{
  display:flex;
  gap:10px;
  justify-content:center;
  margin:22px 0 10px;
}
.pg__link{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  font-weight:900;
  border:1px solid rgba(17,24,39,.10);
  background:#fff;
}
.pg__link--active{
  border-color:var(--primaryDark);
  color:var(--primaryDark);
}

/* Article page clean */
.articleLayout{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:28px;
  align-items:start;
}

.articleClean{
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
  border-radius:0;
}

.articleCat{
  display:inline-block;
  font-weight:900;
  font-size:12px;
  color:var(--primaryDark);
  text-transform:uppercase;
  letter-spacing:.6px;
}

.articleTitleClean{
  margin:0;
  font-size:38px;
  font-weight:900;
  line-height:1.05;
}

.articleMetaClean{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:12px;
  color:#6b7280;
  font-size:13px;
}
.articleMetaClean .sep{ opacity:.5; }

.copyBtn{
  border:1px solid rgba(17,24,39,.10);
  background:#fff;
  padding:8px 14px;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
}

.articleHeroClean{ margin-top:16px; }
.articleHeroClean img{
  width:100%;
  height:420px;
  max-height:420px;
  object-fit:cover;
  object-position:center;
  border-radius:14px;
  box-shadow: 0 18px 44px rgba(17,24,39,.16);
}

.articleContentClean{
  margin-top:18px;
  font-size:16px;
  line-height:1.75;
  color:#202532;
}
.articleContentClean h2{
  margin:22px 0 10px;
  font-size:24px;
  font-weight:900;
}
.articleContentClean p{ margin:0 0 14px; }

/* Right sidebar slider */
.articleSide{
  position:sticky;
  top:22px;
  align-self:start;
}

.sideSlider{
  background:transparent;
  border:0;
  box-shadow:none;
  border-radius:0;
  padding:0;
  margin-bottom:18px;
}

.sideSlider__nav{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-bottom:10px;
}
.sideSlider__btn{
  width:34px;
  height:34px;
  border:1px solid rgba(17,24,39,.12);
  background:#fff;
  border-radius:12px;
  cursor:pointer;
  font-size:18px;
  line-height:0;
}

.sideSlider__media{
  display:block;
  border-radius:14px;
  overflow:hidden;
  box-shadow: 0 12px 26px rgba(17,24,39,.12);
}
.sideSlider__media img{
  width:100%;
  height:190px;
  object-fit:cover;
}

.sideSlider__body{ padding:12px 0 0; }
.sideSlider__title{
  font-weight:900;
  font-size:15px;
  line-height:1.2;
  margin-bottom:10px;
}
.sideSlider__more{
  display:inline-block;
  padding:9px 12px;
  border:1px solid rgba(17,24,39,.12);
  border-radius:12px;
  font-weight:900;
  font-size:11px;
  letter-spacing:.7px;
  text-transform:uppercase;
  background:#fff;
}

.sideSlider__dots{
  display:flex;
  justify-content:center;
  gap:6px;
  padding:12px 0 6px;
}
.dot{
  width:7px;
  height:7px;
  border-radius:50%;
  border:0;
  background:#d1d5db;
  cursor:pointer;
}
.dot--on{ background: var(--primary); }

/* Recent posts on article page */
.sideRecent{ margin-top:12px; }
.sideRecent__title{
  font-weight:900;
  font-size:15px;
  margin-bottom:12px;
  border-top:1px solid rgba(17,24,39,.08);
  padding-top:12px;
}

/* Search page */
.searchBox{
  text-align:center;
  padding:18px 0 14px;
}
.searchBox h1{ margin:0 0 6px; font-weight:900; }
.searchBox p{ margin:0; color:#6b7280; }

.searchRow{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:12px;
}

.resultsHead{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:10px;
  margin:10px 0 12px;
}
.resultsTitle{ font-weight:900; font-size:18px; }
.resultsInfo{ color:#6b7280; font-size:13px; }

/* Static pages box */
.staticBox{
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:16px;
  box-shadow: var(--shadow);
  padding:18px;
}
.staticBox h1{
  margin:0 0 12px;
  font-weight:900;
  font-size:30px;
}

/* Footer */
.footer{
  border-top:1px solid rgba(17,24,39,.08);
  margin-top:28px;
}
.footer__inner{
  width:min(var(--shell), calc(100% - 32px));
  margin:0 auto;
  padding:22px 0;
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  justify-content:space-between;
  align-items:center;
}
.footer__brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.footer__brand img{
  width:38px;
  height:38px;
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(17,24,39,.10);
  padding:3px;
}
.footer__name{ font-weight:900; }
.footer__sub{ color:#6b7280; font-size:13px; }
.footer__links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  color:#374151;
  font-weight:800;
  font-size:14px;
}
.footer__copy{
  width:100%;
  color:#6b7280;
  font-size:13px;
  margin-top:6px;
}

/* Back to top bubble */
.toTop{
  position:fixed;
  right:18px;
  bottom:18px;
  width:46px;
  height:46px;
  border-radius:50%;
  border:0;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:#fff;
  display:grid;
  place-items:center;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transition:.2s ease;
  box-shadow:0 16px 34px rgba(17,24,39,.22);
  z-index:100;
}
.toTop.show{
  opacity:1;
  pointer-events:auto;
}
.toTop svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:#fff;
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Autocomplete */
.acBox{
  position:absolute;
  background:#fff;
  border:1px solid rgba(17,24,39,.10);
  border-radius:14px;
  box-shadow: 0 20px 44px rgba(17,24,39,.18);
  overflow:hidden;
  z-index:999;
}
.acItem{
  width:100%;
  text-align:left;
  border:0;
  background:#fff;
  padding:10px 12px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.acItem:hover{ background:#f3f4f6; }
.acItem__title{ font-weight:900; font-size:13px; }
.acItem__cat{ color:#6b7280; font-size:12px; }

/* ======================================================
   Responsive
====================================================== */
@media (max-width: 980px){
  /* switch to mobile topbar + drawer */
  .sidebar{ display:none; }
  .main{ margin-left:0; }
  .mobileTopbar{ display:block; }

  .homeLayout,
  .twoCol,
  .articleLayout{
    grid-template-columns:1fr;
  }

  .featuredRow{ grid-template-columns:1fr; }
  .gridCards--sections{ grid-template-columns:1fr; }

  .homeSide .sideSticky,
  .sideBoxClean,
  .articleSide{
    position:relative;
    top:auto;
  }
}

@media (max-width: 520px){
  .hero__name{ font-size:28px; }
  .articleTitleClean{ font-size:30px; }
  .sCard__media img{ height:220px; }
  .articleHeroClean img{ height:260px; max-height:260px; }
}

.hero__headline{
  margin:14px 0 6px;
  font-size:40px;
  line-height:1.05;
  font-weight:900;
  letter-spacing:-.6px;
}

.hero__sub{
  margin:0 auto;
  max-width:720px;
  color:#475569;
  font-size:15px;
  line-height:1.6;
}

.heroChips{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.92);
  border:1px solid rgba(17,24,39,.08);
  box-shadow: 0 12px 26px rgba(17,24,39,.10);
  font-weight:900;
  font-size:12px;
  color:#1f2937;
  text-transform:lowercase;
}

.chip:hover{
  transform: translateY(-1px);
}
.homeIntroWrap{
  margin-top:0px;
}

.homeIntroCard{
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(17,24,39,.06);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(17,24,39,.12);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.homeIntroHead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.homeIntroTitle{
  margin:0;
  font-size:20px;
  font-weight:900;
}

.homeIntroText{
  margin:4px 0 0;
  color:#6b7280;
  font-size:13px;
}

.homeIntroLink{
  font-weight:900;
  color:var(--primaryDark);
}
@media (max-width: 520px){
  .hero__headline{ font-size:28px; }
  .homeIntroWrap{ margin-top:-22px; }
  .homeIntroCard{ padding:12px; }
}
.sbToggle{
  width:44px;
  height:38px;
  border:0;
  border-radius:14px;
  background: rgba(255,255,255,.08);
  cursor:pointer;
  display:grid;
  place-items:center;
  margin:6px 6px 12px;
}
.sbToggle span{
  display:block;
  width:18px;
  height:2px;
  background:#fff;
  margin:3px 0;
  border-radius:999px;
}

/* collapsed state (desktop only) */
@media (min-width: 981px){

  .sb-collapsed{
    --sideW: 52px; /* sidebar becomes slim */
  }

  .sb-collapsed .sidebar__inner{
    padding:12px 2px;
  }

  .sb-collapsed .sidebar__brand{
    justify-content:center;
    padding:0px;
    background: rgba(255,255,255,.06);
  }

  /* hide text parts when collapsed */
  .sb-collapsed .sidebar__brand div{
    display:none;
  }

  .sb-collapsed .sidebar__search,
  .sb-collapsed .sidebarCats,
  .sb-collapsed .sidebarNav{
    display:none;
  }

  /* make toggle button centered */
  .sb-collapsed .sbToggle{
    margin:6px auto 12px;
  }
}
.sbToggle__icon{
  width:18px;
  height:18px;
  fill:none;
  stroke:#fff;
  stroke-width:2.6;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition: transform .18s ease;
}

/* rotate arrow when sidebar is collapsed */
.sb-collapsed .sbToggle__icon{
  transform: rotate(180deg);
}
