/* ===== Blog shared styles ===== */

:root {
    --blog-max-width: 1100px;
    --article-max-width: 740px;
}

.blog-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.blog-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: var(--blog-max-width);
}

.blog-nav .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 20px;
}

.blog-nav .logo-icon {
    color: var(--color-primary, #6366f1);
}

.blog-nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.blog-nav-links a {
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-nav-links a:hover {
    color: var(--color-text);
}

.blog-nav-links .btn-demo {
    padding: 10px 18px;
    background: var(--gradient-primary, linear-gradient(135deg, #6366f1, #8b5cf6));
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
}

/* Reading progress bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary, linear-gradient(135deg, #6366f1, #8b5cf6));
    z-index: 200;
    transition: width 0.1s ease-out;
    width: 0;
}

/* ===== Blog Hero ===== */
.blog-hero {
    padding: 100px 0 40px;
    background:
        radial-gradient(1000px 400px at 50% -100px, rgba(99, 102, 241, 0.12), transparent),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    text-align: center;
}

.blog-hero .container {
    max-width: 760px;
}

.blog-hero .eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
}

.blog-hero h1 {
    font-size: 52px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #0f172a 0%, #4338ca 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-hero p {
    font-size: 19px;
    color: var(--color-text-secondary);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.55;
}

/* ===== Featured post ===== */
.featured-section {
    padding: 40px 20px 20px;
    max-width: var(--blog-max-width);
    margin: 0 auto;
}

.featured-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #6366f1;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: #6366f1;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.04);
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.1);
}

.featured-card .cover {
    min-height: 340px;
    background-size: cover;
    background-position: center;
}

.featured-card .content {
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-card .meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 16px;
    align-items: center;
}

.featured-card h2 {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.featured-card p {
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    color: #6366f1;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== Categories ===== */
.categories {
    max-width: var(--blog-max-width);
    margin: 40px auto 20px;
    padding: 0 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.category-chip {
    padding: 8px 16px;
    border-radius: 100px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.category-chip:hover,
.category-chip.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

/* ===== Post grid ===== */
.post-list {
    padding: 20px 20px 100px;
    max-width: var(--blog-max-width);
    margin: 0 auto;
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.post-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.post-card .cover {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.post-card .cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.15) 100%);
}

.post-card .body {
    padding: 22px 22px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    align-self: flex-start;
}

.tag.cat-guia { background: rgba(99, 102, 241, 0.08); color: #4f46e5; }
.tag.cat-tecnica { background: rgba(6, 182, 212, 0.1); color: #0891b2; }
.tag.cat-negocio { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.tag.cat-comparativa { background: rgba(168, 85, 247, 0.1); color: #7c3aed; }
.tag.cat-casos { background: rgba(34, 197, 94, 0.1); color: #15803d; }
.tag.cat-seguridad { background: rgba(239, 68, 68, 0.08); color: #b91c1c; }

.post-card h3 {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.post-card p {
    color: var(--color-text-secondary);
    font-size: 14.5px;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 16px;
}

.post-card .meta {
    display: flex;
    gap: 12px;
    font-size: 12.5px;
    color: #94a3b8;
    font-weight: 500;
}

/* ===== Article ===== */
.article {
    padding: 60px 0 40px;
    max-width: var(--article-max-width);
    margin: 0 auto;
}

.article-header {
    margin-bottom: 32px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover { color: #0f172a; }

.article-meta {
    display: flex;
    gap: 14px;
    color: var(--color-text-secondary);
    font-size: 13px;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    align-items: center;
    flex-wrap: wrap;
}

.article-meta .tag { margin-bottom: 0; }

.article h1 {
    font-size: 42px;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.article .lead {
    font-size: 20px;
    line-height: 1.55;
    color: #475569;
    margin-bottom: 32px;
}

.article-cover {
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.article h2 {
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    margin: 52px 0 16px;
    letter-spacing: -0.015em;
    color: #0f172a;
}

.article h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 36px 0 12px;
    color: #0f172a;
}

.article p,
.article ul,
.article ol {
    font-size: 17.5px;
    line-height: 1.75;
    margin-bottom: 20px;
    color: #1f2937;
}

.article ul,
.article ol {
    padding-left: 24px;
}

.article li {
    margin-bottom: 8px;
}

.article strong {
    color: #0f172a;
    font-weight: 700;
}

.article a {
    color: #4f46e5;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(79, 70, 229, 0.3);
    text-underline-offset: 3px;
}

.article a:hover {
    text-decoration-color: #4f46e5;
}

.article code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    font-size: 0.9em;
    color: #be185d;
}

.article blockquote {
    border-left: 4px solid #6366f1;
    padding: 6px 24px;
    margin: 28px 0;
    color: #475569;
    font-style: italic;
    font-size: 18px;
    line-height: 1.6;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.04), transparent);
    border-radius: 0 8px 8px 0;
}

.stat-block {
    margin: 28px 0;
    padding: 24px 28px;
    background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 100%);
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.stat-block .stat {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-block .stat-label {
    font-size: 15px;
    color: #475569;
    margin-bottom: 8px;
}

.stat-block .source {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

.stat-block .source a {
    color: #64748b;
}

.article-cta {
    margin-top: 60px;
    padding: 40px;
    background:
        radial-gradient(400px 200px at 20% 0%, rgba(139, 92, 246, 0.2), transparent),
        linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.article-cta h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #0f172a;
}

.article-cta p {
    margin: 0 0 22px;
    color: #475569;
    font-size: 16px;
}

.article-cta a {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 15.5px;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.article-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

/* ===== Related posts ===== */
.related {
    max-width: var(--blog-max-width);
    margin: 40px auto 100px;
    padding: 0 20px;
}

.related h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 24px;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ===== Share ===== */
.share {
    margin: 40px 0 20px;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.share span {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.share a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 100px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.share a:hover {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

/* ===== Footer ===== */
.blog-footer {
    padding: 40px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    color: #64748b;
    font-size: 14px;
    background: #fafafa;
}

.blog-footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-card .cover {
        min-height: 220px;
    }

    .featured-card .content {
        padding: 28px 24px;
    }

    .featured-card h2 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 0 32px;
    }

    .blog-hero h1 {
        font-size: 34px;
    }

    .blog-hero p {
        font-size: 16px;
    }

    .article {
        padding: 40px 20px 20px;
    }

    .article h1 {
        font-size: 30px;
    }

    .article h2 {
        font-size: 24px;
        margin-top: 40px;
    }

    .article .lead {
        font-size: 17px;
    }

    .article p, .article ul, .article ol {
        font-size: 16.5px;
    }

    .article-cta {
        padding: 28px 20px;
    }

    .stat-block .stat {
        font-size: 28px;
    }
}
