/*
 * Vitta Minds — Estilos del Blog
 * Coherente con el sistema de diseño activo (Playfair Display + Nunito, OKLCH verde/crema).
 * Se carga únicamente en vistas del blog.
 */

/* ===== Layout general del blog ===== */
.vm-blog {
  position: relative;
}

.vm-blog__content {
  width: 100%;
}

.vm-blog__wrap {
  max-width: var(--max-w, 1200px);
  margin: 0 auto;
  padding: 120px 32px 80px;
}

/* ===== Breadcrumbs ===== */
.vm-breadcrumbs {
  margin-bottom: 32px;
}

.vm-breadcrumbs__list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.vm-breadcrumbs__list a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.vm-breadcrumbs__list a:hover { color: var(--accent); }

.vm-breadcrumbs__sep { opacity: 0.5; }

.vm-breadcrumbs__current { color: var(--fg); }

/* ===== Header del post (single) ===== */
.vm-post__header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
}

.vm-post__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 24px 0 16px;
}

.vm-post__lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 28px;
}

/* ===== Meta del post ===== */
.vm-post__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  font-size: 14px;
  color: var(--muted);
}

.vm-post__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vm-post__meta-item svg { flex-shrink: 0; }

.vm-post__meta-item a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.vm-post__meta-item a:hover { text-decoration: underline; }

/* ===== Imagen destacada ===== */
.vm-post__featured {
  margin: 0 0 56px;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(58, 90, 58, 0.12);
}

.vm-post__featured img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ===== Layout del cuerpo ===== */
.vm-post__layout {
  max-width: 780px;
  margin: 0 auto;
}

.vm-post__entry { width: 100%; }

/* ===== Body / contenido tipográfico ===== */
.vm-post__body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--fg);
}

.vm-post__body > * + * { margin-top: 1.4em; }

.vm-post__body h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 2em;
  line-height: 1.2;
}

.vm-post__body h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 27px);
  font-weight: 500;
  margin-top: 1.8em;
  line-height: 1.25;
}

.vm-post__body h4 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-top: 1.6em;
}

.vm-post__body p { margin: 0; }

.vm-post__body ul,
.vm-post__body ol {
  padding-left: 1.5em;
}

.vm-post__body li { margin: 0.5em 0; }

.vm-post__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vm-post__body blockquote {
  margin: 2em 0;
  padding: 24px 28px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 var(--radius, 12px) var(--radius, 12px) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
}

.vm-post__body blockquote p { margin: 0; }

.vm-post__body blockquote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-body);
}

.vm-post__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.vm-post__body th,
.vm-post__body td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.vm-post__body th {
  font-weight: 700;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.4);
}

.vm-post__body code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.vm-post__body pre {
  background: #1c2b1c;
  color: #e8e6da;
  padding: 20px 24px;
  border-radius: var(--radius, 12px);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

.vm-post__body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.vm-post__body figure {
  margin: 2em 0;
}

.vm-post__body figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius, 12px);
}

.vm-post__body figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.vm-post__body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em auto;
  max-width: 120px;
}

/* ===== Tags ===== */
.vm-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0;
}

.vm-tag {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.vm-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Compartir ===== */
.vm-share {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.vm-share__label {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.vm-share__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.vm-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.vm-share__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.5);
}

.vm-share__btn.vm-share__copy {
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 600;
}

.vm-share__btn.vm-share__copy.is-copied {
  border-color: var(--success);
  color: var(--success);
}

/* ===== Navegación entre posts (filas horizontales limpias) ===== */
.vm-post__nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.vm-post__nav-link {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  max-width: 46%;
  text-decoration: none;
  color: var(--fg);
  transition: color 0.2s;
}

.vm-post__nav-link:hover { color: var(--accent); }

.vm-post__nav-link.is-prev { text-align: left; align-items: flex-start; }

.vm-post__nav-link.is-next { text-align: right; align-items: flex-end; }

.vm-post__nav-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.vm-post__nav-link:hover .vm-post__nav-kicker { color: var(--accent); }

.vm-post__nav-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

/* ===== Header del archive (listado) ===== */
.vm-arch__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.vm-arch__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.vm-arch__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.vm-arch__desc {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== Toolbar de filtros ===== */
.vm-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  align-items: center;
  margin-bottom: 48px;
}

.vm-toolbar__cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.vm-pill {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 9px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.vm-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.vm-pill.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== Grid de tarjetas ===== */
.vm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

.vm-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(58, 90, 58, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(58, 90, 58, 0.14);
}

.vm-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.vm-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.vm-card:hover .vm-card__media img { transform: scale(1.04); }

.vm-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.vm-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.vm-card__cat {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.vm-card__cat:hover { text-decoration: underline; }

.vm-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 12px;
}

.vm-card__title a {
  color: var(--fg);
  text-decoration: none;
}

.vm-card__title a:hover { color: var(--accent); }

.vm-card__excerpt {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.vm-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
}

.vm-card__more:hover { text-decoration: underline; }

/* ===== Paginación ===== */
.vm-pagination {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}

.vm-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.vm-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.2s;
}

.vm-pagination .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.vm-pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== Comentarios ===== */
.comments-area {
  max-width: 780px;
  margin: 0 auto;
  padding-top: 48px;
}

/* Título */
.comments-title,
.comment-reply-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 24px;
}

.comments-title a { color: var(--fg); }

/* Lista de comentarios */
.comment-list {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
}

.comment-list .comment { margin-bottom: 28px; }

.comment-list .children {
  list-style: none;
  margin: 20px 0 0 40px;
  padding: 0;
}

.comment-body {
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: rgba(255, 255, 255, 0.45);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-author .avatar {
  border-radius: 50%;
  display: block;
}

.comment-author .fn {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  font-style: normal;
}

.comment-author .says { display: none; }

.comment-metadata {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 400;
}

.comment-metadata a { color: var(--muted); text-decoration: none; }

.comment-metadata a:hover { color: var(--accent); }

.comment-content {
  font-size: 15px;
  color: var(--fg);
  line-height: 1.7;
}

.comment-content p { margin: 0 0 1em; }
.comment-content p:last-child { margin-bottom: 0; }

.reply {
  margin-top: 14px;
  text-align: right;
}

.comment-reply-link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.comment-reply-link:hover { text-decoration: underline; }

/* Navegación de comentarios */
.comments-navigation {
  margin-bottom: 32px;
  font-size: 14px;
}

.comments-navigation a { color: var(--accent); text-decoration: none; }

.comments-navigation a:hover { text-decoration: underline; }

/* Formulario */
.comment-respond {
  background: rgba(250, 243, 232, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 40px;
}

.comment-respond .comment-form { display: block; }

.comment-form label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  padding: 13px 16px;
  margin-bottom: 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.comment-form textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 125, 60, 0.15);
}

.comment-form .form-submit { margin: 8px 0 0; }

.comment-form .submit {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 100px;
  padding: 14px 32px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(58, 90, 58, 0.25);
  transition: background 0.3s, transform 0.2s;
}

.comment-form .submit:hover {
  background: oklch(0.34 0.08 140);
  transform: translateY(-1px);
}

.comment-form .comment-notes,
.comment-form .logged-in-as,
.comment-form .comment-form-cookies-consent {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-form .comment-form-cookies-consent input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.no-comments { font-size: 14px; color: var(--muted); margin-top: 24px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .vm-blog__wrap { padding: 110px 16px 56px; }

  .vm-post__meta { gap: 10px 18px; }

  .vm-post__nav { flex-direction: column; align-items: flex-start; gap: 16px; }

  .vm-post__nav-link { max-width: 100%; }

  .vm-post__nav-link.is-next { text-align: left; align-items: flex-start; }

  .vm-share { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  .vm-grid { grid-template-columns: 1fr; }
}
