/* ============================================================
   Galgo · Blog público
   CSS plano (sin build). Reutiliza .auto-container del tema.
   ============================================================ */

#blogPage, #blogPostPage { --gg-blue: #0443a3; --gg-blue-2: #3366ca; --gg-ink: #1b2431; --gg-muted: #6b7686; --gg-line: #e5e9f0; }

/* ---------- Hero ---------- */
.blog-hero {
  background: linear-gradient(135deg, #04275f, #0443a3);
  color: #fff; padding: 130px 0 46px; text-align: center;
}
.blog-hero h1 { font-size: 44px; margin: 0 0 8px; color: #fff; }
.blog-hero p { font-size: 17px; opacity: .9; margin: 0; }

/* ---------- Listing ---------- */
.blog-listing { padding: 46px 0 70px; background: #f7f9fc; }

.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 34px; }
.blog-cats a {
  padding: 7px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--gg-line);
  color: var(--gg-ink); font-size: 14px; font-weight: 600; transition: all .18s ease;
}
.blog-cats a:hover { border-color: var(--gg-blue-2); color: var(--gg-blue); text-decoration: none; }
.blog-cats a.is-active { background: var(--gg-blue); color: #fff; border-color: var(--gg-blue); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }

.blog-card {
  background: #fff; border: 1px solid var(--gg-line); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(4, 39, 95, .12); }
.blog-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #eef2f9; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; display: block; }
.blog-card:hover .blog-card-media img { transform: scale(1.05); }
.blog-card-media.is-placeholder {
  background: linear-gradient(135deg, #dbe6fb, #b9cdf2);
  position: relative;
}
.blog-card-media.is-placeholder::after {
  content: "Galgo Group"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #6f8fce; font-weight: 700; letter-spacing: .04em; font-size: 15px;
}
.blog-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--gg-muted); margin-bottom: 10px; flex-wrap: wrap; }
.blog-card-meta .cat { background: #e6effb; color: var(--gg-blue); padding: 2px 10px; border-radius: 999px; font-weight: 700; }
.blog-card-body h3 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; }
.blog-card-body h3 a { color: var(--gg-ink); }
.blog-card-body h3 a:hover { color: var(--gg-blue); text-decoration: none; }
.blog-card-body p { color: var(--gg-muted); font-size: 14.5px; margin: 0 0 16px; flex: 1; }
.blog-readmore { color: var(--gg-blue); font-weight: 700; font-size: 14px; align-self: flex-start; }
.blog-readmore:hover { text-decoration: none; }
.blog-readmore i { margin-left: 4px; }

.blog-empty { text-align: center; color: var(--gg-muted); padding: 40px 0; font-size: 17px; }

.blog-pager { display: flex; gap: 8px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.blog-pager a { padding: 9px 15px; border-radius: 8px; border: 1px solid var(--gg-line); background: #fff; color: var(--gg-ink); font-weight: 600; }
.blog-pager a.is-active, .blog-pager a:hover { background: var(--gg-blue); color: #fff; border-color: var(--gg-blue); text-decoration: none; }

/* ---------- Post individual ---------- */
.post-single { background: #fff; }
.post-header { padding: 130px 0 24px; text-align: center; background: #f7f9fc; }
.post-meta { display: flex; gap: 12px; align-items: center; justify-content: center; font-size: 14px; color: var(--gg-muted); margin-bottom: 14px; flex-wrap: wrap; }
.post-cat { background: var(--gg-blue); color: #fff; padding: 3px 12px; border-radius: 999px; font-weight: 700; }
.post-cat:hover { color: #fff; text-decoration: none; opacity: .9; }
.post-title { font-size: 40px; line-height: 1.2; max-width: 860px; margin: 0 auto; color: var(--gg-ink); }
.post-draftflag { margin-top: 12px; color: #d9822b; font-weight: 700; }

.post-cover { background: #f7f9fc; padding-bottom: 10px; }
.post-cover img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 14px; display: block; }

.post-body { padding: 44px 0 54px; }
.post-content { max-width: 760px; margin: 0 auto; font-size: 17.5px; line-height: 1.8; color: #2b3646; }
.post-content > *:first-child { margin-top: 0; }
.post-content h2 { font-size: 28px; margin: 34px 0 14px; color: var(--gg-ink); }
.post-content h3 { font-size: 22px; margin: 28px 0 12px; color: var(--gg-ink); }
.post-content p { margin: 0 0 20px; }
.post-content a { color: var(--gg-blue); text-decoration: underline; }
.post-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 18px 0; }
.post-content ul, .post-content ol { margin: 0 0 20px; padding-left: 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote { border-left: 4px solid var(--gg-blue-2); margin: 24px 0; padding: 6px 22px; color: var(--gg-muted); font-style: italic; }
.post-content pre { background: #0f1b2d; color: #e6edf7; padding: 16px; border-radius: 10px; overflow-x: auto; }

.post-tags { max-width: 760px; margin: 30px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tag { background: #eef2f9; color: var(--gg-blue); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }

.post-related { background: #f7f9fc; padding: 56px 0; }
.post-related h2 { text-align: center; margin-bottom: 32px; font-size: 28px; color: var(--gg-ink); }

.post-notfound { text-align: center; padding: 150px 0 90px; }
.post-notfound h1 { font-size: 34px; margin-bottom: 10px; }
.post-notfound p { color: var(--gg-muted); margin-bottom: 24px; }

/* ---------- Comentarios ---------- */
.post-comments { padding: 56px 0 80px; }
.post-comments .auto-container { max-width: 800px; }
.post-comments > .auto-container > h2 { font-size: 26px; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-list li { border-bottom: 1px solid var(--gg-line); padding: 18px 0; }
.comment-list li:last-child { border-bottom: 0; }
.c-head { margin-bottom: 6px; }
.c-body { color: #2b3646; line-height: 1.7; }
.muted { color: var(--gg-muted); }
.sm { font-size: 13.5px; }

.comment-form-wrap { background: #f7f9fc; border: 1px solid var(--gg-line); border-radius: 14px; padding: 28px; }
.comment-form-wrap h3 { font-size: 20px; margin-bottom: 4px; }
.comment-form { margin-top: 16px; }
.comment-form .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--gg-line); border-radius: 9px;
  font-family: inherit; font-size: 15px; margin-bottom: 14px; background: #fff; color: var(--gg-ink);
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--gg-blue-2); box-shadow: 0 0 0 3px rgba(51,102,202,.15); }
.comment-form textarea { resize: vertical; }
.comment-form .lw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.comment-form .alert-ok { background: #e3f5ea; color: #14663a; padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; }
.comment-form .alert-err { background: #fbe6e6; color: #9a2c2c; padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; }
.comment-form .d-none { display: none; }

/* ---------- Buscador y barra de filtros ---------- */
.blog-toolbar { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 34px; }
.blog-toolbar .blog-cats { margin-bottom: 0; }
.blog-search { display: flex; align-items: center; background: #fff; border: 1px solid var(--gg-line); border-radius: 999px; padding: 2px 4px 2px 16px; }
.blog-search:focus-within { border-color: var(--gg-blue-2); box-shadow: 0 0 0 3px rgba(51, 102, 202, .15); }
.blog-search input {
  border: 0; outline: none; background: transparent; font-family: inherit; font-size: 14.5px;
  color: var(--gg-ink); padding: 8px 0; width: 190px;
}
.blog-search button {
  border: 0; background: var(--gg-blue); color: #fff; width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 13px;
}
.blog-search button:hover { background: var(--gg-blue-2); }
.blog-results { text-align: center; color: var(--gg-muted); margin: -14px 0 26px; font-size: 15px; }
.blog-clear { margin-left: 10px; color: var(--gg-blue); font-weight: 600; font-size: 14px; }

/* ---------- Barra de progreso de lectura ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: transparent; z-index: 999; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--gg-blue-2); transition: width .1s linear; }

/* ---------- Tiempo de lectura, compartir y navegación ---------- */
.post-readtime::before { content: '·'; margin-right: 12px; }
.post-share { max-width: 760px; margin: 34px auto 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-share .share-label { font-weight: 700; color: var(--gg-ink); font-size: 14px; margin-right: 4px; }
.post-share a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: #eef2f9; color: var(--gg-blue); transition: all .18s ease;
}
.post-share a:hover { background: var(--gg-blue); color: #fff; text-decoration: none; transform: translateY(-2px); }
.share-copy {
  border: 1px solid var(--gg-line); background: #fff; color: var(--gg-muted); font-family: inherit;
  font-size: 13.5px; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all .18s ease;
}
.share-copy:hover { border-color: var(--gg-blue-2); color: var(--gg-blue); }
.share-copy.is-copied { background: #e3f5ea; border-color: #bfe6cd; color: #14663a; }

.post-nav { max-width: 760px; margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav-item {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 20px;
  border: 1px solid var(--gg-line); border-radius: 12px; background: #fff; transition: all .18s ease;
}
.post-nav-item:hover { border-color: var(--gg-blue-2); text-decoration: none; transform: translateY(-2px); }
.post-nav-item.is-next { text-align: right; }
.post-nav .nav-dir { font-size: 12.5px; font-weight: 700; color: var(--gg-blue); text-transform: uppercase; letter-spacing: .03em; }
.post-nav .nav-title { color: var(--gg-ink); font-weight: 600; font-size: 15px; line-height: 1.35; }

@media (max-width: 640px) {
  .blog-hero { padding: 110px 0 38px; }
  .blog-hero h1 { font-size: 34px; }
  .post-title { font-size: 30px; }
  .post-header { padding: 110px 0 20px; }
  .comment-form .cf-row { grid-template-columns: 1fr; }
  .blog-toolbar { flex-direction: column; gap: 14px; }
  .blog-search input { width: 100%; }
  .blog-search { width: 100%; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.is-next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .post-nav-item:hover, .post-share a:hover { transform: none; }
  .read-progress span { transition: none; }
}
