/* Blog — listado y artículo */

body.page-blog {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.page-blog .tn-page-header {
  flex-shrink: 0;
}

body.page-blog .body-wrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

body.page-blog .tn-site-footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* —— Artículo individual —— */
.tn-blog-article {
  background: var(--tn-bg-card, #1a1a1a);
  border: 1px solid var(--tn-border-strong, rgba(255, 255, 255, 0.18));
  border-radius: var(--tn-radius-lg, 16px);
  box-shadow: var(--tn-shadow, 0 12px 40px rgba(0, 0, 0, 0.45)), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.tn-blog-single > .tn-blog-breadcrumb {
  display: none;
}

.tn-blog-article__hero {
  padding: clamp(24px, 4vw, 32px) clamp(20px, 4vw, 32px) clamp(20px, 3vw, 28px);
  border-bottom: 1px solid var(--tn-border, rgba(255, 255, 255, 0.1));
  background: linear-gradient(180deg, rgba(255, 154, 0, 0.07) 0%, transparent 55%);
}

.tn-blog-article__hero .tn-blog-breadcrumb {
  margin-bottom: 1.1rem;
}

.tn-blog-article__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tn-brand, #ff9a00);
  background: var(--tn-brand-soft, rgba(255, 154, 0, 0.15));
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.tn-blog-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tn-blog-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--tn-text-soft, rgba(255, 255, 255, 0.72));
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--tn-border, rgba(255, 255, 255, 0.1));
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.tn-blog-article__title {
  font-size: clamp(1.55rem, 4.2vw, 2.05rem);
  font-weight: 700;
  line-height: 1.28;
  margin: 0 0 0.85rem;
  color: var(--tn-text, #fff);
  text-wrap: balance;
}

.tn-blog-article__lead {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--tn-text-secondary, #c8c8c8);
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.tn-blog-article__figure {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  max-width: 400px;
  margin: 0.25rem auto 0;
  border-radius: var(--tn-radius, 12px);
  overflow: hidden;
  border: 1px solid var(--tn-border, rgba(255, 255, 255, 0.12));
  background: #141418;
}

.tn-blog-article__figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.tn-blog-article__credit {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  text-align: right;
}

.tn-blog-article__body {
  padding: clamp(24px, 4vw, 32px) clamp(20px, 4vw, 32px);
}

/* —— Contenido del artículo —— */
.tn-blog-content {
  color: var(--tn-text-secondary, #d0d0d0);
  font-size: 1.04rem;
  line-height: 1.78;
}

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

.tn-blog-content > *:last-child {
  margin-bottom: 0;
}

.tn-blog-content p {
  margin: 0 0 1.15rem;
}

.tn-blog-content h2 {
  font-size: 1.38rem;
  font-weight: 700;
  color: var(--tn-text, #fff);
  margin: 2.25rem 0 0.85rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--tn-brand, #ff9a00);
  line-height: 1.35;
}

.tn-blog-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--tn-text, #fff);
  margin: 1.65rem 0 0.6rem;
  line-height: 1.4;
}

.tn-blog-content h4 {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--tn-text, #fff);
  margin: 1.25rem 0 0.5rem;
}

.tn-blog-content ul,
.tn-blog-content ol {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}

.tn-blog-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.15rem;
}

.tn-blog-content li::marker {
  color: var(--tn-accent, #ff9a00);
}

.tn-blog-content a {
  color: var(--tn-accent, #ff9a00);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 154, 0, 0.45);
}

.tn-blog-content a:hover {
  color: #ffb84d;
  text-decoration-color: #ffb84d;
}

.tn-blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.35rem 0;
  display: block;
  border: 1px solid var(--tn-border, rgba(255, 255, 255, 0.1));
}

.tn-blog-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--tn-accent, #ff9a00);
  background: rgba(255, 154, 0, 0.08);
  border-radius: 0 12px 12px 0;
  color: var(--tn-text, #fff);
  font-style: italic;
}

.tn-blog-content strong {
  color: var(--tn-text, #fff);
  font-weight: 600;
}

.tn-blog-content table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
  border-radius: 12px;
  overflow: hidden;
}

.tn-blog-content th,
.tn-blog-content td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--tn-border, rgba(255, 255, 255, 0.12));
  text-align: left;
}

.tn-blog-content th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--tn-text, #fff);
  font-weight: 600;
}

.tn-blog-article__footer {
  padding: clamp(20px, 3vw, 28px) clamp(20px, 4vw, 32px) clamp(24px, 4vw, 32px);
  border-top: 1px solid var(--tn-border, rgba(255, 255, 255, 0.1));
  background: rgba(0, 0, 0, 0.2);
}

.tn-blog-article__cta {
  text-align: center;
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(255, 154, 0, 0.12) 0%, rgba(255, 154, 0, 0.04) 100%);
  border: 1px solid rgba(255, 154, 0, 0.22);
  border-radius: var(--tn-radius, 12px);
}

.tn-blog-article__cta-text {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--tn-text-secondary, #e2e2e2);
  text-wrap: balance;
}

.tn-blog-article__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tn-blog-article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tn-blog-article__link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--tn-brand, #ff9a00);
  text-decoration: none;
}

.tn-blog-article__link:hover {
  text-decoration: underline;
}

/* —— Artículos relacionados —— */
.tn-blog-related {
  margin-top: clamp(28px, 4vw, 40px);
}

.tn-blog-related__title {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: var(--tn-text, #fff);
  margin: 0 0 1rem;
}

.tn-blog-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.tn-blog-related__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--tn-border, rgba(255, 255, 255, 0.12));
  border-radius: var(--tn-radius, 12px);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tn-blog-related__card:hover {
  border-color: rgba(255, 154, 0, 0.4);
  transform: translateY(-2px);
  text-decoration: none;
}

.tn-blog-related__label {
  font-weight: 700;
  color: var(--tn-brand, #ff9a00);
  font-size: 0.95rem;
  line-height: 1.35;
}

.tn-blog-related__desc {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--tn-text-secondary, #c0c0c0);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 575px) {
  .tn-blog-article__nav {
    flex-direction: column;
    align-items: stretch;
  }

  .tn-blog-article__nav .btn {
    width: 100%;
    justify-content: center;
  }

  .tn-blog-article__link {
    text-align: center;
  }
}
