/* =====================================================================
   BLOG / KNOWLEDGE HUB PAGE
   Hero → search + platform filters → per-platform article sections.
   Cards are rendered by JS from a data array. + shared footer.
   ===================================================================== */

.bl-page { overflow-x: hidden; }

.bl-section { padding: clamp(40px, 5vw, 70px) clamp(20px, 4vw, 60px); }
.bl-wrap { max-width: 1200px; margin: 0 auto; }

.grad-blue {
  background: linear-gradient(100deg, #5b8def 0%, #2f6bd8 55%, #6aa0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ===================== HERO ===================== */
.bl-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(440px, 64vh, 720px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(120px, 15vh, 175px);
  padding-bottom: clamp(40px, 5vw, 64px);
  text-align: center;
  border-bottom: 1px solid rgba(90, 120, 180, 0.12);
}
/* background image behind the heading — fully visible (not cropped) */
.bl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../blog-images/blog-for-pc-screen.webp") center / cover no-repeat;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.bl-hero .bl-wrap { position: relative; z-index: 1; }
.bl-eyebrow {
  display: none; /* Knowledge Hub pill removed on all screens */
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2f6bd8;
  background: rgba(91, 141, 239, 0.08);
  border: 1px solid rgba(91, 141, 239, 0.3);
}
.bl-title {
  margin-top: 22px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #16202f;
}
.bl-hero-sub {
  margin: 20px auto 0;
  max-width: 640px;
  font-weight: 300;
  line-height: 1.7;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  color: #5a6478;
}

/* ===================== SEARCH + FILTERS ===================== */
.bl-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 40px) clamp(20px, 4vw, 60px);
}
.bl-search {
  display: none; /* search removed on all screens */
  position: relative;
  width: 100%;
  max-width: 360px;
}
.bl-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
}
.bl-search input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border-radius: 999px;
  border: 1px solid rgba(90, 120, 180, 0.22);
  background: #f6f8fc;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #16202f;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.bl-search input:focus { outline: none; border-color: #2f6bd8; background: #fff; }
.bl-search input::placeholder { color: #94a3b8; }

.bl-filters {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(232, 238, 247, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 30px rgba(40, 60, 110, 0.08);
  scrollbar-width: none;
}
.bl-filters::-webkit-scrollbar { display: none; }

/* liquid-glass sliding highlight */
.bl-filter-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, #5b9bf5, #2f6bd8);
  box-shadow:
    0 2px 6px rgba(40, 60, 110, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  pointer-events: none;
  will-change: transform, width;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.3s ease;
}

.bl-filter {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #54607a;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.bl-filter:hover { color: #16202f; }
.bl-filter.active { color: #fff; background: transparent; box-shadow: none; }

/* ===================== GRID ===================== */
.bl-grid { background: #ffffff; min-height: 480px; }
.bl-grid-head { margin-bottom: clamp(28px, 3vw, 44px); }
.bl-eyebrow-sm {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2f6bd8;
}
.bl-grid-count {
  margin-top: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: #16202f;
}

.bl-platforms { display: flex; flex-direction: column; gap: clamp(44px, 5vw, 64px); }

/* platform section header */
.bl-phead {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(22px, 2.4vw, 32px);
}
.bl-phead-left { display: flex; align-items: center; gap: 14px; }
.bl-plogo {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(40, 60, 110, 0.12);
  padding: 8px;
}
.bl-plogo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

/* "View Blog Page" centered below the cards */
.bl-viewall { display: flex; justify-content: center; margin-top: clamp(28px, 3vw, 42px); }
.bl-pcount {
  margin-top: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  color: #16202f;
}
.bl-viewblog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(120deg, #5b9bf5, #2f6bd8);
  color: #fff;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 12px 26px rgba(47, 107, 216, 0.34);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.bl-viewblog svg { width: 16px; height: 16px; }
.bl-viewblog:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* track / cards */
.bl-carousel { position: relative; }
.bl-arrow, .bl-mnav { display: none; } /* desktop: hidden */
.bl-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}
.bl-card {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(90, 120, 180, 0.12);
  box-shadow: 0 26px 60px rgba(40, 60, 110, 0.10);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.bl-card:hover { transform: translateY(-6px); box-shadow: 0 40px 80px rgba(40, 60, 110, 0.18); }
.bl-media {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid rgba(90, 120, 180, 0.1);
  background: #f1f5fb;
}
.bl-media img { width: 100%; object-fit: contain; object-position: center; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.bl-card:hover .bl-media img { transform: scale(1.05); }
.bl-logo {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
  padding: 6px;
}
.bl-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.bl-cat {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.bl-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: clamp(22px, 2vw, 28px);
}
.bl-meta {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a94a8;
}
.bl-card-title {
  margin-top: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.16rem;
  line-height: 1.3;
  color: #16202f;
}
.bl-desc {
  margin-top: 14px;
  flex: 1 1 auto;
  font-weight: 300;
  line-height: 1.6;
  font-size: 0.92rem;
  color: #5a6478;
}
.bl-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(90, 120, 180, 0.12);
}
.bl-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--accent, #2f6bd8);
  color: #fff;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  transition: transform 0.25s ease, filter 0.25s ease;
}
.bl-btn:hover { transform: translateY(-2px); filter: brightness(1.12); }

/* empty state */
.bl-empty { text-align: center; padding: 80px 20px; color: #5a6478; }
.bl-empty button {
  margin-top: 14px;
  border: none;
  background: none;
  color: #2f6bd8;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* reveal */
.bl-reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.bl-reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .bl-reveal { transition: opacity 0.3s ease; transform: none; } }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 760px) {
  /* cards become a swipe / coverflow carousel (like "More Ways to Connect") */
  .bl-track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 18px 8% 16px;
  }
  .bl-track::-webkit-scrollbar { display: none; }
  .bl-card {
    flex: 0 0 80%;
    margin: 0 6px;
    scroll-snap-align: center;
    will-change: transform;
    transition: none;
  }
  /* keep mobile cards the same proportion as desktop (not super tall) */
  .bl-media { height: 180px; }
  .bl-card-title { font-size: 1.08rem; }
  .bl-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* stack section header so the View Blog Page button never overlaps cards */
  .bl-phead { flex-direction: column; align-items: flex-start; }

  .bl-arrow {
    display: grid;
    place-items: center;
    position: absolute;
    top: 42%;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #2f6bd8;
    box-shadow: 0 10px 26px rgba(40, 60, 110, 0.22);
    cursor: pointer;
    z-index: 6;
    transform: translateY(-50%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  }
  .bl-arrow.next { right: 2px; }
  .bl-arrow.prev { left: 2px; }
  .bl-arrow svg { width: 22px; height: 22px; }
  .bl-arrow:active { transform: translateY(-50%) scale(0.9); }
  .bl-arrow.is-hidden { opacity: 0; pointer-events: none; }
  .bl-arrow.next.is-hidden { transform: translateY(-50%) translateX(14px) scale(0.8); }
  .bl-arrow.prev.is-hidden { transform: translateY(-50%) translateX(-14px) scale(0.8); }

  .bl-mnav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
  }
  .bl-dots { display: flex; gap: 8px; }
  .bl-dot {
    width: 9px; height: 9px;
    border-radius: 999px;
    border: none; padding: 0;
    background: #c3cce0;
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
  }
  .bl-dot.active { width: 26px; background: #2f6bd8; }
  .bl-swipe {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7a86a0;
  }
}

/* ===================== PHONE: centered header, no search, coverflow filters ===================== */
@media (max-width: 760px) {
  /* hide the hero eyebrow pill and the grid count header on phone */
  .bl-eyebrow { display: none; }
  .bl-grid-head { display: none; }
  /* phone-specific hero background image */
  .bl-hero::before { background-image: url("../blog-images/blog-bg.webp"); background-size: cover; opacity: 0.42; }

  /* push the heading + text lower so the image up top is more visible */
  .bl-hero {
    justify-content: flex-end;
    padding-bottom: clamp(48px, 12vw, 90px);
  }

  /* center each platform section header */
  .bl-phead { align-items: center; text-align: center; }
  .bl-phead-left { justify-content: center; }

  /* filter pills → coverflow swipe selector (no "bar" look) */
  .bl-tools { padding-top: 14px; padding-bottom: 6px; }
  .bl-filters {
    background: transparent;
    border: none;
    gap: 0;
    width: 100%;
    padding: 10px 38%;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .bl-filter {
    flex: 0 0 auto;
    scroll-snap-align: center;
    margin: 0 5px;
    padding: 13px 20px;
    font-size: 0.92rem;
    will-change: transform, opacity;
  }
  /* phone uses the same smooth sliding glass indicator as desktop */
}

/* ===================== DARK THEME ===================== */
[data-theme="dark"] .bl-eyebrow {
  color: var(--accent-deep);
  background: rgba(91, 155, 245, 0.12);
  border-color: rgba(91, 155, 245, 0.3);
}
[data-theme="dark"] .bl-hero { border-bottom-color: var(--d-line); }
[data-theme="dark"] .bl-title,
[data-theme="dark"] .bl-grid-count,
[data-theme="dark"] .bl-pcount,
[data-theme="dark"] .bl-card-title { color: var(--d-t1); }
[data-theme="dark"] .bl-hero-sub,
[data-theme="dark"] .bl-desc { color: var(--d-t2); }
[data-theme="dark"] .bl-eyebrow-sm,
[data-theme="dark"] .bl-meta { color: var(--accent-deep); }
[data-theme="dark"] .bl-search input { background: var(--d-surface); border-color: var(--d-line); color: var(--d-t1); }
[data-theme="dark"] .bl-search input:focus { background: var(--d-surface-2); border-color: var(--accent); }
[data-theme="dark"] .bl-filters { background: rgba(255, 255, 255, 0.04); border-color: var(--d-line); }
[data-theme="dark"] .bl-filter { color: var(--d-t2); }
[data-theme="dark"] .bl-filter:hover { color: var(--d-t1); }
[data-theme="dark"] .bl-grid { background: var(--d-base); }
[data-theme="dark"] .bl-plogo { background: rgba(255, 255, 255, 0.95); }
[data-theme="dark"] .bl-card { background: var(--d-surface); border-color: var(--d-line); box-shadow: var(--d-shadow); }
[data-theme="dark"] .bl-meta { color: var(--accent-deep); }
[data-theme="dark"] .bl-foot { border-top-color: var(--d-line); }
[data-theme="dark"] .bl-hero::before { opacity: 0.10; }
[data-theme="dark"] .bl-arrow { background: var(--d-surface-2); color: var(--accent-deep); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .bl-dot { background: rgba(255, 255, 255, 0.22); }
[data-theme="dark"] .bl-dot.active { background: var(--accent); }
[data-theme="dark"] .bl-swipe { color: var(--d-t3); }

