/* ═══════════════════════════════════════════════════════
   BETTERCAUSE — blog.css
   Blog LISTING page ONLY  (blog.html)
   DO NOT import this on blog-post.html — use blog-post.css
═══════════════════════════════════════════════════════ */

.blog-page-body {
  background: #ffffff;
  color: #fff;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  overflow-x: hidden; /* Prevents horizontal shaking/scrolling from orbs */
}


/* ════════════════════════════════════════════
   NAVBAR — light on listing page
════════════════════════════════════════════ */
.blog-page-body .navbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}

.blog-page-body .navbar--scrolled {
  background: rgba(255,255,255,.95);
  box-shadow: 0 1px 0 rgba(0,0,0,.1);
}

.blog-page-body .navbar__logo-img {
  filter: brightness(0);
}

.blog-page-body .navbar__logo {
  color: #1C1C28;
}

.blog-page-body .navbar__links {
  background: rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.1);
}

.blog-page-body .navbar__link {
  color: rgba(28,28,40,.55);
}

.blog-page-body .navbar__link:hover {
  color: #1C1C28;
}

.blog-page-body .navbar__link--active {
  background: #1C1C28;
  color: #fff;
}

.blog-page-body .btn--ghost {
  color: #1C1C28;
}

.blog-page-body .btn--ghost:hover {
  background: rgba(0,0,0,.05);
}

.blog-page-body .btn--solid {
  background: #6B35CF;
  color: #fff;
}

/* ════════════════════════════════════════════
   HERO
════════════════════════════════════════════ */
.blisting-hero {
  background: transparent;
  padding: calc(var(--navbar-h) + 140px) 96px 100px;
  position: relative;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Dot grid texture */
.blisting-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(28,28,40,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* Orb container */
.blisting-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
}

.blisting-hero__title,
.blisting-hero__sub {
  position: relative;
  z-index: 1;
}

/* Floating orbs */
.blisting-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 8s ease-in-out infinite;
}
.blisting-hero__orb--1 {
  width: 500px; height: 500px;
  background: rgba(185, 94, 255, 0.25);
  top: -100px; left: -80px;
  animation-delay: 0s;
}

.blisting-hero__orb--2 {
  width: 420px; height: 420px;
  background: rgba(84, 103, 249, 0.2);
  top: 0; right: -80px;
  animation-delay: -3s;
}

.blisting-hero__orb--3 {
  width: 320px; height: 320px;
  background: rgba(139, 92, 246, 0.18);
  bottom: -60px; left: 35%;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(20px,-30px) scale(1.04); }
  66%  { transform: translate(-15px,-20px) scale(0.97); }
  100% { transform: translate(0,0) scale(1); }
}

/* Shimmer title */
.blisting-hero__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  max-width: 700px;
  margin-bottom: 20px;
  opacity: 0;
  background: linear-gradient(
    90deg,
    #1C1C28 0%,
    #1C1C28 30%,
    #8B5CF6 45%,
    #B95EFF 50%,
    #8B5CF6 55%,
    #1C1C28 70%,
    #1C1C28 100%
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation:
    fadeUpAnim .7s cubic-bezier(.22,.68,0,1.2) .1s forwards,
    shimmer 4s linear 1s infinite;
}

.blisting-hero__sub {
  font-size: 1rem;
  color: #4B5563;
  line-height: 1.7;
  max-width: 440px;
  opacity: 0;
  animation: fadeUpAnim .7s cubic-bezier(.22,.68,0,1.2) .3s forwards;
}

@keyframes fadeUpAnim {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -100% center; }
}

/* ════════════════════════════════════════════
   MAIN SECTION — transparent, shows gradient
════════════════════════════════════════════ */


.blisting-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 96px 100px;
  position: relative;
  z-index: 1;
}


/* ════════════════════════════════════════════
   BLOG GRID CONTAINER
   Fixed size: exactly 2 rows, then scroll
════════════════════════════════════════════ */
.blisting-blog-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: 310px;
  gap: 16px !important;

  /* 2 rows: 310 + 310 + 16 gap + 32 padding top/bottom */
  max-height: 684px;
  overflow-y: auto;
  overflow-x: hidden;

  padding: 20px;
  border-radius: 28px;

  /* Frosted glass card over gradient */
  background: rgba(255,255,255,0.72) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.8) inset,
    0 32px 80px rgba(28,28,40,0.14),
    0 8px 24px rgba(139,92,246,0.08);

  align-items: stretch !important;
  height: auto !important;
}

/* Styled scrollbar */
.blisting-blog-grid::-webkit-scrollbar {
  width: 7px;
}
.blisting-blog-grid::-webkit-scrollbar-track {
  background: rgba(139,92,246,0.08);
  border-radius: 999px;
  margin: 12px 0;
}
.blisting-blog-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #B95EFF 0%, #5467F9 100%);
  border-radius: 999px;
}

/* ── Card overrides inside the listing grid ── */
.blisting-blog-grid .blog-card,
.blisting-blog-grid .blog-card.is-open {
  flex: none !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  background: #1C1C28 !important;
  color: #ffffff !important;
  border-radius: 20px;
  overflow: hidden;
  cursor: default;
  border: 1px solid rgba(255,255,255,0.06);
}

.blisting-blog-grid .blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}

.blisting-blog-grid .blog-card__content {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  overflow: hidden;
}

.blisting-blog-grid .blog-card__inner {
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blisting-blog-grid .blog-card__title {
  font-size: .95rem;
  line-height: 1.3;
  color: #ffffff !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blisting-blog-grid .blog-card__img {
  width: 100% !important;
  height: 108px !important;
  object-fit: cover;
  border-radius: 12px;
  align-self: stretch;
}

.blisting-blog-grid .blog-card__snippet {
  font-size: .77rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.62) !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blisting-blog-grid .blog-card__read {
  opacity: 1 !important;
  color: #A78BFA !important;
  font-size: .78rem;
  font-weight: 700;
}

.blisting-blog-grid .blog-card__btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.blisting-blog-grid .blog-card:hover .blog-card__btn {
  background: #8B5CF6 !important;
}

/* ── Staggered card entrance ── */
.blog-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .5s ease, transform .5s ease;
}
.blog-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.blog-card:nth-child(1) { transition-delay: .05s; }
.blog-card:nth-child(2) { transition-delay: .12s; }
.blog-card:nth-child(3) { transition-delay: .19s; }
.blog-card:nth-child(4) { transition-delay: .26s; }
.blog-card:nth-child(5) { transition-delay: .33s; }
.blog-card:nth-child(6) { transition-delay: .40s; }
.blog-card:nth-child(7) { transition-delay: .47s; }
.blog-card:nth-child(8) { transition-delay: .54s; }

/* ════════════════════════════════════════════
   STORY BANNER
════════════════════════════════════════════ */
.blisting-story {
  margin-top: 28px;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 340px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.blisting-story.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.blisting-story__img {
  width: 100%; height: 100%;
  min-height: 340px;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.blisting-story__overlay {
  position: relative;
  z-index: 1;
  padding: 48px 52px;
  background: rgba(0,0,0,.42);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.blisting-story__title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.blisting-story__text {
  font-size: .95rem;
  color: rgba(255,255,255,.85);
  line-height: 1.7;
  max-width: 480px;
}

.btn-blisting-story {
  display: inline-block;
  align-self: flex-end;
  margin-top: 32px;
  background: linear-gradient(135deg, #B95EFF 0%, #5467F9 100%);
  color: #fff;
  font-family: var(--font-main);
  font-size: .9rem;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.btn-blisting-story:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(139,92,246,.5);
}

/* ════════════════════════════════════════════
   FOOTER on listing page
════════════════════════════════════════════ */
.blog-page-body .footer {
  background: #0A0A10;
}

.blog-page-body .footer .navbar__logo-img {
  filter: none;
}

.footer__legal-btns {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.footer__legal-btn {
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 8px 20px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.footer__legal-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}
