/* World Design — Blog */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 1201;
  background: linear-gradient(90deg, var(--color-primary), var(--color-purple));
  transition: width 0.1s linear;
}

.blog-search-wrap {
  max-width: 420px;
  margin: 1.5rem auto 0;
}

.blog-search {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-glass);
  color: inherit;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.blog-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
}

.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  height: 100%;
}

.blog-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(0, 150, 199, 0.15), rgba(124, 58, 237, 0.1));
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.04);
}

.blog-card__badge {
  position: absolute;
  top: 0.75rem;
  inset-inline-start: 0.75rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--gradient-btn);
  color: #fff;
}

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

.blog-card__cat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary-light);
}

.blog-card__title {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0;
}

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

.blog-card__excerpt {
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  flex: 1;
}

.blog-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.blog-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.blog-card__more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary-light);
}

.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}

.blog-featured__media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.blog-featured__body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.blog-empty {
  text-align: center;
  color: var(--color-muted);
  padding: 3rem 1rem;
}

.blog-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.post-hero__title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.2;
  margin: 0.5rem 0 1rem;
}

.post-hero__excerpt {
  color: var(--color-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.post-hero__figure img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════
   Blog Post Detail — Professional layout
   ═══════════════════════════════════════════════════════════ */

.page-blog-post {
  --post-sidebar-w: 300px;
}

.page-blog-post .site-header {
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

[data-theme="light"] .page-blog-post .site-header {
  background: rgba(241, 245, 249, 0.88);
}

/* Hero */
.post-hero {
  position: relative;
  margin-top: var(--header-h);
  min-height: clamp(320px, 52vh, 520px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.post-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.post-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.post-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 14, 26, 0.35) 0%, rgba(10, 14, 26, 0.92) 72%, var(--color-navy-deep) 100%),
    linear-gradient(135deg, rgba(0, 150, 199, 0.2) 0%, transparent 45%, rgba(124, 58, 237, 0.15) 100%);
}

[data-theme="light"] .post-hero__overlay {
  background:
    linear-gradient(180deg, rgba(241, 245, 249, 0.2) 0%, rgba(241, 245, 249, 0.94) 75%, var(--color-navy-deep) 100%),
    linear-gradient(135deg, rgba(0, 150, 199, 0.12) 0%, transparent 50%);
}

.post-hero__content {
  position: relative;
  z-index: 1;
  padding: 2rem 0 2.75rem;
  max-width: 900px;
}

.post-hero__breadcrumb {
  margin-bottom: 1.25rem;
}

.post-hero__breadcrumb .breadcrumb__current {
  color: var(--color-white);
  opacity: 0.9;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}

.post-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 150, 199, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}

.post-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 150, 199, 0.45);
  color: #fff;
}

.post-hero__title {
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.post-hero__excerpt {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
  max-width: 65ch;
}

.post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  color: var(--color-white);
  backdrop-filter: blur(8px);
}

.post-meta-chip svg {
  flex-shrink: 0;
  opacity: 0.85;
  color: var(--color-primary-light);
}

.post-meta-chip--muted {
  color: var(--color-muted);
}

/* Body layout */
.post-body {
  margin-top: -1.5rem;
  position: relative;
  z-index: 2;
  padding-bottom: 1rem;
}

.post-layout {
  display: grid;
  grid-template-columns: var(--post-sidebar-w) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
}

.post-sidebar__panel {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-glass-border);
  background: var(--color-glass);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
}

.post-main {
  min-width: 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.post-tags .blog-tag {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  transition: border-color var(--transition), color var(--transition);
}

.post-tags .blog-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
}

.post-content-wrap {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Prose typography */
.post-content.prose {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--color-white);
  max-width: none;
}

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

.post-content.prose h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.post-content.prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.75rem 0 0.65rem;
  color: var(--color-primary-light);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.post-content.prose p {
  margin-bottom: 1.15rem;
}

.post-content.prose ul,
.post-content.prose ol {
  margin: 0 0 1.25rem;
  padding-inline-start: 1.35rem;
}

.post-content.prose ul { list-style: disc; }
.post-content.prose ol { list-style: decimal; }

.post-content.prose li {
  margin-bottom: 0.45rem;
  padding-inline-start: 0.25rem;
}

.post-content.prose li::marker {
  color: var(--color-primary-light);
}

.post-content.prose a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.post-content.prose a:hover {
  color: var(--color-purple-soft);
}

.post-content.prose strong {
  font-weight: 700;
  color: var(--color-white);
}

.post-content.prose blockquote {
  margin: 1.75rem 0;
  padding: 1.15rem 1.35rem;
  border-inline-start: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: linear-gradient(135deg, rgba(0, 150, 199, 0.1), rgba(124, 58, 237, 0.06));
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-muted);
}

.post-content.prose figure {
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.post-content.prose figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-content.prose figcaption {
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  background: var(--color-glass);
}

.post-content.prose code {
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: rgba(0, 150, 199, 0.15);
  color: var(--color-primary-light);
}

.post-content.prose pre {
  margin: 1.5rem 0;
  padding: 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--color-border);
  overflow-x: auto;
}

.post-content.prose pre code {
  padding: 0;
  background: none;
}

.post-content.prose table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.post-content.prose th,
.post-content.prose td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-border);
  text-align: start;
}

.post-content.prose th {
  background: var(--color-glass);
  font-weight: 600;
}

/* TOC */
.post-toc__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: 1rem;
}

.post-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.post-toc__item {
  margin-bottom: 0.35rem;
}

.post-toc__item a {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--color-muted);
  border-inline-start: 2px solid transparent;
  transition: all var(--transition);
}

.post-toc__item a:hover {
  color: var(--color-white);
  background: var(--color-glass);
}

.post-toc__item.is-active a {
  color: var(--color-primary-light);
  border-inline-start-color: var(--color-primary);
  background: rgba(0, 150, 199, 0.1);
  font-weight: 600;
}

.post-toc__item--h3 a {
  padding-inline-start: 1.25rem;
  font-size: 0.82rem;
}

/* Author card */
.post-author-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.post-author-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
  flex-shrink: 0;
}

.post-author-card__name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.post-author-card__role {
  font-size: 0.82rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* Share */
.post-share-panel__label,
.post-share-mobile .post-share-panel__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.85rem;
}

.post-share {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 0.65rem;
}

.post-share--stack {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 76px;
  padding: 0.65rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-glass);
  color: var(--color-white);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.share-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.share-item__icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.share-item__label {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-muted);
  max-width: 100%;
  word-break: break-word;
}

.share-item:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  background: rgba(0, 150, 199, 0.1);
}

.share-item:hover .share-item__label {
  color: var(--color-white);
}

.share-item--facebook:hover { border-color: #1877f2; }
.share-item--facebook:hover .share-item__icon { background: rgba(24, 119, 242, 0.15); color: #1877f2; }

.share-item--x:hover { border-color: #555; background: rgba(0, 0, 0, 0.35); }
.share-item--x:hover .share-item__icon { background: rgba(255, 255, 255, 0.1); }

.share-item--linkedin:hover { border-color: #0a66c2; }
.share-item--linkedin:hover .share-item__icon { background: rgba(10, 102, 194, 0.15); color: #0a66c2; }

.share-item--whatsapp:hover { border-color: #25d366; }
.share-item--whatsapp:hover .share-item__icon { background: rgba(37, 211, 102, 0.12); color: #25d366; }

.share-item--telegram:hover { border-color: #26a5e4; }
.share-item--telegram:hover .share-item__icon { background: rgba(38, 165, 228, 0.12); color: #26a5e4; }

.share-item--email:hover { border-color: var(--color-primary-light); }

.share-item--copy.is-copied {
  border-color: var(--color-primary);
  background: rgba(0, 150, 199, 0.12);
}

.share-item--copy.is-copied .share-item__label {
  color: var(--color-primary-light);
}

.post-share-mobile {
  display: none;
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-glass);
}

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-block: 2.5rem 1rem;
}

.post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-glass-border);
  background: var(--color-glass);
  backdrop-filter: blur(12px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.post-nav__link span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary-light);
}

.post-nav__link strong {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 600;
}

.post-nav__link:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.post-nav__link--next {
  text-align: end;
  align-items: flex-end;
}

/* End CTA */
.post-end-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--gradient-card);
}

.post-end-cta__title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  margin: 0.35rem 0 0.5rem;
  max-width: 22ch;
}

.post-end-cta__desc {
  color: var(--color-muted);
  max-width: 42ch;
  margin: 0;
}

.post-end-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-related {
  padding-top: 0;
}

.post-related .section-title {
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .post-share-panel {
    display: none;
  }

  .post-share-mobile {
    display: block;
  }
}

@media (max-width: 640px) {
  .post-hero {
    min-height: auto;
  }

  .post-hero__media {
    position: relative;
    height: 220px;
  }

  .post-hero__content {
    padding: 1.5rem 0 2rem;
  }

  .post-hero__overlay {
    background: linear-gradient(180deg, transparent 0%, var(--color-navy-deep) 100%);
  }

  .post-sidebar {
    grid-template-columns: 1fr;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav__link--next {
    text-align: start;
    align-items: flex-start;
  }

  .post-end-cta__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .post-end-cta__actions {
    flex-direction: column;
  }

  .post-end-cta__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .blog-featured {
    grid-template-columns: 1fr;
  }
}

.post-content .blog-cta {
  border-radius: var(--radius-lg, 12px);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
}
.post-content .blog-cta h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.post-content .blog-cta p {
  margin: 0.5rem 0;
  opacity: 0.95;
}
.post-content .blog-cta a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}
