/*! ------------------------------------------------
 * Blog Styles — Multiverse Intellect
 * Extends Blayden theme CSS variables
 * ------------------------------------------------ */

/* ---------- Blog Listing Grid ---------- */
.blog__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media only screen and (min-width: 768px) {
  .blog__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.2rem;
  }
}

@media only screen and (min-width: 1200px) {
  .blog__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Blog Card ---------- */
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.12));
  border-radius: var(--_radius-s, 1rem);
  overflow: hidden;
  background: rgba(var(--base-rgb, 20, 20, 20), 0.35);
  backdrop-filter: blur(8px);
  transition: transform var(--_animspeed-medium, 0.3s) var(--_animbezier), 
              border-color var(--_animspeed-medium, 0.3s) var(--_animbezier),
              box-shadow var(--_animspeed-medium, 0.3s) var(--_animbezier);
  cursor: pointer;
}

.blog-card:hover,
.blog-card:focus-within {
  transform: translateY(-4px);
  border-color: var(--stroke-controls, #F2F5FC);
  box-shadow: 0 12px 40px rgba(var(--base-rgb, 20, 20, 20), 0.5);
}

.blog-card__image-wrapper {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(var(--base-rgb, 20, 20, 20), 0.5);
  position: relative;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__image {
  transform: scale(1.05);
}

.blog-card__category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-block;
  padding: 0.6rem 1.4rem;
  font-size: 1.5rem;
  font-weight: var(--font-weight-medium, 500);
  color: var(--t-opp-bright, #151617);
  background: var(--stroke-controls, #F2F5FC);
  border-radius: 0.5rem;
  z-index: 2;
  letter-spacing: 0.02em;
}

.blog-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 14px;
  color: var(--t-muted, #505258);
}

.blog-card__meta i {
  font-size: 14px;
}

.blog-card__title {
  margin: 0 0 0.7rem 0;
  font-size: 1.25rem;
  font-weight: var(--font-weight-medium, 500);
  color: var(--t-bright, #F2F5FC);
  line-height: 1.4;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
}

.blog-card__excerpt {
  margin: 0 0 1.2rem 0;
  font-size: 1.3rem;
  color: var(--t-medium, #AEB5C5);
  line-height: 1.65;
  flex: 1;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: var(--font-weight-medium, 500);
  color: var(--stroke-controls, #F2F5FC);
  text-decoration: none;
  transition: gap 0.2s ease;
  margin-top: auto;
}

.blog-card__link:hover {
  gap: 0.75rem;
}

.blog-card__link i {
  font-size: 14px;
}

/* ---------- Pagination ---------- */
.blog__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.1));
}

.blog__pagination .page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.65rem;
  font-size: 14px;
  font-weight: var(--font-weight-medium, 500);
  color: var(--t-medium, #AEB5C5);
  text-decoration: none;
  border: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.12));
  transition: all var(--_animspeed-medium, 0.3s) var(--_animbezier);
}

.blog__pagination .page-btn:hover {
  border-color: var(--stroke-controls, #F2F5FC);
  color: var(--t-bright, #F2F5FC);
}

.blog__pagination .page-btn--active {
  border-color: var(--stroke-controls, #F2F5FC);
  color: var(--t-opp-bright, #151617);
  background: var(--stroke-controls, #F2F5FC);
}

.blog__pagination .page-btn--arrow {
  font-size: 1.1rem;
}

/* ---------- Single Blog Post ---------- */
.blog-post__header {
  margin-bottom: 2rem;
}

.blog-post__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  color: var(--t-medium, #AEB5C5);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.blog-post__back:hover {
  color: var(--t-bright, #F2F5FC);
}

.blog-post__category {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 14px;
  font-weight: var(--font-weight-medium, 500);
  color: var(--t-opp-bright, #151617);
  background: var(--stroke-controls, #F2F5FC);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.blog-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1rem;
  font-size: 14px;
  color: var(--t-muted, #505258);
}

.blog-post__meta i {
  font-size: 14px;
}

.blog-post__meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-post__featured-image {
  width: 100%;
  border-radius: var(--_radius-s, 1rem);
  margin: 2rem 0;
  border: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.1));
}

.blog-post__content {
  max-width: 720px;
  margin: 0 auto;
}

.blog-post__content h2 {
  font-weight: var(--font-weight-medium, 500);
  color: var(--t-bright, #F2F5FC);
  margin: 2.5rem 0 1rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.1));
  font-size: 2.2rem;
}

.blog-post__content h3 {
  font-size: 1.6rem;
}

/* ---------- Blog Table (generic fallback) ---------- */
.blog-post__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem 0;
  font-size: 1.4rem;
  color: var(--t-medium, #AEB5C5);
}

.blog-post__content thead th {
  text-align: left;
  padding: 0.8rem 1rem;
  font-weight: var(--font-weight-medium, 500);
  color: var(--t-bright, #F2F5FC);
  border-bottom: 2px solid var(--stroke-controls, rgba(242, 245, 252, 0.3));
  background: rgba(var(--base-rgb, 20, 20, 20), 0.4);
}

.blog-post__content tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.08));
  vertical-align: top;
  line-height: 1.6;
}

.blog-post__content tbody tr:hover {
  background: rgba(var(--base-rgb, 20, 20, 20), 0.3);
}

.blog-post__content tbody tr:first-child td {
  padding-top: 1rem;
}

/* ========== Blog Table — Premium Styled ========== */
.blog-post__content table.blog-table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.12));
  border-radius: 1.2rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  font-size: 1.35rem;
  margin: 2.5rem 0;
}

/* --- Header row --- */
.blog-post__content table.blog-table thead th {
  background: linear-gradient(135deg, rgba(242, 245, 252, 0.08) 0%, rgba(242, 245, 252, 0.03) 100%);
  color: var(--t-bright, #F2F5FC);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 1.4rem 1.6rem;
  border-bottom: 2px solid rgba(242, 245, 252, 0.15);
  white-space: nowrap;
}

/* --- Body cells --- */
.blog-post__content table.blog-table tbody td {
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.06));
  color: var(--t-medium, #AEB5C5);
  vertical-align: middle;
  line-height: 1.65;
}

/* --- Zebra striping --- */
.blog-post__content table.blog-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.blog-post__content table.blog-table tbody tr:nth-child(odd) {
  background: transparent;
}

/* --- Hover highlight --- */
.blog-post__content table.blog-table tbody tr:hover {
  background: rgba(242, 245, 252, 0.05) !important;
  transition: background 0.2s ease;
}

/* --- First column emphasis (product/name label) --- */
.blog-post__content table.blog-table tbody td:first-child {
  font-weight: 600;
  color: var(--t-bright, #F2F5FC);
  white-space: nowrap;
}

/* --- Last row — no bottom border --- */
.blog-post__content table.blog-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Difficulty badge (⭐ ratings) --- */
.blog-post__content table.blog-table td .badge--difficulty {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  background: rgba(242, 245, 252, 0.06);
  border: 1px solid rgba(242, 245, 252, 0.1);
}

/* --- Price highlight --- */
.blog-table__price {
  font-weight: 600;
  color: #4ade80;
  white-space: nowrap;
}

/* Mobile: horizontal scroll wrapper */
@media only screen and (max-width: 767px) {
  .blog-post__content table.blog-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 1rem;
    font-size: 1.25rem;
  }

  .blog-post__content table.blog-table thead th,
  .blog-post__content table.blog-table tbody td {
    padding: 1rem 1.2rem;
    white-space: nowrap;
  }
}

.blog-post__content h3 {
  font-weight: var(--font-weight-medium, 500);
  color: var(--t-bright, #F2F5FC);
  margin: 1.8rem 0 0.8rem 0;
}

.blog-post__content p {
  line-height: 1.85;
  color: var(--t-medium, #AEB5C5);
  margin-bottom: 1.2rem;
}

.blog-post__content blockquote {
  border-left: 3px solid var(--stroke-controls, #F2F5FC);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: rgba(var(--base-rgb, 20, 20, 20), 0.3);
  border-radius: 0 var(--_radius-s, 1rem) var(--_radius-s, 0);
}

.blog-post__content blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--t-bright, #F2F5FC);
}

/* ========== Blog Lists — Premium Styled ========== */
.blog-post__content ul,
.blog-post__content ol {
  margin: 1.5rem 0 2rem 0;
  padding-left: 2.2rem;
  color: var(--t-medium, #AEB5C5);
  line-height: 1.85;
  list-style-position: outside;
}

/* --- List item spacing --- */
.blog-post__content li {
  margin-bottom: 0.7rem;
  padding-left: 0.3rem;
}

.blog-post__content li:last-child {
  margin-bottom: 0;
}

/* --- Ordered list: custom number style --- */
.blog-post__content ol {
  list-style-type: none;
  counter-reset: blog-ol;
}

.blog-post__content ol > li {
  counter-increment: blog-ol;
  position: relative;
  padding-left: 0;
}

.blog-post__content ol > li::before {
  content: counter(blog-ol);
  display: inline-block;
  width: auto;
  min-width: 2rem;
  margin-right: 1rem;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--t-bright, #F2F5FC);
  background: rgba(242, 245, 252, 0.08);
  border: 1px solid rgba(242, 245, 252, 0.12);
  border-radius: 0.5rem;
  text-align: center;
  line-height: 1.6;
  padding: 0.05rem 0.6rem;
}

/* --- Unordered list: custom bullet --- */
.blog-post__content ul {
  list-style-type: none;
}

.blog-post__content ul > li {
  position: relative;
  padding-left: 1.8rem;
}

.blog-post__content ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stroke-controls, #F2F5FC);
  opacity: 0.7;
}

/* --- Nested lists --- */
.blog-post__content ul ul,
.blog-post__content ol ol,
.blog-post__content ul ol,
.blog-post__content ol ul {
  margin: 0.5rem 0 0.5rem 1.5rem;
}

.blog-post__content ul ul > li::before {
  width: 5px;
  height: 5px;
  background: transparent;
  border: 1.5px solid var(--stroke-controls, #F2F5FC);
  opacity: 0.5;
}

.blog-post__content ol ol > li::before {
  background: rgba(242, 245, 252, 0.05);
  border-color: rgba(242, 245, 252, 0.08);
  font-size: 1.2rem;
  color: var(--t-medium, #AEB5C5);
}

/* --- List items with strong/em inside — keep marker alignment --- */
.blog-post__content li strong,
.blog-post__content li b {
  color: var(--t-bright, #F2F5FC);
}

/* --- Checklist / feature list variant --- */
.blog-post__content ul.blog-list--check > li::before {
  content: '✓';
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #4ade80;
  font-size: 1rem;
  font-weight: 700;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0.15em;
  left: 0;
  line-height: 1;
}

/* --- Icon list variant --- */
.blog-post__content ul.blog-list--icon > li {
  padding-left: 2.4rem;
}

.blog-post__content ul.blog-list--icon > li::before {
  content: '▸';
  background: none;
  border: none;
  width: auto;
  height: auto;
  border-radius: 0;
  color: var(--stroke-controls, #F2F5FC);
  font-size: 1.1rem;
  top: 0.1em;
  opacity: 0.8;
}

/* Mobile: tighten spacing */
@media only screen and (max-width: 767px) {
  .blog-post__content ul,
  .blog-post__content ol {
    padding-left: 1.8rem;
  }

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

  .blog-post__content ol > li::before {
    min-width: 1.8rem;
    margin-right: 0.8rem;
    font-size: 1.2rem;
  }
}

.blog-post__content a {
  color: var(--stroke-controls, #F2F5FC);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-post__content strong {
  color: var(--t-bright, #F2F5FC);
  font-weight: var(--font-weight-medium, 500);
}

.blog-post__content hr {
  border: none;
  border-top: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.1));
  margin: 2.5rem 0;
}

.blog-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.1));
}

.blog-post__tag {
  padding: 0.35rem 0.85rem;
  font-size: 14px;
  color: var(--t-medium, #AEB5C5);
  border: 1px solid var(--stroke-elements, rgba(255, 255, 255, 0.15));
  border-radius: 2rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.blog-post__tag:hover {
  border-color: var(--stroke-controls, #F2F5FC);
  color: var(--t-bright, #F2F5FC);
}

/* ---------- Share / Related ---------- */
.blog-post__share {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  font-size: 14px;
  color: var(--t-muted, #505258);
}

.blog-post__share a {
  color: var(--t-medium, #AEB5C5);
  font-size: 1.3rem;
  transition: color 0.2s ease;
}

.blog-post__share a:hover {
  color: var(--t-bright, #F2F5FC);
}

/* Mobile adjustments */
@media only screen and (max-width: 767px) {
  .blog__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .blog-post__content {
    padding: 0 0.5rem;
  }

  .blog-post__meta {
    gap: 0.8rem;
    font-size: 14px;
  }
}

/* Bottom back-to-blog button on article pages */
.blog-post__back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 15px;
  font-weight: 500;
  color: var(--t-bright, #F2F5FC);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: 2rem;
}
.blog-post__back-link:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--t-bright, #fff);
}
