/* Blog page redesign */

.bl-hero {
  position: relative; overflow: hidden;
  padding: 3rem 0 2.75rem;
  border-bottom: 1px solid rgba(0,212,255,.12);
  background:
    radial-gradient(70% 120% at 78% 40%, rgba(0,212,255,.16), transparent 62%),
    linear-gradient(180deg, #0a131a, var(--bg-base));
}
.bl-hero::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,.7), transparent);
}
.bl-hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,.8fr) minmax(0,.9fr);
  align-items: center; gap: 2rem;
}
.bl-crumb { font-size: .85rem; color: var(--text-muted); margin-bottom: .6rem; }
.bl-crumb a { color: var(--text-secondary); text-decoration: none; }
.bl-crumb a:hover { color: var(--accent); }
.bl-hero .page-title { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin: 0 0 .8rem; }
.bl-hero .page-subtitle { max-width: 520px; line-height: 1.7; color: var(--text-secondary); margin: 0; }
.bl-hero .bl-tagline { margin-top: .35rem; color: var(--text-primary); font-weight: 500; }
.bl-art { display: flex; justify-content: center; }
.bl-art svg { width: 100%; max-width: 230px; height: auto; filter: drop-shadow(0 0 30px rgba(0,212,255,.35)); }
.bl-quote {
  padding-left: 1.4rem; border-left: 1px solid rgba(0,212,255,.25);
  font-size: 1.05rem; line-height: 1.6; color: var(--text-primary);
}
.bl-quote small { display: block; margin-top: .5rem; color: var(--accent); font-size: .85rem; }
@media (max-width: 900px) {
  .bl-hero-inner { grid-template-columns: 1fr; }
  .bl-art, .bl-quote { display: none; }
}

/* Layout */
.bl-section { padding: 2.5rem 0 5rem; }
.bl-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 1.75rem; align-items: start; }
@media (max-width: 1020px) { .bl-layout { grid-template-columns: 1fr; } }

/* Search + filters */
.bl-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; margin-bottom: 1.5rem; }
.bl-search { position: relative; flex: 1 1 280px; min-width: 0; }
.bl-search svg {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted); pointer-events: none;
}
.bl-search .input {
  width: 100%; padding: .85rem 1rem .85rem 2.8rem; border-radius: 12px;
  background: rgba(6,9,13,.75); border: 1px solid rgba(255,255,255,.09);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.bl-search .input:focus {
  outline: none; border-color: rgba(0,212,255,.6);
  box-shadow: 0 0 0 4px rgba(0,212,255,.12);
}
.bl-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.bl-pills .tab {
  padding: .6rem 1.1rem; border-radius: 10px; font-weight: 600; font-size: .85rem;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  color: var(--text-secondary); cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.bl-pills .tab:hover { color: #fff; border-color: rgba(0,212,255,.35); }
.bl-pills .tab.active {
  color: #04121a; background: var(--accent); border-color: var(--accent);
  box-shadow: 0 8px 22px -8px rgba(0,212,255,.6);
}

/* Cards */
.bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.bl-card {
  --tc: 0,212,255;
  display: flex; flex-direction: column; overflow: hidden; cursor: pointer;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(19,27,36,.55), rgba(13,17,23,.95));
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.bl-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--tc), .4);
  box-shadow: 0 18px 44px rgba(0,0,0,.42), 0 10px 34px -14px rgba(var(--tc), .4);
}
.bl-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #060a0f; }
.bl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.bl-card:hover .bl-thumb img { transform: scale(1.05); }
.bl-thumb::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(6,9,13,.55));
}
.bl-thumb-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(70% 90% at 50% 40%, rgba(var(--tc), .22), transparent 70%), #0a1218;
  color: rgb(var(--tc));
}
.bl-thumb-fallback svg { width: 56px; height: 56px; opacity: .85; }
.bl-body { display: flex; flex-direction: column; gap: .7rem; padding: 1.15rem 1.3rem 1.25rem; flex: 1; }
.bl-tag {
  align-self: flex-start; padding: .22rem .7rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: .64rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgb(var(--tc)); background: rgba(var(--tc), .1); border: 1px solid rgba(var(--tc), .4);
}
.bl-title {
  margin: 0; font-size: 1.12rem; line-height: 1.35; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-excerpt {
  margin: 0; font-size: .88rem; line-height: 1.65; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-meta {
  margin-top: auto; padding-top: .85rem; border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  font-size: .76rem; color: var(--text-muted);
}
.bl-read { color: var(--accent); font-weight: 700; white-space: nowrap; }

/* Sidebar */
.bl-aside { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: 90px; }
@media (max-width: 1020px) { .bl-aside { position: static; } }
.bl-side-card {
  padding: 1.35rem 1.4rem; border-radius: 18px;
  background: linear-gradient(180deg, rgba(19,27,36,.55), rgba(13,17,23,.95));
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}
.bl-side-title { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; font-size: 1.05rem; color: #fff; }
.bl-side-title svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.bl-news-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1rem; }
.bl-news-head svg { width: 34px; height: 34px; color: var(--accent); flex-shrink: 0; }
.bl-news-head h3 { margin: 0 0 .3rem; font-size: 1.15rem; color: #fff; }
.bl-news-head p { margin: 0; font-size: .85rem; line-height: 1.6; color: var(--text-secondary); }
.bl-news-form { display: flex; gap: .6rem; }
.bl-news-form .input { flex: 1; min-width: 0; padding: .7rem .9rem; border-radius: 10px; }
.bl-news-form .btn { border-radius: 10px; font-weight: 700; white-space: nowrap; }
.bl-pop-item {
  display: flex; align-items: center; gap: .8rem; padding: .6rem 0;
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.05);
}
.bl-pop-item:last-child { border-bottom: none; }
.bl-pop-rank {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; color: var(--accent);
  background: rgba(0,212,255,.1); border: 1px solid rgba(0,212,255,.3);
}
.bl-pop-thumb { width: 52px; height: 40px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #0a1218; }
.bl-pop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-pop-text { min-width: 0; }
.bl-pop-text strong {
  display: block; font-size: .85rem; font-weight: 600; color: var(--text-primary); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-pop-text small { color: var(--text-muted); font-size: .72rem; }
.bl-pop-item:hover strong { color: var(--accent); }
.bl-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.bl-tags button {
  padding: .4rem .9rem; border-radius: 999px; font-size: .78rem; cursor: pointer;
  color: var(--text-secondary); background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.bl-tags button:hover { color: var(--accent); border-color: rgba(0,212,255,.4); background: rgba(0,212,255,.08); }

/* ═══ BLOG POLISH v2 ═══ */

/* Hero: one-line title, roomier art */
.bl-hero-inner { grid-template-columns: minmax(0,1.6fr) minmax(0,.55fr) minmax(0,.85fr); }
.bl-hero .page-title { font-size: clamp(2rem, 3.8vw, 3.1rem); white-space: nowrap; }
.bl-art svg { max-width: 190px; }
.bl-hero { padding: 3.25rem 0 3rem; }
@media (max-width: 900px) { .bl-hero .page-title { white-space: normal; } }

/* Search on its own row, pills below */
.bl-filterbar { gap: 1rem; margin-bottom: 1.75rem; }
.bl-search { flex: 1 1 100%; }
.bl-search .input { padding: 1rem 1.1rem 1rem 3rem; font-size: .95rem; border-radius: 14px; }
.bl-pills { width: 100%; }

/* Category badge: frosted pill on the picture */
.bl-thumb .bl-tag {
  position: absolute; top: .9rem; left: .9rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .38rem .85rem .38rem .7rem; border-radius: 999px;
  font-size: .66rem; letter-spacing: .12em;
  color: rgb(var(--tc)); background: rgba(6,9,13,.62);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--tc), .55);
  box-shadow: 0 8px 20px rgba(0,0,0,.45), 0 0 16px rgba(var(--tc), .22);
}
.bl-thumb .bl-tag::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: rgb(var(--tc)); box-shadow: 0 0 10px rgb(var(--tc));
}

/* Cards */
.bl-body { gap: .8rem; padding: 1.3rem 1.4rem 1.35rem; }
.bl-title { font-size: 1.18rem; }
.bl-card:hover { box-shadow: 0 20px 48px rgba(0,0,0,.45), 0 12px 38px -14px rgba(var(--tc), .5); }
.bl-read { transition: transform .18s ease; }
.bl-card:hover .bl-read { transform: translateX(3px); }

/* Stay Updated: stacked so the email is fully visible */
.bl-news-form { flex-direction: column; }
.bl-news-form .input { width: 100%; padding: .85rem 1rem; }
.bl-news-form .btn { width: 100%; padding: .85rem 1rem; }
.bl-side-card { padding: 1.5rem; }

/* ═══ BLOG HERO v3 ═══ */

.bl-hero {
  padding: 4.5rem 0 4rem;
  background:
    radial-gradient(60% 120% at 82% 50%, rgba(0,212,255,.2), transparent 62%),
    radial-gradient(40% 80% at 0% 0%, rgba(0,212,255,.07), transparent 70%),
    linear-gradient(180deg, #0a131a, var(--bg-base));
}
.bl-hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,212,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 100% at 75% 50%, #000, transparent 85%);
  mask-image: radial-gradient(70% 100% at 75% 50%, #000, transparent 85%);
}
.bl-hero .bl-hero-inner {
  grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
  gap: 3rem; align-items: center;
}
.bl-crumb { margin-bottom: 1.1rem; }
.bl-eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-bottom: 1.1rem; padding: .35rem .9rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  background: rgba(0,212,255,.07); border: 1px solid rgba(0,212,255,.28);
}
.bl-eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
.bl-hero .page-title {
  font-size: clamp(2.6rem, 5vw, 4.1rem); line-height: 1.05;
  white-space: nowrap; margin: 0 0 1.1rem;
}
.bl-hero .page-subtitle { font-size: 1.08rem; max-width: 500px; margin: 0; }
.bl-hero .bl-tagline {
  margin-top: 1.1rem; padding-top: 1.1rem; max-width: 500px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 1rem; font-weight: 600; color: #fff; letter-spacing: .02em;
}

.bl-visual { position: relative; height: 300px; display: flex; align-items: center; justify-content: center; }
.bl-visual > svg {
  width: 100%; max-width: 440px; height: 100%;
  filter: drop-shadow(0 0 34px rgba(0,212,255,.3));
}
.bl-visual .bl-quote {
  position: absolute; right: 0; bottom: 6px; max-width: 270px;
  padding: 1rem 1.2rem; border-radius: 16px; border-left: none;
  font-size: .98rem; line-height: 1.55; color: #fff;
  background: rgba(8,14,20,.62);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(0,212,255,.28);
  box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 26px rgba(0,212,255,.12);
}
.bl-visual .bl-quote small { color: var(--accent); }

@media (max-width: 960px) {
  .bl-hero { padding: 3rem 0 2.5rem; }
  .bl-hero .bl-hero-inner { grid-template-columns: 1fr; }
  .bl-visual { display: none; }
  .bl-hero .page-title { white-space: normal; }
}

/* ═══ BLOG GRID v4 (three per row) ═══ */

.bl-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 1.5rem; }
.bl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }

@media (max-width: 1179px) {
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .bl-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bl-grid { grid-template-columns: 1fr; }
}

/* Compact cards so three fit comfortably */
.bl-card { border-radius: 16px; }
.bl-body { gap: .65rem; padding: 1.05rem 1.1rem 1.1rem; }
.bl-title { font-size: 1.02rem; line-height: 1.35; }
.bl-excerpt { font-size: .84rem; line-height: 1.6; -webkit-line-clamp: 2; }
.bl-thumb .bl-tag { top: .7rem; left: .7rem; padding: .3rem .7rem .3rem .6rem; font-size: .6rem; }
.bl-meta { flex-wrap: wrap; row-gap: .35rem; font-size: .72rem; }
.bl-side-card { padding: 1.3rem; }

/* ═══ BLOG HERO: compact, same glow, grid and edge as the Courses page ═══ */
.bl-hero {
  padding: calc(var(--navbar-h, 72px) + 1.25rem) 0 1.6rem;
  background:
    linear-gradient(180deg, rgba(0,212,255,0.07) 0%, rgba(0,212,255,0.02) 50%, transparent 100%),
    radial-gradient(ellipse at 60% 0%, rgba(0,212,255,0.08) 0%, transparent 55%);
  border-bottom: 1px solid rgba(0,212,255,0.1);
}
.bl-hero::before {
  inset: 0;
  height: auto;
  background-image:
    linear-gradient(rgba(0,212,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.035) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, black 0%, transparent 100%);
          mask-image: linear-gradient(180deg, black 0%, transparent 100%);
}
.bl-hero-grid { display: none; }
.bl-hero .bl-hero-inner { gap: 2rem; }
.bl-crumb { margin-bottom: .5rem; font-size: .8rem; }
.bl-eyebrow { margin-bottom: .6rem; padding: .22rem .7rem; font-size: .62rem; }
.bl-hero .page-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.1; margin: 0 0 .45rem; }
.bl-hero .page-subtitle { font-size: .98rem; line-height: 1.6; max-width: 520px; }
.bl-hero .bl-tagline { margin-top: .6rem; padding-top: .6rem; font-size: .92rem; }
.bl-visual { height: 170px; }
.bl-visual > svg { filter: drop-shadow(0 0 18px rgba(0,212,255,.18)); }
.bl-visual .bl-quote {
  max-width: 230px; padding: .7rem 1rem; font-size: .88rem; border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
}
@media (max-width: 960px) {
  .bl-hero { padding: calc(var(--navbar-h, 72px) + 1.25rem) 0 1.6rem; }
}
