:root {
  --bg: #ffffff;
  --text: #111;
  --card: #f4f4f5;
}

/* Blog layout builds on the global InvestGame styles in /static/index.css */

.blog-main {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

.blog-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 1.5rem auto;
}

.blog-hero h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.blog-hero-post h1 {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
}

.blog-intro {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.blog-post-meta {
  font-size: 0.9rem;
}

.blog-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  opacity: 0.9;
}

.blog-breadcrumb a:hover {
  opacity: 1;
  text-decoration: underline;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-card {
  position: relative;
  background: rgba(15, 23, 42, 0.97);
  border-radius: 18px;
  padding: 1.7rem 1.9rem 1.6rem 1.7rem;
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
  overflow: hidden;
  animation: fadeIn 0.4s ease-out;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.85);
  border-color: rgba(96, 165, 250, 0.6);
}

.blog-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}

.blog-card-title {
  font-size: 1.2rem;
  margin: 0;
}

.blog-card-title a {
  color: var(--text-main);
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--primary-hover);
}

.blog-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-card-summary {
  font-size: 0.96rem;
  color: var(--text-main);
  opacity: 0.9;
  margin: 0.4rem 0 0.9rem 0;
}

.blog-card-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.blog-card-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.blog-post {
  max-width: 820px;
  margin: 0 auto;
}

.blog-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-main);
}

.blog-body p {
  margin: 0 0 1rem 0;
}

.blog-body a {
  color: var(--primary-color);
  text-decoration: underline;
}

.blog-body a:hover {
  color: var(--primary-hover);
}

.blog-body img,
.blog-body iframe,
.blog-body video {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.blog-body ul,
.blog-body ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.blog-body li {
  margin-bottom: 0.4rem;
}

.blog-body h2,
.blog-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.blog-back {
  margin-top: 1.75rem;
}

.blog-back .large-btn {
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: var(--text-main);
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.blog-back .large-btn:hover {
  background: rgba(15, 23, 42, 0.96);
  color: var(--primary-color);
  border-color: rgba(59, 130, 246, 0.85);
  transform: translateY(-1px);
}

.blog-footer {
  text-align: center;
  padding: 2.5rem 1rem 3rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .blog-main {
    padding-top: 1.5rem;
    padding-bottom: 2.25rem;
  }

  .blog-card {
    padding: 1.25rem 1.2rem;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.75);
  }

  .blog-hero {
    text-align: left;
    margin-bottom: 1.25rem;
  }

  .blog-hero h1 {
    font-size: 1.55rem;
  }

  .blog-intro {
    font-size: 0.9rem;
  }

  .blog-card-title {
    font-size: 1.05rem;
  }

  .blog-card-summary {
    font-size: 0.92rem;
  }

  .blog-post {
    max-width: 100%;
  }

  .blog-body {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .blog-back {
    margin-top: 1.5rem;
  }

  .blog-back .large-btn {
    width: 100%;
    justify-content: center;
  }

  .blog-breadcrumb {
    font-size: 0.8rem;
    white-space: normal;
  }
}

@media (min-width: 1024px) {
  .blog-post {
    max-width: 960px;
  }
}
