/* ─── MorgansMedia · Blog · brand styling ─── */
:root {
    --mm-brand: #00AEEF;
    --mm-brand-dark: #008AC5;
    --mm-text: #0F172A;
    --mm-muted: #6b7280;
    --mm-border: rgba(0,0,0,0.08);
    --mm-card: #fff;
    --mm-surface: #f8fafc;
}
.dark {
    --mm-text: #f1f5f9;
    --mm-muted: #94a3b8;
    --mm-border: rgba(255,255,255,0.08);
    --mm-card: #111111;
    --mm-surface: #0a0a0a;
}

/* ─── Eyebrow + breadcrumb ─── */
.eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mm-brand);
}
.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
}
.breadcrumb a { color: inherit; transition: color 0.15s; }
.breadcrumb a:hover { color: #fff; }

/* ─── Category pills ─── */
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--mm-muted);
    background: rgba(0,0,0,0.04);
    border: 1.5px solid transparent;
    transition: all 0.15s;
}
.dark .cat-pill { background: rgba(255,255,255,0.04); }
.cat-pill:hover { color: var(--mm-brand); border-color: rgba(0,174,239,0.35); transform: translateY(-1px); }
.cat-pill.active { background: rgba(0,174,239,0.1); color: var(--mm-brand); border-color: var(--mm-brand); }
.cat-pill .count {
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    background: rgba(0,0,0,0.05);
    border-radius: 999px;
    font-weight: 700;
}
.dark .cat-pill .count { background: rgba(255,255,255,0.06); }

.cat-badge {
    display: inline-flex;
    padding: 0.4rem 0.95rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

/* ─── Featured post (editorial) ─── */
.featured-post {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 3.5rem;
    background: var(--mm-card);
    border: 1px solid var(--mm-border);
    border-radius: 24px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.3s, transform 0.3s;
}
.featured-post:hover {
    border-color: rgba(0,174,239,0.3);
    box-shadow: 0 28px 60px -22px rgba(15,23,42,0.16);
    transform: translateY(-2px);
}
@media (min-width: 900px) {
    .featured-post {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        align-items: stretch;
    }
}

/* Imagen */
.featured-img {
    position: relative;
    display: block;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: rgba(15,23,42,0.04);
}
@media (min-width: 900px) { .featured-img { aspect-ratio: auto; min-height: 100%; } }
.featured-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.featured-post:hover .featured-img img { transform: scale(1.03); }
.featured-badge {
    position: absolute;
    top: 1.25rem; left: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    color: #0F172A;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    box-shadow: 0 6px 18px -6px rgba(15,23,42,0.18);
}
.featured-badge i { color: #F59E0B; }

/* Cuerpo (lado derecho) */
.featured-body {
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    min-width: 0;
}
@media (min-width: 768px)  { .featured-body { padding: 2.5rem 2.5rem 2rem; } }
@media (min-width: 1100px) { .featured-body { padding: 3rem 3rem 2.25rem; gap: 2rem; } }
.featured-body-top { display: flex; flex-direction: column; min-width: 0; }

.featured-eyebrow {
    display: inline-block;
    color: var(--mm-brand);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1rem;
    align-self: flex-start;
    transition: opacity 0.15s;
}
.featured-eyebrow:hover { opacity: 0.7; }

.featured-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--mm-text);
    margin: 0 0 1rem;
    hyphens: auto;
    word-break: break-word;
}
.featured-title a { color: inherit; transition: color 0.15s; }
.featured-title a:hover { color: var(--mm-brand); }

.featured-excerpt {
    color: var(--mm-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Divider */
.featured-divider {
    height: 1px;
    background: var(--mm-border);
    width: 100%;
    margin: 0;
}

/* Footer del featured: autor + CTA */
.featured-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.featured-author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}
.featured-avatar {
    width: 44px; height: 44px;
    border-radius: 999px;
    object-fit: cover;
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    flex-shrink: 0;
}
.featured-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--mm-brand);
    font-size: 1rem;
    background: rgba(0,174,239,0.08);
    border-color: rgba(0,174,239,0.2);
}
.featured-author-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.featured-author-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--mm-text);
    font-size: 0.92rem;
}
.featured-author-meta {
    color: var(--mm-muted);
    font-size: 0.8rem;
}

.featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mm-brand);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: gap 0.2s, color 0.15s;
}
.featured-cta:hover { color: var(--mm-brand-dark); gap: 0.7rem; }

/* Compat: deja el .read-more antiguo por si otra vista lo usa */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: var(--mm-brand);
    font-size: 0.92rem;
}
.read-more:hover { color: var(--mm-brand-dark); gap: 0.6rem; transition: gap 0.2s; }

/* ─── Post grid ─── */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }

.post-card {
    background: var(--mm-card);
    border: 1px solid var(--mm-border);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
}
.post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0,174,239,0.3);
    box-shadow: 0 18px 40px -16px rgba(0,174,239,0.18);
}

.post-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--mm-surface);
}
.post-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mm-muted);
    background: linear-gradient(135deg, rgba(0,174,239,0.05), rgba(37,99,235,0.05));
}

.post-body { padding: 1.5rem 1.65rem; }
.post-body h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0.5rem 0 0.6rem;
    color: var(--mm-text);
}
.post-body h3 a { color: inherit; transition: color 0.15s; }
.post-body h3 a:hover { color: var(--mm-brand); }
.post-body p {
    font-size: 0.88rem;
    color: var(--mm-muted);
    line-height: 1.6;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--mm-muted);
}

/* ─── Empty state ─── */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--mm-card);
    border: 1.5px dashed var(--mm-border);
    border-radius: 18px;
}

/* ─── Pagination ─── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--mm-border);
    gap: 1rem;
    flex-wrap: wrap;
}
.page-prev, .page-next {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.1rem;
    color: var(--mm-text);
    border: 1.5px solid var(--mm-border);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s;
}
.page-prev:hover, .page-next:hover { color: var(--mm-brand); border-color: var(--mm-brand); }
.page-nums { display: flex; gap: 0.4rem; }
.page-num {
    min-width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--mm-muted);
    border: 1.5px solid transparent;
}
.page-num:hover { color: var(--mm-brand); }
.page-num.active { color: var(--mm-brand); border-color: var(--mm-brand); background: rgba(0,174,239,0.05); }

/* ─── Sidebar cards ─── */
.side-card {
    padding: 1.5rem 1.6rem;
    background: var(--mm-card);
    border: 1px solid var(--mm-border);
    border-radius: 16px;
}
.side-card h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 0.7rem;
    color: var(--mm-text);
    letter-spacing: -0.01em;
}
.side-card p {
    font-size: 0.82rem;
    color: var(--mm-muted);
    line-height: 1.55;
    margin-bottom: 0.65rem;
}
.side-card.side-cta {
    background: linear-gradient(135deg, rgba(0,174,239,0.06), rgba(37,99,235,0.04));
    border-color: rgba(0,174,239,0.25);
}

.recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.recent-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--mm-text);
    transition: color 0.15s;
}
.recent-item:hover { color: var(--mm-brand); }
.recent-item img, .recent-thumb-placeholder {
    width: 56px; height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--mm-surface);
}
.recent-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mm-muted);
}
.recent-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}
.recent-meta { font-size: 0.7rem; color: var(--mm-muted); }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.tag-pill {
    display: inline-flex;
    padding: 0.3rem 0.7rem;
    background: rgba(0,174,239,0.08);
    color: var(--mm-brand);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    transition: all 0.12s;
}
.tag-pill:hover { background: var(--mm-brand); color: #fff; }

/* ─── Post page ─── */
.post-hero {
    color: #fff;
    background: #0F172A;
    min-height: 360px;
}
.post-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.post-hero-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.5;
}
.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15,23,42,0.5), rgba(15,23,42,0.95));
}
.post-hero .breadcrumb { color: rgba(255,255,255,0.7); }
.post-hero .breadcrumb a:hover { color: var(--mm-brand); }
.post-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #fff;
    margin: 0 0 1.25rem;
}
.post-excerpt {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.55;
    margin-bottom: 1.75rem;
    max-width: 50rem;
}
.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
}
.post-meta-text strong { display: block; color: #fff; font-weight: 700; }
.post-meta-text span { font-size: 0.78rem; color: rgba(255,255,255,0.7); }

/* ─── Post body layout (TOC + content) ─── */
.post-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 100%;
}
@media (min-width: 1024px) {
    .post-grid-layout { grid-template-columns: 240px 1fr; gap: 4rem; }
}

.post-toc { display: none; }
@media (min-width: 1024px) {
    .post-toc { display: block; }
    .toc-card {
        position: sticky;
        top: 100px;
        padding: 1.5rem;
        background: var(--mm-card);
        border: 1px solid var(--mm-border);
        border-radius: 14px;
    }
    .toc-card hr { border: 0; border-top: 1px solid var(--mm-border); margin: 1.25rem 0 1rem; }
    .toc-card ul { list-style: none; padding: 0; margin: 0.75rem 0 0; }
    .toc-item { margin-bottom: 0.45rem; }
    .toc-item a {
        font-size: 0.82rem;
        color: var(--mm-muted);
        line-height: 1.4;
        transition: color 0.15s;
        display: block;
        padding: 0.2rem 0;
    }
    .toc-item a:hover { color: var(--mm-brand); }
    .toc-h3 { padding-left: 0.85rem; }
    .toc-h3 a { font-size: 0.78rem; }
    .toc-share { display: flex; gap: 0.45rem; margin-top: 0.5rem; }
    .share-btn {
        width: 36px; height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(0,174,239,0.08);
        color: var(--mm-brand);
        border: none;
        cursor: pointer;
        transition: all 0.15s;
    }
    .share-btn:hover { background: var(--mm-brand); color: #fff; }
}

/* ─── Post content typography ─── */
.post-content {
    max-width: 720px;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--mm-text);
}
.post-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 2.5rem 0 1rem;
    scroll-margin-top: 6rem;
}
.post-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.75rem 0 0.7rem;
    color: var(--mm-text);
    scroll-margin-top: 6rem;
}
.post-content h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
    color: var(--mm-text);
}
.post-content p { margin: 0 0 1rem; color: var(--mm-text); }
.post-content strong { color: var(--mm-text); font-weight: 700; }
.post-content a {
    color: var(--mm-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.post-content a:hover { color: var(--mm-brand-dark); }
.post-content ul, .post-content ol {
    padding-left: 1.5rem;
    margin: 0 0 1.25rem;
}
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote {
    border-left: 3px solid var(--mm-brand);
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--mm-text);
    font-style: italic;
    font-size: 1.05rem;
    background: rgba(0,174,239,0.04);
    border-radius: 0 10px 10px 0;
}
.dark .post-content blockquote { background: rgba(0,174,239,0.08); }
.post-content code {
    background: rgba(0,174,239,0.1);
    color: var(--mm-brand);
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85em;
}
.post-content pre {
    background: #0F172A;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
}
.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.75rem 0;
}
.post-content hr {
    border: 0;
    border-top: 1px solid var(--mm-border);
    margin: 2.5rem 0;
}

/* ─── Post tags + share + author + CTA ─── */
.post-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--mm-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.post-tags .eyebrow { margin-right: 0.5rem; }

.post-share-mobile { margin-top: 2rem; }
@media (min-width: 1024px) { .post-share-mobile { display: none; } }
.share-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.7rem; }
.share-row a, .share-row button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.95rem;
    background: rgba(0,174,239,0.08);
    color: var(--mm-brand);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.share-row a:hover, .share-row button:hover { background: var(--mm-brand); color: #fff; }

.author-card {
    margin-top: 3rem;
    padding: 1.75rem;
    background: var(--mm-card);
    border: 1px solid var(--mm-border);
    border-radius: 16px;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.author-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.author-card h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.3rem 0 0.4rem;
    color: var(--mm-text);
}
.author-card p { font-size: 0.85rem; color: var(--mm-muted); margin: 0; line-height: 1.55; }

.post-cta {
    margin-top: 3rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, rgba(0,174,239,0.08), rgba(37,99,235,0.06));
    border: 1px solid rgba(0,174,239,0.25);
    border-radius: 18px;
    text-align: center;
}
.post-cta h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.6rem;
    color: var(--mm-text);
}
.post-cta p {
    color: var(--mm-muted);
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
}
/* El selector .post-content a estaba pintando el botón con color brand sobre fondo brand → invisible.
   Override explícito para los CTAs dentro de .post-cta. */
.post-cta a {
    color: #fff !important;
    text-decoration: none !important;
    text-underline-offset: 0 !important;
}
.post-cta a:hover { color: #fff !important; }

/* ─── Search bar ─── */
.blog-search input { font-family: 'Plus Jakarta Sans', sans-serif; }
