/*
Theme Name: PrensaBot Blog
Theme URI: https://prensabot.com/
Author: PrensaBot
Description: Tema editorial ligero para el blog oficial de PrensaBot. Sin framework ni plugins obligatorios.
Version: 1.3.0
Text Domain: prensabot-blog
*/

:root {
    --pb-ink: #0f172a;
    --pb-muted: #64748b;
    --pb-navy: #0b2447;
    --pb-blue: #4f46e5;
    --pb-sky: #0284c7;
    --pb-cyan: #06b6d4;
    --pb-bg: #f8fafc;
    --pb-card: #ffffff;
    --pb-line: #dfe7f1;
    --pb-radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--pb-ink);
    background: var(--pb-bg);
    font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
}
a { color: var(--pb-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pb-sky); }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wrap { width: min(1280px, calc(100% - 40px)); margin-inline: auto; }

.site-header { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--pb-line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--pb-ink); font-weight: 700; letter-spacing: -.03em; text-decoration: none; font-size: 1.12rem; }
.brand img { width: 32px; height: 32px; border-radius: 10px; }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 24px; margin: 0; padding: 0; }
.main-nav a { color: #334155; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.main-nav a:hover { color: #4f46e5; }
.header-actions { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.header-cta, .header-login { display: inline-flex; align-items: center; justify-content: center; min-height: 2.4rem; border: 1px solid transparent; border-radius: .85rem; padding: 8px 15px; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none !important; transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.header-cta { color: white !important; background: linear-gradient(145deg, #6366f1 0%, #4f46e5 100%); box-shadow: 0 8px 20px rgba(99,102,241,.25); }
.header-cta:hover { color: white !important; background: linear-gradient(145deg, #7174f8 0%, #5850eb 100%); transform: translateY(-1px); }
.header-login { color: #334155 !important; border-color: #cbd5e1; background: white; }
.header-login:hover { color: #4f46e5 !important; border-color: #a5b4fc; background: #eef2ff; transform: translateY(-1px); }

.hero { padding: 42px 0 28px; }
.hero-card { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr); align-items: center; gap: 22px; padding: clamp(22px, 3vw, 32px) clamp(24px, 4vw, 44px); color: white; border-radius: 26px; background: linear-gradient(135deg, #06172e 0%, var(--pb-navy) 48%, #194f94 100%); box-shadow: 0 20px 50px rgba(11,36,71,.16); }
.hero-card::after { content: ""; position: absolute; width: 320px; height: 320px; right: -100px; bottom: -160px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 30px rgba(255,255,255,.03), 0 0 0 60px rgba(255,255,255,.02); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 13px; color: #a5f3fc; font-size: .74rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { max-width: 620px; margin: 0; font-family: inherit; font-size: clamp(1.75rem, 3.5vw, 2.8rem); font-weight: 600; line-height: 1.08; letter-spacing: -.04em; }
.hero p { max-width: 620px; margin: 12px 0 0; color: #dbeafe; font-size: .94rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 17px; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 176px; }
.hero-visual-card { position: relative; z-index: 1; display: grid; justify-items: center; gap: 7px; width: min(100%, 270px); padding: 20px 18px; border: 1px solid rgba(255,255,255,.24); border-radius: 20px; background: rgba(255,255,255,.1); box-shadow: 0 18px 35px rgba(3,15,36,.2); backdrop-filter: blur(8px); text-align: center; }
.hero-visual-card img { width: 58px; height: 58px; border-radius: 17px; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.hero-visual-card strong { color: white; font-size: 1.05rem; letter-spacing: -.02em; }
.hero-visual-card > span { color: #dbeafe; font-size: .72rem; }
.hero-flow { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; margin-top: 7px; color: #cffafe; font-size: .54rem; font-weight: 800; letter-spacing: .08em; }
.hero-flow i { color: #a5f3fc; font-size: .75rem; font-style: normal; }
.hero-visual-orbit { position: absolute; border: 1px solid rgba(165,243,252,.18); border-radius: 50%; }
.hero-visual-orbit-one { width: 220px; height: 220px; }
.hero-visual-orbit-two { width: 300px; height: 300px; opacity: .55; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 10px 17px; border: 1px solid transparent; border-radius: .85rem; background: #0f274a; color: white; font-size: .84rem; font-weight: 600; text-decoration: none; box-shadow: 0 4px 14px rgba(15,39,74,.15); transition: all 160ms ease; }
.button:hover { color: white; background: #173b70; transform: translateY(-1px); }
.button-light { background: white; color: var(--pb-navy); }
.button-light:hover { color: var(--pb-navy); background: #f1f5f9; }
.button-accent { background: linear-gradient(145deg, #6366f1 0%, #4f46e5 100%); box-shadow: 0 8px 20px rgba(99,102,241,.25); }
.button-accent:hover { color: white; background: linear-gradient(145deg, #7174f8 0%, #5850eb 100%); box-shadow: 0 10px 24px rgba(99,102,241,.35); }

.section { padding: 25px 0 72px; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 34px; align-items: start; }
.home-main { min-width: 0; }
.home-main .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-main .pagination { justify-content: center; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-family: inherit; font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 600; line-height: 1.1; letter-spacing: -.035em; }
.section-heading p { max-width: 550px; margin: 7px 0 0; color: var(--pb-muted); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; min-height: 100%; border: 1px solid var(--pb-line); border-radius: var(--pb-radius); background: var(--pb-card); box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.post-card-media { aspect-ratio: 16 / 9; display: grid; place-items: center; background: linear-gradient(135deg, #dbeafe, #eef2ff); color: var(--pb-blue); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 13px; margin-bottom: 11px; color: var(--pb-muted); font-size: .76rem; font-weight: 750; }
.post-card .post-meta { display: block; }
.post-card .post-meta > span { display: block; }
.post-card .post-meta .category-pill { margin-top: 6px; }
.category-pill { color: var(--pb-sky); text-transform: uppercase; letter-spacing: .06em; }
.post-card h3 { margin: 0; font-family: inherit; font-size: 1.45rem; font-weight: 600; line-height: 1.18; letter-spacing: -.025em; }
.post-card h3 a { color: var(--pb-ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--pb-blue); }
.post-card-excerpt { margin: 12px 0 20px; color: var(--pb-muted); font-size: .94rem; }
.read-more { margin-top: auto; font-size: .88rem; font-weight: 850; text-decoration: none; }

.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.pipeline-step { padding: 18px; border: 1px solid var(--pb-line); border-radius: 16px; background: white; }
.pipeline-step strong { display: block; margin: 9px 0 3px; }
.pipeline-step span { color: var(--pb-muted); font-size: .82rem; }
.pipeline-step:nth-child(1) { border-top: 3px solid var(--pb-sky); }
.pipeline-step:nth-child(2) { border-top: 3px solid #9333ea; }
.pipeline-step:nth-child(3) { border-top: 3px solid #f59e0b; }
.pipeline-step:nth-child(4) { border-top: 3px solid #10b981; }

.archive-header { padding: 58px 0 30px; }
.archive-header h1, .article-header h1 { max-width: 850px; margin: 0; font-family: inherit; font-size: clamp(2.4rem, 6vw, 4.3rem); font-weight: 600; line-height: 1.08; letter-spacing: -.045em; }
.article-header h1 { max-width: none; font-size: clamp(2.3rem, 5.5vw, 4.1rem); font-weight: 600; letter-spacing: -.04em; }
.archive-header p { max-width: 650px; color: var(--pb-muted); font-size: 1.08rem; }
.archive-grid { padding-bottom: 72px; }
.pagination { display: flex; gap: 8px; margin-top: 30px; }
.pagination .page-numbers { padding: 8px 13px; border: 1px solid var(--pb-line); border-radius: 10px; background: white; text-decoration: none; }
.pagination .current { color: white; background: var(--pb-blue); border-color: var(--pb-blue); }

.article-header { padding: 65px 0 30px; }
.article-header .post-meta { margin-top: 22px; }
.article-lead { max-width: none; margin: 19px 0 0; color: var(--pb-muted); font-size: 1.2rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 52px; padding-bottom: 80px; }
.article-content { min-width: 0; padding: 30px clamp(20px, 4vw, 48px); border: 1px solid var(--pb-line); border-radius: var(--pb-radius); background: white; box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.article-content > :first-child { margin-top: 0; }
.article-content h2, .article-content h3 { margin-top: 2em; font-family: inherit; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
.article-content h2 { font-size: 1.9rem; }
.article-content h3 { font-size: 1.4rem; }
.article-content blockquote { margin: 26px 0; padding: 5px 24px; border-left: 4px solid var(--pb-sky); color: #334155; font-size: 1.05rem; }
.article-content pre { overflow-x: auto; padding: 18px; border-radius: 12px; background: #0f172a; color: #e2e8f0; }
.article-content code { padding: 2px 5px; border-radius: 5px; background: #eef2ff; }
.article-content pre code { padding: 0; background: transparent; }
.article-content img { border-radius: 14px; }
.article-sidebar { align-self: start; position: sticky; top: 102px; display: grid; gap: 14px; }
.sidebar-block { padding: 20px; border: 1px solid var(--pb-line); border-radius: 16px; background: white; }
.sidebar-intro { border-top: 3px solid var(--pb-cyan); }
.sidebar-kicker { margin: 0 0 10px !important; color: var(--pb-sky) !important; font-size: .72rem !important; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.article-sidebar h2 { margin: 0 0 12px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.article-sidebar p { margin: 0; color: var(--pb-muted); font-size: .9rem; }
.sidebar-link { display: inline-block; margin-top: 16px; font-weight: 800; }
.article-sidebar .search-form { display: block; margin: 0; }
.article-sidebar .search-form label { display: block; }
.article-sidebar .search-field { min-height: 40px; font-size: .86rem; }
.article-sidebar .search-submit { width: 100%; min-height: 40px; margin-top: 8px; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--pb-blue); color: white; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.article-sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar-post-list { display: grid; gap: 13px; }
.sidebar-post-list li { padding-bottom: 13px; border-bottom: 1px solid var(--pb-line); }
.sidebar-post-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.sidebar-post-list a { display: block; color: var(--pb-ink); font-size: .88rem; font-weight: 700; line-height: 1.35; text-decoration: none; }
.sidebar-post-list a:hover { color: var(--pb-blue); }
.sidebar-post-list time { display: block; margin-top: 4px; color: var(--pb-muted); font-size: .72rem; }
.sidebar-category-list { display: grid; gap: 7px; }
.sidebar-category-list li { font-size: .84rem; }
.sidebar-category-list a { text-decoration: none; }
.sidebar-category-list .count { color: var(--pb-muted); }
.sidebar-cta { background: linear-gradient(145deg, #eef2ff, #ecfeff); }
.post-navigation { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 30px; }
.post-navigation-item { display: block; min-width: 0; }
.post-navigation a { display: block; min-width: 0; overflow-wrap: anywhere; padding: 14px; border: 1px solid var(--pb-line); border-radius: 12px; background: #f8fafc; text-decoration: none; }
.post-navigation .next { text-align: right; }

#comments, #respond { margin-top: 42px; padding-top: 30px; border-top: 1px solid var(--pb-line); }
.post-navigation + #respond { margin-top: 64px; }
#reply-title, .comments-title { margin: 0 0 18px; font-family: inherit; font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -.03em; }
.comment-notes, .logged-in-as { margin: 0 0 22px; color: var(--pb-muted); font-size: .92rem; }
.comment-notes a, .logged-in-as a { color: var(--pb-blue); }
.comment-form { display: grid; gap: 16px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; margin-bottom: 7px; color: var(--pb-ink); font-size: .88rem; font-weight: 600; }
.comment-form .required { color: #4f46e5; }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; color: var(--pb-ink); font: inherit; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.comment-form textarea { min-height: 165px; resize: vertical; }
.comment-form textarea:focus, .comment-form input:focus { outline: none; border-color: #818cf8; background: white; box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 9px; color: var(--pb-muted); font-size: .88rem; }
.comment-form-cookies-consent input { flex: 0 0 auto; margin-top: 4px; accent-color: #4f46e5; }
.comment-form-cookies-consent label { margin: 0; color: var(--pb-muted); font-size: .88rem; font-weight: 400; }
.form-submit { margin-top: 2px !important; }
.form-submit input[type="submit"] { min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: .85rem; background: linear-gradient(145deg, #6366f1 0%, #4f46e5 100%); color: white; font: inherit; font-size: .84rem; font-weight: 600; letter-spacing: .02em; cursor: pointer; box-shadow: 0 8px 20px rgba(99,102,241,.22); transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.form-submit input[type="submit"]:hover { background: linear-gradient(145deg, #7174f8 0%, #5850eb 100%); box-shadow: 0 10px 24px rgba(99,102,241,.3); transform: translateY(-1px); }
.comment-list { margin: 28px 0 0; padding: 0; list-style: none; }
.comment-list .comment { padding: 18px 0; border-top: 1px solid var(--pb-line); }
.comment-list .comment-body p { margin: 10px 0 0; }
.comment-list .comment-meta { color: var(--pb-muted); font-size: .82rem; }
.comment-list .comment-author { font-weight: 600; }
.comment-list .reply { margin-top: 10px; font-size: .86rem; font-weight: 600; }

.site-footer { padding: 30px 0; border-top: 1px solid var(--pb-line); background: white; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; color: var(--pb-muted); font-size: .84rem; }
.footer-inner p { margin: 0; }
.footer-inner strong { color: var(--pb-ink); }
.search-form { display: flex; gap: 8px; max-width: 560px; margin-top: 24px; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--pb-line); border-radius: 10px; background: white; font: inherit; }

@media (max-width: 800px) {
    .header-inner { align-items: flex-start; padding: 15px 0; flex-direction: column; gap: 12px; }
    .main-nav ul { gap: 13px; }
    .header-actions { display: none; }
    .post-grid, .pipeline { grid-template-columns: 1fr 1fr; }
    .home-layout, .article-layout { grid-template-columns: 1fr; gap: 20px; }
    .hero-card { grid-template-columns: 1fr; }
    .hero-visual { min-height: 145px; }
    .article-sidebar { position: static; }
}
@media (max-width: 560px) {
    .wrap { width: min(100% - 28px, 1120px); }
    .hero { padding-top: 24px; }
    .hero-card { padding: 24px 20px; border-radius: 22px; }
    .hero-visual-card { padding: 15px; }
    .post-grid, .pipeline, .post-navigation { grid-template-columns: 1fr; }
    .section-heading, .footer-inner { align-items: flex-start; flex-direction: column; }
    .article-header { padding-top: 38px; }
    .article-content { padding: 24px 18px; }
}
