/* ============================================================
   Blog — Paulina A. Cid Méndez · Veterinaria a domicilio Vallenar
   Comparte el sistema de diseño del sitio (style.css)
   ============================================================ */

/* ---------- Índice del blog (blog.html) ---------- */

.blog-index-hero {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(47, 143, 107, .18), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(209, 138, 38, .12), transparent 60%),
    var(--brand-900);
  padding: clamp(8rem, 16vw, 11rem) 0 clamp(3rem, 6vw, 5rem);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.blog-index-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='70' height='70' viewBox='0 0 70 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23f7d28f' stroke-opacity='0.10' stroke-width='1.4'%3E%3Cpath d='M35 14c-2 0-3.6 1.6-3.6 3.6S33 21.2 35 21.2s3.6-1.6 3.6-3.6S37 14 35 14zm-9 6c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7-1.2-2.7-2.7-2.7zm18 0c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7S44.5 20 44 20zm-9 6c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7S36.5 26 35 26z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: .5;
}
.blog-index-hero .eyebrow { color: var(--gold-300); }
.blog-index-hero .eyebrow::before { background: linear-gradient(90deg, var(--gold-400), var(--gold-300)); }
.blog-index-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  max-width: 18ch;
  margin: 1rem auto 1.2rem;
  line-height: 1.08;
}
.blog-index-hero h1 em {
  font-style: italic;
  background: linear-gradient(120deg, var(--gold-300), var(--clay-300));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.blog-index-hero p {
  color: rgba(255, 255, 255, .8);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  max-width: 48ch;
  margin-inline: auto;
}

/* Aviso de IA */
.ai-notice {
  position: relative;
  display: grid;
  gap: .95rem;
  background:
    radial-gradient(120% 150% at 100% 0%, rgba(47, 143, 107, .10), transparent 55%),
    radial-gradient(120% 150% at 0% 100%, rgba(209, 138, 38, .10), transparent 55%),
    linear-gradient(135deg, #fffdf8, #fdf3e2);
  border: 1px solid rgba(209, 138, 38, .35);
  border-radius: var(--radius);
  padding: 1.35rem 1.45rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.ai-notice::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-500), var(--gold-500), var(--clay-400));
}
.ai-notice-head {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.ai-notice-head .ai-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  box-shadow: 0 10px 20px -8px rgba(31, 102, 76, .55);
}
.ai-notice-head .ai-icon svg { width: 22px; height: 22px; }
.ai-notice-head strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.04rem;
  line-height: 1.2;
  color: var(--brand-900);
}
.ai-notice-head span {
  display: block;
  margin-top: .2rem;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--clay-600);
}
.ai-notice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.62;
}

/* Barra de herramientas del índice */
.blog-index-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(26, 82, 61, .12);
}

/* ---------- Blog: no aplicar reglas de altura 100% del home ---------- */

html body.page-blog,
html body.page-blog main {
  height: auto;
  min-height: auto;
  max-height: none;
}

/* Fondo con textura seamless en parallax + overlay uniforme */
/* Se aplica en un ::before fijo al viewport para que el filtro cubra
   siempre las mismas proporciones de pantalla, con o sin scroll,
   y en cualquier navegador (evita el fallo de background-attachment:fixed
   en páginas muy altas). El patrón queda anclado al viewport = parallax. */
body.page-blog {
  background: transparent;
  position: relative;
}
body.page-blog::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(251,247,240,.90),rgba(251,247,240,.90)),
    radial-gradient(55% 45%at 0% 20%,rgba(209,138,38,.08),transparent 55%),
    radial-gradient(50% 45%at 100% 80%,rgba(47,143,107,.10),transparent 55%),
    url(../imágenes/seamless1.jpg);
  background-size:auto,auto,auto,760px auto;
  background-position:center center;
  background-repeat:no-repeat,no-repeat,no-repeat,repeat;
}
/* Sin parallax en responsive (portrait) y landscape: el fondo se desplaza
   con el contenido en vez de quedar anclado al viewport. */
@media (max-width: 767px), (max-height: 520px) and (orientation: landscape) {
  body.page-blog::before {
    position: absolute;
  }
}

/* Grilla de tarjetas */
.posts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.post-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 0;
  min-width: 0;
  flex: 0 1 calc(33.333% - 1rem);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(26, 82, 61, .07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow .35s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
}
.post-card-body {
  padding: 1.4rem 1.8rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex: 1;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-500), var(--gold-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.post-card:hover { box-shadow: var(--shadow-card); transform: translateY(-4px); }
.post-card:hover::before { transform: scaleX(1); }
.post-card-meta {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--clay-600);
}
.post-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--brand-900);
  font-weight: 600;
}
.post-card p {
  color: var(--ink-soft);
  font-size: .94rem;
  line-height: 1.6;
  flex-grow: 1;
  margin: 0;
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--brand-600);
  font-weight: 800;
  font-size: .9rem;
  transition: gap .2s, color .2s;
}
.post-card:hover .read-more { gap: .65rem; color: var(--gold-600); }

/* ---------- Cabecera de entrada (post-XX.html) ---------- */

.blog-post-header {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(47, 143, 107, .16), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(209, 138, 38, .10), transparent 60%),
    var(--brand-900);
  padding: clamp(7.5rem, 14vw, 10rem) 0 clamp(2.5rem, 5vw, 4rem);
  color: #fff;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 1.6rem;
}
.breadcrumb a { color: rgba(255, 255, 255, .8); }
.breadcrumb a:hover { color: var(--gold-300); }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
}
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(232, 163, 61, .18);
  border: 1px solid rgba(247, 210, 143, .45);
  color: var(--gold-300);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .4rem .85rem;
  border-radius: 999px;
}
.post-date {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255, 255, 255, .7);
  font-size: .85rem;
  font-weight: 700;
}
.blog-post-header h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  line-height: 1.12;
  max-width: 24ch;
  margin-bottom: 1rem;
}
.post-lead {
  color: rgba(255, 255, 255, .8);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.7;
  max-width: 60ch;
}

/* Layout de la entrada */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 1023px) {
  .post-layout { grid-template-columns: 1fr; }
}

.post-body {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(26, 82, 61, .07);
  overflow: hidden;
}

/* Tipografía del artículo */
.post-prose {
  padding: clamp(1.8rem, 4vw, 3rem);
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.8;
}
.post-prose h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--brand-900);
  margin: 2.2rem 0 .8rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--brand-100);
}
.post-prose h2:first-child { margin-top: 0; }
.post-prose p { margin: 0 0 1.1rem; color: var(--ink-soft); }
.post-prose ul {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
  display: grid;
  gap: .5rem;
}
.post-prose li::marker { color: var(--brand-500); }

.post-footer-note {
  border-top: 1px dashed rgba(26, 82, 61, .15);
  margin: 0 clamp(1.8rem, 4vw, 3rem) clamp(1.8rem, 4vw, 3rem);
  padding-top: 1.4rem;
}
.post-footer-note p { color: var(--ink-soft); font-size: .95rem; }

/* Sidebar */
.post-sidebar { display: grid; gap: 1.5rem; position: sticky; top: 100px; }
@media (max-width: 1023px) {
  .post-sidebar { position: static; }
}
.post-cta {
  background: var(--brand-900);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.6rem;
  color: #fff;
  display: grid;
  gap: 1.2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.post-cta::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(232, 163, 61, .25), transparent);
  pointer-events: none;
}
.post-cta > * { position: relative; z-index: 1; }
.sidebar-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(26, 82, 61, .07);
}
.sidebar-box h4 {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 1rem;
}
.sidebar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.sidebar-list li { display: flex; align-items: center; gap: .6rem; color: var(--ink-soft); font-size: .92rem; }
.sidebar-list li i { color: var(--brand-500); width: 1.1rem; text-align: center; }
.sidebar-list.small li { align-items: flex-start; line-height: 1.5; }
.sidebar-list.small a { color: var(--ink); font-weight: 700; transition: color .2s; }
.sidebar-list.small a:hover { color: var(--brand-600); }

/* Navegación anterior/siguiente */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
}
.post-nav-link {
  flex: 0 1 48%;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid rgba(26, 82, 61, .08);
  padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .3s, transform .3s;
}
.post-nav-link:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.post-nav-link.disabled { opacity: .45; pointer-events: none; }
.post-nav-link .dir {
  display: block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clay-600);
  margin-bottom: .3rem;
}
.post-nav-link .tt { display: block; font-weight: 800; color: var(--brand-900); font-size: .95rem; line-height: 1.4; }

/* Responsive */
@media (min-width: 641px) and (max-width: 1023px) {
  .post-card { flex: 0 1 calc(50% - .75rem); }
  .post-card.featured { flex: 1 1 100%; }
}

@media (max-width: 640px) {
  .posts-grid { flex-direction: column; }
  .post-card, .post-card.featured { flex: 1 1 auto; }
  .blog-sort { width: 100%; justify-content: space-between; }
  .post-nav { flex-direction: column; }
  .post-nav-link { flex: 1 1 auto; }
  .ai-notice-head .ai-icon { width: 42px; height: 42px; }
}

/* ---------- Modal de entradas ---------- */

.blog-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.blog-modal.open { display: flex; }
.blog-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 32, 24, .66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: modalFade .25s ease;
}
.blog-modal-dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: 92vh;
  background: var(--cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
  animation: modalPop .35s cubic-bezier(.22, 1, .36, 1);
}
.blog-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(26, 82, 61, .55);
  backdrop-filter: blur(6px);
  transition: background .2s, transform .2s;
}
.blog-modal-close:hover { background: var(--brand-700); transform: rotate(90deg); }
.blog-modal-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.blog-modal-loading {
  display: none;
  align-items: center;
  gap: .75rem;
  justify-content: center;
  padding: 4rem 1.5rem;
  color: var(--ink-soft);
  font-weight: 700;
}
.blog-modal-scroll:not(.loaded) .blog-modal-loading { display: flex; }
.blog-modal-scroll:not(.loaded) .blog-modal-content { display: none; }
.blog-modal-scroll .spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--brand-200);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.blog-modal-error {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--clay-700);
  font-weight: 700;
}
.blog-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.5rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid rgba(26, 82, 61, .08);
}
@media (max-width: 560px) {
  .blog-modal { padding: .5rem; }
  .blog-modal-footer {
    flex-direction: column;
    gap: .65rem;
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  .blog-modal-footer .btn { width: 100%; }
}

/* El header de la entrada dentro del modal */
.blog-modal-content .blog-post-header {
  padding: 3.5rem 2rem 2.25rem;
}
.blog-modal-content .post-body { box-shadow: none; border-inline: 0; border-top: 0; border-radius: 0; }
@media (max-width: 560px) {
  .blog-modal-content .blog-post-header { padding: 3rem 1.25rem 1.75rem; }
  .blog-modal-content .post-prose { padding: 1.4rem 1.25rem; }
}

/* ---------- Imágenes de las entradas ---------- */

.post-card-thumb {
  display: block;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- Controles: búsqueda, filtros y paginación ---------- */

.blog-controls {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
  padding: 1.6rem;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 82, 61, .07);
  box-shadow: var(--shadow-soft);
}
.blog-tools-head {
  display: flex;
  align-items: baseline;
  gap: .75rem;
}
.blog-tools-head span:last-child { color: var(--ink-soft); }
.blog-search {
  position: relative;
}
.blog-search i {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-500);
  pointer-events: none;
}
.blog-search input {
  width: 100%;
  padding: .85rem 1.1rem .85rem 2.8rem;
  border-radius: 999px;
  border: 1.5px solid rgba(26, 82, 61, .16);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: .97rem;
  color: var(--ink);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.blog-search input:focus {
  outline: none;
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 143, 107, .15);
}
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1.5px solid rgba(26, 82, 61, .18);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .86rem;
  padding: .55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s;
}
.filter-btn:hover { border-color: var(--brand-500); color: var(--brand-700); }


/* Orden por fecha */
.blog-sort {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.blog-sort .sort-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: .86rem;
}
.blog-sort .sort-label i { color: var(--brand-500); }
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid rgba(26, 82, 61, .18);
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .86rem;
  padding: .55rem 2.4rem .55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23257a59' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.sort-select:hover, .sort-select:focus { border-color: var(--brand-500); color: var(--brand-700); outline: none; }

/* Paginación */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.page-numbers { display: flex; gap: .4rem; flex-wrap: wrap; }
.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1.5px solid rgba(26, 82, 61, .18);
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .92rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all .25s;
}
.page-btn:hover:not(:disabled) { border-color: var(--brand-500); color: var(--brand-700); }
.page-btn.active {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(31, 102, 76, .6);
}
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Sin resultados */
.blog-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--ink-soft);
}
.blog-empty i { font-size: 2rem; color: var(--brand-300); margin-bottom: .75rem; }
.blog-empty p { margin-bottom: 1.25rem; }

/* ============================================================
   Refinamiento de estilos — Entradas de blog (post-XX.html)
   ============================================================ */

/* ---------- Cabecera de la entrada ---------- */

.blog-post-header {
  position: relative;
  isolation: isolate;
}
.blog-post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 80% at 90% 10%, rgba(232, 163, 61, .16), transparent 60%),
    radial-gradient(50% 70% at 5% 95%, rgba(47, 143, 107, .20), transparent 60%);
}
.blog-post-header h1::after {
  content: '';
  display: block;
  width: 76px;
  height: 5px;
  margin-top: 1.15rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-400), var(--clay-400));
}

.breadcrumb {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: .5rem 1rem;
  border-radius: 999px;
  display: inline-flex;
  font-size: .78rem;
}
.breadcrumb span:last-child { color: var(--gold-300); }

.post-date {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: .4rem .9rem;
  border-radius: 999px;
  font-size: .8rem;
}
.post-lead {
  border-left: 3px solid var(--gold-400);
  padding-left: 1.1rem;
}

/* ---------- Cuerpo del artículo ---------- */

.post-body {
  position: relative;
}
.post-body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  z-index: 2;
  background: linear-gradient(90deg, var(--brand-500), var(--gold-500), var(--clay-400), var(--brand-500));
  background-size: 200% 100%;
  animation: gradientShift 6s linear infinite;
}

/* Tipografía */
.post-prose {
  font-size: 1.06rem;
  line-height: 1.85;
}
.post-prose h2 {
  position: relative;
  padding-left: 1.15rem;
  padding-bottom: 0;
  border-bottom: 0;
  margin-top: 2.4rem;
  font-size: 1.62rem;
}
.post-prose h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: .28rem;
  bottom: .28rem;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand-500), var(--gold-500));
}
.post-prose h2:first-child { margin-top: 0; }
.post-prose p {
  color: #3f5049;
  margin-bottom: 1.3rem;
}
.post-prose strong { color: var(--brand-900); font-weight: 800; }
.post-prose a {
  color: var(--brand-600);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(47, 143, 107, .35);
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}
.post-prose a:hover { color: var(--gold-600); text-decoration-color: var(--gold-500); }

/* Letra capital en el primer párrafo */
.post-prose p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.3em;
  line-height: .82;
  padding-right: .6rem;
  color: var(--brand-600);
}

/* Listas con viñetas de marca */
.post-prose ul {
  padding-left: 0;
  list-style: none;
  gap: .7rem;
}
.post-prose li {
  position: relative;
  padding-left: 1.65rem;
  line-height: 1.7;
}
.post-prose li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .6em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  box-shadow: 0 0 0 3px var(--brand-100);
}
.post-prose li::marker { content: ''; }

/* Nota final como llamada destacada */
.post-footer-note {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  background: linear-gradient(135deg, var(--brand-50), #eef6f0);
  border: 1px solid rgba(37, 122, 89, .18);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin: 1.5rem clamp(1.8rem, 4vw, 3rem) clamp(1.8rem, 4vw, 3rem);
}
.post-footer-note p { margin: 0; font-weight: 700; color: var(--brand-800); }

/* ---------- Sidebar ---------- */

.sidebar-box {
  position: relative;
  overflow: hidden;
}
.sidebar-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--gold-500));
}
.sidebar-list.small li {
  padding: .6rem 0;
  border-bottom: 1px dashed rgba(26, 82, 61, .12);
}
.sidebar-list.small li:last-child { border-bottom: 0; padding-bottom: 0; }
.sidebar-list.small li:first-child { padding-top: 0; }
.sidebar-list.small a {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
  line-height: 1.45;
}
.sidebar-list.small a::after {
  content: '→';
  flex-shrink: 0;
  color: var(--gold-600);
  font-weight: 800;
  transition: transform .2s, color .2s;
}
.sidebar-list.small a:hover { color: var(--brand-600); }
.sidebar-list.small a:hover::after { transform: translateX(4px); color: var(--clay-500); }

/* CTA */
.post-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-400), var(--clay-400), var(--brand-500));
}
.post-cta .btn-gold { box-shadow: 0 12px 26px -10px rgba(209, 138, 38, .75); }

/* ---------- Navegación anterior / siguiente ---------- */

.post-nav-link {
  position: relative;
  overflow: hidden;
  transition: box-shadow .3s, transform .3s, border-color .3s;
}
.post-nav-link::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-500), var(--gold-500));
  opacity: 0;
  transition: opacity .3s;
}
.post-nav-link:hover { border-color: rgba(26, 82, 61, .2); }
.post-nav-link:hover::before { opacity: 1; }
.post-nav-link .tt { transition: color .2s; }
.post-nav-link:hover .tt { color: var(--brand-600); }

/* ---------- Tarjetas del índice (fichas) ---------- */

.post-card h3 { transition: color .25s; }
.post-card:hover h3 { color: var(--brand-600); }
.post-card-meta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.post-card-thumb { transition: transform 1s cubic-bezier(.22, 1, .36, 1); }
.post-card:hover .post-card-thumb { transform: scale(1.04); }

/* ---------- Entrada destacada a ancho completo ---------- */

.post-card.featured {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.post-card.featured .post-card-thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
}
.post-card.featured .post-card-body {
  padding: 1.8rem 2rem 2rem;
  gap: .75rem;
}
.post-card.featured h3 {
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  line-height: 1.15;
}
.post-card.featured p {
  font-size: 1.02rem;
  max-width: 62ch;
}
.post-card.featured .post-card-meta::before {
  content: 'Destacado';
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem;
  margin-right: .4rem;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-500), var(--gold-500));
  border-radius: 999px;
}
.post-card.featured .read-more { font-size: 1rem; }

@media (min-width: 860px) {
  .post-card.featured {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .post-card.featured .post-card-thumb {
    aspect-ratio: auto;
    height: 100%;
  }
}

/* ---------- Slider de imágenes en el hero del índice ---------- */

.blog-index-hero {
  isolation: isolate;
}
.blog-index-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.blog-index-hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.5s ease, transform 7s ease;
  will-change: opacity, transform;
}
.blog-index-hero-slides img.active {
  opacity: 1;
  transform: scale(1);
}
.blog-index-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(12, 38, 28, .82) 0%, rgba(20, 57, 42, .72) 45%, rgba(20, 57, 42, .86) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.blog-index-hero .container { position: relative; z-index: 2; }
.blog-index-hero::after { z-index: 1; }

/* ---------- Imagen de la entrada en la cabecera del post ---------- */

.blog-post-header { position: relative; overflow: hidden; }
.post-header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: .5;
  filter: saturate(.85);
}
.blog-post-header::before { z-index: 1; }
.blog-post-header .container { position: relative; z-index: 2; }

/* ---------- Accesibilidad: tamaños de fuente ---------- */

.post-card-meta { font-size: .82rem; }
.post-card p { font-size: .98rem; }
.read-more { font-size: .95rem; }
.breadcrumb { font-size: .82rem; }
.category-chip { font-size: .82rem; }
.post-date { font-size: .85rem; }
.ai-notice-head span { font-size: .8rem; }
.ai-notice p { font-size: .95rem; }
.sidebar-box h4 { font-size: .85rem; }
.sidebar-list li { font-size: .95rem; }
.sidebar-list.small a { font-size: .95rem; }
.post-nav-link .dir { font-size: .82rem; }
.post-nav-link .tt { font-size: 1rem; }
.filter-btn { font-size: .9rem; }
.page-btn { font-size: .95rem; }
.blog-search input { font-size: 1rem; }
.blog-tools-head span:last-child { font-size: .95rem; }
.post-footer-note p { font-size: 1rem; }
.post-cta p:first-child { font-size: .85rem; }
.post-cta p:last-child { font-size: .95rem; }
