/* assets/css/post.css */
/* Estilo editorial profesional / calmado / mobile-first */

:root{
  --post-max: 1120px;
  --read-max: 760px;
  --radius-lg: 18px;
  --radius-md: 14px;

  /* Si tu web ya tiene variables, no pasa nada: estas caen a lo que haya */
  --stroke: rgba(0,0,0,0.10);
  --stroke2: rgba(0,0,0,0.14);
  --paper: rgba(255,255,255,0.55);
  --paper2: rgba(255,255,255,0.72);
}

.post-page{
  max-width: var(--post-max);
  margin: 0 auto;
  padding: 16px 16px 46px;
}

/* Breadcrumbs */
.post-breadcrumbs{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items:center;
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 13px;
  opacity: .85;
  margin-bottom: 12px;
}

.post-breadcrumbs a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.post-breadcrumbs a:hover{
  border-bottom-color: rgba(0,0,0,0.25);
}

/* Header */
.post-header{
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: linear-gradient(180deg, var(--paper2), transparent);
  backdrop-filter: blur(6px);
}

.post-meta{
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 12px;
  opacity: .8;
  margin-bottom: 8px;
}

.post-title{
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.08;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.post-submeta{
  margin: 0;
  opacity: .9;
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Portada: se ve “revista”, sin deformar. */
.post-cover{
  width: 100%;
  display:block;
  margin-top: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke2);

  /* Esto es lo que corrige el “no queda bien” */
  height: clamp(220px, 36vw, 420px);
  object-fit: cover;           /* fotos: perfecto */
  object-position: center;
  background: rgba(0,0,0,0.04);
}

/* Si alguna portada es ilustración y se ve mejor sin recortar,
   añade class="post-cover post-cover--contain" al <img> */
.post-cover--contain{
  object-fit: contain;
  background: rgba(255,255,255,0.7);
}

/* Contenido: lectura cómoda */
.post-content{
  max-width: var(--read-max);
  margin: 16px auto 0;
  padding: 0 2px;
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.85;
  font-size: 16px;
  color: inherit;
}

/* Tipografía Markdown */
.post-content h2{
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  line-height: 1.18;
  margin: 22px 0 10px;
}
.post-content h3{
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  line-height: 1.2;
  margin: 18px 0 8px;
}
.post-content p{
  margin: 12px 0;
  opacity: .96;
}
.post-content a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.25);
}
.post-content a:hover{
  border-bottom-color: rgba(0,0,0,0.5);
}

.post-content blockquote{
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 3px solid rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.55);
  border-radius: 12px;
}

/* LISTAS */
.post-content ul, .post-content ol{
  padding-left: 18px;
  margin: 12px 0;
}
.post-content li{ margin: 6px 0; }

/* IMÁGENES dentro del contenido (markdown) */
.post-content img{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 14px auto;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(0,0,0,0.04);
}

/* Si quieres un “look revista” aún más elegante: drop-cap */
.post-content p:first-of-type::first-letter{
  float: left;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 44px;
  line-height: 1;
  padding-right: 10px;
  padding-top: 6px;
  opacity: .95;
}

/* Footer + acciones */
.post-footer{
  max-width: var(--read-max);
  margin: 18px auto 0;
}

.post-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* Botones (coherentes) */
.blog-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-decoration:none;
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,0.65);
  color: inherit;
  border-radius: 999px;
  padding: 10px 12px;
  cursor:pointer;
}
.blog-btn--ghost{ background: transparent; }

/* Responsive */
@media (min-width: 720px){
  .post-page{ padding: 22px 20px 54px; }
  .post-title{ font-size: 38px; }
}