/**
 * Blog listing, single post and card styles for the v5imraan theme.
 * Loaded site-wide (cards also render on the homepage and 404 page).
 */

/* ---------------------------------------------------------------
 * Accessibility helpers (style-rtl.css only ships for RTL).
 * ------------------------------------------------------------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

.screen-reader-text:focus,
.skip-link:focus {
  background-color: #818cf8;
  clip: auto !important;
  clip-path: none;
  color: #0e0d0d;
  display: block;
  font-size: 15px;
  font-weight: 600;
  height: auto;
  left: 8px;
  width: auto;
  padding: 12px 20px;
  position: fixed;
  top: 8px;
  z-index: 100000;
  text-decoration: none;
}

/* ---------------------------------------------------------------
 * Blog hero (listing, archives, search, single).
 * ------------------------------------------------------------- */
.blog-hero {
  position: relative;
  overflow: hidden;
  background-color: #0e0d0d;
  color: #ffffff;
  padding: 132px 0 64px;
}

.blog-hero::before,
.blog-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
}

.blog-hero::before {
  top: -180px;
  left: -140px;
  background: #6366f1;
}

.blog-hero::after {
  bottom: -200px;
  right: -140px;
  background: #a855f7;
}

.blog-hero .container {
  position: relative;
  z-index: 1;
}

.breadcrumbs {
  margin-bottom: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.breadcrumbs__item a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.breadcrumbs__item a:hover {
  color: #a855f7;
}

.breadcrumbs__item--current {
  color: rgba(255, 255, 255, 0.55);
}

.blog-hero__kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  color: #0e0d0d;
  background: linear-gradient(120deg, #818cf8, #c084fc);
  margin-bottom: 18px;
}

.blog-hero__title {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  max-width: 820px;
}

.blog-hero__tagline {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  max-width: 640px;
}

.blog-hero__search {
  margin-top: 30px;
  max-width: 560px;
}

.blog-hero__author img {
  margin-top: 18px;
  border-radius: 50%;
  border: 2px solid #6366f1;
}

/* Search form (rendered on the dark hero). */
.search-form {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.search-form__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 15px 18px;
  color: #ffffff;
  font: inherit;
}

.search-form__input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.search-form__btn {
  border: 0;
  cursor: pointer;
  padding: 0 20px;
  color: #0e0d0d;
  background: linear-gradient(120deg, #818cf8, #c084fc);
  display: inline-flex;
  align-items: center;
}

/* ---------------------------------------------------------------
 * Category chips.
 * ------------------------------------------------------------- */
.blog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 34px;
}

.blog-chip {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid transparent;
  color: #191919;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.blog-chip:hover {
  border-color: #6366f1;
}

.blog-chip.is-active {
  background: #191919;
  color: #ffffff;
}

/* ---------------------------------------------------------------
 * Listing shell.
 * ------------------------------------------------------------- */
.blog-listing {
  padding: 26px 0 96px;
}

.blog-listing__count {
  color: #6b7280;
  font-size: 15px;
  margin: 0 0 22px;
}

.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: #4b5563;
}

.blog-empty h2 {
  font-size: 26px;
  color: #191919;
  margin-bottom: 10px;
}

.blog-empty p {
  margin-bottom: 22px;
}

.blog-empty__cta {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: #191919;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.blog-empty__cta:hover {
  background: linear-gradient(120deg, #818cf8, #c084fc);
  color: #0e0d0d;
}
/* ---------------------------------------------------------------
 * Post card grid.
 * ------------------------------------------------------------- */
.post-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
}

.post-grid__item--featured {
  grid-column: span 2;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e7eaef;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.post-card:hover {
  border-color: #6366f1;
  box-shadow: 0 18px 40px rgba(15, 17, 21, 0.1);
  transform: translateY(-4px);
}

.post-card__media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.post-card__media--ph {
  background: linear-gradient(127deg, #101114, #1c2230);
}

.post-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card__img {
  transform: scale(1.04);
}

.post-card__ph-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(120deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.post-card__cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(14, 13, 13, 0.85);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 24px;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
}

.post-card__title {
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 10px;
}

.post-card__title a {
  color: #191919;
  text-decoration: none;
}

.post-card__title a:hover {
  background: linear-gradient(120deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.post-card__excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: #4b5563;
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Featured hero card: side-by-side on desktop. */
.post-card--featured {
  flex-direction: row;
}

.post-card--featured .post-card__media {
  width: 52%;
  aspect-ratio: auto;
}

.post-card--featured .post-card__body {
  width: 48%;
  justify-content: center;
  padding: 30px 32px;
}

.post-card--featured .post-card__title {
  font-size: 27px;
}

.post-card--featured .post-card__excerpt {
  -webkit-line-clamp: 4;
}

/* Cards inside the homepage flexbox-col3 strip. */
.flexbox-col3 li {
  display: flex;
}

.flexbox-col3 li .post-card {
  flex: 1;
  width: 100%;
}

.card-box .post-card {
  border: none;
  box-shadow: 0 1px 2px rgba(15, 17, 21, 0.04);
}

/* ---------------------------------------------------------------
 * Pagination (scoped to override the legacy .pagination block
 * in style.css).
 * ------------------------------------------------------------- */
.blog-listing .pagination,
.blog-listing .navigation.pagination {
  display: flex;
  justify-content: center;
  margin: 52px 0 0;
}

.blog-listing .pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.blog-listing .pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #e2e5ea;
  background: #ffffff;
  color: #191919;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.blog-listing .pagination .page-numbers:hover {
  border-color: #6366f1;
  background: #ffffff;
  color: #191919;
}

.blog-listing .pagination .page-numbers.current {
  background: linear-gradient(120deg, #818cf8, #c084fc);
  border-color: transparent;
  color: #0e0d0d;
}

.blog-listing .pagination .page-numbers.dots {
  border: 0;
  background: none;
}

.blog-listing .pagination .page-numbers.prev,
.blog-listing .pagination .page-numbers.next {
  padding: 0 16px;
}
/* ---------------------------------------------------------------
 * Single post.
 * ------------------------------------------------------------- */
.sp-progress {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 40;
  pointer-events: none;
}

.sp-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6366f1, #a855f7);
}

.sp-hero {
  padding-bottom: 84px;
}

.sp-hero__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.sp-hero__cat {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.4);
  text-decoration: none;
}

.sp-hero__cat:hover {
  background: #a855f7;
  color: #0e0d0d;
}

.sp-hero__byline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  margin-bottom: 20px;
}

.sp-hero__byline img {
  border-radius: 50%;
}

.sp-hero__title {
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 700;
  line-height: 1.15;
  max-width: 860px;
}

.sp-hero__excerpt {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  max-width: 720px;
}

.sp-hero__inner {
  display: flex;
  align-items: center;
  gap: 48px;
}

.sp-hero__content {
  flex: 1 1 auto;
  min-width: 0;
}

.sp-hero__media {
  flex: 0 0 40%;
  max-width: 40%;
}

figure.sp-featured {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 17, 21, 0.18);
  background: #ffffff;
}

.sp-featured__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 480px;
}

.sp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 0 96px;
}

.sp-content {
  font-size: 17px;
  line-height: 1.78;
  color: #27272a;
}

.sp-content > *:first-child {
  margin-top: 0;
}

.sp-content p {
  margin: 0 0 1.25em;
}

.sp-content a {
  color: #4f46e5;
  text-decoration: underline;
  text-decoration-color: rgba(79, 70, 229, 0.5);
  text-underline-offset: 3px;
}

.sp-content a:hover {
  color: #191919;
  text-decoration-color: #a855f7;
}

.sp-content h2 {
  position: relative;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
  color: #191919;
  margin: 1.9em 0 0.75em;
  padding-top: 14px;
  scroll-margin-top: 110px;
}

.sp-content h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
}

.sp-content h3 {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  color: #191919;
  margin: 1.6em 0 0.6em;
  scroll-margin-top: 110px;
}

.sp-content h4 {
  font-size: 18px;
  font-weight: 700;
  color: #191919;
  margin: 1.5em 0 0.5em;
  scroll-margin-top: 110px;
}

.sp-content ul,
.sp-content ol {
  margin: 0 0 1.25em;
  padding-left: 1.4em;
}

.sp-content li {
  margin-bottom: 0.5em;
}

.sp-content blockquote {
  border-left: 4px solid #6366f1;
  background: #f7fdff;
  padding: 18px 22px;
  margin: 0 0 1.4em;
  font-style: italic;
}

.sp-content blockquote p {
  margin: 0;
}

.sp-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.sp-content pre {
  background: #101114;
  color: #e5e7eb;
  padding: 18px 20px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 1.4em;
}

.sp-content code {
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.92em;
  background: #eef1f4;
  border-radius: 6px;
  padding: 2px 6px;
}

.sp-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.sp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 15.5px;
}

.sp-content th,
.sp-content td {
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  text-align: left;
}

.sp-content th {
  background: #f7f8fa;
  font-weight: 700;
}

/* TL;DR / Executive Summary box (added server-side by inc/blog.php). */
.post-summary {
  border: 1px solid #d9f7f0;
  background: #f2fdfa;
  border-radius: 16px;
  padding: 20px 22px;
  margin: 0 0 28px;
}

.post-summary p {
  margin: 0;
}

.post-summary__label {
  font-weight: 700;
  background: linear-gradient(120deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Multi-page post links (wp_link_pages). */
.sp-page-links {
  margin: 28px 0;
  font-weight: 600;
}

.sp-page-links a {
  color: #4f46e5;
}
/* ---------------------------------------------------------------
 * Tags, share, author, post navigation.
 * ------------------------------------------------------------- */
.sp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 36px 0 10px;
}

.sp-tags a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}

.sp-tags a:hover {
  background: #191919;
  color: #ffffff;
}

.sp-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #eceef2;
  border-bottom: 1px solid #eceef2;
  padding: 18px 0;
  margin: 26px 0 0;
}

.sp-share__label {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.sp-share__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sp-share__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e2e5ea;
  background: #ffffff;
  color: #191919;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.sp-share__btn:hover {
  border-color: #191919;
  background: #191919;
  color: #ffffff;
}

.sp-share__btn.is-copied {
  border-color: transparent;
  background: linear-gradient(120deg, #818cf8, #c084fc);
  color: #0e0d0d;
}

.sp-author {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #f7f8fa;
  border: 1px solid #eceef2;
  border-radius: 18px;
  padding: 24px;
  margin-top: 34px;
}

.sp-author img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.sp-author__title {
  font-size: 18px;
  font-weight: 700;
  color: #191919;
}

.sp-author__bio {
  font-size: 15px;
  line-height: 1.65;
  color: #4b5563;
  margin-top: 6px;
}

.sp-author__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #4f46e5;
  text-decoration: none;
}

.sp-author__link:hover {
  text-decoration: underline;
}

.sp-postnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 34px;
}

.sp-postnav__card {
  border: 1px solid #eceef2;
  border-radius: 16px;
  padding: 18px 20px;
  background: #ffffff;
}

.sp-postnav__card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.sp-postnav__card--next {
  text-align: right;
}

.sp-postnav__card:only-child {
  grid-column: 1 / -1;
  text-align: left;
}

.sp-postnav__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 6px;
}

.sp-postnav__title {
  font-weight: 600;
  color: #191919;
}

/* ---------------------------------------------------------------
 * Sidebar: TOC + share.
 * ------------------------------------------------------------- */
.sp-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sp-toc-wrap,
.sp-share-wrap {
  background: #ffffff;
  border: 1px solid #eceef2;
  border-radius: 18px;
  padding: 20px;
}

.sp-toc-wrap h2,
.sp-share-wrap h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 12px;
}

.sp-toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-toc__item a {
  display: block;
  padding: 7px 0 7px 12px;
  border-left: 2px solid #eceef2;
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
  text-decoration: none;
}

.sp-toc__item a:hover {
  color: #191919;
  border-color: #6366f1;
}

.sp-toc__item a.is-active {
  color: #191919;
  font-weight: 600;
  border-color: #6366f1;
}

.sp-toc__item--sub a {
  padding-left: 26px;
  font-size: 13px;
}
/* ---------------------------------------------------------------
 * Related + comments.
 * ------------------------------------------------------------- */
.sp-related {
  margin-top: 56px;
}

.sp-related h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 22px;
}

.comments-area {
  margin-top: 56px;
  max-width: 780px;
}

.comments-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 22px;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment-list .comment-body {
  border: 1px solid #eceef2;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.65;
}

.comment-list .avatar {
  border-radius: 50%;
  margin-right: 10px;
}

.comment-list .children {
  list-style: none;
  margin-top: 16px;
  padding-left: 24px;
}

.comment-form {
  margin-top: 28px;
}

.comment-form p {
  margin-bottom: 14px;
}

.comment-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid #e2e5ea;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  background: #ffffff;
}

.comment-form .submit {
  background: linear-gradient(120deg, #818cf8, #c084fc);
  color: #0e0d0d;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  font: inherit;
}

.comment-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-navigation a {
  font-weight: 600;
  color: #4f46e5;
}

/* ---------------------------------------------------------------
 * Homepage awards (replacement for the old empty <h2> spacer).
 * ------------------------------------------------------------- */
.award-heading-spacer {
  height: 34px;
}

.card-inline-text.is-active {
  border: 2px solid #6366f1;
}

/* ---------------------------------------------------------------
 * Responsive.
 * ------------------------------------------------------------- */
@media (max-width: 1023px) {
  .sp-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-sidebar {
    display: none;
  }

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

  .post-grid__item--featured {
    grid-column: span 2;
  }

  .sp-hero__inner {
    display: block;
  }

  .sp-hero__media {
    flex: none;
    max-width: 520px;
    margin: 28px auto 0;
  }
}

@media (max-width: 639px) {
  .blog-hero {
    padding: 96px 0 44px;
  }

  .sp-hero {
    padding-bottom: 44px;
  }

  .sp-hero__media {
    max-width: 100%;
    margin: 20px auto 0;
  }

  figure.sp-featured {
    border-radius: 14px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .post-grid__item--featured {
    grid-column: auto;
  }

  .post-card--featured {
    flex-direction: column;
  }

  .post-card--featured .post-card__media {
    width: 100%;
    aspect-ratio: 3 / 2;
  }

  .post-card--featured .post-card__body {
    width: 100%;
    padding: 20px 22px 24px;
  }

  .sp-postnav {
    grid-template-columns: 1fr;
  }

  .sp-postnav__card--next {
    text-align: left;
  }

  .sp-author {
    flex-direction: column;
  }
}
