/* ===== Cube3 Blog — sistema editorial ===== */

/* ---------- Cards ---------- */
.blog-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  margin-top: var(--space-4);
}
@media (min-width: 720px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
  display: flex;
  flex-direction: column;
  color: inherit;
}
.blog-card__media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-bottom: var(--space-2);
  background: rgba(18,18,26,0.06);
}
.blog-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
@media (prefers-reduced-motion: reduce) { .blog-card__media img { transition: none; } }
.blog-card:hover .blog-card__media img { transform: scale(1.045); }

.blog-card__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,20,0) 55%, rgba(11,11,20,0.55) 100%);
  pointer-events: none;
}
.blog-card__tag {
  position: absolute; left: var(--space-1); bottom: var(--space-1);
  z-index: 1;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--c3-text-on-dark);
  padding: 0.3rem 0.65rem 0.3rem 0.4rem;
  background: rgba(11,11,20,0.35);
  backdrop-filter: blur(3px);
}
.blog-card__tag::before {
  content: ""; width: 7px; height: 7px;
  background: var(--c3-accent-orange);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  flex: none;
}

.blog-card__meta {
  font-size: 0.8125rem;
  color: rgba(18,18,26,0.55);
  display: flex; gap: 0.5rem; align-items: center;
}
.blog-card__meta .dot::before { content: "·"; }

.blog-card h3 {
  font-size: 1.3125rem;
  line-height: 1.2;
  margin-block: 0.35rem 0.45rem;
}
.blog-card h3 a { background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%; background-repeat: no-repeat; background-size: 0% 1px;
  transition: background-size 0.3s ease; }
.blog-card:hover h3 a { background-size: 100% 1px; }
.blog-card p.blog-card__excerpt {
  color: rgba(18,18,26,0.7);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ---------- Category filter ---------- */
.blog-filters {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-top: var(--space-3);
}
.blog-filters a {
  font-size: 0.8125rem; font-weight: 600;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(245,245,247,0.25);
  border-radius: 999px;
  color: rgba(245,245,247,0.75);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.blog-filters a:hover,
.blog-filters a[aria-current="page"] {
  border-color: transparent;
  background: var(--c3-gradient);
  color: var(--c3-text-on-dark);
}

/* ---------- Featured post (blog home) ---------- */
.blog-featured {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(18,18,26,0.1);
}
@media (min-width: 860px) {
  .blog-featured { grid-template-columns: 1.2fr 1fr; align-items: center; gap: var(--space-4); }
}
.blog-featured__media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.blog-featured__media img { width: 100%; height: 100%; object-fit: cover; }
.blog-featured__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,20,0) 55%, rgba(11,11,20,0.5) 100%);
}
.blog-featured__tag {
  position: absolute; left: var(--space-2); bottom: var(--space-2); z-index: 1;
  font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  color: var(--c3-text-on-dark);
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.75rem 0.35rem 0.5rem;
  background: rgba(11,11,20,0.35);
}
.blog-featured__tag::before {
  content: ""; width: 8px; height: 8px;
  background: var(--c3-accent-orange);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  flex: none;
}
.blog-featured__title { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.1; margin-bottom: var(--space-2); }
.blog-featured__excerpt { color: rgba(18,18,26,0.75); font-size: 1.0625rem; line-height: 1.6; margin-bottom: var(--space-2); }
.blog-featured__link { font-weight: 600; }
.blog-featured__link .arrow { display: inline-block; transition: transform 0.25s ease; }
.blog-featured__link:hover .arrow { transform: translateX(4px); }

/* ---------- Pagination ---------- */
.blog-pagination { margin-top: var(--space-5); display: flex; gap: var(--space-2); }
.blog-pagination .page-numbers { padding: 0.5rem 0.9rem; border: 1px solid rgba(18,18,26,0.2); border-radius: 999px; }
.blog-pagination .page-numbers.current { background: var(--c3-gradient); color: var(--c3-text-on-dark); border-color: transparent; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
  font-size: 0.8125rem; color: rgba(245,245,247,0.6); margin-bottom: var(--space-3);
}
.breadcrumbs a { color: rgba(245,245,247,0.75); }
.breadcrumbs a:hover { color: var(--c3-text-on-dark); text-decoration: underline; }
.breadcrumbs span[aria-current] { color: rgba(245,245,247,0.9); }

/* ---------- Reading progress bar ---------- */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--c3-gradient);
  z-index: 200;
  transition: width 0.1s linear;
}
@media (prefers-reduced-motion: reduce) { .reading-progress { transition: none; } }

/* ---------- Article header ---------- */
.article-header__dek {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.5;
  color: rgba(245,245,247,0.85);
  max-width: 46rem;
  margin-top: var(--space-2);
}
.blog-post__meta {
  font-size: 0.9375rem; color: rgba(245,245,247,0.75); margin-top: var(--space-3);
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}

/* ---------- Article layout / reading column ---------- */
.article-body {
  max-width: 42rem;
  margin-inline: auto;
  font-size: 1.125rem;
  line-height: 1.75;
}
.article-body > * + * { margin-top: 1.35em; }
.article-body h2 {
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  margin-top: 2.1em;
  margin-bottom: 0.6em;
  scroll-margin-top: 5.5rem;
}
.article-body h3 {
  font-size: 1.1875rem;
  margin-top: 1.7em;
  margin-bottom: 0.5em;
  scroll-margin-top: 5.5rem;
}
.article-body p { color: rgba(18,18,26,0.85); }
.article-body ul, .article-body ol {
  padding-left: 1.3em;
  color: rgba(18,18,26,0.85);
}
.article-body li + li { margin-top: 0.5em; }
.article-body li::marker { color: var(--c3-accent-orange-deep); font-weight: 700; }
.article-body a:not(.btn) {
  text-decoration: underline;
  text-decoration-color: rgba(168,61,25,0.4);
  text-underline-offset: 3px;
}
.article-body a:not(.btn):hover { text-decoration-color: var(--c3-accent-orange-deep); }

.editorial-highlight {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  line-height: 1.35;
  color: var(--c3-text-on-light);
  border-left: 3px solid var(--c3-accent-orange);
  padding-left: 1.1em;
  margin-block: 2em !important;
}

.info-box {
  background: rgba(110,32,217,0.05);
  border: 1px solid rgba(110,32,217,0.15);
  padding: var(--space-2) var(--space-3);
}
.info-box__label {
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 700; color: var(--c3-accent-orange-deep);
  margin-bottom: 0.4em !important;
}
.info-box p:last-child { margin-top: 0 !important; }

.article-body figure { margin-block: 1.6em !important; }
.article-body figcaption {
  font-size: 0.8125rem; color: rgba(18,18,26,0.55);
  margin-top: 0.5em; text-align: center;
}

/* ---------- Table of contents ---------- */
.article-toc {
  max-width: 42rem;
  margin: var(--space-4) auto;
  border: 1px solid rgba(18,18,26,0.12);
  padding: var(--space-2) var(--space-3);
}
.article-toc summary {
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.article-toc summary::-webkit-details-marker { display: none; }
.article-toc summary::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.article-toc[open] summary::after { transform: rotate(-135deg); }
.article-toc ol {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  counter-reset: toc;
}
.article-toc li { counter-increment: toc; margin-top: 0.6em; }
.article-toc li::before {
  content: counter(toc, decimal-leading-zero) " — ";
  color: var(--c3-accent-orange-deep);
  font-weight: 700;
}
.article-toc a { font-size: 0.9375rem; }
.article-toc a:hover { text-decoration: underline; }

/* ---------- Contextual CTA ---------- */
.article-cta {
  max-width: 42rem;
  margin: var(--space-5) auto 0;
  padding: var(--space-3);
  background: var(--c3-ink);
  color: var(--c3-text-on-dark);
  position: relative;
  overflow: hidden;
}
.article-cta::before {
  content: "";
  position: absolute; top: -30px; right: -30px;
  width: 140px; height: 140px;
  background: var(--c3-gradient);
  opacity: 0.35;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.article-cta__heading {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  margin-bottom: 0.5em;
  position: relative;
}
.article-cta p { position: relative; color: rgba(245,245,247,0.85); }
.article-cta .btn { margin-top: var(--space-2); position: relative; }

/* ---------- Share row ---------- */
.share-row {
  max-width: 42rem;
  margin: var(--space-4) auto 0;
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.share-row__label { font-size: 0.8125rem; color: rgba(18,18,26,0.55); font-weight: 600; }
.share-row a, .share-row button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid rgba(18,18,26,0.15);
  border-radius: 50%;
  color: rgba(18,18,26,0.7);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
  font-family: var(--font-body);
}
.share-row a:hover, .share-row button:hover {
  border-color: var(--c3-accent-orange-deep);
  color: var(--c3-accent-orange-deep);
}
.share-row svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Related articles ---------- */
.article-related {
  max-width: var(--container-max);
  margin-inline: auto;
}
.article-related h2 {
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  margin-bottom: var(--space-3);
}

@media (min-width: 720px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
