/* ====================================================
   Neomedios Blog — Estilos (heredan paleta del sitio)
   ==================================================== */

:root {
    --c-bg: #ffffff;
    --c-bg-alt: #f5f5f7;
    --c-bg-dark: #1d1d1f;
    --c-text: #1d1d1f;
    --c-text-soft: #424245;
    --c-text-muted: #6e6e73;
    --c-text-light: #86868b;
    --c-border: #d2d2d7;
    --c-border-soft: #e8e8ed;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Charter', 'Iowan Old Style', 'Apple Garamond', Georgia, 'Times New Roman', serif;
    --container: 760px;
    --container-wide: 1180px;
    --radius: 14px;
    --radius-lg: 22px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.55;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Navbar (reutiliza el del sitio) ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--c-border-soft);
}
.nav__inner {
    height: 64px;
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__brand-tag {
    font-size: 13px;
    color: var(--c-text-muted);
    border-left: 1px solid var(--c-border);
    padding-left: 10px;
    margin-left: 4px;
}
.nav__menu {
    display: flex;
    gap: 32px;
    margin-left: auto;
}
.nav__menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text-soft);
    text-decoration: none;
    transition: color .2s var(--ease);
}
.nav__menu a:hover { color: var(--c-text); }
.nav__menu a.is-active { color: var(--c-text); }

/* CTA — idéntico al home */
.nav__cta {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 18px;
    border-radius: 18px;
    background: var(--c-text);
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav__cta:hover { transform: scale(1.03); opacity: .9; }

/* Burger — idéntico al home */
.nav__burger {
    display: none;
    background: transparent;
    border: 0;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
.nav__burger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--c-text);
    transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 640px) {
    .nav__inner { padding: 0 20px; }
    .nav__menu, .nav__cta { display: none; }
    .nav__burger { display: flex; }
    .nav__menu.is-open {
        display: flex;
        position: absolute;
        top: 64px;
        left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        padding: 24px 28px;
        gap: 20px;
        border-bottom: 1px solid var(--c-border-soft);
        z-index: 99;
    }
}

/* ---------- Contenedor principal ---------- */
.wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Hero del blog ---------- */
.blog-hero {
    padding: 80px 0 60px;
    text-align: center;
}
.blog-hero__eyebrow {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 14px;
}
.blog-hero__title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 18px;
}
.blog-hero__sub {
    font-size: 18px;
    color: var(--c-text-muted);
    max-width: 520px;
    margin: 0 auto;
}

/* ---------- Listado de posts ---------- */
.posts {
    list-style: none;
    padding: 0;
    margin: 40px 0 80px;
    display: flex;
    flex-direction: column;
}
.post-card {
    padding: 32px 0;
    border-top: 1px solid var(--c-border-soft);
    transition: padding .2s var(--ease);
}
.post-card:last-child { border-bottom: 1px solid var(--c-border-soft); }
.post-card--has-image {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
}
.post-card__thumb {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: var(--c-bg-alt);
    transition: transform .25s var(--ease);
    overflow: hidden;
}
.post-card__thumb:hover { transform: scale(1.015); }
@media (max-width: 640px) {
    .post-card--has-image { grid-template-columns: 1fr; gap: 16px; }
    .post-card__thumb { aspect-ratio: 16 / 9; }
}
.post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--c-text-muted);
    margin-bottom: 10px;
}
.post-card__meta::before { content: ''; }
.post-card__author {
    font-weight: 500;
    color: var(--c-text-soft);
}
.post-card__title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.25;
}
.post-card__title a {
    color: var(--c-text);
    text-decoration: none;
    transition: color .2s var(--ease);
}
.post-card__title a:hover { color: var(--c-text-soft); }
.post-card__excerpt {
    margin: 0;
    color: var(--c-text-soft);
    font-size: 16px;
    line-height: 1.55;
}
.post-card__read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 14px;
    color: var(--c-text);
    font-weight: 500;
    text-decoration: none;
}

.empty {
    text-align: center;
    padding: 100px 0;
    color: var(--c-text-muted);
}
.empty h2 { color: var(--c-text); }

/* ---------- Post individual ---------- */
.post {
    padding: 70px 0 100px;
}
.post__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--c-text-muted);
    text-decoration: none;
    transition: color .2s var(--ease);
}
.post__back:hover { color: var(--c-text); }
.post__meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    color: var(--c-text-muted);
    margin-bottom: 14px;
}
.post__author { color: var(--c-text-soft); font-weight: 500; }
.post__title {
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 24px;
}
.post__featured {
    margin: 0 0 40px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--c-bg-alt);
}
.post__featured img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post__body {
    font-size: 18px;
    line-height: 1.7;
    color: var(--c-text);
}
.post__body p { margin: 0 0 1.4em; }
.post__body p:last-child { margin-bottom: 0; }

/* Tipografía del contenido enriquecido (TinyMCE output) */
.post__body h2 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 2em 0 0.6em;
    line-height: 1.2;
}
.post__body h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 1.6em 0 0.5em;
    line-height: 1.3;
}
.post__body strong, .post__body b { font-weight: 600; }
.post__body em, .post__body i { font-style: italic; }
.post__body a {
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    transition: border-color .2s var(--ease);
}
.post__body a:hover { border-color: var(--c-text); }
.post__body ul, .post__body ol {
    padding-left: 1.5em;
    margin: 0 0 1.4em;
}
.post__body li { margin-bottom: 0.5em; }
.post__body blockquote {
    margin: 1.5em 0;
    padding: 6px 0 6px 24px;
    border-left: 4px solid var(--c-border);
    color: var(--c-text-soft);
    font-style: italic;
    font-size: 1.05em;
}
.post__body pre {
    background: var(--c-bg-alt);
    padding: 18px 22px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14.5px;
    line-height: 1.55;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    margin: 1.5em 0;
}
.post__body code {
    background: var(--c-bg-alt);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.92em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.post__body pre code { background: transparent; padding: 0; }
.post__body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5em 0;
    display: block;
}
/* Imagen centrada cuando el <p>/<div> que la contiene tiene text-align:center */
.post__body p[style*="text-align: center"],
.post__body p[style*="text-align:center"],
.post__body div[style*="text-align: center"],
.post__body div[style*="text-align:center"],
.post__body figure[style*="text-align: center"],
.post__body figure[style*="text-align:center"] {
    text-align: center;
}
.post__body p[style*="text-align: center"] img,
.post__body p[style*="text-align:center"] img,
.post__body div[style*="text-align: center"] img,
.post__body div[style*="text-align:center"] img,
.post__body figure[style*="text-align: center"] img,
.post__body figure[style*="text-align:center"] img {
    margin-left: auto;
    margin-right: auto;
}
/* Soporte para <img align="center"> y para <img style="margin:0 auto"> */
.post__body img[align="center"],
.post__body img[style*="margin: 0 auto"],
.post__body img[style*="margin:0 auto"],
.post__body img[style*="margin-left: auto"] {
    margin-left: auto;
    margin-right: auto;
}
/* Alineación izquierda/derecha (flotada) para imágenes */
.post__body p[style*="text-align: right"],
.post__body p[style*="text-align:right"] { text-align: right; }
.post__body p[style*="text-align: right"] img,
.post__body p[style*="text-align:right"] img {
    margin-left: auto;
    margin-right: 0;
}
.post__body figure { margin: 1.5em 0; }
.post__body figcaption {
    text-align: center;
    color: var(--c-text-muted);
    font-size: 14px;
    margin-top: 0.6em;
}
.post__body hr {
    border: 0;
    border-top: 1px solid var(--c-border-soft);
    margin: 2.5em 0;
}
.post__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 15.5px;
}
.post__body th, .post__body td {
    border-bottom: 1px solid var(--c-border-soft);
    padding: 10px 12px;
    text-align: left;
}
.post__body th { font-weight: 600; background: var(--c-bg-alt); }

/* ---------- Footer ---------- */
.footer-mini {
    background: var(--c-bg-dark);
    color: #86868b;
    padding: 40px 0;
    text-align: center;
    font-size: 13px;
}
.footer-mini a { color: #d2d2d7; text-decoration: none; }
.footer-mini a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .blog-hero { padding: 50px 0 40px; }
    .post-card { padding: 24px 0; }
    .post-card__title { font-size: 22px; }
    .post { padding: 40px 0 70px; }
    .post__body { font-size: 17px; }
    .nav__menu { gap: 18px; }
    .nav__brand-tag { display: none; }
}
