/* ==========================================================================
   Blog Module — Premium Editorial Design System
   ========================================================================== */

/* ── Container & Global Page Layout ── */
.blog-page {
  padding: 48px 0 80px;
  background: #f8fafc;
}

.blog-container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

/* ── Hero Section ── */
.blog-hero {
  position: relative;
  padding: clamp(70px, 8vw, 110px) 24px clamp(80px, 9vw, 120px);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

.blog-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Background Orbs */
.blog-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.blog-hero__orb--a {
  top: -10%;
  left: 15%;
  width: 320px;
  height: 320px;
  background: #ec4f25;
}

.blog-hero__orb--b {
  bottom: -10%;
  right: 15%;
  width: 380px;
  height: 380px;
  background: #f59e0b;
}

.blog-hero__orb--c {
  top: 30%;
  right: 35%;
  width: 250px;
  height: 250px;
  background: #6366f1;
}

/* Vector Doodles (Crucial fixed dimensions & absolute positioning) */
.blog-hero__doodle {
  position: absolute;
  color: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.blog-hero__doodle--book {
  top: 15%;
  left: 6%;
  width: 56px;
  height: 56px;
}

.blog-hero__doodle--pen {
  bottom: 25%;
  left: 10%;
  width: 48px;
  height: 48px;
}

.blog-hero__doodle--bulb {
  top: 18%;
  right: 8%;
  width: 52px;
  height: 52px;
}

.blog-hero__doodle--plane {
  bottom: 22%;
  right: 10%;
  width: 56px;
  height: 56px;
}

.blog-hero__doodle--star {
  width: 24px;
  height: 24px;
  color: rgba(245, 158, 11, 0.4);
}

.blog-hero__doodle--star-a { top: 12%; left: 28%; }
.blog-hero__doodle--star-b { top: 18%; right: 25%; }
.blog-hero__doodle--star-c { bottom: 18%; left: 38%; }

.blog-hero__doodle--squiggle {
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 36px;
  color: rgba(236, 79, 37, 0.3);
}

.blog-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.blog-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-size: 0.82rem;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 20px;
}

.blog-hero__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.blog-hero__title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 16px;
}

.blog-hero__title-accent {
  background: linear-gradient(90deg, #ec4f25, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-hero__tagline {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto;
}

.blog-hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 50px;
  display: block;
}

/* ── Bento Grid Layout (Top Section) ── */
.blog-bento {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  margin-bottom: 56px;
  align-items: stretch;
}

.blog-bento__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Base Card Styles ── */
.blog-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(236, 79, 37, 0.35);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
}

/* Card Media Header */
.blog-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  background: #0f172a;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.04);
}

/* Category Pill Badge on Image */
.blog-card__pill {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── Card Content Padding & Typography ── */
.blog-card__content {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 12px;
}

.blog-card__dot {
  color: #cbd5e1;
  font-size: 0.7rem;
}

.blog-card__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.blog-card__title a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card__title a:hover {
  color: #ec4f25;
}

.blog-card__excerpt {
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.65;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ec4f25;
  text-decoration: none;
  transition: all 0.2s ease;
}

.blog-card__read-more:hover {
  color: #f59e0b;
  transform: translateX(4px);
}

/* ── Featured Card Variations ── */
.blog-card--featured .blog-card__media {
  aspect-ratio: 16 / 9;
}

.blog-card--featured .blog-card__title {
  font-size: 1.45rem;
}

/* ── Compact Sidebar Cards ── */
.blog-card--compact {
  flex-direction: column;
  height: 100%;
}

.blog-card--compact .blog-card__media {
  width: 100%;
  aspect-ratio: 16 / 9.5;
  flex-shrink: 0;
}

.blog-card--compact .blog-card__pill {
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  font-size: 0.68rem;
}

.blog-card--compact .blog-card__content {
  padding: 20px 24px 22px;
}

.blog-card--compact .blog-card__title {
  font-size: 1.1rem;
  line-height: 1.4;
  margin: 0;
}

/* ── Main Articles Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}

.blog-grid .blog-card__title {
  font-size: 1.15rem;
}

.blog-grid .blog-card__excerpt {
  -webkit-line-clamp: 3;
}

/* ── Pagination ── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}

.blog-pagination__btn {
  padding: 10px 22px;
  border-radius: 50px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
}

.blog-pagination__btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.blog-pagination__info {
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
}

/* ── Responsive Layout Breakpoints ── */
@media (max-width: 1024px) {
  .blog-bento {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-page {
    padding: 28px 0 60px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card--compact {
    flex-direction: column;
  }

  .blog-card--compact .blog-card__media {
    width: 100%;
    height: 180px;
  }

  .blog-card__content {
    padding: 20px 22px 24px;
  }
}
