/* ================================
   Blog Post Styling
   ================================ */

/* Main blog post container */
.blog-post {
  background: #ffffff;
  color: #222;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: left;
}

/* Blog header, subtitle, and date */
.blog-header h1 {
  margin-bottom: 0.5rem;
}

.blog-subtitle {
  color: #666;
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.blog-date {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 2rem;
}

/* Blog content */
.blog-content p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.blog-content h2,
.blog-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #0aa89e;
}

.blog-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

/* Images */
.blog-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.blog-content img.small {
  max-width: 500px;
}

/* ================================
   Blog Post Image Row
   ================================ */
.image-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem 0;
}

.image-row img {
  flex: 1 1 auto;
  max-width: min(100%, 600px);
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  object-fit: cover;
}

@media screen and (max-width: 768px) {
  .image-row img {
    max-width: 90%;
  }
}

/* ================================
   Demo Blocks
   ================================ */
.demo-block {
  margin: 2rem auto;
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #fafafa;
  text-align: center;
  max-width: 400px;
}

.demo-block:hover {
  border-color: #ccc;
  background: #f5f5f5;
}

.demo-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  margin-bottom: 1rem;
}

/* ================================
   Twitch Cards
   ================================ */
.twitch-card {
  background: #f4f4f4;
  color: #111;
  max-width: 260px;
  margin: 2rem auto;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
}

.twitch-card.live {
  background: #e6f7f5;
  border: 1px solid rgba(78, 228, 78, 0.6);
  animation: twitchPulse 1.8s infinite ease-in-out;
}

@keyframes twitchPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(78, 228, 78, 0.3); }
  50% { box-shadow: 0 0 16px rgba(78, 228, 78, 0.6); }
}

/* ================================
   Back Link
   ================================ */
.blog-back {
  text-align: center;
  margin-top: 2rem;
}

.blog-back a {
  color: #0aa89e;
  text-decoration: none;
}

.blog-back a:hover {
  text-decoration: underline;
}

/* ================================
   Blog Index Layout Fix
   ================================ */

/* Widen container ONLY for blog index */
.page-layout.blog-index .page-container {
  max-width: 1000px;
  padding: 2rem 1.5rem;
}

/* ================================
   Blog Card Grid
   ================================ */

.blog-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* Tablet */
@media screen and (max-width: 900px) {
  .blog-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media screen and (max-width: 600px) {
  .blog-cards {
    grid-template-columns: 1fr;
  }
}

/* ================================
   Blog Cards
   ================================ */

.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #222;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  color: #0aa89e;
}

/* Square image OR placeholder */
.blog-card img,
.card-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eaeaea;
}

/* Card content */
.card-content {
  padding: 1rem 1.2rem;
}

.card-content h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.card-date {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.3rem;
}

.card-placeholder {
  position: relative;          /* allow inner content */
  width: 100%;
  aspect-ratio: 1 / 1;         /* square, same as images */
  background: linear-gradient(135deg, #0a1a2a, #0f2a44);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;            /* ensure no overflow from text */
}

.card-placeholder span {
  position: absolute;          /* sits on top of square */
  padding: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
}

/* ================================
   Image Caption
   ================================ */
.image-caption {
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  margin-top: -0.5rem;  /* pulls it closer to the image */
  margin-bottom: 1.5rem;
  opacity: 0.8;
  font-style: italic;
}

@media screen and (max-width: 768px) {
  .blog-container {
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .blog-post {
    padding: 1.2rem 1rem;
    border-radius: 0;
    box-shadow: none;
  }
}