/* ============================================================
   SINGLE POST — HERO
   ============================================================ */

.post-hero {
  position: relative;
  height: 400px;
  display: flex;
  align-items: flex-end;
  border-radius: var(--border-radius);
}

.post-hero--no-image {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.post-body ul li::marker {
  color: var(--color-marker);
}
.post-body ul li {
  color: var(--color-text-secondary);
}

.post-body ul li strong {
  font-weight: 700;
  color: var(--color-text);
}

.post-body a {
  font-weight: 500;
  color: var(--color-green-dark);
  text-decoration: underline;
  transition: var(--transition);
}
.post-body a:hover {
  opacity: 0.5;
}

/* Full-bleed background image */
.post-hero__bg {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.post-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Subtle gradient so the card reads cleanly */
.post-hero--no-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-bg-page);
  pointer-events: none;
}

/* Info card at bottom-left */
.post-hero__card {
  position: relative;
  z-index: 3;
  width: fit-content;
  max-width: 40%;
  border-radius: var(--border-radius);
  padding: 24px;
  background-color: var(--color-bg-page);
  margin-left: 32px;
  margin-bottom: -32px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.post-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.post-hero__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.post-hero__title {
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 10px;
}

.post-hero__date {
  display: block;
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* No featured image variant */
.post-hero--no-image {
  align-items: center;
  padding: 56px 40px;
  min-height: 220px;
}

.post-hero--no-image .post-hero__card {
  box-shadow: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

/* ============================================================
   SINGLE POST — BODY CONTENT
   ============================================================ */

.post-body {
  margin-left: auto;
  margin-right: auto;
}

.post-body > * + * {
  margin-top: 24px;
}

.post-body p {
  font-size: 16px;
  line-height: 20px;
  color: var(--color-text);
}

.post-body p strong {
  font-weight: 700;
}

.post-body ul {
  padding-left: 24px;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-text);
}

/* ol styled like ita-tws-list */
.post-body ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: ita-ol-counter;
  background-color: var(--color-bg-page);
  border-radius: var(--border-radius);
  padding: 24px;
  margin-top: 24px;
}

.post-body ol li {
  counter-increment: ita-ol-counter;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-default, #e8e8e3);
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text-secondary);
}

.post-body ol li:last-child {
  border-bottom: none;
}

.post-body ol li::before {
  content: counter(ita-ol-counter, decimal-leading-zero);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-text);
  flex-shrink: 0;
  min-width: 48px;
}

.post-body figure img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  display: block;
}

.post-body figcaption {
  font-size: 13px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: 8px;
}

.post-body blockquote {
  border-left: none;
  margin: 24px 0;
  padding: 24px;
  font-style: normal;
  background: var(--color-bg-surface);
  border-radius: var(--border-radius);
  text-align: center;
}

.post-body blockquote p {
  font-size: 24px;
  font-weight: 700;
  line-height: 22px;
  color: var(--color-text);
  margin: 0;
}

.post-body blockquote p::before {
  content: "\201C";
}

.post-body blockquote p:last-of-type::after {
  content: "\201D";
}

.post-body blockquote cite {
  display: block;
  margin-top: 16px;
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
  line-height: 22px;
  color: var(--color-text);
  text-align: center;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--color-border-default);
}

/* ============================================================
   SINGLE POST — TARJETA AUTOR
   ============================================================ */

.post-autor {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-top: 48px;
  padding: 24px;
}

.post-autor__foto {
  flex-shrink: 0;
  margin: 0;
  width: 100px;
  height: auto;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.post-autor__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-autor__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--color-border-default);
  border-radius: var(--border-radius);
  padding: 24px;
}

.post-autor__nombre {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.post-autor__rol {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
}

.post-autor__bio {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ============================================================
   SINGLE POST — ARTÍCULOS RELACIONADOS
   ============================================================ */

.post-related {
  margin-top: 64px;
}

.post-related__title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 32px;
}

.post-related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.post-related__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--border-radius);
}

.post-related__card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.post-related__card-date {
  font-size: 13px;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.post-related__card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ita-actualidad-card__badge {
  display: inline-block;
  background: var(--color-tag-bg);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text);
  white-space: nowrap;
}

.post-related__card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  flex: 1;
  margin: 0;
}

.post-related__card-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.post-related__card-title a:hover {
  color: var(--color-green-dark);
}

.post-related__card-cta {
  align-self: flex-start;
  margin-top: auto;
}

.post-related__footer {
  margin-top: 24px;
  padding-top: 4px;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .post-related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .post-related__grid {
    grid-template-columns: 1fr;
  }

  .post-hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0 !important;
    margin-bottom: 0;
    gap: 8px;
  }

  .post-hero__bg {
    position: relative;
    inset: auto;
    height: 370px;
    flex-shrink: 0;
  }
  .post-hero__card {
    position: relative;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 24px;
    border-radius: var(--border-radius);
    animation: none;
  }

  .post-hero {
    height: fit-content;
  }
}
