/* Entrada del blog (single) */

/* Migas de pan (componente) */
/* Bootstrap también define .breadcrumb (flex + márgenes): se neutraliza para que el recorte con "…" funcione */
.breadcrumb {
  display: block;
  margin: 0;
  padding: 0;
}

.breadcrumb__list {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.4rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1.3rem;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  margin: 0 0.8rem;
  opacity: 0.6;
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  text-decoration: underline;
}

/* Hero: caja redondeada con imagen de fondo + overlay */
.post-hero {
  padding-bottom: 0;
}

.post-hero__box {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 44rem;
  padding: 4.8rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--color-primary);
  color: var(--color-text-on-dark);
}

.post-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero__box::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.post-hero__inner {
  width: 100%;
  min-width: 0;
}

.post-hero__inner > * + * {
  margin-top: 1.6rem;
}

.post-hero .breadcrumb,
.post-hero .eyebrow,
.post-hero__title,
.post-hero__meta {
  color: var(--color-text-on-dark);
}

.post-hero__title {
  max-width: 90rem;
  font-size: clamp(3.2rem, 4.4vw, 4.8rem);
  line-height: 1.15;
}

.post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.4rem;
  margin: 2.4rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1.4rem;
}

.post-hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.post-hero__meta .material-symbols-outlined {
  font-size: 1.8rem;
  color: var(--color-secondary);
}

/* Datos de la entrada fuera del hero: solo en móvil */
.post-meta {
  display: none;
}
/* Cuerpo: contenido + aside fijo */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36rem;
  gap: 5.6rem;
  align-items: start;
}

.post-main {
  max-width: 82rem;
}

/* Tabla de contenido */
.post-toc {
  margin: 4.8rem 0 0;
  padding: 2.4rem 2.8rem;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-soft);
}

.post-toc__title {
  cursor: pointer;
  font-size: 2rem;
  font-weight: var(--font-weight-semibold);
  list-style: none;
}

.post-toc__title::-webkit-details-marker {
  display: none;
}

.post-toc__title::after {
  content: "expand_more";
  float: right;
  font-family: "Material Symbols Outlined";
  font-size: 2.4rem;
  line-height: 1;
  color: var(--color-primary);
  transition: transform var(--transition-base);
}

.post-toc details[open] .post-toc__title::after {
  transform: rotate(180deg);
}

.post-toc__list {
  display: grid;
  gap: 0.8rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.post-toc__item--h2 {
  counter-increment: toc;
}

.post-toc__item--h2 a::before {
  content: counter(toc) ". ";
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

.post-toc a {
  color: var(--color-text);
  font-size: 1.5rem;
  text-decoration: none;
}

.post-toc a:hover,
.post-toc a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Contenido: columna de lectura */
.post-content > * + * {
  margin-top: 2rem;
}

.post-content h2,
.post-content h3 {
  scroll-margin-top: 12rem;
}

.post-content h2 {
  margin-top: 4.8rem;
  font-size: 3.2rem;
}

.post-content h3 {
  margin-top: 3.2rem;
  font-size: 2.4rem;
}

.post-content p,
.post-content li {
  font-size: 1.8rem;
  line-height: 1.75;
}

.post-content ul,
.post-content ol {
  padding-left: 2.4rem;
}

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

.post-content li + li {
  margin-top: 0.8rem;
}

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

.post-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.post-content img {
  border-radius: var(--radius-lg);
}

.post-content blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 2.4rem 3.2rem;
  border-left: 0.5rem solid var(--color-gray);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background-color: #f4f4f4;
}

.post-content blockquote p {
  font-size: 2rem;
  font-weight: var(--font-weight-regular);
  color: var(--color-text);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 4rem 0 0;
  padding: 0;
  list-style: none;
}

.post-tags a {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface-soft);
  font-size: 1.3rem;
  color: var(--color-primary);
  text-decoration: none;
}

.post-tags a:hover {
  background-color: var(--color-surface);
}

/* Final del contenido: cambiar de entrada, compartir y autor (bloques planos separados por bordes) */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.2rem;
  margin-top: 4.8rem;
  padding: 2.4rem 0;
  border-top: 0.1rem solid var(--color-border-soft);
  border-bottom: 0.1rem solid var(--color-border-soft);
}

.post-nav__link {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  color: var(--color-text);
  text-decoration: none;
}

.post-nav__link--next {
  grid-column: 2;
  justify-content: flex-end;
  text-align: right;
}

.post-nav__arrow {
  flex-shrink: 0;
  font-size: 2.8rem;
  color: var(--color-primary);
  transition: transform var(--transition-base);
}

.post-nav__link--prev:hover .post-nav__arrow {
  transform: translateX(-0.4rem);
}

.post-nav__link--next:hover .post-nav__arrow {
  transform: translateX(0.4rem);
}

.post-nav__text {
  display: grid;
  gap: 0.4rem;
}

.post-nav__label {
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.post-nav__title {
  font-size: 1.6rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.35;
}

.post-nav__link:hover .post-nav__title,
.post-nav__link:focus-visible .post-nav__title {
  color: var(--color-primary);
}

.post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2rem;
  margin-top: 3.2rem;
}

.post-share__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.post-share__list {
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-share__list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  border: 0.1rem solid var(--color-primary);
  border-radius: var(--radius-button);
  color: var(--color-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
}

.post-share__list a:hover,
.post-share__list a:focus-visible {
  background-color: var(--color-primary);
  color: var(--color-text-on-dark);
}

.post-share__list .bi {
  font-size: 1.8rem;
  line-height: 1;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 3.2rem;
  padding-top: 3.2rem;
  border-top: 0.1rem solid var(--color-border-soft);
}

.post-author__avatar {
  flex-shrink: 0;
  width: 9.6rem;
  height: 9.6rem;
  border-radius: 50%;
}

.post-author__body > * + * {
  margin-top: 0.4rem;
}

.post-author__label {
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.post-author__name {
  font-size: 2rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.post-author__bio {
  font-size: 1.5rem;
}

/* Aside fijo: sin tarjetas; borde gris al costado y bloques separados por un borde inferior */
.post-aside {
  position: sticky;
  top: 11rem;
  max-height: calc(100vh - 12.8rem);
  padding-left: 4rem;
  overflow-y: auto;
  border-left: 0.1rem solid var(--color-border-soft);
  scrollbar-width: thin;
}

.post-widget {
  padding: 0 0 3.2rem;
  border-bottom: 0.1rem solid var(--color-border-soft);
}

.post-widget + .post-widget {
  padding-top: 3.2rem;
}

.post-widget:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.post-widget__title {
  display: block;
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  margin-bottom: 1.6rem;
  font-size: 2rem;
}

.post-widget__text {
  margin: -0.8rem 0 1.6rem;
  font-size: 1.4rem;
}

/* Buscador */
.post-search {
  position: relative;
}

.post-search input[type="search"] {
  display: block;
  width: 100%;
  height: var(--button-height);
  padding: 0 5rem 0 1.4rem;
  border: 0.1rem solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-white);
  color: var(--color-text);
  font-size: 1.4rem;
  -webkit-appearance: none;
  appearance: none;
}

.post-search input[type="search"]:focus-visible {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 0.2rem var(--color-secondary);
}

.post-search__submit {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--button-height);
  height: var(--button-height);
  border: 0;
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
}

/* Entradas recientes */
.post-recent {
  display: grid;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-recent__item {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.post-recent__media {
  flex: 0 0 8rem;
  height: 8rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  line-height: 0;
}

.post-recent__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-recent__body {
  display: grid;
  gap: 0.4rem;
}

.post-recent__title {
  font-size: 1.5rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.35;
  color: var(--color-text);
  text-decoration: none;
}

.post-recent__title:hover,
.post-recent__title:focus-visible {
  color: var(--color-primary);
}

.post-recent__date {
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

/* Formulario de contacto dentro del aside: una columna */
.post-widget--form .quote-form__grid {
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.post-widget--form .quote-form__status {
  background-color: var(--color-surface-soft);
}

/* Llamada a la acción */
.post-cta {
  background-color: var(--color-surface-soft);
}

.post-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3.2rem;
}

.post-cta__text {
  max-width: 64rem;
}

.post-cta__text > * + * {
  margin-top: 1.2rem;
}

@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 4.8rem;
  }

  .post-main {
    max-width: none;
  }

  /* Sin columna lateral: el aside deja de ser fijo y pierde el borde del costado */
  .post-aside {
    position: static;
    max-height: none;
    padding-left: 0;
    overflow: visible;
    border-left: 0;
    border-top: 0.1rem solid var(--color-border-soft);
    padding-top: 4rem;
  }
}

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

  .post-nav__link--next {
    grid-column: 1;
    justify-content: space-between;
  }

  .post-author {
    align-items: flex-start;
  }

  .post-author__avatar {
    width: 6.4rem;
    height: 6.4rem;
  }
  /* Hero en móvil: sin los datos de la entrada (pasan debajo, fuera de la imagen) */
  .post-hero__box {
    min-height: 40rem;
    padding: 3.2rem 2.4rem;
  }

  .post-hero__inner > * + * {
    margin-top: 2rem;
  }

  /* Migas en una sola línea; el título de la entrada se recorta con "…" */
  .post-hero .breadcrumb__list {
    flex-wrap: nowrap;
    font-size: 1.4rem;
  }

  .post-hero .breadcrumb__item {
    flex-shrink: 0;
  }

  .post-hero .breadcrumb__item:last-child {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .post-hero__title {
    font-size: 3.4rem;
    line-height: 1.2;
  }

  .post-hero__meta {
    display: none;
  }

  .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin: 2.4rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 1.4rem;
    color: var(--color-text-muted);
  }

  .post-meta li {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
  }

  .post-meta .material-symbols-outlined {
    font-size: 1.8rem;
    color: var(--color-primary);
  }

  .post-toc {
    padding: 2rem;
  }

  .post-content h2 {
    margin-top: 3.2rem;
    font-size: 2.6rem;
  }

  .post-content h3 {
    font-size: 2rem;
  }

  .post-content p,
  .post-content li {
    font-size: 1.6rem;
  }

  .post-content blockquote {
    padding: 2rem;
  }

  .post-content blockquote p {
    font-size: 1.7rem;
  }

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

  .post-cta__inner .btn {
    width: 100%;
  }
}
