body.public-blog-page {
  background: #f7f5f1;
}

.public-blog-page main {
  overflow: visible;
}

.blog-page {
  color: #17221f;
}

.blog-kicker {
  margin: 0 0 .75rem;
  color: #657a72;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-masthead {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.blog-masthead::after {
  content: "";
  position: absolute;
  left: max(1.5rem, calc((100vw - var(--container, 1180px)) / 2));
  right: max(1.5rem, calc((100vw - var(--container, 1180px)) / 2));
  bottom: .4rem;
  height: 10px;
  background: color-mix(in srgb, #edb53f 66%, transparent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 28px) 100%, 28px 100%);
}

.blog-masthead__inner {
  display: grid;
  gap: .85rem;
  text-align: center;
}

.blog-masthead h1 {
  margin: 0 auto;
  max-width: 14ch;
  color: #111815;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.8rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: .9;
}

.blog-masthead p:last-child {
  margin: 0 auto;
  max-width: 68ch;
  color: #4e5f59;
  font-size: 1.12rem;
}

.blog-toolbar {
  position: sticky;
  top: var(--header-offset, var(--header-h, 74px));
  z-index: 8;
  padding: .9rem 0;
  background: color-mix(in srgb, #f7f5f1 78%, transparent);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(107, 133, 126, .14);
  border-bottom: 1px solid rgba(107, 133, 126, .14);
}

.blog-toolbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.blog-toolbar__inner p {
  margin: 0;
  color: #5f716b;
  font-weight: 700;
}

.blog-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.blog-filterbar button {
  border: 1px solid rgba(107, 133, 126, .24);
  border-radius: 0;
  padding: .62rem .85rem;
  background: rgba(255, 255, 255, .74);
  color: #253530;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(43, 64, 58, .05);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.blog-filterbar button:hover,
.blog-filterbar button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(47, 102, 89, .42);
  outline: none;
}

.blog-filterbar button.is-active {
  background: #17221f;
  color: #fff;
}

.blog-list-section {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(4rem, 7vw, 6rem);
}

.blog-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.blog-feed {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  transition: opacity .18s ease;
}

.blog-feed.is-filtering {
  opacity: 0;
}

.blog-empty {
  display: grid;
  gap: .7rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  min-height: 360px;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(238, 245, 241, .64));
  border: 1px solid rgba(107, 133, 126, .2);
  backdrop-filter: blur(16px);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 100%, 0 100%);
  box-shadow: 0 22px 52px rgba(42, 62, 56, .08);
}

.blog-empty p,
.blog-empty h2,
.blog-empty span {
  margin: 0;
}

.blog-empty p {
  color: #657a72;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-empty h2 {
  max-width: 12ch;
  color: #111815;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1;
}

.blog-empty span {
  max-width: 48ch;
  color: #4e5f59;
  font-size: 1.05rem;
}

/* ---- Scroll reveal ---- */
.blog-post.will-animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}

.blog-post.will-animate.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Reading progress bar ---- */
.blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, #dc6d5b, #edb53f);
  transition: width .1s linear;
  pointer-events: none;
}

/* ---- Base card ---- */
.blog-post {
  display: grid;
  grid-template-columns: minmax(280px, .92fr) minmax(0, .78fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding-bottom: clamp(2rem, 4vw, 4rem);
  border-bottom: 1px solid rgba(23, 34, 31, .18);
}

.blog-post__media {
  display: block;
  overflow: hidden;
  background: #e6ece8;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 100%, 0 100%);
  box-shadow: 0 22px 50px rgba(42, 62, 56, .12);
}

.blog-post__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

.blog-post__media:hover img,
.blog-post__media:focus-visible img {
  transform: scale(1.035);
  filter: saturate(1.08);
}

.blog-post__body {
  position: relative;
  display: grid;
  gap: .8rem;
  justify-items: start;
  padding: clamp(1rem, 2.4vw, 1.6rem);
  background: rgba(255, 255, 255, .48);
  border: 1px solid rgba(107, 133, 126, .18);
  backdrop-filter: blur(14px);
  transition: box-shadow .28s ease, background .28s ease;
}

.blog-post:hover .blog-post__body {
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 30px 68px rgba(42, 62, 56, .14);
}

/* ---- Hero card ---- */
.blog-post--hero {
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

.blog-post--hero .blog-post__media {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), 64px 100%, 0 100%);
  box-shadow: 0 36px 80px rgba(42, 62, 56, .18);
}

.blog-post--hero .blog-post__media img {
  aspect-ratio: 21 / 9;
}

.blog-post--hero .blog-post__body {
  margin-top: -4rem;
  margin-left: clamp(1rem, 7vw, 6rem);
  margin-right: 0;
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 3.5vw, 2.8rem);
  background: rgba(247, 245, 241, .92);
  backdrop-filter: blur(24px);
  box-shadow: 0 28px 64px rgba(42, 62, 56, .14);
}

.blog-post--hero .blog-post__body::before {
  width: 88px;
  height: 6px;
}

.blog-post--hero h2 {
  font-size: clamp(2.6rem, 4.5vw, 4.4rem);
}

.blog-post--hero p {
  font-size: 1.22rem;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: .32rem .72rem;
  background: #dc6d5b;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.blog-post__body::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 58px;
  height: 5px;
  background: #dc6d5b;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.blog-post__meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  color: #17221f;
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-post__meta span + span::before {
  content: "";
  display: inline-block;
  width: .34rem;
  height: .34rem;
  margin-right: .65rem;
  border-radius: 999px;
  background: #17221f;
  vertical-align: middle;
}

.blog-post h2 {
  margin: 0;
  color: #111815;
  font-size: 3.2rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.05;
}

.blog-post h2 a {
  color: inherit;
}

.blog-post p {
  margin: 0;
  color: #24332f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.72;
}

.blog-tags {
  display: flex;
  gap: .42rem;
  flex-wrap: wrap;
}

.blog-tags span {
  padding: .24rem .52rem;
  border: 1px solid rgba(107, 133, 126, .24);
  background: rgba(255, 255, 255, .64);
  color: #526c64;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.blog-post__read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  min-height: 3rem;
  margin-top: .45rem;
  padding: .7rem 1.15rem;
  border: 1px solid #dc6d5b;
  color: #9b2f22;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease, transform .18s ease;
}

.blog-post__read:hover,
.blog-post__read:focus-visible {
  background: #dc6d5b;
  color: #fff;
  transform: translateY(-2px);
  outline: none;
}

.blog-sidebar,
.blog-article-aside {
  position: sticky;
  top: calc(var(--header-offset, var(--header-h, 74px)) + 5.4rem);
  display: grid;
  gap: 1.25rem;
}

.blog-author-card,
.blog-popular,
.blog-discount {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(107, 133, 126, .2);
  box-shadow: 0 18px 42px rgba(45, 64, 59, .08);
  backdrop-filter: blur(16px);
}

.blog-author-card {
  display: grid;
  overflow: hidden;
}

.blog-author-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.blog-author-card div {
  display: grid;
  gap: .25rem;
  padding: 1rem;
  background: #edb53f;
  color: #111815;
}

.blog-author-card p,
.blog-author-card h2,
.blog-author-card span {
  margin: 0;
}

.blog-author-card p {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-author-card h2 {
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: 0;
}

.blog-author-card span {
  color: rgba(17, 24, 21, .74);
}

.blog-popular {
  padding: 1.25rem 1rem;
  border-top: 2px solid #1746bf;
  border-bottom: 2px solid #1746bf;
}

.blog-popular__label {
  margin: 0 0 1rem;
  padding-bottom: .6rem;
  color: #1746bf;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1.5px solid rgba(23, 70, 191, .2);
}

.blog-popular ol {
  display: grid;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: popular;
}

.blog-popular li {
  counter-increment: popular;
  display: grid;
  gap: .35rem;
  text-align: center;
}

.blog-popular li::before {
  content: counter(popular, decimal-leading-zero);
  color: #1746bf;
  font-size: .82rem;
  letter-spacing: 0;
}

.blog-popular a {
  color: #1746bf;
  font-size: 1.12rem;
  line-height: 1.35;
}

.blog-popular a:hover,
.blog-popular a:focus-visible {
  color: #0f2c77;
  outline: none;
}

.blog-article-view {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 7rem);
}

.blog-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.blog-article {
  background: rgba(255, 255, 255, .64);
  border: 1px solid rgba(107, 133, 126, .18);
  box-shadow: 0 22px 52px rgba(42, 62, 56, .08);
}

/* Portada: franja mas baja con un difuminado abajo que funde hacia el texto. */
.blog-article__media-frame {
  position: relative;
}

.blog-article__media img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* Degradado suave en la base de la imagen para entrar al texto sin corte.
   Solo cubre la imagen (no el pie de foto, que va fuera de este frame). */
.blog-article__media-frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .92));
  pointer-events: none;
}

.blog-article__media p {
  margin: 0;
  padding: .75rem clamp(1rem, 3vw, 1.5rem) 0;
  color: #64766f;
  font-size: .86rem;
  line-height: 1.5;
}

.blog-article__media p span {
  color: #263a34;
  font-weight: 800;
}

.blog-article__body {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.4rem, 4vw, 3.25rem);
}

.blog-article__body h1 {
  margin: 0;
  color: #111815;
  font-size: 4.4rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: .98;
}

.blog-article__excerpt {
  margin: 0;
  color: #2d413b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.5;
}

.blog-article__content {
  display: grid;
  gap: .75rem;
  margin-top: .7rem;
}

.blog-article__content p {
  margin: 0;
  color: #1f2f2b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  line-height: 1.86;
  /* Justificado tipo revista: bordes parejos a izquierda y derecha. El
     guionado evita huecos grandes entre palabras en lineas angostas. */
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.blog-article__content > p:first-of-type::first-letter {
  float: left;
  margin: .12rem .55rem 0 0;
  color: #17221f;
  font-size: 4.4rem;
  line-height: .82;
  font-weight: 500;
}

.blog-article__content h3 {
  margin: .8rem 0 0;
  color: #111815;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.2;
}

.blog-article__content h4 {
  margin: 0;
  color: #17221f;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.blog-article__content ul,
.blog-article__content ol {
  margin: 0;
  padding-left: 1.4rem;
  display: grid;
  gap: .4rem;
}

.blog-article__content li {
  color: #1f2f2b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  line-height: 1.72;
  text-align: justify;
  hyphens: auto;
}

/* Imagen insertada dentro del articulo. */
.blog-article__figure {
  margin: 1.6rem 0;
  text-align: center;
}

.blog-article__figure img {
  max-width: 100%;
  height: auto;
  border-radius: .6rem;
}

.blog-article__figure figcaption {
  margin-top: .5rem;
  color: #6b756f;
  font-size: .95rem;
  font-style: italic;
}

.blog-article__content blockquote {
  margin: 0;
  padding: 1.1rem 1.5rem;
  border-left: 3px solid #dc6d5b;
  background: rgba(220, 109, 91, .07);
}

.blog-article__content blockquote p {
  font-style: italic;
  color: #2d413b;
  font-size: 1.22rem;
  line-height: 1.62;
}

.blog-article__content hr {
  border: none;
  height: 1px;
  background: rgba(23, 34, 31, .16);
}

.blog-article__content strong {
  font-weight: 800;
  color: #111815;
}

.blog-article__content em {
  font-style: italic;
  color: #2d413b;
}

.blog-post p a,
.blog-article__excerpt a,
.blog-article__content a {
  color: #9b2f22;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(220, 109, 91, .42);
  text-decoration-thickness: .16em;
  text-underline-offset: .18em;
  transition: color .18s ease, text-decoration-color .18s ease;
}

.blog-post p a:hover,
.blog-post p a:focus-visible,
.blog-article__excerpt a:hover,
.blog-article__excerpt a:focus-visible,
.blog-article__content a:hover,
.blog-article__content a:focus-visible {
  color: #17221f;
  text-decoration-color: #edb53f;
  outline: none;
}

.blog-post p mark,
.blog-article__excerpt mark,
.blog-article__content mark {
  padding: 0 .13em;
  background:
    linear-gradient(180deg, transparent 18%, rgba(237, 181, 63, .58) 18%, rgba(237, 181, 63, .58) 88%, transparent 88%);
  color: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.blog-back-link {
  width: fit-content;
  color: #1f584d;
  font-weight: 800;
  border-bottom: 2px solid rgba(220, 171, 139, .75);
}

.blog-discount {
  position: fixed;
  right: clamp(1rem, 3vw, 1.6rem);
  bottom: clamp(1rem, 3vw, 1.6rem);
  z-index: 80;
  width: min(360px, calc(100vw - 2rem));
  padding: 1rem;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}

.blog-discount.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.blog-discount__inner {
  display: grid;
  gap: .65rem;
}

.blog-discount__label {
  margin: 0;
  color: #60746e;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-discount h2 {
  margin: 0;
  color: #14211d;
  font-size: 1.25rem;
  line-height: 1.1;
}

.blog-discount p {
  margin: 0;
  color: #445b54;
}

.blog-discount__actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.blog-discount__actions a,
.blog-discount__actions button {
  min-height: 2.55rem;
  border: 1px solid rgba(107, 133, 126, .2);
  padding: .58rem .82rem;
  font-weight: 800;
  cursor: pointer;
}

.blog-discount__actions a {
  background: #17221f;
  color: #fff;
}

.blog-discount__actions button {
  background: rgba(255, 255, 255, .7);
  color: #263a34;
}

.blog-discount--article {
  border-color: rgba(220, 109, 91, .3);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(255, 244, 236, .72));
}

.blog-discount--article .blog-discount__actions a {
  background: #a83c2f;
}

@media (max-width: 1020px) {
  .blog-list-layout,
  .blog-article-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar,
  .blog-article-aside {
    position: static;
  }

  .blog-sidebar {
    order: -1;
  }

  .blog-author-card {
    grid-template-columns: 160px 1fr;
  }

  .blog-author-card img {
    height: 100%;
    aspect-ratio: auto;
  }
}

@media (max-width: 760px) {
  .blog-masthead h1 {
    font-size: 3.2rem;
  }

  .blog-post {
    grid-template-columns: 1fr;
  }

  .blog-post__media {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), 18px 100%, 0 100%);
  }

  .blog-post h2 {
    font-size: 2.35rem;
  }

  .blog-article__body h1 {
    font-size: 2.55rem;
  }

  .blog-toolbar {
    position: static;
  }

  .blog-author-card {
    grid-template-columns: 1fr;
  }

  .blog-post--hero .blog-post__media {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 36px), 36px 100%, 0 100%);
  }

  .blog-post--hero .blog-post__media img {
    aspect-ratio: 16 / 9;
  }

  .blog-post--hero .blog-post__body {
    margin-top: -2.5rem;
    margin-left: 1rem;
  }

  .blog-post--hero h2 {
    font-size: 2.1rem;
  }
}
