/*
 * Blog Showcase layout (flexbox version)
 * --------------------------------------
 * Styles the custom blog index with:
 * - Page header
 * - Featured hero post
 * - Responsive post grid
 * - "Load more posts" button
 */

/* Design tokens – adjust these to theme your layout */
:root {
  --page-bg: #111827;
  --surface-bg: #f9fafb;
  --card-bg: #ffffff;

  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-alt: #4f46e5;

  --text-main: #020617;
  --text-muted: #6b7280;
  --text-on-accent: #ffffff;

  --border-subtle: #e5e7eb;

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --shadow-outer: 0 0 0 1px rgba(15, 23, 42, 0.7),
                  0 40px 140px rgba(0, 0, 0, 0.8);
  --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.1);

  --transition-fast: 150ms ease-out;
}

/* ===== PAGE WRAPPER ===== */

.blog-showcase-outer {
  /* leave background to the theme; add if you want a different colour */
  /* background: var(--page-bg); */
  padding: 32px 0 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.blog-showcase-outer a {
  text-decoration: none;
  color: inherit;
}

/* ===== SHELL ===== */

.blog-showcase {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 26px 0;
  /* uncomment if you want a card-style container:
  background: var(--surface-bg);
  border-radius: 26px;
  box-shadow: var(--shadow-outer);
  */
  color: var(--text-main);
}

@media (max-width: 768px) {
  .blog-showcase-outer {
    padding: 0;
  }

  .blog-showcase {
    border-radius: 0;
    padding: 28px 18px 44px;
    box-shadow: none;
  }
}

/* ===== HEADER (page title + description) ===== */

.blog-showcase .page-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.blog-showcase .page-title {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}

.blog-showcase .page-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

@media (min-width: 960px) {
  .blog-showcase .page-title {
    font-size: 34px;
  }

  .blog-showcase .page-subtitle {
    font-size: 15px;
  }
}

/* ===== BUTTONS & ICONS ===== */

.blog-showcase .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast);
  white-space: nowrap;
}

.blog-showcase .btn-primary {
  background: #020617;
  color: #f9fafb;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.35);
}

.blog-showcase .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.4);
  background: #000000;
}

.blog-showcase .btn-light {
  background: #ffffff;
  color: #111827;
  border-color: #e5e7eb;
}

.blog-showcase .btn-light:hover {
  background: #f9fafb;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

/* Circular “play” icon used in cards */
.blog-showcase .play-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.35);
  flex-shrink: 0;
}

.blog-showcase .play-icon::before {
  content: "›";
  transform: translateX(1px);
}

/* “Show more posts” button wrapper */
.blog-showcase .load-more-wrap {
  margin-top: 28px;
  text-align: center;
}

/* .load-more-btn inherits .btn + .btn-primary */

/* ===== FEATURED SECTION (HERO) ===== */

.blog-showcase .featured-section {
  margin-bottom: 32px;
}

/* Two-column layout using flex */
.blog-showcase .featured-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: stretch;
}

/* Stack vertically on small screens */
.blog-showcase .featured-media,
.blog-showcase .featured-body {
  flex: 1 1 100%;
  min-width: 0;
}

@media (min-width: 901px) {
  .blog-showcase .featured-media {
    flex: 1.1 1 0;
  }

  .blog-showcase .featured-body {
    flex: 1.4 1 0;
  }
}

/* LEFT: featured image box */

.blog-showcase .featured-media {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 9;
  min-height: 220px;
}

.blog-showcase .featured-media-link {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-showcase .featured-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-showcase .featured-media-placeholder {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 0 0, #1d4ed8 0, #020617 55%);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-align: center;
  padding: 10px;
}

/* RIGHT: title + meta + excerpt */

.blog-showcase .featured-body {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-showcase .featured-meta {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.blog-showcase .featured-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}

.blog-showcase .featured-title a {
  color: inherit;
}

.blog-showcase .featured-excerpt {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .blog-showcase .featured-body {
    padding: 18px 16px 18px;
  }

  .blog-showcase .featured-title {
    font-size: 18px;
  }

  .blog-showcase .featured-excerpt {
    font-size: 13px;
  }
}

/* ===== POSTS GRID (flexbox columns) ===== */

.blog-showcase .posts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* 3 columns on desktop */
.blog-showcase .post-card {
  flex: 1 1 calc(33.333% - 12px);
  max-width: calc(33.333% - 12px);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

/* 2 columns on tablet */
@media (max-width: 980px) {
  .blog-showcase .post-card {
    flex: 1 1 calc(50% - 9px);
    max-width: calc(50% - 9px);
  }
}

/* 1 column on mobile */
@media (max-width: 640px) {
  .blog-showcase .post-card {
    flex: 1 1 100%;
    max-width: 100%;
    min-height: 0;
  }
}

/* ===== POST CARD – TOP (colour panel + thumbnail) ===== */

.blog-showcase .post-card-top {
  display: flex;
  min-height: 155px;
}

/* Left coloured text panel */
.blog-showcase .post-card-visual {
  flex: 1.35 1 0;
  background: linear-gradient(140deg, var(--accent), var(--accent-alt));
  color: var(--text-on-accent);
  padding: 16px 16px 14px;
  border-top-left-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Right thumbnail container */
.blog-showcase .post-card-thumbnail {
  flex: 1 1 0;
  background: #f3f4f6;
  border-top-right-radius: var(--radius-lg);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.blog-showcase .post-card-thumbnail a {
  height: 100%;
}

/* Reduce left/right ratio on smaller screens */
@media (max-width: 640px) {
  .blog-showcase .post-card-visual {
    flex: 1.1 1 0;
  }

  .blog-showcase .post-card-thumbnail {
    flex: 0.9 1 0;
  }
}

@media (max-width: 480px) {
  .blog-showcase .post-card-top {
    min-height: 150px;
  }

  .blog-showcase .post-card-visual {
    flex: 1.15 1 0;
  }

  .blog-showcase .post-card-thumbnail {
    flex: 0.85 1 0;
  }
}

/* Badge row + title inside left panel */

.blog-showcase .post-card-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.blog-showcase .post-card-badge {
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.25);
  font-weight: 500;
}

.blog-showcase .post-card-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}

.blog-showcase .post-card-title a {
  color: #ffffff;
}

/* Thumbnail image or placeholder */

.blog-showcase .post-card-thumbnail .post-card-img {
  width: 100%;
  height: 100%;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.35);
  object-fit: cover;
  display: block;
}

/* Placeholder “window” used when there is no featured image */

.blog-showcase .post-card-window {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 9 / 14;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.35);
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
}

.blog-showcase .post-card-window-header {
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  margin-bottom: 7px;
}

.blog-showcase .post-card-window-body {
  flex: 1;
  border-radius: 10px;
  background: linear-gradient(170deg, #e5e7eb, #f3f4f6);
  margin-bottom: 8px;
}

.blog-showcase .post-card-window-footer {
  display: flex;
  gap: 5px;
}

.blog-showcase .post-card-window-footer span {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
}

/* ===== POST CARD – BOTTOM (meta + CTA) ===== */

.blog-showcase .post-card-bottom {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
}

.blog-showcase .post-card-bottom-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.blog-showcase .post-card-bottom-title a {
  color: inherit;
}

.blog-showcase .post-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.blog-showcase .post-card-meta-row .btn {
  font-size: 11px;
  padding-inline: 14px;
  padding-block: 5px;
}