/* ============================================================================
   BLOG & ARTICLE STYLES
   Styles specific to blog.html and article.html pages
   ============================================================================ */

/* PAGINA BLOG */

.blog-hero {
  position: relative;
  padding: clamp(72px, 10vh, 110px) 0 var(--space-xl);
  background: var(--bg-hero);
  overflow: hidden;
}
.blog-hero .section-label {
  margin-bottom: var(--space-sm);
}
.blog-hero .section-title {
  margin-bottom: var(--space-xs);
}
.blog-hero .section-description {
  max-width: 70ch;
}

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}
.blog-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 460px;
}
.blog-search input {
  width: 100%;
  min-height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-border);
  background: var(--white);
  padding: 10px 12px 10px 38px;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-sm);
}
.blog-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.blog-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--ink-border);
  background: var(--surface);
  color: var(--ink-700);
  font-weight: 600;
  font-size: var(--fs-xs);
  transition: all var(--transition-base);
}
.chip:hover {
  transform: translateY(-1px);
  background: var(--accent-violet) 100%;
  color: var(--white);
}
.chip--active {
  background: var(--accent-violet) !important;
  color: #fff !important;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}
@media (max-width: 1000px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: var(--space-md);
}
@media (max-width: 720px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-sm);
  transition: transform var(--transition-base),
    box-shadow var(--transition-base), border-color var(--transition-base);
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-border);
  box-shadow: var(--shadow-md);
}
.post-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-soft);
}
.post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.5s ease;
}
.post-card:hover .post-media img {
  transform: scale(1.04);
}

.post-content {
  display: grid;
  gap: 8px;
  padding: 2px 6px 6px;
}
.post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.post-tag {
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  background: var(--ink-soft);
  border: 1px solid var(--ink-border);
  color: var(--ink-700);
}
.post-title {
  margin: 2px 0 0;
  font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}
.post-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: var(--fs-xs);
}
.post-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-border);
}
.post-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-border);
  background: var(--surface);
  transition: all var(--transition-base);
}
.post-cta:hover {
  color: var(--ink);
  border-color: var(--brand-border);
  background: var(--bg-hero);
  transform: translateY(-1px);
}
.post-cta svg {
  width: 16px;
  height: 16px;
}

.blog-sidebar {
  display: grid;
  gap: var(--space-md);
  align-content: start;
}
.side-card {
  background: var(--surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md);
}
.side-title {
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--ink);
  font-size: var(--fs-lg);
}
.side-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.side-list a {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
  font-size: var(--fs-sm);
}
.side-list a span {
  color: var(--muted);
  font-weight: 500;
}
.side-list a:hover {
  color: var(--ink-700);
}

.newsletter {
  display: grid;
  gap: var(--space-xs);
}
.newsletter input {
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-border);
  padding: 8px 10px;
  background: var(--white);
}

.blog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--space-xl);
}
.page {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--fs-sm);
  transition: all var(--transition-base);
}
.page:hover {
  transform: translateY(-1px);
  border-color: var(--brand-border);
}
.page.is-current {
  background: linear-gradient(
    90deg,
    var(--ink-700) 0%,
    var(--ink) 45%,
    var(--accent-violet) 100%
  );
  color: var(--white);
  border-color: rgba(109, 123, 255, 0.35);
  box-shadow: 0 8px 18px rgba(109, 123, 255, 0.28);
}
.post-card.is-hidden {
  display: none !important;
}

/* ============================================================================
   ARTICLE PAGE - Optimized for Reading Experience
   ============================================================================ */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--ink-soft);
  z-index: 1000;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.article-page .reading-progress {
  opacity: 1;
}

.reading-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent-violet));
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: var(--space-md) 0;
  background: var(--surface);
  border-bottom: 1px solid var(--ink-border);
}

.breadcrumbs__list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.breadcrumbs__list li:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
  color: var(--ink-border);
}

.breadcrumbs__list a {
  color: var(--muted);
  transition: color var(--transition-base);
}

.breadcrumbs__list a:hover {
  color: var(--ink);
}

.breadcrumbs__current {
  color: var(--ink);
  font-weight: 600;
}

/* Article Hero */
.article-hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  background: var(--bg-hero);
}

.article-hero__content {
  max-width: 800px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}

.article-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.article-tag {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: var(--brand-soft);
  color: var(--brand-700);
  border: 1px solid var(--brand-border);
}

.article-title {
  margin: 0 0 var(--space-md);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.article-excerpt {
  margin: 0 0 var(--space-lg);
  font-size: var(--fs-xl);
  line-height: 1.6;
  color: var(--muted);
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  max-width: 70ch;
  margin: 0 auto;
}

.article-meta__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-meta__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-border);
}

.article-meta__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.article-meta__name {
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--ink);
}

.article-meta__date {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.article-meta__stats {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.article-meta__reading-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.article-meta__reading-time svg {
  width: 16px;
  height: 16px;
}

.article-hero__image {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 21 / 9;
  background: var(--surface-soft);
}

.article-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article Layout */
.article-layout {
  padding: var(--space-3xl) 0;
}

.article-grid {
  display: grid;
  grid-template-columns: 80px 1fr 280px;
  gap: var(--space-2xl);
  align-items: start;
}

@media (max-width: 1200px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .article-sidebar--left,
  .article-sidebar--right {
    display: none;
  }
}

/* Article Content - Optimized Typography */
.article-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
}

.article-content > * + * {
  margin-top: 1.5em;
}

.article-content h2 {
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
}

.article-content h3 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-size: clamp(1.3rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  scroll-margin-top: 100px;
}

.article-content h2:first-child,
.article-content h3:first-child {
  margin-top: 0;
}

.article-content p {
  margin: 0 0 1.5em;
  max-width: 65ch;
}

.article-content a {
  color: var(--accent-violet);
  text-decoration: underline;
  text-decoration-color: var(--violet-30);
  text-underline-offset: 3px;
  transition: all var(--transition-base);
}

.article-content a:hover {
  color: var(--ink);
  text-decoration-color: var(--accent-violet);
}

.article-content strong {
  font-weight: 700;
  color: var(--ink-700);
}

.article-content em {
  font-style: italic;
  color: var(--ink-700);
}

.article-content ul,
.article-content ol {
  padding-left: 1.5em;
  margin: 1.5em 0;
}

.article-content li {
  margin: 0.75em 0;
  padding-left: 0.5em;
}

.article-content li::marker {
  color: var(--brand);
  font-weight: 700;
}

.article-content blockquote {
  margin: 2em 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ink-700);
}

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

.article-content code {
  padding: 3px 6px;
  background: var(--ink-soft);
  border-radius: var(--radius-sm);
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
  font-size: 0.9em;
  color: var(--accent-violet);
}

.article-content pre {
  margin: 2em 0;
  padding: var(--space-lg);
  background: var(--ink);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-md);
  position: relative;
}

.article-content pre code {
  padding: 0;
  background: none;
  color: #e6e6e6;
  font-size: 0.9rem;
  line-height: 1.6;
}

.code-copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-base);
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.code-copy-btn svg {
  width: 14px;
  height: 14px;
}

.code-copy-btn.copied {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink);
}

.article-content hr {
  margin: 3em 0;
  border: none;
  border-top: 2px solid var(--ink-border);
  opacity: 0.5;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 2em 0;
}

/* Article CTA */
.article-cta {
  margin: 3em 0;
  padding: var(--space-xl);
  background: linear-gradient(135deg, var(--brand-soft), var(--surface-soft));
  border: 2px solid var(--brand-border);
  border-radius: var(--radius-xl);
  text-align: center;
}

.article-cta h3 {
  margin: 0 0 var(--space-sm);
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--ink);
}

.article-cta p {
  margin: 0 0 var(--space-lg);
  color: var(--muted);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

/* Sidebars */
.article-sidebar {
  position: relative;
}

.article-sidebar--left {
  grid-column: 1;
}

.article-sidebar--right {
  grid-column: 3;
}

/* Share Buttons */
.article-share {
  position: sticky;
  top: 100px;
}

.article-share--sticky {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.article-share--sticky.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.article-share__title {
  margin: 0 0 var(--space-sm);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-share__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  color: var(--ink);
  cursor: pointer;
  transition: all var(--transition-base);
}

.share-btn svg {
  width: 18px;
  height: 18px;
}

.share-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-btn--copied {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink);
}

/* Table of Contents */
.table-of-contents {
  position: sticky;
  top: 100px;
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-lg);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.toc__title {
  margin: 0 0 var(--space-md);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--ink);
}

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

.toc__item {
  margin: 0;
  padding: 0;
}

.toc__item--nested {
  padding-left: var(--space-md);
}

.toc__link {
  display: block;
  padding: 8px 12px;
  font-size: var(--fs-sm);
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: all var(--transition-base);
  margin-left: -12px;
}

.toc__link:hover {
  color: var(--ink);
  background: var(--ink-soft);
  border-left-color: var(--brand);
}

.toc__link--active {
  color: var(--brand-700);
  font-weight: 600;
  border-left-color: var(--brand);
  background: var(--brand-soft);
}

/* Related Articles */
.related-articles {
  padding: var(--space-3xl) 0;
  background: var(--bg-section);
}

.related-articles__title {
  margin: 0 0 var(--space-xl);
  font-size: var(--fs-3xl);
  font-weight: 800;
  text-align: center;
  color: var(--ink);
}

.related-articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.related-card {
  background: var(--surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-border);
}

.related-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-soft);
}

.related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.related-card__content {
  padding: var(--space-lg);
}

.related-card__tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--brand-soft);
  color: var(--brand-700);
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.related-card__title {
  margin: 0 0 var(--space-sm);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.4;
}

.related-card__title a {
  color: var(--ink);
  transition: color var(--transition-base);
}

.related-card__title a:hover {
  color: var(--brand-700);
}

.related-card__time {
  display: block;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.related-articles__cta {
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .article-hero {
    padding: var(--space-lg) 0;
  }

  .article-hero__content {
    max-width: 100%;
    padding: 0 var(--space-sm);
  }

  .article-title {
    font-size: 1.8rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .article-excerpt {
    font-size: var(--fs-lg);
    max-width: 100%;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .article-meta__author {
    width: 100%;
  }

  .article-meta__stats {
    width: 100%;
  }

  .article-content {
    font-size: 17px;
  }

  .article-content h2 {
    font-size: 1.5rem;
  }

  .article-content h3 {
    font-size: 1.25rem;
  }

  .article-hero__image {
    border-radius: var(--radius-md);
    margin: 0 calc(-1 * var(--space-md));
    max-width: calc(100% + 2 * var(--space-md));
    border-radius: 0;
  }

  .related-articles__grid {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .article-sidebar--left,
  .article-sidebar--right {
    display: none;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .article-excerpt {
    font-size: var(--fs-base);
    line-height: 1.65;
  }

  .article-tags {
    gap: 6px;
  }

  .article-tag {
    font-size: 11px;
    padding: 4px 10px;
  }

  .article-meta__avatar {
    width: 36px;
    height: 36px;
  }

  .article-meta__name,
  .article-meta__date,
  .article-meta__reading-time {
    font-size: 13px;
  }
}

/* ============================================================================
   MODERN BLOG REDESIGN - Consistent with index.html & services.html
   ============================================================================ */

/* Modern Hero - White background with pattern */
.blog-hero--modern {
  background: var(--white);
  background-image: url("assets/brackia-white-background.png");
  background-size: cover;
  background-repeat: no-repeat;
  padding: 120px 0 80px;
  min-height: 500px;
}

.blog-hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 100;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.blog-hero-title .text-bold {
  font-weight: 800;
}

.blog-hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ink-700);
  max-width: 60ch;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Glassmorphism Toolbar */
.blog-toolbar--glass {
  background: var(--white-86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  box-shadow: 0 10px 30px rgba(33, 59, 82, 0.1);
  margin-top: var(--space-xl);
}

.blog-toolbar--glass .blog-search input {
  background: var(--white);
  border: 1px solid var(--ink-border);
}

.blog-toolbar--glass .chip {
  background: var(--surface);
  border-color: var(--ink-border);
}

.blog-toolbar--glass .chip--active {
  background: var(--gold-600) !important;
  color: var(--ink-700) !important;
  border-color: var(--gold-600) !important;
}

/* Premium Card Styles */
.posts-grid--modern {
  gap: 64px;
}

.post-card--modern {
  background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%);
  border: 1px solid rgba(33, 59, 82, 0.14);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(33, 59, 82, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
  position: relative;
  transition: all var(--transition-base);
}

.post-card--modern::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(
    90deg,
    var(--ink-700) 0%,
    var(--accent-violet) 100%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
}

.post-card--modern:hover::before {
  opacity: 1;
}

.post-card--modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(33, 59, 82, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

/* Featured Post Variant */
.post-card--featured::before {
  opacity: 1 !important;
  background: linear-gradient(90deg, var(--gold-600) 0%, var(--gold-700) 100%);
  width: 6px;
}

.post-card--featured {
  box-shadow: 0 12px 36px rgba(33, 59, 82, 0.12),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

/* Modern CTA Button */
.post-cta--modern {
  background: linear-gradient(
    90deg,
    var(--ink-700) 0%,
    var(--accent-violet) 100%
  );
  color: var(--white) !important;
  border: none !important;
  font-weight: 700;
  padding: 8px 14px;
  box-shadow: 0 4px 12px var(--violet-20);
  transition: all var(--transition-base);
}

.post-cta--modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--violet-30);
}

/* ============================================================================
   ARTICLE PAGE MODERN STYLES
   ============================================================================ */

/* Modern Article Hero */
.article-hero--modern {
  background: var(--white);
  background-image: url("assets/brackia-white-background.png");
  background-size: cover;
  background-repeat: no-repeat;
  padding: 100px 0 60px;
}

.article-hero__content--glass {
  background: var(--white-90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: 0 10px 40px rgba(33, 59, 82, 0.12);
  margin-bottom: var(--space-xl);
}

.article-title--modern {
  font-weight: 100;
  color: var(--ink);
}

.article-title--modern .text-bold {
  font-weight: 800;
}

.article-tag--modern {
  background: var(--gold-600);
  color: var(--ink-700);
  border: none;
}

/* Premium TOC */
.table-of-contents--modern {
  background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%);
  border: 1px solid rgba(33, 59, 82, 0.14);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(33, 59, 82, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

.table-of-contents--modern .toc__link--active {
  color: var(--gold-600);
  border-left-color: var(--gold-600);
  background: var(--gold-14);
}

/* Premium Share Buttons */
.share-btn--modern {
  background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%);
  border: 1px solid rgba(33, 59, 82, 0.14);
  box-shadow: 0 4px 12px rgba(33, 59, 82, 0.08);
  transition: all var(--transition-base);
}

.share-btn--modern:hover {
  background: var(--accent-violet);
  border-color: var(--accent-violet);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--violet-30);
  color: var(--white);
}

/* Related Articles - Modern Background */
.related-articles--modern {
  background: var(--white);
  background-image: url("assets/brackia-white-background.png");
  background-size: cover;
  background-repeat: no-repeat;
}

.related-articles__grid--modern {
  gap: 64px;
}

.related-card--modern {
  background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%);
  border: 1px solid rgba(33, 59, 82, 0.14);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(33, 59, 82, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
  transition: all var(--transition-base);
}

.related-card--modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(33, 59, 82, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

/* ============================================================================
   FLOATING TOC BUTTON (Mobile)
   ============================================================================ */

.toc-floating-btn {
  position: fixed;
  bottom: 69px;
  right: 16px;
  width: 42px;
  height: 42px;
  background: linear-gradient(
    90deg,
    var(--ink-700) 0%,
    var(--accent-violet) 100%
  );
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px var(--violet-30);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.toc-floating-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px var(--violet-40);
}

.toc-floating-btn svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 1024px) {
  .toc-floating-btn {
    display: flex;
  }
}

/* TOC Overlay (Mobile) */
.toc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.toc-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.toc-overlay__content {
  background: var(--white);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: var(--space-xl);
  max-height: 70vh;
  overflow-y: auto;
  width: 100%;
  max-width: 600px;
  transform: translateY(100%);
  transition: transform var(--transition-base);
  box-shadow: 0 -8px 32px rgba(30, 41, 59, 0.2);
}

.toc-overlay.is-open .toc-overlay__content {
  transform: translateY(0);
}

.toc-overlay__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-full);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-base);
}

.toc-overlay__close:hover {
  background: var(--ink);
  color: var(--white);
  transform: rotate(90deg);
}

@media (max-width: 480px) {
  .blog-hero--modern {
    padding: 80px 0 60px;
    min-height: 400px;
  }

  .blog-hero-title {
    font-size: clamp(32px, 8vw, 48px);
  }

  .blog-toolbar--glass {
    padding: var(--space-sm);
  }

  .posts-grid--modern {
    gap: var(--space-lg);
  }

  .article-hero--modern {
    padding: 80px 0 40px;
  }

  .article-hero__content--glass {
    padding: var(--space-lg);
  }
}
