/* ═══════════════════════════════════════════════════════════
   OptiKa el Pueblito — Blog
   ═══════════════════════════════════════════════════════════ */

.blog-hero {
    position: relative;
    padding: 4.5rem 0;
    overflow: hidden;
    isolation: isolate;
}
.blog-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.blog-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(15, 23, 42, 0.9), rgba(23, 37, 84, 0.65));
    z-index: -1;
}
.blog-hero-content h1 {
    font-family: "Sora", sans-serif;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 0;
    font-weight: 800;
}
.blog-hero-content h1 i { color: var(--brand-cyan-soft); margin-right: 0.5rem; }
.blog-hero-content p {
    color: #e0f2fe;
    max-width: 60ch;
    margin-top: 0.8rem;
    font-size: 1.05rem;
}

/* ── Grid de artículos ──────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
.blog-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(30, 58, 138, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.blog-card-img { width: 100%; height: 200px; object-fit: cover; object-position: center 30%; display: block; }
.blog-card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.blog-card-tag {
    align-self: flex-start;
    background: var(--brand-mist);
    color: var(--brand-blue);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.8rem;
}
.blog-card h3 {
    font-family: "Sora", sans-serif;
    font-size: 1.15rem;
    margin: 0 0 0.6rem;
    color: var(--brand-blue-deep);
    line-height: 1.3;
}
.blog-card p { color: var(--text-muted); margin: 0 0 1rem; font-size: 0.92rem; flex: 1; }
.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(30, 58, 138, 0.08);
}
.blog-card-footer i { margin-right: 0.3rem; color: var(--brand-cyan); }
.read-more { color: var(--brand-cyan); font-weight: 700; }

/* ── Artículo individual ────────────────────────────────── */
.article-hero {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
    isolation: isolate;
}
.article-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.article-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(15, 23, 42, 0.9), rgba(23, 37, 84, 0.6));
    z-index: -1;
}
.article-hero-content h1 {
    font-family: "Sora", sans-serif;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin: 0;
    max-width: 24ch;
    font-weight: 800;
    line-height: 1.15;
}
.article-meta {
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem;
    color: #a5f3fc;
    font-size: 0.9rem;
    flex-wrap: wrap;
}
.article-meta i { margin-right: 0.3rem; }

.article-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 0;
    line-height: 1.8;
    color: var(--text);
}
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--brand-cyan);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.back-to-blog:hover { text-decoration: underline; }
.article-content h2 {
    font-family: "Sora", sans-serif;
    font-size: 1.6rem;
    color: var(--brand-blue-deep);
    margin: 2.2rem 0 0.8rem;
    font-weight: 700;
}
.article-content h3 {
    font-family: "Sora", sans-serif;
    font-size: 1.25rem;
    color: var(--brand-blue-deep);
    margin: 1.6rem 0 0.6rem;
}
.article-content p { margin: 0 0 1.1rem; }
.article-content ul, .article-content ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.article-content li { margin: 0.5rem 0; }
.article-content blockquote {
    border-left: 4px solid var(--brand-cyan);
    background: var(--brand-light);
    padding: 1.2rem 1.4rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--brand-slate);
    font-style: italic;
}
.article-cta {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-deep));
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    margin: 2.5rem 0;
    color: #fff;
}
.article-cta h3 {
    font-family: "Sora", sans-serif;
    font-size: 1.4rem;
    margin: 0 0 0.6rem;
    color: #fff;
}
.article-cta p { color: #cbd5e1; margin: 0 0 1.2rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 992px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .article-content { padding: 2rem 0; }
}
